update for shift and deving member dis

This commit is contained in:
Yan
2017-07-07 14:56:05 +06:30
parent 4d3de51e72
commit 1b0bcbffea
9 changed files with 78 additions and 37 deletions

View File

@@ -52,8 +52,9 @@ class ShiftSale < ApplicationRecord
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.grand_total.to_i - self.commercial_taxes
self.nett_sales = saleobj.total_amount.to_f #self.grand_total.to_i - self.commercial_taxes
self.commercial_taxes = self.commercial_taxes.to_i + tax.to_f
self.total_receipt = self.total_receipt + 1
self.save
end