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 {
|
||||
|
||||
@@ -561,8 +561,8 @@ class OrderController extends mfBaseController {
|
||||
$email->setBody($body);
|
||||
$email->setFrom($from, $from_name);
|
||||
$email->setTo($to);
|
||||
$email->setHeader("X-xinon-oid", $order->id);
|
||||
$email->setHeader("X-xinon-pid", $product->id);
|
||||
$email->setHeader("X-Xinon-Oid", $order->id);
|
||||
$email->setHeader("X-Xinon-Pid", $product->id);
|
||||
$email->addAttachment($pdfpath, null, $pdfname, "application/pdf");
|
||||
$email->send();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user