43 lines
2.0 KiB
Ruby
43 lines
2.0 KiB
Ruby
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 |