From 9d790e27f311ec4554c0d78cd08575b94e81a7a4 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 5 Jun 1995 16:08:56 +0000 Subject: [PATCH] Errore MI3143 git-svn-id: svn://10.65.10.50/trunk@1442 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba4200.cpp | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/ba/ba4200.cpp b/ba/ba4200.cpp index 14a8668b2..6c6a3af0b 100755 --- a/ba/ba4200.cpp +++ b/ba/ba4200.cpp @@ -340,7 +340,10 @@ bool no_dup_fis(TMask_field& f, KEY key) const TString16 cofi(f.get()); if ( cofi.not_empty() ) - { + { + // TRelation * r = app.get_relation(); + + // r->save_status(); anag.zero() ; anag.put(N_TIPOA, app.tip_ana()); anag.put(N_COFI, cofi ) ; @@ -351,11 +354,9 @@ bool no_dup_fis(TMask_field& f, KEY key) const TString16 s = anag.get(N_CODANAGR), s1 = app.cod_ana(); if (anag.good() && (t1 != t || s1 != s)) - { - f.error_box("Codice fiscale gia' utilizzato per il codice %c/%s", - t, (const char*)s); - return FALSE; - } + f.message_box("Codice fiscale gia' utilizzato per il codice %c/%s", + t, (const char*)s); + // r->restore_status(); } return TRUE ; } @@ -430,8 +431,6 @@ TMask* TPersone_app::get_mask(int mode) _msk[MSKF]->set_handler(FLD_AF1_COMRES, gest_uff_imp); _msk[MSKF]->set_handler(FLD_AF2_COMRF, gest_uff_imp); _msk[MSKF]->set_handler(FLD_AF2_COMCORR, clear_cap); - _msk[MSKF]->set_handler(FLD_AF1_PAIV, no_dup_iva_f); - _msk[MSKF]->set_handler(FLD_AF1_COFI, no_dup_fis); _msk[MSKF]->set_handler(F_UFFCONC, uff_conc); _msk[MSKF]->set_handler(ba4200_handler); } @@ -443,7 +442,7 @@ TMask* TPersone_app::get_mask(int mode) _msk[MSKG]->set_handler(FLD_AG2_COMRES, gest_uff_imp); _msk[MSKG]->set_handler(FLD_AG1_COMRF, gest_uff_imp); _msk[MSKG]->set_handler(FLD_AG2_COMCORR, clear_cap); - _msk[MSKG]->set_handler(FLD_AG1_COFI, no_dup_fis); + // _msk[MSKG]->set_handler(FLD_AG1_COFI, no_dup_iva_g); _msk[MSKG]->set_handler(FLD_AG1_PAIV, no_dup_iva_g); _msk[MSKG]->set_handler(F_UFFCONC, uff_conc); _msk[MSKG]->set_handler(ba4200_handler); @@ -553,7 +552,19 @@ int TPersone_app::rewrite(const TMask& m) _reset_uff_conc = FALSE; r->lfile().zero("UFFCONC"); } - manual_save(m); + manual_save(m); + /* if (ana_fis()) + { + if (m.field(FLD_AF2_INDRF).dirty() || m.field(FLD_AF2_CIVRF).dirty() || + m.field(FLD_AF2_CAPRF).dirty() || m.field(FLD_AF2_COMRF).dirty()) + message_box("Attenzione e' stata variata la residenza fiscale. Controllare le unita' locali"); + } + else + { + if (m.field(FLD_AG1_INDRF).dirty() || m.field(FLD_AG1_CIVRF).dirty() || + m.field(FLD_AG1_CAPRF).dirty() || m.field(FLD_AG1_COMRF).dirty()) + message_box("Attenzione e' stata variata la residenza fiscale. Controllare le unita' locali"); + } */ return r->rewrite(); }