separate foodcourt module

This commit is contained in:
Myat Zin Wai Maw
2019-12-02 16:10:51 +06:30
parent 09e7650452
commit cac6994ccb
113 changed files with 14365 additions and 193 deletions

View File

@@ -16,7 +16,6 @@ class ShiftSale < ApplicationRecord
belongs_to :cashier_terminal
belongs_to :employee, :foreign_key => 'employee_id'
has_many :sales
belongs_to :shop
def self.current_shift(shop_code)
# today_date = DateTime.now.strftime("%Y-%m-%d")
@@ -84,6 +83,7 @@ class ShiftSale < ApplicationRecord
self.shift_started_at = DateTime.now
self.employee_id = current_user.id
self.opening_balance = opening_balance
self.shop_code = current_user.shop_code
self.other_sales = 0
self.save
end