From 4cda5343aad6223562fe293245b93f2ae11739cf Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Thu, 2 Feb 2017 23:25:04 -0500 Subject: [PATCH] This will fix the issue with the PHP error when adding a new item kit. It also initializes the line_sequence config option. --- application/controllers/Item_kits.php | 1 + database/3.0.2_to_3.1.0.sql | 3 +++ database/database.sql | 1 + database/tables.sql | 1 + 4 files changed, 6 insertions(+) diff --git a/application/controllers/Item_kits.php b/application/controllers/Item_kits.php index 6950b377a..545389aa0 100644 --- a/application/controllers/Item_kits.php +++ b/application/controllers/Item_kits.php @@ -89,6 +89,7 @@ class Item_kits extends Secure_Controller { $info->price_option = '0'; $info->print_option = '0'; + $info->kit_item_id = 0; } foreach(get_object_vars($info) as $property => $value) { diff --git a/database/3.0.2_to_3.1.0.sql b/database/3.0.2_to_3.1.0.sql index f5c5b5992..31c97d62c 100644 --- a/database/3.0.2_to_3.1.0.sql +++ b/database/3.0.2_to_3.1.0.sql @@ -20,6 +20,9 @@ ALTER TABLE `ospos_sales_items` ALTER TABLE `ospos_sales_suspended_items` ADD COLUMN `print_option` TINYINT(2) NOT NULL DEFAULT 0; +INSERT INTO `ospos_app_config` (`key`, `value`) VALUES +('line_sequence', '0'); + -- alter pic_id field, to rather contain a file name ALTER TABLE `ospos_items` CHANGE `pic_id` `pic_filename` VARCHAR(255); diff --git a/database/database.sql b/database/database.sql index 891bcdda8..fd846b05b 100644 --- a/database/database.sql +++ b/database/database.sql @@ -44,6 +44,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_description', '1'), ('receipt_show_serialnumber', '1'), ('invoice_enable', '1'), +('line_sequence', '0'), ('recv_invoice_format', '$CO'), ('sales_invoice_format', '$CO'), ('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'), diff --git a/database/tables.sql b/database/tables.sql index bcc182bed..288e1c638 100644 --- a/database/tables.sql +++ b/database/tables.sql @@ -44,6 +44,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('receipt_show_description', '1'), ('receipt_show_serialnumber', '1'), ('invoice_enable', '1'), +('line_sequence', '0'), ('recv_invoice_format', '$CO'), ('sales_invoice_format', '$CO'), ('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'),