0

TAX settings in the system Tax settings: there is a 5% tax for the product and 25% tax for the shipping configured in the system.

Emails and invoices are set to display with both Included and Excluded taxes, and with full tax summary. Subtotal is not displaying neither on cart, nor emails nor invoices.

There is a fixed amount coupon created for the whole cart with the amount of 30.

Description of the problem When someone activates a coupon on the cart, and finishes order, he gets totals like it is shown below:

Subtotal (Excl.Tax) 180,00
Subtotal (Incl.Tax) 189,00
Shipping & Handling (Excl.Tax) 20,00
Shipping & Handling (Incl.Tax) 25,00
Discount (pl9432) -30,00
Tax on product (5%) 7,57
Tax on shipping and handling (25%) 5,00
Tax total: 12,57

So actually, all fields are displayed correctly besides there should be one more field Subtotal (with discount applied), and in this case the amount should be 151.43 (159 * 1,05). We need to add this subtotal with discount applied to emails and PDF invoices.

Every help is welcomed.

1 Answer 1

1

For subtotal with discount applied try this:

Tax include:

$subtotal = $item->getRowTotal() + $item->getTaxAmount() + $item->getHiddenTaxAmount()
    - $item->getDiscountAmount(); 

Tax Excluded:

    $subtotal = $item->getRowTotal() - $item->getDiscountAmount(); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.