Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add missing quantize method on checkout in Avatax plugin

Damian W5aee7e2b50ac
diff --git a/saleor/plugins/avatax/plugin.py b/saleor/plugins/avatax/plugin.py
index f801cd391e..29828d1553 100644
--- a/saleor/plugins/avatax/plugin.py
+++ b/saleor/plugins/avatax/plugin.py
@@ -139,8 +139,9 @@ class AvataxPlugin(BasePlugin):
voucher_value = checkout.discount
if voucher_value:
total -= voucher_value
- total = max(total, zero_taxed_money(total.currency))
- return quantize_price(total, total.currency)
+ return quantize_price(
+ max(total, zero_taxed_money(total.currency)), total.currency
+ )
def _calculate_checkout_subtotal(
self, currency: str, lines: List[Dict]