duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/simple-commerce
Other
143 stars 34 forks source link

[7.x] Fix `{{ sc:cart:shipping_total_with_tax }}` tag when tax rate has "Price includes tax" enabled #1095

Closed duncanmcclean closed 4 weeks ago

duncanmcclean commented 4 weeks ago

This pull request fixes an issue with the {{ sc:cart:shipping_total_with_tax }} tag when the shipping tax rate has the "Price includes tax" toggle enabled.

Previous to this fix, both shipping_total and shipping_total_with_tax were returning the shipping total amount excluding tax.

This was happening because the raw shipping_total value has tax deducted from it in the ShippingTaxCalculator, and in the shippingTotalWithTax method we were presuming it would include tax when the price includes tax setting was enabled.

Related: #1065

github-actions[bot] commented 4 weeks ago

Released as part of v7.3.0.