Corretta gestione codici fiscali e IVA duplicati

git-svn-id: svn://10.65.10.50/trunk@92 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-08-30 08:04:56 +00:00
parent 153fc29d92
commit 4584da5e26
3 changed files with 505 additions and 499 deletions

View File

@ -468,7 +468,8 @@ bool BA1100_application::menu(MENU_TAG m)
enable_menu_item(M_FILE_NEW); enable_menu_item(M_FILE_NEW);
} }
return TRUE;
return xvt_test_menu_tag(BAR_ITEM(2));
} }
int ba1100(int argc, char** argv) int ba1100(int argc, char** argv)

View File

@ -61,7 +61,7 @@ bool ba4200_handler(TMask& m, KEY k)
{ {
if (app->ana_fis()) app->set_tip_ana(TGIU); if (app->ana_fis()) app->set_tip_ana(TGIU);
else app->set_tip_ana(TFIS); else app->set_tip_ana(TFIS);
m.stop_run(k); m.stop_run(K_ESC);
return FALSE; return FALSE;
} }
if (k != K_F5 || m.mode() != MODE_MOD) return TRUE; if (k != K_F5 || m.mode() != MODE_MOD) return TRUE;
@ -285,21 +285,22 @@ bool no_dup_fis(TMask_field& f, KEY key)
BA4200_application* app = (BA4200_application*) MainApp(); BA4200_application* app = (BA4200_application*) MainApp();
TLocalisamfile& anag = *app->get_relation()->lfile(LF_ANAG) ; TLocalisamfile& anag = *app->get_relation()->lfile(LF_ANAG) ;
const TString cofi(f.get()); const TString16 cofi(f.get());
if ( cofi.not_empty() && !anag.empty() ) if ( cofi.not_empty() )
{ {
beep();
anag.zero() ; anag.zero() ;
anag.put(N_TIPOA, app->tip_ana());
anag.put(N_COFI, cofi ) ; anag.put(N_COFI, cofi ) ;
anag.setkey(3) ; anag.setkey(3) ;
anag.read() ; anag.read() ;
anag.setkey(1) ; anag.setkey(1) ;
char t = anag.get_char(N_TIPOA); const char t = anag.get_char(N_TIPOA), t1 = app->tip_ana();
char t1 = app->tip_ana(); const TString16 s = anag.get(N_CODANAGR), s1 = app->cod_ana();
TString s = anag.get(N_CODANAGR), s1 = app->cod_ana();
if (anag.good() && (t1 != t || s1 != s)) if (anag.good() && (t1 != t || s1 != s))
{ {
f.error_box("Codice fiscale gia' utilizzato per il codice : %c/%s", f.error_box("Codice fiscale gia' utilizzato per il codice %c/%s",
t, (const char*)s); t, (const char*)s);
return FALSE; return FALSE;
} }
@ -318,6 +319,7 @@ bool gest_iva(TMask_field& f, KEY key , short fd_sta ,short fd_iva )
if ( f.get().not_empty() && !anag.empty() ) if ( f.get().not_empty() && !anag.empty() )
{ {
anag.zero() ; anag.zero() ;
anag.put(N_TIPOA, app->tip_ana());
anag.put(N_STATOPAIV, msk.get(fd_sta) ) ; anag.put(N_STATOPAIV, msk.get(fd_sta) ) ;
anag.put(N_PAIV, msk.get(fd_iva) ) ; anag.put(N_PAIV, msk.get(fd_iva) ) ;
anag.setkey(4) ; anag.setkey(4) ;
@ -344,7 +346,7 @@ bool no_dup_iva_f(TMask_field& f, KEY key)
bool no_dup_iva_g(TMask_field& f, KEY key) bool no_dup_iva_g(TMask_field& f, KEY key)
{ {
if (key == K_ENTER && f.get().empty()) if (key == K_ENTER && !f.mask().query_mode() && f.get().empty())
{ {
bool ok = FALSE; bool ok = FALSE;
if (!f.mask().get_bool(CHK_AG1_ENTENCOMM)) if (!f.mask().get_bool(CHK_AG1_ENTENCOMM))

3
ba/prassi.aut Executable file
View File

@ -0,0 +1,3 @@
ba Base
cg Contabilita' Generale
te Testmask