(important)migrateion files changed

This commit is contained in:
Yan
2017-06-07 18:47:50 +06:30
parent be7d448c30
commit f746c18238
38 changed files with 40 additions and 43 deletions

View File

@@ -4,6 +4,6 @@ class Account < ApplicationRecord
has_many :menu_items
# belongs_to :lookup , :class_name => "Lookup"
def self.collection
Account.select("id, title").map { |e| [e.title, e.id] }
end
Account.select("id, title").map { |e| [e.title, e.id] }
end
end

View File

@@ -4,7 +4,7 @@ class MenuItem < ApplicationRecord
has_many :menu_item_instances
belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true
has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
belongs_to :account, :optional => true
belongs_to :account
validates_presence_of :item_code, :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item

View File

@@ -272,7 +272,6 @@ class Order < ApplicationRecord
left join sale_orders on sale_orders.order_id = orders.order_id
left join sales on sales.sale_id = sale_orders.sale_id")
.where("dining_facilities.is_active=? and orders.date between ? and ?",true,from,to)
.group("orders.order_id,order_items.order_items_id,dining_facilities.name,sales.receipt_no,bookings.booking_id,sales.sale_id")
end