From 95c2650160f0d9e6fd8b263cb7bc26d651fe4932 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 30 Aug 2012 11:10:17 +0200 Subject: [PATCH] Fix: best method --- htdocs/core/tpl/objectline_add.tpl.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_add.tpl.php b/htdocs/core/tpl/objectline_add.tpl.php index 88a3022338f..f07a23ab26a 100644 --- a/htdocs/core/tpl/objectline_add.tpl.php +++ b/htdocs/core/tpl/objectline_add.tpl.php @@ -369,7 +369,9 @@ $(document).ready(function() { $('#tva_tx').change(function() { if ($(this).val() == 0) { - $('#price_ttc').attr('disabled','disabled'); + if ($('#idprod').val() == 0) { + $('#price_ttc').attr('disabled','disabled'); + } $('#price_ttc').val(''); } else { // Enable excl.VAT field