fix bug update_shift

This commit is contained in:
Thein Lin Kyaw
2020-05-30 15:43:05 +06:30
parent b810f15542
commit 8f5ea9417d

View File

@@ -699,7 +699,8 @@ class SalePayment < ApplicationRecord
# update for cashier shift
def update_shift
shift = ShiftSale.current_open_shift(self.action_by.id)
current_shift_user = Employee.find_by_id(self.action_by.id)
shift = ShiftSale.current_open_shift(current_shift_user)
if shift.nil?
current_shift_user = Employee.find_by_id(self.sale.cashier_id)