From c95c56ade74ad04ee337d5aabb3c5603cc9192c3 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Thu, 20 Apr 2017 23:34:56 -0400 Subject: [PATCH] Fix the customer change issue. --- application/controllers/Customers.php | 13 +++++++++++-- application/controllers/Taxes.php | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/application/controllers/Customers.php b/application/controllers/Customers.php index 0b643a060..3891d7c91 100644 --- a/application/controllers/Customers.php +++ b/application/controllers/Customers.php @@ -118,10 +118,19 @@ class Customers extends Persons 'company_name' => $this->input->post('company_name') == '' ? NULL : $this->input->post('company_name'), 'discount_percent' => $this->input->post('discount_percent') == '' ? 0.00 : $this->input->post('discount_percent'), 'package_id' => $this->input->post('package_id') == '' ? NULL : $this->input->post('package_id'), - 'taxable' => $this->input->post('taxable') != NULL, - 'sales_tax_code' => $this->input->post('sales_tax_code') + 'taxable' => $this->input->post('taxable') != NULL ); + $x = $this->input->post('sales_tax_code'); + if(!isset($x)) + { + $customer_data['sales_tax_code'] = ''; + } + else + { + $customer_data['sales_tax_code'] = $this->input->post('sales_tax_code'); + } + if($this->Customer->save_customer($person_data, $customer_data, $customer_id)) { $person_data = $this->xss_clean($person_data); diff --git a/application/controllers/Taxes.php b/application/controllers/Taxes.php index ea9183990..ff9ac96d2 100644 --- a/application/controllers/Taxes.php +++ b/application/controllers/Taxes.php @@ -141,7 +141,7 @@ class Taxes extends Secure_Controller { $entered_tax_code = $this->xss_clean($this->input->post('tax_code')); $tax_code_data = array( - 'tax_code' => $this->input->post('tax_code'), + 'tax_code' => strtoupper($this->input->post('tax_code')), 'tax_code_name' => $this->input->post('tax_code_name'), 'tax_code_type' => $this->input->post('tax_code_type'), 'city' => $this->input->post('city'),