current shop

This commit is contained in:
Nweni
2019-12-03 14:54:53 +06:30
parent 23b5d0d344
commit 78838a7718
17 changed files with 44 additions and 43 deletions

View File

@@ -15,13 +15,13 @@ class Foodcourt::CashInsController < BaseFoodcourtController
p_jour.cash_in(reference, remark, amount, payment_method, payment_method_reference, current_user)
shift = ShiftSale.current_open_shift(current_user)
current_shift = ShiftSale.current_shift(@shop.shop_code)
current_shift = ShiftSale.current_shift(Shop.current_shopshop_code)
# set cashier
if shift != nil
shift = shift
else
open_cashier = Employee.where("shop_code='#{@shop.shop_code}' and role = 'cashier' AND token_session <> ''")
open_cashier = Employee.where("role = 'cashier' AND token_session <> ''")
if open_cashier.count>0
shift = ShiftSale.current_open_shift(open_cashier[0])