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:
parent
153fc29d92
commit
4584da5e26
@ -468,7 +468,8 @@ bool BA1100_application::menu(MENU_TAG m)
|
||||
|
||||
enable_menu_item(M_FILE_NEW);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
return xvt_test_menu_tag(BAR_ITEM(2));
|
||||
}
|
||||
|
||||
int ba1100(int argc, char** argv)
|
||||
|
@ -61,7 +61,7 @@ bool ba4200_handler(TMask& m, KEY k)
|
||||
{
|
||||
if (app->ana_fis()) app->set_tip_ana(TGIU);
|
||||
else app->set_tip_ana(TFIS);
|
||||
m.stop_run(k);
|
||||
m.stop_run(K_ESC);
|
||||
return FALSE;
|
||||
}
|
||||
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();
|
||||
TLocalisamfile& anag = *app->get_relation()->lfile(LF_ANAG) ;
|
||||
|
||||
const TString cofi(f.get());
|
||||
if ( cofi.not_empty() && !anag.empty() )
|
||||
const TString16 cofi(f.get());
|
||||
if ( cofi.not_empty() )
|
||||
{
|
||||
beep();
|
||||
anag.zero() ;
|
||||
anag.put(N_TIPOA, app->tip_ana());
|
||||
anag.put(N_COFI, cofi ) ;
|
||||
anag.setkey(3) ;
|
||||
anag.read() ;
|
||||
anag.setkey(1) ;
|
||||
char t = anag.get_char(N_TIPOA);
|
||||
char t1 = app->tip_ana();
|
||||
TString s = anag.get(N_CODANAGR), s1 = app->cod_ana();
|
||||
const char t = anag.get_char(N_TIPOA), t1 = app->tip_ana();
|
||||
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",
|
||||
f.error_box("Codice fiscale gia' utilizzato per il codice %c/%s",
|
||||
t, (const char*)s);
|
||||
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() )
|
||||
{
|
||||
anag.zero() ;
|
||||
anag.put(N_TIPOA, app->tip_ana());
|
||||
anag.put(N_STATOPAIV, msk.get(fd_sta) ) ;
|
||||
anag.put(N_PAIV, msk.get(fd_iva) ) ;
|
||||
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)
|
||||
{
|
||||
if (key == K_ENTER && f.get().empty())
|
||||
if (key == K_ENTER && !f.mask().query_mode() && f.get().empty())
|
||||
{
|
||||
bool ok = FALSE;
|
||||
if (!f.mask().get_bool(CHK_AG1_ENTENCOMM))
|
||||
|
3
ba/prassi.aut
Executable file
3
ba/prassi.aut
Executable file
@ -0,0 +1,3 @@
|
||||
ba Base
|
||||
cg Contabilita' Generale
|
||||
te Testmask
|
Loading…
x
Reference in New Issue
Block a user