Skip to content

Commit

Permalink
Merge pull request #2428 from ekylibre/debugproduct-nature-variants-c…
Browse files Browse the repository at this point in the history
…ontroller

[Exception] product_nature_variants#detail (NoMethodError) undefined …
  • Loading branch information
Aquaj committed Mar 14, 2019
2 parents c5e13f2 + 3c5384e commit c903577
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -183,7 +183,7 @@ def detail
infos[:unit][:amount] = item.unit_amount infos[:unit][:amount] = item.unit_amount
# or get tax and amount from catalog # or get tax and amount from catalog
elsif (items = @product_nature_variant.catalog_items.of_usage(:purchase)) && items.any? elsif (items = @product_nature_variant.catalog_items.of_usage(:purchase)) && items.any?
if item.all_taxes_included if item && item.all_taxes_included
infos[:unit][:pretax_amount] = item.reference_tax.pretax_amount_of(item.amount) infos[:unit][:pretax_amount] = item.reference_tax.pretax_amount_of(item.amount)
infos[:unit][:amount] = item.amount infos[:unit][:amount] = item.amount
else else
Expand Down Expand Up @@ -219,3 +219,4 @@ def detail
end end
end end
end end

0 comments on commit c903577

Please sign in to comment.