From 28b87430c0e834daf906a349dacee39df9f7ef02 Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 24 Jul 2018 15:48:52 +0630 Subject: [PATCH] check waste and spiol btn show hide --- app/views/origami/payments/show.html.erb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index fec0adda..6cb85113 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -401,26 +401,34 @@ <% if current_login_employee.role == "cashier" %> - <% if @other_payment <= 0 && @sale_payment.nil? %> + <% if @other_payment < 0 && @sale_payment.nil? %> <%if @sale_data.total_discount == 0 %> FOC <% end %> <%end %> <% if @sale_payment.nil? %> Void - Waste - Spoile + <% if @other_payment < 0 %> + <%if @sale_data.total_discount == 0 %> + Waste + Spoile + <% end %> + <% end %> <% end %> <% else %> - <% if @other_payment <= 0 && @sale_payment.nil?%> + <% if @other_payment < 0 && @sale_payment.nil?%> <%if @sale_data.total_discount == 0 %> - + <% if @other_payment < 0 %> + <%if @sale_data.total_discount == 0 %> + + + <% end %> + <% end %> <% end %> <% end %>