Skip to content

Commit

Permalink
Merge pull request #140 from ketangarala/Issues/Issue-110
Browse files Browse the repository at this point in the history
Issues/issue 110
  • Loading branch information
Will Strohl authored Jul 16, 2018
2 parents 9c4c4d9 + bb3f996 commit 3fbd36e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Libraries/Hotcakes.Commerce/Orders/OrderCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ private void CalculateTaxes(Order order)

private void TaxOrder(Order order)
{
TaxItems(order.ItemsAsITaxable(), order.BillingAddress, order.ShippingAddress, order.TotalOrderDiscounts);
TaxItems(order.ItemsAsITaxable(), order.BillingAddress, order.ShippingAddress, order.TotalOrderDiscounts,order.UserID);

var isTaxRateSame = true;
decimal taxRate = -1;
Expand Down Expand Up @@ -586,7 +586,7 @@ private void TaxOrder(Order order)
order.TotalTax = order.ItemsTax + order.ShippingTax;
}

private void TaxItems(List<ITaxable> items, IAddress billingAddress, IAddress shippingAddress,decimal totalOrderDiscounts)
private void TaxItems(List<ITaxable> items, IAddress billingAddress, IAddress shippingAddress,decimal totalOrderDiscounts,string userId)
{
var applyVATRules = _app.CurrentStore.Settings.ApplyVATRules;
decimal discount = 0;
Expand Down Expand Up @@ -622,7 +622,7 @@ private void TaxItems(List<ITaxable> items, IAddress billingAddress, IAddress sh

if (tax != null)
{
var user = _app.CurrentCustomer;
var user = _app.MembershipServices.Customers.Find(userId);
var taxExemptUser = user != null ? user.TaxExempt : false;

if (!taxExemptUser)
Expand Down

0 comments on commit 3fbd36e

Please sign in to comment.