Magento – remove total excl tax in checkout, order invoice emails in magento2

checkout-summarymagento2order-summaryshopping-carttax

In Store > Configuration > Shopping Cart Display Settings I set next configuration: enter image description here

But in checkout and cart, order total incl. and excl. tax both are displayed.

enter image description here

How I can remove total exclude tax from checkout page and order invoice emails?

Best Answer

Changing the below store configuration will solve this.

enter image description here

Which renders the totals as below

enter image description here

./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