Merge pull request #18251 from cfoellmann/improve-makeorder
Improve makeorder
This commit is contained in:
commit
9dc45ac6ec
@ -566,6 +566,11 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
}
|
}
|
||||||
$object->actionmsg = $langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref ? $object->newref : $object->ref));
|
$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;
|
$object->sendtoid = 0;
|
||||||
} elseif ($action == 'ORDER_SUPPLIER_RECEIVE') {
|
} elseif ($action == 'ORDER_SUPPLIER_RECEIVE') {
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
|
|||||||
@ -983,7 +983,9 @@ if (empty($reshook)) {
|
|||||||
if ($action == 'commande') {
|
if ($action == 'commande') {
|
||||||
$methodecommande = GETPOST('methodecommande', 'int');
|
$methodecommande = GETPOST('methodecommande', 'int');
|
||||||
|
|
||||||
if ($methodecommande <= 0) {
|
if ($cancel) {
|
||||||
|
$action = '';
|
||||||
|
} elseif ($methodecommande <= 0) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors');
|
||||||
$action = 'makeorder';
|
$action = 'makeorder';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user