fix grand total in receipt no
This commit is contained in:
@@ -596,7 +596,7 @@ def self.get_separate_tax(from,to,payment_type=nil)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def grand_total_after_rounding
|
def grand_total_after_rounding
|
||||||
return self.grand_total.to_f + self.rounding_adjustment.to_f
|
return self.old_grand_total.to_f + self.rounding_adjustment.to_f
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_cash_amount
|
def get_cash_amount
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% grand_total = 0 %>
|
<% grand_total = 0 %>
|
||||||
|
<% old_grand_total = 0 %>
|
||||||
<% total_tax = 0 %>
|
<% total_tax = 0 %>
|
||||||
<% guest_count = 0 %>
|
<% guest_count = 0 %>
|
||||||
<% total_sum = 0 %>
|
<% total_sum = 0 %>
|
||||||
@@ -66,6 +67,7 @@
|
|||||||
@sale_data.each do |result| %>
|
@sale_data.each do |result| %>
|
||||||
|
|
||||||
<% grand_total = grand_total.to_f + result.grand_total.to_f %>
|
<% grand_total = grand_total.to_f + result.grand_total.to_f %>
|
||||||
|
<% old_grand_total = old_grand_total.to_f + result.old_grand_total.to_f %>
|
||||||
<% total_tax += result.total_tax.to_f %>
|
<% total_tax += result.total_tax.to_f %>
|
||||||
<% total_sum += result.total_amount.to_f %>
|
<% total_sum += result.total_amount.to_f %>
|
||||||
<% discount_amt += result.total_discount.to_f %>
|
<% discount_amt += result.total_discount.to_f %>
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
<!-- <td><b><%= other_amt rescue '-'%></b></td> -->
|
<!-- <td><b><%= other_amt rescue '-'%></b></td> -->
|
||||||
<td><b><%= grand_total.to_f.round(2) rescue '-'%></b></td>
|
<td><b><%= grand_total.to_f.round(2) rescue '-'%></b></td>
|
||||||
<td><b><%= rounding_adj rescue '-'%></b></td>
|
<td><b><%= rounding_adj rescue '-'%></b></td>
|
||||||
<td><b><%= grand_total.to_f.round + rounding_adj %></b></td>
|
<td><b><%= old_grand_total.to_f.round + rounding_adj %></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> </td>
|
<td colspan="2"> </td>
|
||||||
|
|||||||
Reference in New Issue
Block a user