Merge pull request #18251 from cfoellmann/improve-makeorder

Improve makeorder
This commit is contained in:
Laurent Destailleur
2021-07-28 15:41:09 +02:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -566,6 +566,11 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
$object->actionmsg = $langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref ? $object->newref : $object->ref));
if (!empty($object->context['comments'])) {
$object->actionmsg .= '<br>';
$object->actionmsg .= $langs->trans("Comment") . ': '.$object->context['comments'];
}
$object->sendtoid = 0;
} elseif ($action == 'ORDER_SUPPLIER_RECEIVE') {
// Load translation files required by the page

View File

@@ -983,7 +983,9 @@ if (empty($reshook)) {
if ($action == 'commande') {
$methodecommande = GETPOST('methodecommande', 'int');
if ($methodecommande <= 0) {
if ($cancel) {
$action = '';
} elseif ($methodecommande <= 0) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors');
$action = 'makeorder';
}