From ff63adecdcf90189d52752f0457b3741e84a0c30 Mon Sep 17 00:00:00 2001 From: Aaron Gong Date: Mon, 7 Mar 2016 22:26:07 +0800 Subject: [PATCH 1/3] Fix For #339 https://github.com/jekkos/opensourcepos/issues/339 We should also rollout the fixes to develop/2.4 if necessary. This fix was adapted from BootstrapUI which fixed the PHP 7 error regarding classes. --- application/controllers/customers.php | 4 ++-- application/controllers/employees.php | 2 +- application/controllers/suppliers.php | 2 +- application/models/customer.php | 2 +- application/models/employee.php | 2 +- application/models/supplier.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/controllers/customers.php b/application/controllers/customers.php index 833f012ca..68b431ed1 100644 --- a/application/controllers/customers.php +++ b/application/controllers/customers.php @@ -75,7 +75,7 @@ class Customers extends Person_controller 'company_name'=>$this->input->post('company_name')=='' ? null:$this->input->post('company_name'), 'taxable'=>$this->input->post('taxable')=='' ? 0:1, ); - if($this->Customer->save($person_data,$customer_data,$customer_id)) + if($this->Customer->save_customer($person_data,$customer_data,$customer_id)) { //New customer if($customer_id==-1) @@ -179,7 +179,7 @@ class Customers extends Person_controller $invalidated = $this->Customer->account_number_exists($account_number); } - if($invalidated || !$this->Customer->save($person_data,$customer_data)) + if($invalidated || !$this->Customer->save_customer($person_data,$customer_data)) { $failCodes[] = $i; } diff --git a/application/controllers/employees.php b/application/controllers/employees.php index d9da8e255..0c8bb6be0 100644 --- a/application/controllers/employees.php +++ b/application/controllers/employees.php @@ -87,7 +87,7 @@ class Employees extends Person_controller $employee_data=array('username'=>$this->input->post('username')); } - if($this->Employee->save($person_data,$employee_data,$grants_data,$employee_id)) + if($this->Employee->save_employee($person_data,$employee_data,$grants_data,$employee_id)) { //New employee if($employee_id==-1) diff --git a/application/controllers/suppliers.php b/application/controllers/suppliers.php index f3346008e..a6803634d 100644 --- a/application/controllers/suppliers.php +++ b/application/controllers/suppliers.php @@ -76,7 +76,7 @@ class Suppliers extends Person_controller 'agency_name'=>$this->input->post('agency_name'), 'account_number'=>$this->input->post('account_number')=='' ? null:$this->input->post('account_number'), ); - if($this->Supplier->save($person_data,$supplier_data,$supplier_id)) + if($this->Supplier->save_supplier($person_data,$supplier_data,$supplier_id)) { //New supplier if($supplier_id==-1) diff --git a/application/models/customer.php b/application/models/customer.php index 1422c4508..2c6b2e9ef 100644 --- a/application/models/customer.php +++ b/application/models/customer.php @@ -95,7 +95,7 @@ class Customer extends Person /* Inserts or updates a customer */ - function save(&$person_data, &$customer_data,$customer_id=false) + function save_customer(&$person_data, &$customer_data,$customer_id=false) { $success=false; //Run these queries as a transaction, we want to make sure we do all or nothing diff --git a/application/models/employee.php b/application/models/employee.php index 6429c8069..6b49c0ac4 100644 --- a/application/models/employee.php +++ b/application/models/employee.php @@ -81,7 +81,7 @@ class Employee extends Person /* Inserts or updates an employee */ - function save(&$person_data, &$employee_data,&$grants_data,$employee_id=false) + function save_employee(&$person_data, &$employee_data,&$grants_data,$employee_id=false) { $success=false; diff --git a/application/models/supplier.php b/application/models/supplier.php index ea5894237..aaefeb416 100644 --- a/application/models/supplier.php +++ b/application/models/supplier.php @@ -90,7 +90,7 @@ class Supplier extends Person /* Inserts or updates a suppliers */ - function save(&$person_data, &$supplier_data,$supplier_id=false) + function save_supplier(&$person_data, &$supplier_data,$supplier_id=false) { $success=false; //Run these queries as a transaction, we want to make sure we do all or nothing From 6208569c7e58838ee4e269a5780e30d3ac464ba8 Mon Sep 17 00:00:00 2001 From: Aaron Gong Date: Sun, 13 Mar 2016 22:04:39 +0800 Subject: [PATCH 2/3] Fix for issue 160 https://github.com/jekkos/opensourcepos/issues/160 I try to interfere as little as possible --- application/helpers/table_helper.php | 4 ++-- application/views/sales/manage.php | 10 +++++----- css/ospos_print.css | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/application/helpers/table_helper.php b/application/helpers/table_helper.php index b20adba85..743e7f0d4 100644 --- a/application/helpers/table_helper.php +++ b/application/helpers/table_helper.php @@ -67,7 +67,7 @@ function get_sales_manage_sale_data_row($sale, $controller) $width = $controller->get_form_width(); $table_data_row=''; - $table_data_row.=''; + $table_data_row.=''; $table_data_row.=''.'POS ' . $sale['sale_id'] . ''; $table_data_row.=''.date( $CI->config->item('dateformat') . ' ' . $CI->config->item('timeformat'), strtotime($sale['sale_time']) ).''; $table_data_row.=''.character_limiter( $sale['customer_name'], 25).''; @@ -76,7 +76,7 @@ function get_sales_manage_sale_data_row($sale, $controller) $table_data_row.=''.to_currency( $sale['change_due'] ).''; $table_data_row.=''.$sale['payment_type'].''; $table_data_row.=''.$sale['invoice_number'].''; - $table_data_row.=''; + $table_data_row.=''; $table_data_row.=anchor($controller_name."/edit/" . $sale['sale_id'] . "/width:$width", $CI->lang->line('common_edit'),array('class'=>'thickbox','title'=>$CI->lang->line($controller_name.'_update'))); $table_data_row.='    '; $table_data_row.='' . $CI->lang->line('sales_show_receipt') . ''; diff --git a/application/views/sales/manage.php b/application/views/sales/manage.php index 77e03e022..439e95e03 100755 --- a/application/views/sales/manage.php +++ b/application/views/sales/manage.php @@ -170,17 +170,17 @@ function init_table_sorting()
lang->line('common_list_of').' '.$this->lang->line('sales_receipt_number'); ?>
-
+ 'search_form')); ?> -
+ -
+