This commit is contained in:
ldestailleur 2025-08-14 00:49:56 +02:00
parent ccafcd6f91
commit 2c2f085b5c
2 changed files with 5 additions and 2 deletions

View file

@ -2062,7 +2062,7 @@ if ($action == 'create') {
$text .= $notify->confirmMessage('SHIPPING_VALIDATE', $object->socid, $object);
}
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('ValidateSending'), $text, 'confirm_valid', '', 0, 1, 250);
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('ValidateSending'), $text, 'confirm_valid', '', 0, 1, 260);
}
// Confirm cancellation
if ($action == 'cancel') {

View file

@ -2627,7 +2627,10 @@ class Expedition extends CommonObject
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET fk_statut = ".self::STATUS_CLOSED.", date_expedition = '".$this->db->escape($this->db->idate(dol_now()))."'";
$sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET fk_statut = ".self::STATUS_CLOSED;
if (empty($this->date_shipping)) { // Date of real shipment was not yet set, we force it on closing
$sql .= ", date_expedition = '".$this->db->escape($this->db->idate(dol_now()))."'";
}
$sql .= " WHERE rowid = ".((int) $this->id)." AND fk_statut > 0";
$resql = $this->db->query($sql);