From 462a3b17c2bf5c3a4731cb51bdb7226895390ca4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 20 May 2022 22:24:06 +0200 Subject: [PATCH] Fix regression --- htdocs/core/tpl/objectline_create.tpl.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 48abc6316f4..a3a8e964ee1 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -948,15 +948,14 @@ if (!empty($usemargins) && $user->rights->margins->creer) { var discount = parseFloat($('option:selected', this).attr('data-discount')); if (isNaN(discount)) { discount = parseFloat(jQuery('#idprodfournprice').attr('data-discount'));} - var tva_tx = parseFloat($('option:selected', this).data('tvatx')); + /* var tva_tx = $('option:selected', this).data('tvatx'); */ - console.log("We find supplier price :"+up+" qty: "+qty+" discount: "+discount+" for product "+jQuery('#idprodfournprice').val()); + console.log("We find supplier price :"+up+" qty: "+qty+" tva_tx="+tva_tx+" discount: "+discount+" for product "+jQuery('#idprodfournprice').val()); jQuery("#price_ht").val(up); - $('#tva_tx option').removeAttr('selected').filter('[value='+tva_tx+']').prop('selected', true); - - if (jQuery("#qty").val() < qty) - { + /* $('#tva_tx option').removeAttr('selected').filter('[value='+tva_tx+']').prop('selected', true); */ + + if (jQuery("#qty").val() < qty) { jQuery("#qty").val(qty); } if (jQuery("#remise_percent").val() < discount)