|
|
@@ -130,13 +130,15 @@ class DolibarrSyncService
|
|
|
$newSocietyData['phone'] = $this->getOrganizationPhone($organization);
|
|
|
|
|
|
// Sync Network
|
|
|
- $newSocietyData['parent'] = '' . match (
|
|
|
- $this->getOrganizationNetworkId($organization)
|
|
|
- ) {
|
|
|
- NetworkEnum::CMF()->getValue() => $cmfDolibarrId,
|
|
|
- NetworkEnum::FFEC()->getValue() => $ffecDolibarrId,
|
|
|
- default => null
|
|
|
- };
|
|
|
+ if (!in_array($organization->getId(), [NetworkEnum::CMF()->getValue(), NetworkEnum::FFEC()->getValue()], true)) {
|
|
|
+ $newSocietyData['parent'] = '' . match (
|
|
|
+ $this->getOrganizationNetworkId($organization)
|
|
|
+ ) {
|
|
|
+ NetworkEnum::CMF()->getValue() => $cmfDolibarrId,
|
|
|
+ NetworkEnum::FFEC()->getValue() => $ffecDolibarrId,
|
|
|
+ default => null
|
|
|
+ };
|
|
|
+ }
|
|
|
|
|
|
// More infos
|
|
|
$infos = [];
|