Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes
This commit is contained in:
42
db/migrate/20180306044939_create_receipts.rb
Normal file
42
db/migrate/20180306044939_create_receipts.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
class CreateReceipts < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :receipts do |t|
|
||||
t.string :client_code, :limit => 16, :null => false
|
||||
t.string :client_name, :null => false
|
||||
t.string :shop_code, :limit => 16, :null => false
|
||||
t.string :shop_name, :null => false
|
||||
t.integer :receipt_no, :limit => 8, :null => false
|
||||
t.datetime :transaction_time, :null => false
|
||||
t.datetime :receipt_open_time, :null => false
|
||||
t.datetime :receipt_close_time, :null => false
|
||||
t.decimal :gross_sales, :null => false, :default => 0
|
||||
t.decimal :discount_amount, :null => false, :default => 0
|
||||
t.decimal :sales, :null => false, :default => 0
|
||||
t.decimal :tax_amount, :null => false, :default => 0
|
||||
t.decimal :service_charges, :null => false, :default => 0
|
||||
t.decimal :net_sales, :null => false, :default => 0
|
||||
t.decimal :credit_card_sales, :null => false, :default => 0
|
||||
t.decimal :voucher_sales, :null => false, :default => 0
|
||||
t.decimal :foc_amount, :null => false, :default => 0
|
||||
t.decimal :staff_meal_amount, :null => false, :default => 0
|
||||
t.decimal :rounding_amount, :null => false, :default => 0
|
||||
t.decimal :raw_wastage_amount, :null => false, :default => 0
|
||||
t.decimal :semi_wastage_amount, :null => false, :default => 0
|
||||
t.decimal :wastage_amount, :null => false, :default => 0
|
||||
t.decimal :spoilage_amount, :null => false, :default => 0
|
||||
t.decimal :sampling_amount, :null => false, :default => 0
|
||||
t.integer :qty, :null => false, :default => 0
|
||||
t.integer :no_of_pax, :null => false, :default => 0
|
||||
t.integer :no_of_adult, :null => false, :default => 0
|
||||
t.integer :no_of_child, :null => false, :default => 0
|
||||
t.string :terminal_id, :null => false
|
||||
t.string :employee_code, :limit => 4, :null => false
|
||||
t.string :employee_name, :null => false
|
||||
t.boolean :is_valid, :null => false, :default => false
|
||||
t.boolean :overing, :null => false, :default => false
|
||||
t.boolean :cancle, :null => false, :default => false
|
||||
t.text :remarks
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
43
db/migrate/20180306045018_create_receipt_details.rb
Normal file
43
db/migrate/20180306045018_create_receipt_details.rb
Normal file
@@ -0,0 +1,43 @@
|
||||
class CreateReceiptDetails < ActiveRecord::Migration[5.1]
|
||||
def change
|
||||
create_table :receipt_details do |t|
|
||||
t.string :client_code, :null => false
|
||||
t.string :client_name, :null => false
|
||||
t.string :shop_code, :null => false
|
||||
t.string :shop_name, :null => false
|
||||
t.string :receipt_no, :null => false
|
||||
t.datetime :receipt_date, :null => false
|
||||
t.datetime :transaction_date, :null => false
|
||||
t.integer :item_sequence, :null => false
|
||||
t.string :category_code, :null => false
|
||||
t.string :category_name, :null => false
|
||||
t.string :sub_category_code, :null => false
|
||||
t.string :sub_category_name, :null => false
|
||||
t.string :report_group_code, :null => false
|
||||
t.string :report_group_name, :null => false
|
||||
t.string :item_code, :null => false
|
||||
t.string :item_name, :null => false
|
||||
t.integer :qty, :null => false, :default => 0
|
||||
t.string :transaction_type, :null => false
|
||||
t.decimal :gross_sales, :null => false, :default => 0
|
||||
t.string :discount_code, :null => false
|
||||
t.decimal :discount_amount, :null => false, :default => 0
|
||||
t.decimal :sales, :null => false, :default => 0
|
||||
t.decimal :tax_amount, :null => false, :default => 0
|
||||
t.decimal :service_charges, :null => false, :default => 0
|
||||
t.decimal :net_sales, :null => false, :default => 0
|
||||
t.boolean :is_foc, :null => false, :default => false
|
||||
t.boolean :is_set_item, :null => false, :default => false
|
||||
t.boolean :is_staff_meal, :null => false, :default => false
|
||||
t.boolean :is_raw_wastage, :null => false, :default => false
|
||||
t.boolean :is_semi_wastage, :null => false, :default => false
|
||||
t.boolean :is_wastage, :null => false, :default => false
|
||||
t.boolean :is_spoilage, :null => false, :default => false
|
||||
t.boolean :is_sampling, :null => false, :default => false
|
||||
t.boolean :tax_able, :null => false, :default => false
|
||||
t.boolean :is_void, :null => false, :default => false
|
||||
t.text :remarks
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user