From 98b38628c57a583e2288ec6a8ea6c1dd88936dec Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 19 Sep 2012 17:24:40 +0200 Subject: [PATCH] Fix: optimizing --- htdocs/core/tpl/predefinedproductline_create.tpl.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)