check payment amount > 0

This commit is contained in:
phyusin
2018-07-20 13:55:27 +06:30
parent 5c75a99e41
commit 85d74abf46
2 changed files with 28 additions and 24 deletions

View File

@@ -130,22 +130,24 @@
<% sale_payments = SalePayment.get_sale_payments(result) %>
<% if sale_payments.length > 0%>
<% sale_payments.each do |rec| %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment <%= rec.payment_method.upcase %></td>
<td><%= rec.payment_amount %> ( <%= rec.payment_status %> )</td>
<td>&nbsp;</td>
</tr>
<% if !rec.payment_reference.nil? %>
<%if rec.payment_amount.to_f > 0 %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment Ref.</td>
<td><%= rec.payment_reference %></td>
<td>Payment <%= rec.payment_method.upcase %></td>
<td><%= rec.payment_amount %> ( <%= rec.payment_status %> )</td>
<td>&nbsp;</td>
</tr>
</tr>
<% if !rec.payment_reference.nil? %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment Ref.</td>
<td><%= rec.payment_reference %></td>
<td>&nbsp;</td>
</tr>
<% end %>
<% end %>
<% end %>
<% if result.amount_changed != 0 && !result.amount_changed.nil? %>