fixes issue if admin and handling == 0 then do not render row

This commit is contained in:
jtruong2
2018-02-12 15:48:06 +01:00
committed by Maxime Lalisse
parent 23d36e3898
commit 6c92fdf167

View File

@@ -35,13 +35,13 @@
%td.text-right
%span.order-total.item-total= display_checkout_subtotal(@order)
%td
%tr
%td.text-right{colspan:"3"}
= t :orders_form_admin
%td.text-right
%span.order-total.distribution-total= display_checkout_admin_and_handling_adjustments_total_for(@order)
%td
-if display_checkout_admin_and_handling_adjustments_total_for(@order) != Spree::Money.new(0 , currency: @order.currency)
%tr
%td.text-right{colspan:"3"}
= t :orders_form_admin
%td.text-right
%span.order-total.distribution-total= display_checkout_admin_and_handling_adjustments_total_for(@order)
%td
- checkout_adjustments_for(@order, exclude: [:line_item, :admin_and_handling]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment|
%tr.order-adjustment