Merge pull request #24593 from altairisfr/deldispatchline
FIX : reopen supplier order after line delete if needed
This commit is contained in:
commit
53736f5bfb
@ -916,8 +916,18 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->commit();
|
// reopen order if necessary
|
||||||
|
if ($object->status == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) {
|
||||||
|
if ($object->setStatus($user, CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
$error++;
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$db->commit();
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user