update taday list and addorder
This commit is contained in:
@@ -92,7 +92,12 @@ class Sale < ApplicationRecord
|
||||
self.cashier_id = open_cashier[0].id
|
||||
self.cashier_name = open_cashier[0].name
|
||||
shift_id = ShiftSale.current_open_shift(open_cashier[0].id)
|
||||
self.shift_sale_id = shift_id.id
|
||||
if shift_id
|
||||
self.shift_sale_id = shift_id.id
|
||||
else
|
||||
self.shift_sale_id = current_shift.id
|
||||
end
|
||||
|
||||
else
|
||||
self.cashier_id = current_shift.employee_id
|
||||
self.cashier_name = Employee.find(current_shift.employee_id).name
|
||||
|
||||
Reference in New Issue
Block a user