From cefbcf03f6a43eef6ae58e142bacfe34599c425f Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Tue, 27 Jul 2021 16:18:06 +0200 Subject: [PATCH 1/2] fix cancel on makeorder (supplier_order) --- htdocs/fourn/commande/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index cc0f67e4b4e..d5d704c4573 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -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'; } From d9529f260052b8d159d936bdb8d5ba6c3df38957 Mon Sep 17 00:00:00 2001 From: Christian Foellmann Date: Tue, 27 Jul 2021 16:37:34 +0200 Subject: [PATCH 2/2] save makeorder comment to agenda item --- .../triggers/interface_50_modAgenda_ActionsAuto.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 8e23c258d88..fcc51c21df9 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -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 .= '
'; + $object->actionmsg .= $langs->trans("Comment") . ': '.$object->context['comments']; + } + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_RECEIVE') { // Load translation files required by the page