|
|
@@ -41,9 +41,10 @@ class DolibarrService extends ApiRequestService
|
|
|
try {
|
|
|
return $this->getJsonContent(
|
|
|
"contracts",
|
|
|
- ["limit" => "1", "sqlfilters" => "statut=1", "thirdparty_ids=" . $socId => null]
|
|
|
+ ["limit" => "1", "sqlfilters" => "statut=1", "thirdparty_ids" => $socId]
|
|
|
)[0];
|
|
|
} catch (NotFoundHttpException) {
|
|
|
+ // /!\ The dolibarr API will return a 404 error if no contract is found...
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
@@ -60,6 +61,7 @@ class DolibarrService extends ApiRequestService
|
|
|
"invoices",
|
|
|
["sortfield" => "datef", "sortorder" => "DESC", "limit" => 5, "sqlfilters" => "fk_soc=" . $socId]);
|
|
|
} catch (NotFoundHttpException) {
|
|
|
+ // /!\ The dolibarr API will return a 404 error if no invoices are found...
|
|
|
return [];
|
|
|
}
|
|
|
}
|