Merge branch 'master' of ssh://bitbucket.org/code2lab/sxrestaurant

This commit is contained in:
Min Zeya Phyo
2017-06-03 15:05:25 +06:30
112 changed files with 2468 additions and 259 deletions

View File

@@ -0,0 +1,20 @@
class CreatePrintSettings < ActiveRecord::Migration[5.1]
def change
create_table :print_settings do |t|
t.string :name, :null => false
t.string :unique_code, :null => false
t.string :template, :null => false
t.string :db_name, :null => false
t.string :db_type, :null => false
t.string :db_username, :null => false
t.string :db_password
t.string :printer_name, :null => false
t.string :api_settings
t.decimal :page_width, :null => false, :default => 200
t.decimal :page_height, :null => false, :default => 800
t.integer :print_copies, :null => false, :default => 1
t.timestamps
end
end
end

View File

@@ -0,0 +1,10 @@
class CreateAccounts < ActiveRecord::Migration[5.1]
def change
create_table :accounts do |t|
t.string :title
t.string :account_type
t.timestamps
end
end
end

View File

@@ -70,6 +70,10 @@ booking_status = Lookup.create([{lookup_type:'booking_status', name: 'Available'
{lookup_type:'booking_status', name: 'Cleaning', value: 'cleaning'},
{lookup_type:'booking_status', name: 'Moved', value: 'moved'}])
#booking_status
account_type = Lookup.create([{lookup_type:'account_type', name: 'Income', value: 'income'},
{lookup_type:'account_type', name: 'Expense', value: 'expense'}])
#WALK CUSTOMER - Default CUSTOMER (take key 1)
customer = Customer.create({id:1, name:"WALK-IN", contact_no:"000000000"})
customer = Customer.create({id:2, name:"TAKEAWAY", contact_no:"000000000"})