diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index 61bed01bd..1287f3d40 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -958,7 +958,7 @@ class Reports extends Secure_Controller $summary_data[] = $this->xss_clean(array( 'id' => $row['sale_id'], 'type_code' => $row['type_code'], - 'sale_date' => to_date(strtotime($row['sale_date'])), + 'sale_time' => to_datetime(strtotime($row['sale_time'])), 'quantity' => to_quantity_decimals($row['items_purchased']), 'employee_name' => $row['employee_name'], 'subtotal' => to_currency($row['subtotal']), @@ -1070,7 +1070,7 @@ class Reports extends Secure_Controller $summary_data[] = $this->xss_clean(array( 'id' => $row['sale_id'], 'type_code' => $row['type_code'], - 'sale_date' => to_date(strtotime($row['sale_date'])), + 'sale_time' => to_datetime(strtotime($row['sale_time'])), 'quantity' => to_quantity_decimals($row['items_purchased']), 'customer_name' => $row['customer_name'], 'subtotal' => to_currency($row['subtotal']), @@ -1178,7 +1178,7 @@ class Reports extends Secure_Controller $summary_data[] = $this->xss_clean(array( 'id' => $row['sale_id'], 'type_code' => $row['type_code'], - 'sale_date' => to_date(strtotime($row['sale_date'])), + 'sale_time' => to_datetime(strtotime($row['sale_time'])), 'quantity' => to_quantity_decimals($row['items_purchased']), 'employee_name' => $row['employee_name'], 'customer_name' => $row['customer_name'], @@ -1256,7 +1256,7 @@ class Reports extends Secure_Controller $summary_data = $this->xss_clean(array( 'sale_id' => $report_data['sale_id'], - 'sale_date' => to_date(strtotime($report_data['sale_date'])), + 'sale_time' => to_datetime(strtotime($row['sale_time'])), 'quantity' => to_quantity_decimals($report_data['items_purchased']), 'employee_name' => $report_data['employee_name'], 'customer_name' => $report_data['customer_name'], @@ -1307,7 +1307,7 @@ class Reports extends Secure_Controller $tabular_data[] = $this->xss_clean(array( 'id' => $row['sale_id'], 'type_code' => $row['type_code'], - 'sale_date' => to_date(strtotime($row['sale_date'])), + 'sale_time' => to_datetime(strtotime($row['sale_time'])), 'name' => $row['name'], 'category' => $row['category'], 'item_number' => $row['item_number'], @@ -1391,7 +1391,7 @@ class Reports extends Secure_Controller $summary_data[] = $this->xss_clean(array( 'id' => $row['sale_id'], 'type_code' => $row['type_code'], - 'sale_date' => to_date(strtotime($row['sale_date'])), + 'sale_time' => to_datetime(strtotime($row['sale_time'])), 'quantity' => to_quantity_decimals($row['items_purchased']), 'employee_name' => $row['employee_name'], 'customer_name' => $row['customer_name'], @@ -1465,7 +1465,7 @@ class Reports extends Secure_Controller $summary_data = $this->xss_clean(array( 'receiving_id' => $report_data['receiving_id'], - 'receiving_date' => to_date(strtotime($report_data['receiving_date'])), + 'receiving_time' => to_datetime(strtotime($row['receiving_time'])), 'quantity' => to_quantity_decimals($report_data['items_purchased']), 'employee_name' => $report_data['employee_name'], 'supplier_name' => $report_data['supplier_name'], @@ -1507,7 +1507,7 @@ class Reports extends Secure_Controller { $summary_data[] = $this->xss_clean(array( 'id' => $row['receiving_id'], - 'receiving_date' => to_date(strtotime($row['receiving_date'])), + 'receiving_time' => to_datetime(strtotime($row['receiving_time'])), 'quantity' => to_quantity_decimals($row['items_purchased']), 'employee_name' => $row['employee_name'], 'supplier_name' => $row['supplier_name'], diff --git a/application/models/reports/Detailed_receivings.php b/application/models/reports/Detailed_receivings.php index b7b802199..cfa6d3508 100644 --- a/application/models/reports/Detailed_receivings.php +++ b/application/models/reports/Detailed_receivings.php @@ -15,7 +15,7 @@ class Detailed_receivings extends Report return array( 'summary' => array( array('id' => $this->lang->line('reports_receiving_id')), - array('receiving_date' => $this->lang->line('reports_date'), 'sortable' => FALSE), + array('receiving_time' => $this->lang->line('reports_date'), 'sortable' => FALSE), array('quantity' => $this->lang->line('reports_quantity')), array('employee_name' => $this->lang->line('reports_received_by')), array('supplier_name' => $this->lang->line('reports_supplied_by')), @@ -36,7 +36,7 @@ class Detailed_receivings extends Report public function getDataByReceivingId($receiving_id) { $this->db->select('receiving_id, - MAX(receiving_date) as receiving_date, + MAX(receiving_time) as receiving_time, SUM(quantity_purchased) AS items_purchased, MAX(CONCAT(employee.first_name, " ", employee.last_name)) AS employee_name, MAX(supplier.company_name) AS supplier_name, @@ -58,7 +58,7 @@ class Detailed_receivings extends Report public function getData(array $inputs) { $this->db->select('receiving_id, - MAX(receiving_date) as receiving_date, + MAX(receiving_time) as receiving_time, SUM(quantity_purchased) AS items_purchased, MAX(CONCAT(employee.first_name," ",employee.last_name)) AS employee_name, MAX(supplier.company_name) AS supplier_name, @@ -88,7 +88,7 @@ class Detailed_receivings extends Report { $this->db->having('items_purchased = 0'); } - $this->db->group_by('receiving_id', 'receiving_date'); + $this->db->group_by('receiving_id', 'receiving_time'); $this->db->order_by('receiving_id'); $data = array(); diff --git a/application/models/reports/Detailed_sales.php b/application/models/reports/Detailed_sales.php index f49dd556c..3d11985c8 100644 --- a/application/models/reports/Detailed_sales.php +++ b/application/models/reports/Detailed_sales.php @@ -16,7 +16,7 @@ class Detailed_sales extends Report 'summary' => array( array('id' => $this->lang->line('reports_sale_id')), array('type_code' => $this->lang->line('reports_code_type')), - array('sale_date' => $this->lang->line('reports_date'), 'sortable' => FALSE), + array('sale_time' => $this->lang->line('reports_date'), 'sortable' => FALSE), array('quantity' => $this->lang->line('reports_quantity')), array('employee_name' => $this->lang->line('reports_sold_by')), array('customer_name' => $this->lang->line('reports_sold_to')), @@ -48,7 +48,7 @@ class Detailed_sales extends Report public function getDataBySaleId($sale_id) { $this->db->select('sale_id, - sale_date, + sale_time as sale_time, SUM(quantity_purchased) AS items_purchased, MAX(employee_name) AS employee_name, MAX(customer_name) AS customer_name, @@ -79,7 +79,7 @@ class Detailed_sales extends Report ELSE \'\' END) AS type_code, MAX(sale_status) as sale_status, - MAX(sale_date) AS sale_date, + MAX(sale_time) AS sale_time, SUM(quantity_purchased) AS items_purchased, MAX(employee_name) AS employee_name, MAX(customer_name) AS customer_name, @@ -135,7 +135,7 @@ class Detailed_sales extends Report } $this->db->group_by('sale_id'); - $this->db->order_by('MAX(sale_date)'); + $this->db->order_by('MAX(sale_time)'); $data = array(); $data['summary'] = $this->db->get()->result_array(); diff --git a/application/models/reports/Specific_customer.php b/application/models/reports/Specific_customer.php index faa7ae865..aed9837e0 100644 --- a/application/models/reports/Specific_customer.php +++ b/application/models/reports/Specific_customer.php @@ -16,7 +16,7 @@ class Specific_customer extends Report 'summary' => array( array('id' => $this->lang->line('reports_sale_id')), array('type_code' => $this->lang->line('reports_code_type')), - array('sale_date' => $this->lang->line('reports_date'), 'sortable' => FALSE), + array('sale_time' => $this->lang->line('reports_date'), 'sortable' => FALSE), array('quantity' => $this->lang->line('reports_quantity')), array('employee_name' => $this->lang->line('reports_sold_by')), array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), @@ -57,7 +57,7 @@ class Specific_customer extends Report ELSE \'\' END) AS type_code, MAX(sale_status) as sale_status, - MAX(sale_date) AS sale_date, + MAX(sale_time) AS sale_time, SUM(quantity_purchased) AS items_purchased, MAX(employee_name) AS employee_name, SUM(subtotal) AS subtotal, @@ -118,7 +118,7 @@ class Specific_customer extends Report } $this->db->group_by('sale_id'); - $this->db->order_by('MAX(sale_date)'); + $this->db->order_by('MAX(sale_time)'); $data = array(); $data['summary'] = $this->db->get()->result_array(); diff --git a/application/models/reports/Specific_discount.php b/application/models/reports/Specific_discount.php index 9643e7257..8bc992449 100755 --- a/application/models/reports/Specific_discount.php +++ b/application/models/reports/Specific_discount.php @@ -16,7 +16,7 @@ class Specific_discount extends Report 'summary' => array( array('id' => $this->lang->line('reports_sale_id')), array('type_code' => $this->lang->line('reports_code_type')), - array('sale_date' => $this->lang->line('reports_date'), 'sortable' => FALSE), + array('sale_time' => $this->lang->line('reports_date'), 'sortable' => FALSE), array('quantity' => $this->lang->line('reports_quantity')), array('employee_name' => $this->lang->line('reports_sold_by')), array('customer_name' => $this->lang->line('reports_sold_to')), @@ -58,7 +58,7 @@ class Specific_discount extends Report ELSE \'\' END) AS type_code, MAX(sale_status) as sale_status, - MAX(sale_date) AS sale_date, + MAX(sale_time) AS sale_time, SUM(quantity_purchased) AS items_purchased, MAX(employee_name) AS employee_name, MAX(customer_name) AS customer_name, @@ -112,7 +112,7 @@ class Specific_discount extends Report } $this->db->group_by('sale_id'); - $this->db->order_by('MAX(sale_date)'); + $this->db->order_by('MAX(sale_time)'); $data = array(); $data['summary'] = $this->db->get()->result_array(); diff --git a/application/models/reports/Specific_employee.php b/application/models/reports/Specific_employee.php index 54c6b4005..62b542dd8 100644 --- a/application/models/reports/Specific_employee.php +++ b/application/models/reports/Specific_employee.php @@ -16,7 +16,7 @@ class Specific_employee extends Report 'summary' => array( array('id' => $this->lang->line('reports_sale_id')), array('type_code' => $this->lang->line('reports_code_type')), - array('sale_date' => $this->lang->line('reports_date'), 'sortable' => FALSE), + array('sale_time' => $this->lang->line('reports_date'), 'sortable' => FALSE), array('quantity' => $this->lang->line('reports_quantity')), array('customer_name' => $this->lang->line('reports_sold_to')), array('subtotal' => $this->lang->line('reports_subtotal'), 'sorter' => 'number_sorter'), @@ -57,7 +57,7 @@ class Specific_employee extends Report ELSE \'\' END) AS type_code, MAX(sale_status) as sale_status, - MAX(sale_date) AS sale_date, + MAX(sale_time) AS sale_time, SUM(quantity_purchased) AS items_purchased, MAX(customer_name) AS customer_name, SUM(subtotal) AS subtotal, @@ -109,7 +109,7 @@ class Specific_employee extends Report } $this->db->group_by('sale_id'); - $this->db->order_by('MAX(sale_date)'); + $this->db->order_by('MAX(sale_time)'); $data = array(); $data['summary'] = $this->db->get()->result_array(); diff --git a/application/models/reports/Specific_supplier.php b/application/models/reports/Specific_supplier.php index 214c39425..19ebf8f45 100644 --- a/application/models/reports/Specific_supplier.php +++ b/application/models/reports/Specific_supplier.php @@ -15,7 +15,7 @@ class Specific_supplier extends Report return array( array('id' => $this->lang->line('reports_sale_id')), array('type_code' => $this->lang->line('reports_code_type')), - array('sale_date' => $this->lang->line('reports_date'), 'sortable' => FALSE), + array('sale_time' => $this->lang->line('reports_date'), 'sortable' => FALSE), array('name' => $this->lang->line('reports_name')), array('category' => $this->lang->line('reports_category')), array('item_number' => $this->lang->line('reports_item_number')), @@ -42,7 +42,7 @@ class Specific_supplier extends Report ELSE \'\' END) AS type_code, MAX(sale_status) as sale_status, - MAX(sale_date) AS sale_date, + MAX(sale_time) AS sale_time, MAX(name) AS name, MAX(category) AS category, MAX(item_number) AS item_number,