diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 5aeec4f444c..c100dfd0091 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -128,7 +128,9 @@ if ($action == 'add') if (!$error) { - $mesgs = $langs->trans("TransferFromToDone", ''.$accountfrom->label."", ''.$accountto->label."", $amount, $langs->transnoentities("Currency".$conf->currency)); + $mesgs = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount, $langs->transnoentitiesnoconv("Currency".$conf->currency)); + $mesgs = str_replace('{s1}', ''.$accountfrom->label.'', $mesgs); + $mesgs = str_replace('{s2}', ''.$accountto->label.'', $mesgs); setEventMessages($mesgs, null, 'mesgs'); $db->commit(); } else { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 502cb9d920e..11b654e9ef3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1949,7 +1949,7 @@ class Form * @param string $nooutput No print, return the output into a string * @return void|string */ - public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array(), $nooutput = 0) + public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array(), $nooutput = 0) { // phpcs:enable global $langs, $conf; @@ -4495,10 +4495,15 @@ class Form if (inputok.length>0) { $.each(inputok, function(i, inputname) { var more = ""; - if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; } - if ($("#" + inputname).attr("type") == "radio") { more = ":checked"; } - var inputvalue = $("#" + inputname + more).val(); + var inputvalue; + if ($("input[name=\'" + inputname + "\']").attr("type") == "radio") { + inputvalue = $("input[name=\'" + inputname + "\']").val(); + } else { + if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; } + inputvalue = $("#" + inputname + more).val(); + } if (typeof inputvalue == "undefined") { inputvalue=""; } + console.log("check inputname="+inputname+" inputvalue="+inputvalue); options += "&" + inputname + "=" + encodeURIComponent(inputvalue); }); } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index b2997d948ac..e8b8fbdd5a1 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -16,7 +16,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2016 Meziane Sof * Copyright (C) 2017 Josep Lluís Amador - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * Copyright (C) 2019-2020 Thibault FOUCART * Copyright (C) 2020 Pierre Ardoin * @@ -1311,12 +1311,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) // Accountancy_code_buy print ''.$langs->trans("ProductAccountancyBuyCode").''; print ''; - if ($type == 0) - { - $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT); - } else { - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); - } + if ($type == 0) { + $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT); + } else { + $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT); + } print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, ''); print ''; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 3b06cf275a5..0d8a92c1cf3 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -252,7 +252,7 @@ if (empty($reshook)) 'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php', 'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php', 'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php', - 'Livraison' => '/delivery/class/delivery.class.php', + 'Delivery' => '/delivery/class/delivery.class.php', 'Product' => '/product/class/product.class.php', 'Project' => '/projet/class/project.class.php', 'Ticket' => '/ticket/class/ticket.class.php',