mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Handling tax categories without tax rates
This commit is contained in:
@@ -39,7 +39,7 @@ module OpenFoodNetwork
|
||||
|
||||
def gst(variant)
|
||||
tax_category = variant.product.tax_category
|
||||
if tax_category
|
||||
if tax_category && tax_category.tax_rates.present?
|
||||
tax_rate = tax_category.tax_rates.first
|
||||
line_item = mock_line_item(variant, tax_category)
|
||||
tax_rate.calculator.compute line_item
|
||||
|
||||
Reference in New Issue
Block a user