diff --git a/templates/_js.tpl b/templates/_js.tpl index 8bffb35..5508ae6 100644 --- a/templates/_js.tpl +++ b/templates/_js.tpl @@ -40,14 +40,14 @@ function changeTypeSaisie(type) { g.toggle(['.type_client', '.type_membre'], false); - g.toggle('.type_' + type, true); + + if (type) { + g.toggle('.type_' + type, true); + } } const form = document.querySelector('#f_numero_facture').form; - - if (form.base_receveur) { - changeTypeSaisie(form.base_receveur.value); - } + changeTypeSaisie(form.base_receveur.value); var inputs = $('input[name="base_receveur"]'); diff --git a/templates/facture_ajouter.tpl b/templates/facture_ajouter.tpl index 7ad46c6..9aa9471 100644 --- a/templates/facture_ajouter.tpl +++ b/templates/facture_ajouter.tpl @@ -58,27 +58,26 @@