diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index e10dc184ccb..3fadf385543 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -142,8 +142,7 @@ if (! empty($conf->margin->enabled)) { $("#idprod").change(function() { $("#fournprice options").remove(); $("#fournprice").hide(); - $("#buying_price").val(""); - $("#buying_price").show(); + $("#buying_price").val("").show(); $.post('/fourn/ajax/getSupplierPrices.php', {'idprod': $(this).val()}, function(data) { if (data && data.length > 0) { var options = ''; @@ -158,9 +157,8 @@ $("#idprod").change(function() { options += '>'+this.label+''; }); options += ''; - $("#fournprice").html(options); $("#buying_price").hide(); - $("#fournprice").show(); + $("#fournprice").html(options).show(); $("#fournprice").change(function() { var selval = $(this).find('option:selected').attr("price"); if (selval)