Skip to content

Commit 0a449af

Browse files
committed
Fix vat selection
1 parent 201fb62 commit 0a449af

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

myaccount/tpl/myaccount.tpl.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
print '<div class="form-group">
107107
<label>'.$langs->trans("VATIntra").'</label> ';
108108
if (! empty($mythirdpartyaccount->tva_assuj) && empty($mythirdpartyaccount->tva_intra)) {
109-
print img_warning($langs->trans("Mandatory"), 'class="hideifnonassuj"');
109+
print img_warning($langs->trans("Mandatory"), '', 'hideifnonassuj');
110110
}
111111

112112
$placeholderforvat='';
@@ -196,9 +196,12 @@
196196
jQuery(document).ready(function() {
197197
jQuery("#vatassuj").click(function() {
198198
console.log("Click on vatassuj "+jQuery("#vatassuj").is(":checked"));
199-
jQuery(".hideifnonassuj").hide();
200-
jQuery(".hideifnonassuj").show();
201-
jQuery("#vatnumber").focus();
199+
if (jQuery("#vatassuj").is(":checked")) {
200+
jQuery(".hideifnonassuj").show();
201+
jQuery("#vatnumber").focus();
202+
} else {
203+
jQuery(".hideifnonassuj").hide();
204+
}
202205
});
203206
});
204207
</script>';

0 commit comments

Comments
 (0)