diff --git a/app/models/sale.rb b/app/models/sale.rb index 2ffa5afd..661222bc 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -596,7 +596,7 @@ def self.get_separate_tax(from,to,payment_type=nil) end 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 def get_cash_amount diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index aa117624..d30d6154 100644 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -53,6 +53,7 @@ <% grand_total = 0 %> + <% old_grand_total = 0 %> <% total_tax = 0 %> <% guest_count = 0 %> <% total_sum = 0 %> @@ -66,6 +67,7 @@ @sale_data.each do |result| %> <% 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_sum += result.total_amount.to_f %> <% discount_amt += result.total_discount.to_f %> @@ -98,7 +100,7 @@ <%= grand_total.to_f.round(2) rescue '-'%> <%= rounding_adj rescue '-'%> - <%= grand_total.to_f.round + rounding_adj %> + <%= old_grand_total.to_f.round + rounding_adj %>   diff --git a/dump.rdb b/dump.rdb index 8ad94b15..abdaadff 100644 Binary files a/dump.rdb and b/dump.rdb differ