Additional fixes in write_customer() definition.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 19 Aug 2019 13:21:05 +0000 (15:21 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 19 Aug 2019 13:21:05 +0000 (15:21 +0200)
sales/includes/sales_db.inc
sales/manage/customers.php

index 2fd0bb9fa55a38b6d3dd9abe69499a86ea6f7e2a..dc3b9bf473a181fca5dc28e996ea011350eb6def 100644 (file)
@@ -471,7 +471,7 @@ function write_recurrent_invoice($invoice_id, $description, $order_no, $debtor_n
 
 function write_customer($customer_id, $name, $ref, $address, $tax_id, $curr_code, $dim1, $dim2, $credit_status,
         $payment_terms, $discount, $credit_limit, $sales_type, $notes, $inactive, $salesman, $area, 
-        $tax_group, $location, $address, $ship_via, $notes, $bank_account, $phone, $phone2, $fax, $email)
+        $tax_group, $location, $ship_via, $bank_account, $phone, $phone2, $fax, $email)
 {
        global $SysPrefs;
 
index 8f73217357ac1430bbd3a6dfbdb277cd9225923d..ffdfb6da464b6de911eb2f92a27027e52e6fc33d 100644 (file)
@@ -78,12 +78,12 @@ function handle_submit(&$selected_id)
                return;
                
 
-       $_POST['customer_id'] = write_customer($_POST['customer_id'], $_POST['CustName'], $_POST['cust_ref'], $_POST['address'],
-               $_POST['tax_id'], $_POST['curr_code'], $_POST['dimension_id'], $_POST['dimension2_id'],
-               $_POST['credit_status'], $_POST['payment_terms'], input_num('discount'),
-               input_num('credit_limit'), $_POST['sales_type'], $_POST['notes'], @$_POST['inactive'], get_post('salesman'),
-               get_post('area'), get_post('tax_group_id'), get_post('location'), get_post('address'), get_post('ship_via'), 
-               get_post('notes'), get_post('bank_account'), get_post('phone'), get_post('phone2'), get_post('fax'), get_post('email'));
+       $_POST['customer_id'] = write_customer(get_post('customer_id'), get_post('CustName'), get_post('cust_ref'), get_post('address'),
+               get_post('tax_id'), get_post('curr_code'), get_post('dimension_id'), get_post('dimension2_id'),
+               get_post('credit_status'), get_post('payment_terms'), input_num('discount'),
+               input_num('credit_limit'), get_post('sales_type'), get_post('notes'), @$_POST['inactive'], get_post('salesman'),
+               get_post('area'), get_post('tax_group_id'), get_post('location'), get_post('ship_via'), 
+               get_post('bank_account'), get_post('phone'), get_post('phone2'), get_post('fax'), get_post('email'));
 
        if ($selected_id) 
        {