shift open/close

This commit is contained in:
Nweni
2017-06-29 13:35:09 +06:30
parent 45961880c8
commit 618a89472a
20 changed files with 320 additions and 18 deletions

View File

@@ -247,12 +247,14 @@ class SalePayment < ApplicationRecord
end
self.sale.sale_status = "completed"
self.sale.save!
shift = ShiftSale.current_open_shift(self.sale.cashier_id)
if shift
shift.update(self.sale)
end
table_update_status(sObj)
rebat(sObj)
shift = ShiftSale.current_open_shift(self.sale.cashier_id)
puts shift
if !shift.nil?
puts ">>>> shift >>>>>>"
shift.update(self.sale)
end
end
end