|
|
@@ -257,8 +257,8 @@ class DolibarrSyncService
|
|
|
'lastname' => trim($person->getName()),
|
|
|
'firstname' => trim($person->getGivenName()),
|
|
|
'email' => $contact?->getEmail() ?? $dolibarrContact['email'] ?? null,
|
|
|
- 'phone_pro' => $contact?->getTelphone() ? $this->formatPhoneNumber($contact->getTelphone()) : $dolibarrContact['phone_pro'] ?? null,
|
|
|
- 'phone_mobile' => $contact?->getMobilPhone() ? $this->formatPhoneNumber($contact->getMobilPhone()) : $dolibarrContact['phone_mobile'] ?? null,
|
|
|
+ 'phone_pro' => !empty($contact?->getTelphone()) ? $this->formatPhoneNumber($contact->getTelphone()) : $dolibarrContact['phone_pro'] ?? null,
|
|
|
+ 'phone_mobile' => !empty($contact?->getMobilPhone()) ? $this->formatPhoneNumber($contact->getMobilPhone()) : $dolibarrContact['phone_mobile'] ?? null,
|
|
|
'poste' => !empty($missions) ? $this->formatContactPosition($missions, $person->getGender()?->value) : $dolibarrContact['poste'] ?? null,
|
|
|
'statut' => '1',
|
|
|
];
|