fixed inventory

This commit is contained in:
NyanLinHtut
2019-09-27 20:43:48 +06:30
parent ba7e929dc4
commit 62c03bf5fe
6 changed files with 59 additions and 59 deletions

View File

@@ -8,6 +8,7 @@ class Booking < ApplicationRecord
belongs_to :sale, :optional => true
has_many :booking_orders
has_many :orders, :through => :booking_orders
has_many :order_items, :through => :orders
scope :active, -> {where("booking_status != 'moved'")}
scope :today, -> {where("created_at >= #{Time.now.utc}")}