Corretti errori 1128, 1231 e in parte 1229

git-svn-id: svn://10.65.10.50/trunk@406 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-10-19 11:58:26 +00:00
parent 22ee1b6b43
commit 701c4f8b2e

View File

@ -183,6 +183,19 @@ HIDDEN bool no_dup_iva(TMask_field& f, KEY key)
return TRUE ; return TRUE ;
} }
HIDDEN bool autoexit_rsoc_handler(TMask_field& f, KEY key)
{
if (f.mask().query_mode() && key == K_TAB)
{
TArray parms;
parms.add((TString)format("%d", F_RAGSOC));
parms.add((TString)format("%d", F_RAGSOCA));
::validate(AUTOEXIT_FUNC, (TEdit_field&) f, key, parms);
}
return TRUE;
}
HIDDEN bool autoexit_handler(TMask_field& f, KEY key) HIDDEN bool autoexit_handler(TMask_field& f, KEY key)
{ {
@ -196,10 +209,20 @@ HIDDEN bool autoexit_handler(TMask_field& f, KEY key)
} }
} }
else else
{
if (f.dlg() == F_COFI && key == K_TAB && f.focusdirty())
{
const TString s1(f.get());
if (s1.not_empty())
f.mask().set(F_TIPOPERS, isdigit(s1[0]) ? "G" : "F");
}
if (f.to_check(key) && f.mask().get(F_ALLEG) != "4") if (f.to_check(key) && f.mask().get(F_ALLEG) != "4")
{ {
if (f.dlg() == F_COFI) return no_dup_fis(f, key); if (f.dlg() == F_COFI) return no_dup_fis(f, key);
else return no_dup_iva(f, key); else
if (f.dlg() == F_PAIV) return no_dup_iva(f, key);
}
} }
return TRUE; return TRUE;
} }
@ -360,6 +383,9 @@ void CG0200_application::init_query_mode(TMask& m)
init_pages(m); init_pages(m);
if (gest_vend()) if (gest_vend())
reset_sheet(); reset_sheet();
if (argc() > 2 && *argv(2) == 'F')
m.set(F_TIPOCF, "F");
} }
int CG0200_application::read(TMask& m) int CG0200_application::read(TMask& m)
@ -568,8 +594,10 @@ bool CG0200_application::user_create() // initvar e arrmask
_comuni = new TLocalisamfile(LF_COMUNI); _comuni = new TLocalisamfile(LF_COMUNI);
_msk = new TMask("cg0200a") ; _msk = new TMask("cg0200a") ;
_msk->set_handler(F_OCCASIONALE, occas_handler); _msk->set_handler(F_OCCASIONALE, occas_handler);
_msk->set_handler(F_RAGSOCA, autoexit_rsoc_handler);
_msk->set_handler(F_COFI, autoexit_handler); _msk->set_handler(F_COFI, autoexit_handler);
_msk->set_handler(F_PAIV, autoexit_handler); _msk->set_handler(F_PAIV, autoexit_handler);
_msk->set_handler(F_RICALT, autoexit_handler);
_msk->set_handler(F_CODANAGPER, percip_handler); _msk->set_handler(F_CODANAGPER, percip_handler);
_msk->set_handler(F_TIPOPERS, tipo_handler); _msk->set_handler(F_TIPOPERS, tipo_handler);
_msk->set_handler(F_ALLEG, alleg_handler); _msk->set_handler(F_ALLEG, alleg_handler);
@ -600,6 +628,11 @@ bool CG0200_application::user_destroy() // releasev e arrmask
int cg0200(int argc, char* argv[]) int cg0200(int argc, char* argv[])
{ {
CG0200_application a; CG0200_application a;
a.run(argc, argv, "Clienti/Fornitori"); a.run(argc, argv, "Clienti/Fornitori");
return 0; return 0;
} }