From aed9fb8dd777c0c2072c5e9ee5c9ed144df29010 Mon Sep 17 00:00:00 2001 From: jekkos-t520 Date: Sun, 10 Aug 2014 17:51:14 +0200 Subject: [PATCH] Fix barcode generation (removed whitespace from stock_locations model) Fix error in receivings receipt Update database migration script (needs more review) --- application/controllers/receivings.php | 1 + application/models/stock_locations.php | 1 - application/views/receivings/receipt.php | 5 ++++- database/2.2.2_to_2.3.sql | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/application/controllers/receivings.php b/application/controllers/receivings.php index be3466658..1f958150d 100644 --- a/application/controllers/receivings.php +++ b/application/controllers/receivings.php @@ -140,6 +140,7 @@ class Receivings extends Secure_area $data['total']=$this->receiving_lib->get_total(); $data['receipt_title']=$this->lang->line('recvs_receipt'); $data['transaction_time']= date('m/d/Y h:i:s a'); + $data['mode']=$this->receiving_lib->get_mode(); $supplier_id=$this->receiving_lib->get_supplier(); $employee_id=$this->Employee->get_logged_in_employee_info()->person_id; $comment = $this->input->post('comment'); diff --git a/application/models/stock_locations.php b/application/models/stock_locations.php index ae7c4fd1c..4083b6828 100644 --- a/application/models/stock_locations.php +++ b/application/models/stock_locations.php @@ -100,4 +100,3 @@ class Stock_locations extends CI_Model } } ?> - \ No newline at end of file diff --git a/application/views/receivings/receipt.php b/application/views/receivings/receipt.php index fcf6f42c5..ebc6673d6 100644 --- a/application/views/receivings/receipt.php +++ b/application/views/receivings/receipt.php @@ -41,7 +41,10 @@ if (isset($error_message)) - + + diff --git a/database/2.2.2_to_2.3.sql b/database/2.2.2_to_2.3.sql index 6260c849a..e5775746e 100644 --- a/database/2.2.2_to_2.3.sql +++ b/database/2.2.2_to_2.3.sql @@ -21,6 +21,8 @@ ALTER TABLE ospos_inventory ALTER TABLE ospos_items DROP COLUMN location; +INSERT INTO `ospos_stock_locations` ( `deleted` ) VALUES ('0'); + ALTER TABLE ospos_receivings_items ADD COLUMN item_location int(11) NOT NULL, ADD KEY `item_location` (`item_location`), @@ -47,8 +49,6 @@ ALTER TABLE ospos_sales_suspended_items ADD CONSTRAINT `ospos_sales_suspended_items_ibfk_2` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales_suspended` (`sale_id`), ADD CONSTRAINT `ospos_sales_suspended_items_ibfk_3` FOREIGN KEY (`item_location`) REFERENCES `ospos_stock_locations` (`location_id`); -INSERT INTO `ospos_stock_locations` ( `deleted` ) VALUES ('0'); - ALTER TABLE `ospos_item_quantities` ADD CONSTRAINT `ospos_item_quantities_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`), ADD CONSTRAINT `ospos_item_quantities_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `ospos_stock_locations` (`location_id`);