update receipt no detail report

This commit is contained in:
Thein Lin Kyaw
2020-01-03 16:43:05 +06:30
parent b3eead7aa2
commit 8b5478cf27
2 changed files with 54 additions and 53 deletions

View File

@@ -136,23 +136,24 @@
<% sale_payments = result.sale_payments %> <% sale_payments = result.sale_payments %>
<% if sale_payments.length > 0%> <% if sale_payments.length > 0%>
<% sale_payments.each do |rec| %> <% sale_payments.each do |rec| %>
<% next if rec.payment_method == 'credit_note' && result.payments_for_credits_amount < rec.payment_amount %> <% if rec.payment_amount > 0 %>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>Payment <%= rec.payment_method.upcase %></td>
<td><%= number_format(rec.payment_amount, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) %> ( <%= rec.payment_status %> )</td>
<td>&nbsp;</td>
</tr>
<% if !rec.payment_reference.nil? %>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>Payment Ref.</td> <td>Payment <%= rec.payment_method.upcase %></td>
<td><%= rec.payment_reference %></td> <td><%= number_format(rec.payment_amount, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) %> ( <%= rec.payment_status %> )</td>
<td>&nbsp;</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 %>
<% end %> <% end %>
<% if result.amount_changed != 0 %> <% if result.amount_changed != 0 %>

View File

@@ -125,7 +125,7 @@
</tr> </tr>
<% end %> <% end %>
<% sale_payments = SalePayment.get_sale_payments(result) %> <% sale_payments = result.sale_payments %>
<% if sale_payments.length > 0%> <% if sale_payments.length > 0%>
<% sale_payments.each do |rec| %> <% sale_payments.each do |rec| %>
<%if rec.payment_amount.to_f > 0 %> <%if rec.payment_amount.to_f > 0 %>