Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_material_ui

This commit is contained in:
Aung Myo
2017-11-30 12:05:28 +06:30
3 changed files with 9 additions and 9 deletions

View File

@@ -52,10 +52,10 @@ class ShiftSale < ApplicationRecord
self.total_taxes = self.total_taxes + saleobj.total_tax
self.grand_total = self.grand_total + saleobj.grand_total
self.cash_sales = self.cash_sales.to_f + cash.to_f
self.credit_sales = self.credit_sales.to_i + credit.to_f
self.other_sales = self.other_sales.to_i + other_sales.to_f
self.nett_sales = self.nett_sales + (saleobj.total_amount.to_f - saleobj.total_discount) #self.grand_total.to_i - self.commercial_taxes
self.commercial_taxes = self.commercial_taxes.to_i + tax.to_f
self.credit_sales = self.credit_sales.to_f + credit.to_f
self.other_sales = self.other_sales.to_f + other_sales.to_f
self.nett_sales = self.nett_sales + (saleobj.total_amount.to_f - saleobj.total_discount) #self.grand_total.to_f - self.commercial_taxes
self.commercial_taxes = self.commercial_taxes.to_f + tax.to_f
self.total_rounding = self.total_rounding + saleobj.rounding_adjustment
self.total_receipt = self.total_receipt + 1
if saleobj.customer.customer_type == "Dinein"
@@ -79,10 +79,10 @@ class ShiftSale < ApplicationRecord
self.total_taxes = self.total_taxes - saleobj.total_tax
self.grand_total = self.grand_total - saleobj.grand_total
self.cash_sales = self.cash_sales.to_f - cash.to_f
self.credit_sales = self.credit_sales.to_i - credit.to_f
self.other_sales = self.other_sales.to_i - other_sales.to_f
self.credit_sales = self.credit_sales.to_f - credit.to_f
self.other_sales = self.other_sales.to_f - other_sales.to_f
self.nett_sales = self.nett_sales - (saleobj.total_amount.to_f - self.total_discounts) #self.grand_total.to_i - self.commercial_taxes
self.commercial_taxes = self.commercial_taxes.to_i - tax.to_f
self.commercial_taxes = self.commercial_taxes.to_f - tax.to_f
self.total_rounding = self.total_rounding - saleobj.rounding_adjustment
self.total_void = self.total_void + saleobj.grand_total
if saleobj.customer.customer_type == "Dinein"