From 40d8ea026826acf761ac7657ef627599dafce761 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Sat, 18 Jan 2020 15:32:12 +0000 Subject: [PATCH] Replace serial number with item_number (barcode) in detailed reports --- application/controllers/Reports.php | 8 ++++---- application/models/reports/Detailed_sales.php | 4 ++-- application/models/reports/Specific_customer.php | 4 ++-- application/models/reports/Specific_discount.php | 4 ++-- application/models/reports/Specific_employee.php | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index ce85d1088..22f502e37 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -972,7 +972,7 @@ class Reports extends Secure_Controller $details_data[$row['sale_id']][] = $this->xss_clean(array( $drow['name'], $drow['category'], - $drow['serialnumber'], + $drow['item_number'], $drow['description'], to_quantity_decimals($drow['quantity_purchased']), to_currency($drow['subtotal']), @@ -1084,7 +1084,7 @@ class Reports extends Secure_Controller $details_data[$row['sale_id']][] = $this->xss_clean(array( $drow['name'], $drow['category'], - $drow['serialnumber'], + $drow['item_number'], $drow['description'], to_quantity_decimals($drow['quantity_purchased']), to_currency($drow['subtotal']), @@ -1193,7 +1193,7 @@ class Reports extends Secure_Controller $details_data[$row['sale_id']][] = $this->xss_clean(array( $drow['name'], $drow['category'], - $drow['serialnumber'], + $drow['item_number'], $drow['description'], to_quantity_decimals($drow['quantity_purchased']), to_currency($drow['subtotal']), @@ -1414,7 +1414,7 @@ class Reports extends Secure_Controller $details_data[$row['sale_id']][] = $this->xss_clean(array_merge(array( $drow['name'], $drow['category'], - $drow['serialnumber'], + $drow['item_number'], $drow['description'], $quantity_purchased, to_currency($drow['subtotal']), diff --git a/application/models/reports/Detailed_sales.php b/application/models/reports/Detailed_sales.php index 0ef8a30b3..e620021ef 100644 --- a/application/models/reports/Detailed_sales.php +++ b/application/models/reports/Detailed_sales.php @@ -30,7 +30,7 @@ class Detailed_sales extends Report 'details' => array( $this->lang->line('reports_name'), $this->lang->line('reports_category'), - $this->lang->line('reports_serial_number'), + $this->lang->line('reports_item_number'), $this->lang->line('reports_description'), $this->lang->line('reports_quantity'), $this->lang->line('reports_subtotal'), @@ -144,7 +144,7 @@ class Detailed_sales extends Report foreach($data['summary'] as $key=>$value) { - $this->db->select('name, category, quantity_purchased, item_location, serialnumber, description, subtotal, tax, total, cost, profit, discount, discount_type, sale_status'); + $this->db->select('name, category, quantity_purchased, item_location, item_number, description, subtotal, tax, total, cost, profit, discount, discount_type, sale_status'); $this->db->from('sales_items_temp'); if(count($inputs['definition_ids']) > 0) { diff --git a/application/models/reports/Specific_customer.php b/application/models/reports/Specific_customer.php index fecdd0e3d..faa7ae865 100644 --- a/application/models/reports/Specific_customer.php +++ b/application/models/reports/Specific_customer.php @@ -29,7 +29,7 @@ class Specific_customer extends Report 'details' => array( $this->lang->line('reports_name'), $this->lang->line('reports_category'), - $this->lang->line('reports_serial_number'), + $this->lang->line('reports_item_number'), $this->lang->line('reports_description'), $this->lang->line('reports_quantity'), $this->lang->line('reports_subtotal'), @@ -127,7 +127,7 @@ class Specific_customer extends Report foreach($data['summary'] as $key=>$value) { - $this->db->select('name, category, serialnumber, description, quantity_purchased, subtotal, tax, total, cost, profit, discount, discount_type'); + $this->db->select('name, category, item_number, description, quantity_purchased, subtotal, tax, total, cost, profit, discount, discount_type'); $this->db->from('sales_items_temp'); $this->db->where('sale_id', $value['sale_id']); $data['details'][$key] = $this->db->get()->result_array(); diff --git a/application/models/reports/Specific_discount.php b/application/models/reports/Specific_discount.php index 44dedcfaa..9643e7257 100755 --- a/application/models/reports/Specific_discount.php +++ b/application/models/reports/Specific_discount.php @@ -30,7 +30,7 @@ class Specific_discount extends Report 'details' => array( $this->lang->line('reports_name'), $this->lang->line('reports_category'), - $this->lang->line('reports_serial_number'), + $this->lang->line('reports_item_number'), $this->lang->line('reports_description'), $this->lang->line('reports_quantity'), $this->lang->line('reports_subtotal'), @@ -121,7 +121,7 @@ class Specific_discount extends Report foreach($data['summary'] as $key=>$value) { - $this->db->select('name, category, serialnumber, description, quantity_purchased, subtotal, tax, total, cost, profit, discount, discount_type'); + $this->db->select('name, category, item_number, description, quantity_purchased, subtotal, tax, total, cost, profit, discount, discount_type'); $this->db->from('sales_items_temp'); $this->db->where('sale_id', $value['sale_id']); $data['details'][$key] = $this->db->get()->result_array(); diff --git a/application/models/reports/Specific_employee.php b/application/models/reports/Specific_employee.php index f56b7bd8e..54c6b4005 100644 --- a/application/models/reports/Specific_employee.php +++ b/application/models/reports/Specific_employee.php @@ -29,7 +29,7 @@ class Specific_employee extends Report 'details' => array( $this->lang->line('reports_name'), $this->lang->line('reports_category'), - $this->lang->line('reports_serial_number'), + $this->lang->line('reports_item_number'), $this->lang->line('reports_description'), $this->lang->line('reports_quantity'), $this->lang->line('reports_subtotal'), @@ -118,7 +118,7 @@ class Specific_employee extends Report foreach($data['summary'] as $key=>$value) { - $this->db->select('name, category, serialnumber, description, quantity_purchased, subtotal, tax, total, cost, profit, discount, discount_type'); + $this->db->select('name, category, item_number, description, quantity_purchased, subtotal, tax, total, cost, profit, discount, discount_type'); $this->db->from('sales_items_temp'); $this->db->where('sale_id', $value['sale_id']); $data['details'][$key] = $this->db->get()->result_array();