mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-04 17:57:48 +01:00
Rendere il bic obbligatorio solo se nazione non è Italia
This commit is contained in:
parent
c91406196f
commit
97985a5212
@ -76,6 +76,7 @@ echo '
|
||||
var branch_code = input("branch_code");
|
||||
var bank_code = input("bank_code");
|
||||
var id_nazione = input("id_nazione");
|
||||
var bic = input("bic");
|
||||
|
||||
var components = [branch_code, bank_code, id_nazione];
|
||||
|
||||
@ -117,6 +118,12 @@ echo '
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
compilaCampi(response);
|
||||
|
||||
if (response.id_nazione.text === "Italia"){
|
||||
bic.setRequired(false);
|
||||
} else {
|
||||
bic.setRequired(true);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
toastr["error"]("<?php echo tr('Formato IBAN non valido'); ?>");
|
||||
|
@ -149,6 +149,7 @@ if (!empty($numero_documenti)) {
|
||||
var check_digits = input("check_digits");
|
||||
var national_check_digits = input("national_check_digits");
|
||||
var id_nazione = input("id_nazione");
|
||||
var bic = input("bic");
|
||||
|
||||
var components = [branch_code, bank_code, account_number, check_digits, national_check_digits, id_nazione];
|
||||
|
||||
@ -190,6 +191,12 @@ if (!empty($numero_documenti)) {
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
compilaCampi(response);
|
||||
|
||||
if (response.id_nazione.text === "Italia"){
|
||||
bic.setRequired(false);
|
||||
} else {
|
||||
bic.setRequired(true);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
toastr["error"]("<?php echo tr('Formato IBAN non valido'); ?>");
|
||||
|
Loading…
x
Reference in New Issue
Block a user