account working

This commit is contained in:
Aung Myo
2017-06-02 19:16:14 +06:30
parent 92a82f6e7f
commit 01fefe3b79
30 changed files with 619 additions and 1 deletions

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"})