shift sale

This commit is contained in:
Nweni
2017-07-01 09:46:14 +06:30
parent 18094f5a71
commit c589f11758
6 changed files with 29 additions and 17 deletions

View File

@@ -27,8 +27,8 @@ class ShiftSale < ApplicationRecord
#end
end
def create(opening_balance,current_user)
self.cashier_terminal_id = CashierTerminal.first.id
def create(opening_balance,cashier_terminal, current_user)
self.cashier_terminal_id = cashier_terminal
self.shift_started_at = DateTime.now
self.employee_id = current_user.id
self.opening_balance = opening_balance