diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d0043916ea4..d2294f781ab 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -20,6 +20,7 @@ * Copyright (C) 2022 Anthony Berton * Copyright (C) 2022 Ferran Marcet * Copyright (C) 2022 Charlene Benke + * Copyright (C) 2023 Joachim Kueter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -633,7 +634,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } } if (!empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) { - if (!empty($_GET['action']) && (preg_match('/^create|^add_price|^make/', $_GET['action']) || preg_match('/^presend/', $_GET['action'])) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) { + if (!empty($_GET['action']) && (preg_match('/^create/', $_GET['action']) || preg_match('/^presend/', $_GET['action'])) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) { // Now search in setup to overwrite default values if (!empty($user->default_values)) { // $user->default_values defined from menu 'Setup - Default values' if (isset($user->default_values[$relativepathstring]['createform'])) { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 1e5aa64b602..2aeb13d762c 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -8,9 +8,10 @@ * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ion Agorria - * Copyright (C) 2018-2019 Frédéric France - * Copyright (C) 2022 Gauthier VERDOL - * Copyright (C) 2022 Charlene Benke + * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2022 Gauthier VERDOL + * Copyright (C) 2022 Charlene Benke + * Copyright (C) 2023 Joachim Kueter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1047,7 +1048,7 @@ if (empty($reshook)) { $action = ''; } elseif ($methodecommande <= 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors'); - $action = 'makeorder'; + $action = 'createorder'; } } @@ -2438,7 +2439,7 @@ if ($action == 'create') { */ if ($user->socid == 0 && $action != 'delete') { - if ($action != 'makeorder' && $action != 'presend' && $action != 'editline') { + if ($action != 'createorder' && $action != 'presend' && $action != 'editline') { print '
'; $parameters = array(); @@ -2569,7 +2570,7 @@ if ($action == 'create') { if ($object->statut == CommandeFournisseur::STATUS_ACCEPTED) { if ($usercanorder) { - print ''; + print ''; } else { print ''; } @@ -2637,7 +2638,7 @@ if ($action == 'create') { print "
"; } - if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') { + if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'createorder') { // Set status to ordered (action=commande) print ''."\n"; print '
'; @@ -2678,7 +2679,7 @@ if ($action == 'create') { $action = 'presend'; } - if ($action != 'makeorder' && $action != 'presend' ) { + if ($action != 'createorder' && $action != 'presend' ) { print '
'; // Generated documents