Skip to content

Commit

Permalink
Update tools.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Nov 12, 2024
1 parent 3672783 commit c72c6fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function doliConnect($fonction, $current_user = null, $boolean = false, $refresh
$return = callDoliApi("GET", "/users/email/".$current_user->user_email, null, dolidelay('doliconnector', $refresh));
} elseif ($fonction == 'order' && isset($current_user->user_email) && !empty($current_user->user_email)) {
$thirdparty = callDoliApi("GET", "/thirdparties/email/".$current_user->user_email, null, dolidelay('doliconnector'));
$object = callDoliApi("GET", "/orders?sortfield=t.rowid&sortorder=DESC&limit=1&thirdparty_ids=".$thirdparty->id."&sqlfilters=(t.fk_statut%3A%3D%3A'0')and(t.module_source%3A%3D%3A'doliconnect')&pagination_data=true", null, dolidelay('doliconnector', $refresh));
if (isset($thirdparty->id)) $object = callDoliApi("GET", "/orders?sortfield=t.rowid&sortorder=DESC&limit=1&thirdparty_ids=".$thirdparty->id."&sqlfilters=(t.fk_statut%3A%3D%3A'0')and(t.module_source%3A%3D%3A'doliconnect')&pagination_data=true", null, dolidelay('doliconnector', $refresh));
if ( doliversion('20.0.0') && isset($object->data) ) { $object = $object->data; } else { $object = $object; }
$return = isset($object[0])?$object[0]:null;
if (isset($object[0])) {
Expand Down

0 comments on commit c72c6fa

Please sign in to comment.