route changes
This commit is contained in:
@@ -3,6 +3,9 @@ class CreateShops < ActiveRecord::Migration[5.1]
|
||||
create_table :shops do |t|
|
||||
t.string :logo
|
||||
t.string :name, :null => false
|
||||
t.string :shop_code, :null => false
|
||||
t.string :client_name, :null => false
|
||||
t.string :client_code, :null => false
|
||||
t.string :address, :null => false
|
||||
t.string :township, :null => false
|
||||
t.string :city, :null => false
|
||||
|
||||
@@ -6,7 +6,9 @@ class CreatePrintSettings < ActiveRecord::Migration[5.1]
|
||||
t.string :template
|
||||
t.string :font, :default => ""
|
||||
t.string :printer_name, :null => false
|
||||
t.string :api_settings
|
||||
t.string :api_settings,
|
||||
t.string :brand_name
|
||||
t.string :type
|
||||
t.decimal :page_width, :null => false, :default => 210
|
||||
t.decimal :page_height, :null => false, :default => 1450
|
||||
t.integer :print_copies, :null => false, :default => 1
|
||||
|
||||
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
|
||||
@@ -88,6 +88,10 @@ delete from sym_node;
|
||||
insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action) values ('cloud', 'sx', 'P');
|
||||
|
||||
# Create Trigger for Setting Channel
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('seed_generators','seed_generators','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
@@ -119,11 +123,11 @@ delete from sym_node;
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('tax_profiles','customers','setting',current_timestamp,current_timestamp);
|
||||
values('tax_profiles','tax_profiles','setting',current_timestamp,current_timestamp);
|
||||
|
||||
insert into sym_trigger
|
||||
(trigger_id,source_table_name,channel_id,last_update_time,create_time)
|
||||
values('display_images','customers','setting',current_timestamp,current_timestamp);
|
||||
values('display_images','display_images','setting',current_timestamp,current_timestamp);
|
||||
|
||||
# Create Trigger for Dining Channel
|
||||
|
||||
@@ -339,6 +343,11 @@ delete from sym_node;
|
||||
# Add triggers for tables with router
|
||||
|
||||
# Setting Channel # From cloud to Master
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('seed_generators','cloud_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('lookups','cloud_2_sx', 100, current_timestamp, current_timestamp);
|
||||
@@ -376,6 +385,11 @@ delete from sym_node;
|
||||
values('display_images','cloud_2_sx', 100, current_timestamp, current_timestamp);
|
||||
|
||||
# Setting Channel # From Master to cloud
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('seed_generators','sx_2_cloud', 100, current_timestamp, current_timestamp);
|
||||
|
||||
insert into sym_trigger_router
|
||||
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
|
||||
values('lookups','sx_2_cloud', 100, current_timestamp, current_timestamp);
|
||||
|
||||
Reference in New Issue
Block a user