diff --git a/database/2.3.1_to_2.3.2.sql b/database/2.3.1_to_2.3.2.sql new file mode 100644 index 000000000..9c381a4df --- /dev/null +++ b/database/2.3.1_to_2.3.2.sql @@ -0,0 +1,15 @@ +INSERT INTO `ospos_app_config` (`key`, `value`) VALUES +('barcode_content', 'id'), +('barcode_first_row', 'category'), +('barcode_second_row', 'item_code'), +('barcode_third_row', 'cost_price'), +('barcode_num_in_row', '2'), +('barcode_page_width', '100'), +('barcode_page_cellspacing', '20'); + +INSERT INTO `ospos_permissions` (permission_id, module_id, location_id) +(SELECT CONCAT('sales_', location_name), 'sales', location_id FROM ospos_stock_locations); + +INSERT INTO `ospos_permissions` (permission_id, module_id, location_id) +(SELECT CONCAT('receivings_', location_name), 'receivings', location_id FROM ospos_stock_locations); + diff --git a/database/2.3_to_2.3.1.sql b/database/2.3_to_2.3.1.sql index 93291b1c8..2ba636e83 100644 --- a/database/2.3_to_2.3.1.sql +++ b/database/2.3_to_2.3.1.sql @@ -40,12 +40,6 @@ INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES INSERT INTO `ospos_permissions` (permission_id, module_id, location_id) (SELECT CONCAT('items_', location_name), 'items', location_id FROM ospos_stock_locations); -INSERT INTO `ospos_permissions` (permission_id, module_id, location_id) -(SELECT CONCAT('sales_', location_name), 'sales', location_id FROM ospos_stock_locations); - -INSERT INTO `ospos_permissions` (permission_id, module_id, location_id) -(SELECT CONCAT('receivings_', location_name), 'receivings', location_id FROM ospos_stock_locations); - CREATE TABLE `ospos_grants` ( `permission_id` varchar(255) NOT NULL, `person_id` int(10) NOT NULL, @@ -88,8 +82,6 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('tax_included', '0'), ('recv_invoice_format', '$CO'), ('sales_invoice_format', '$CO'), -('barcode_content', 'id'), -('barcode_labels', ''); -- add invoice_number column to receivings table ALTER TABLE `ospos_receivings` diff --git a/database/database.sql b/database/database.sql index 67c53e136..a5d8f414d 100644 --- a/database/database.sql +++ b/database/database.sql @@ -41,7 +41,12 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('sales_invoice_format', '$CO'), ('tax_included', '0'), ('barcode_content', 'id'), -('barcode_labels', ''); +('barcode_first_row', 'category'), +('barcode_second_row', 'item_code'), +('barcode_third_row', 'cost_price'), +('barcode_num_in_row', '2'), +('barcode_page_width', '100'), +('barcode_page_cellspacing', '20'); -- --------------------------------------------------------