From 6c92fdf16731f793377bcbc10c643fc162b35bc6 Mon Sep 17 00:00:00 2001 From: jtruong2 Date: Mon, 12 Feb 2018 15:48:06 +0100 Subject: [PATCH] fixes issue if admin and handling == 0 then do not render row --- app/views/spree/orders/_form.html.haml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/spree/orders/_form.html.haml b/app/views/spree/orders/_form.html.haml index 9813ff8642..2d25df71e2 100644 --- a/app/views/spree/orders/_form.html.haml +++ b/app/views/spree/orders/_form.html.haml @@ -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