Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: Sales Tax Calculated Before Discount?

  1. #1
    kdatasystems is offline Junior Member
    Join Date
    Apr 2008
    Posts
    19

    Unhappy Sales Tax Calculated Before Discount?

    Hi,

    I am currently using ASPDNSF Multi-Store 9.1.0.1 and found that sales tax is being calculated on the shopping cart subtotal prior to any discount. As an example, if a customer was to purchase a $100 item and use a 50% off coupon, the customer would still pay sales tax on the initial $100 and not the total after the coupon (i.e. $50). Is there an AppConfig value to change this calculation or does anyone know how to correct this behavior?

    Thank you in advance!

  2. #2
    kdatasystems is offline Junior Member
    Join Date
    Apr 2008
    Posts
    19

    Default

    After reviewing the ASPDNSF ML 9.1.0.1 source code, I may have discovered the root of the problem. Line 571 of Prices.cs (Part of ASPDotNetStorefrontCore) contains an "if" statement checking the coupon type and the condition is filtering for product coupons (CouponTypeEnum.ProductCoupon). The following Line 572, then calls the GetOrderCouponDiscount to calculate the total to be taxed. If the logic is calling the GetOrderCouponDiscount method, wouldn't we want to filter for order coupons (CouponTypeEnum.OrderCoupon) and not product coupons?

    Line 571 and 572 are as follows:

    if (coupon != null && (coupon.CouponType == CouponTypeEnum.ProductCoupon || coupon.DiscountPercent > 0))
    lineItemTotal = GetOrderCouponDiscount(lineItemTotal, lineItemTotal, coupon, ThisCustomer);



    Can any ASPDNSF development team members confirm or shine some light on this?

    Thank you.