Fixed first and lastname in ivt sync
This commit is contained in:
@@ -42,7 +42,10 @@ class IvtCustomerController extends mfBaseController {
|
||||
$ivtc->bill_row4 = "";
|
||||
|
||||
$ivtc->id = $contact->customer_number;
|
||||
$ivtc->firstname = $contact->firstname;
|
||||
$ivtc->surname = $contact->lastname;
|
||||
$ivtc->company = str_replace("\r\n", " ", str_replace("\n", " ", $contact->company));
|
||||
|
||||
if($contact->company) {
|
||||
$ivtc->firstname = "";
|
||||
$ivtc->surname = str_replace("\r\n", " ", str_replace("\n", " ", $contact->company));
|
||||
@@ -95,8 +98,6 @@ class IvtCustomerController extends mfBaseController {
|
||||
|
||||
//var_dump($ivtc);
|
||||
|
||||
|
||||
|
||||
if($ivtc->save()) {
|
||||
$return = ['status' => 'OK', 'reason' => ""];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user