diff --git a/modules/banche/actions.php b/modules/banche/actions.php
index 4fb8fcfa2..f8f2daa6e 100755
--- a/modules/banche/actions.php
+++ b/modules/banche/actions.php
@@ -102,6 +102,7 @@ switch (filter('op')) {
echo json_encode([
'id_nazione' => [
'id' => $nazione->id,
+ 'iso2' => $nazione->iso2,
'text' => $nazione->nome,
],
'bank_code' => $iban->getBankCode(),
diff --git a/modules/banche/add.php b/modules/banche/add.php
index 91c3613a6..ecb21d3a1 100755
--- a/modules/banche/add.php
+++ b/modules/banche/add.php
@@ -119,10 +119,12 @@ echo '
success: function (response) {
compilaCampi(response);
- if (response.id_nazione.text === "Italia"){
+ if (response.id_nazione.iso2 === "IT"){
bic.setRequired(false);
+ $("label[for=bic]").html('');
} else {
bic.setRequired(true);
+ $("label[for=bic]").html('*');
}
},
error: function() {
diff --git a/modules/banche/edit.php b/modules/banche/edit.php
index 63e62cb0e..959255f3c 100644
--- a/modules/banche/edit.php
+++ b/modules/banche/edit.php
@@ -192,10 +192,12 @@ if (!empty($numero_documenti)) {
success: function (response) {
compilaCampi(response);
- if (response.id_nazione.text === "Italia"){
+ if (response.id_nazione.iso2 === "IT"){
bic.setRequired(false);
+ $("label[for=bic]").html('');
} else {
bic.setRequired(true);
+ $("label[for=bic]").html('*');
}
},
error: function() {