diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index c3b94332909..110b379c22f 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -774,7 +774,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) { // Now set the VAT var stringforvatrateselection = tva_tx; - if (typeof default_vat_code != 'undefined' && default_vat_code != null) { + if (typeof default_vat_code != 'undefined' && default_vat_code != null && default_vat_code != '') { stringforvatrateselection = stringforvatrateselection+' ('+default_vat_code+')'; } // Set vat rate if field is an input box @@ -996,7 +996,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) { if (typeof default_vat_code === 'undefined') { default_vat_code = jQuery('#idprodfournprice').attr('data-default-vat-code');} // When select is done from HTML input with ajax autocomplete var stringforvatrateselection = tva_tx; - if (typeof default_vat_code != 'undefined' && default_vat_code != null) { + if (typeof default_vat_code != 'undefined' && default_vat_code != null && default_vat_code != '') { stringforvatrateselection = stringforvatrateselection+' ('+default_vat_code+')'; } @@ -1058,7 +1058,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) { if (typeof default_vat_code === 'undefined') { default_vat_code = jQuery('#idprodfournprice').attr('data-default-vat-code');} // When select is done from HTML input with ajax autocomplete var stringforvatrateselection = tva_tx; - if (typeof default_vat_code != 'undefined' && default_vat_code != null) { + if (typeof default_vat_code != 'undefined' && default_vat_code != null && default_vat_code != '') { stringforvatrateselection = stringforvatrateselection+' ('+default_vat_code+')'; }