update and fix

This commit is contained in:
Yan
2017-08-21 16:50:24 +06:30
parent ce7d15c2d4
commit 2b0dcd4ab9
12 changed files with 24 additions and 14 deletions

View File

@@ -7,6 +7,7 @@ class CreateMenuItems < ActiveRecord::Migration[5.1]
t.string :image_path
t.text :description
t.string :information
t.string :unit
t.string :type, :null => false, :default => "SimpleMenuItem"
t.references :menu_category, foreign_key: true
t.json :item_attributes

View File

@@ -95,8 +95,12 @@ float_value = Lookup.create([{lookup_type:'float_value', name: '500', value: '50
# customer type
customer_type = Lookup.create([{lookup_type:'customer_type', name: 'Dinein', value: 'Dinein'},
{lookup_type:'customer_type', name: 'Takeaway', value: 'Takeaway'},
{lookup_type:'customer_type', name: 'Delivery', value: 'Delivery'}])
{lookup_type:'customer_type', name: 'Takeaway', value: 'Takeaway'},
{lookup_type:'customer_type', name: 'Delivery', value: 'Delivery'}])
#unit
units = Lookup.create([{lookup_type:'unit', name: 'PCS', value: 'pcs'},
{lookup_type:'unit', name: 'KG', value: 'kg'}])
# Default CUSTOMER
customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000",card_no:"000", customer_type:"Dinein", tax_profiles:["2", "1"]})