diff --git a/tp/tp0101.cpp b/tp/tp0101.cpp index f82694eb5..c7e810978 100755 --- a/tp/tp0101.cpp +++ b/tp/tp0101.cpp @@ -424,6 +424,7 @@ bool TPack_clifo::trasferisci() log(str); } // iban + bool ibanok = false; const bool ibanflag = get_long("IbanFlag") != 0; if (ibanflag) { @@ -440,9 +441,22 @@ bool TPack_clifo::trasferisci() rec_cfban.put(CFBAN_CAB, iban.mid(10,5)); rec_cfban.put(CFBAN_NUMCC, iban.mid(15)); rec_cfban.put(CFBAN_IBAN, iban); - test_write(cfban, !needs_creation); + ibanok = test_write(cfban, !needs_creation); } } + if (!ibanok) + { + cfban.zero(); + rec_cfban.put(CFBAN_TIPOCF, tipocf); + rec_cfban.put(CFBAN_CODCF, codcf); + rec_cfban.put(CFBAN_TIPOBAN, 'V'); + rec_cfban.put(CFBAN_NRIGA, 1); + rec_cfban.put(CFBAN_ABI, get_str("ABICode")); + rec_cfban.put(CFBAN_CAB, get_str("CABCode")); + rec_cfban.put(CFBAN_NUMCC, get_str("CC")); + ibanok = test_write(cfban, !needs_creation); + } + // agente rec_cfven.put(CFV_CODAG, get_agente());