Don't apply tax calculations if there's no tax

This commit is contained in:
Matt-Yorkley
2023-06-02 14:33:51 +01:00
parent 9e5061fc31
commit 47b5a3fb1d

View File

@@ -19,8 +19,10 @@ class VoucherAdjustmentsService
# For now we just assume it is either all tax included in price or all tax excluded from price.
if order.additional_tax_total.positive?
handle_tax_excluded_from_price(order, amount)
else
elsif order.included_tax_total.positive?
handle_tax_included_in_price(order, amount)
else
adjustment.amount = amount
end
# Move to closed state