Skip to content
Permalink
Browse files

Merge pull request #2428 from ekylibre/debugproduct-nature-variants-c…

…ontroller

[Exception] product_nature_variants#detail (NoMethodError) undefined …
  • Loading branch information...
Aquaj committed Mar 14, 2019
2 parents c5e13f2 + 3c5384e commit c9035772bac331ec426d20c1020c83cac6f10e1b
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/controllers/backend/product_nature_variants_controller.rb
@@ -183,7 +183,7 @@ def detail
infos[:unit][:amount] = item.unit_amount
# or get tax and amount from catalog
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][:amount] = item.amount
else
@@ -219,3 +219,4 @@ def detail
end
end
end

0 comments on commit c903577

Please sign in to comment.
You can’t perform that action at this time.