In Store > Configuration > Shopping Cart Display Settings I set next configuration:
But in checkout and cart, order total incl. and excl. tax both are displayed.
How I can remove total exclude tax from checkout page and order invoice emails?
In Store > Configuration > Shopping Cart Display Settings I set next configuration:
But in checkout and cart, order total incl. and excl. tax both are displayed.
How I can remove total exclude tax from checkout page and order invoice emails?
Changing the below store configuration will solve this.
Which renders the totals as below
./vendor/magento/module-tax/view/frontend/templates/checkout/grandtotal.phtml
In this file, the totals INCL and EXCL both loaded only when this condition is satisfied.
<?php if ($block->includeTax() && $block->getTotalExclTax() >= 0):?>
And the includeTax() method check the above-described store configuration value. Switch this "Include Tax in Order Total" to NO in both
Store > Configuration > Tax > Shopping Cart Display Settings = NO
Store > Configuration > Tax > Orders, Invoices, Credit Memos Display Settings = NO
in the checkout cart tax total template, both are included if you choose to display incl. tax (had the same problem).
You have to override the html template file for the grand total in:
your-theme/Magento_Tax/web/template/checkout/cart/totals/grand-total.html
inside the original file https://github.com/magento/magento2/blob/develop/app/code/Magento/Tax/view/frontend/web/template/checkout/cart/totals/grand-total.html#L16, there is a knockout js if condition isTaxDisplayedInGrandTotal
just remove the second tr output (class="grand totals excl")