lookup and seed data fixes
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
class DiningFacility < ApplicationRecord
|
||||
belongs_to :zone
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Table < DiningFacility
|
||||
has_many :dining_ins
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ class CreateTaxProfiles < ActiveRecord::Migration[5.0]
|
||||
t.decimal :rate, :precision => 10, :scale => 2, :null => false, :default => 0.00
|
||||
t.boolean :inclusive, :null => false, :default => false
|
||||
t.integer :order_by, :null => false, :default => 1
|
||||
|
||||
t.string :created_by, :null => false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
10
db/seeds.rb
10
db/seeds.rb
@@ -65,7 +65,13 @@ employee_roles = Lookup.create([{lookup_type:'employee_roles', name: 'Cashier',
|
||||
customer = Customer.create({id:1, name:"WALK-IN", contact_no:"000000000"})
|
||||
|
||||
#Default ZOne
|
||||
zone = Zone.create({id: 1, name: "Default Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||
zone = Zone.create({id:1, name: "Default Zone", is_active:true, created_by: "SYSTEM DEFAULT"})
|
||||
|
||||
#Default dining_facilities
|
||||
dining_facilities = DiningFacilities.create({id:1, zone: zone, status:"available", type: "table", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||
dining_facilities = DiningFacility.create({id:1, name:"Default Table", zone: zone, status:"available", type: "Table", seater: 2 , order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||
|
||||
#Tax Profile
|
||||
tax_profiles = TaxProfile.create({id:1, name: "Commerical Tax", rate:5.0, order_by:1, created_by:"SYSTEM DEFAULT"})
|
||||
|
||||
#Default menu
|
||||
menu = Menu.create({name: "Default Menu", is_active: true, created_by: "SYSTEM DEFAULT"})
|
||||
|
||||
Reference in New Issue
Block a user