Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0

This commit is contained in:
ldestailleur 2025-03-11 17:32:09 +01:00
commit 2fa9fbdb9a
2 changed files with 7 additions and 2 deletions

View file

@ -2679,6 +2679,7 @@ class EmailCollector extends CommonObject
// Search into contacts of thirdparties to try to guess the thirdparty to use
$resultContact = $contactstatic->findNearest(0, '', '', '', $emailtouseforthirdparty, '', 0);
if ($resultContact > 0) {
$contactstatic->fetch($resultContact);
$idtouseforthirdparty = $contactstatic->socid;
$result = $thirdpartystatic->fetch($idtouseforthirdparty);
if ($result > 0) {

View file

@ -788,8 +788,8 @@ if ($object->id > 0 || !empty($object->ref)) {
$sql .= ", eb.batch, eb.eatby, eb.sellby";
$sql .= " FROM ".$db->prefix()."expeditiondet as ed";
$sql .= " LEFT JOIN ".$db->prefix()."expeditiondet_batch as eb on ed.rowid = eb.fk_expeditiondet";
$sql .= " INNER JOIN ".$db->prefix()."commandedet as cd on ed.fk_origin_line = cd.rowid";
$sql .= " WHERE ed.fk_origin_line = ".(int) $objp->rowid;
$sql .= " INNER JOIN ".$db->prefix()."commandedet as cd on ed.fk_elementdet = cd.rowid";
$sql .= " WHERE ed.fk_elementdet = ".(int) $objp->rowid;
$sql .= " AND ed.fk_expedition = ".(int) $object->id;
$sql .= " ORDER BY ed.rowid, ed.fk_elementdet";
@ -946,6 +946,10 @@ if ($object->id > 0 || !empty($object->ref)) {
$numline++;
}
$suffix = "_".$j."_".$i;
} else {
$errorMsg = 'Shipment dispatch SQL error : '.$db->lasterror();
setEventMessage($errorMsg, 'errors');
dol_syslog($errorMsg, LOG_ERR);
}
if ($j == 0) {