From 682722bf9e0c82478a1557db2b0295574205312f Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 24 Jul 2018 13:27:10 +0630 Subject: [PATCH] check discount cannot give FOC --- app/views/origami/payments/show.html.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index 6dd177d1..fec0adda 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -402,7 +402,9 @@ <% if current_login_employee.role == "cashier" %> <% if @other_payment <= 0 && @sale_payment.nil? %> - FOC + <%if @sale_data.total_discount == 0 %> + FOC + <% end %> <%end %> <% if @sale_payment.nil? %> Void @@ -410,8 +412,10 @@ Spoile <% end %> <% else %> - <% if @other_payment <= 0 && @sale_payment.nil?%> -