Patch level : 12.0 no-patch

Files correlati     : ps0713
Commento            : Aggiunti controlli campi nuovi, spostato cambio pagina dopo testFields == true


git-svn-id: svn://10.65.10.50/branches/R_10_00@23867 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
mtollari 2017-06-14 08:42:45 +00:00
parent f6d7eb4639
commit b5807f1c53
2 changed files with 31 additions and 8 deletions

View File

@ -139,7 +139,6 @@ bool TEsportaIva_msk::on_field_event(TOperable_field& o, TField_event e, long jo
case DLG_RECALC:
if (e != fe_init)
{
show_page(1);
fill();
}
break;
@ -174,18 +173,39 @@ void TEsportaIva_msk::createName()
bool TEsportaIva_msk::testFields() const
{
bool ok = true;
// Controllo presenza campi
if(!get_bool(B_PRTAPE) && !get_bool(B_PRTCHIU))
{
warning_box("Selezionare almeno un tipo di partita!");
return false;
ok = false;
}
if(get_bool(B_DAFORNITORE) && get(F_DACODCF).empty())
{
warning_box("Selezionare il fornitore o togliere il filtro!");
return false;
warning_box("Valorizzare \"Da fornitore\" o togliere il filtro!");
ok = false;
}
return true;
if(get_bool(B_AFORNITORE) && get(F_ACODCF).empty())
{
warning_box("Valorizzare \"A fornitore\" o togliere il filtro!");
ok = false;
}
if(get_bool(B_DAGCS) && get(F_DAGRUPPO).empty() && get(F_DACONTO).empty() && get(F_DASOTTOCONTO).empty())
{
warning_box("Valorizzare almeno uno dei campi \"Da gruppo\", \"Da conto\", \"Da sottoconto\" o togliere il filtro!");
ok = false;
}
if(get_bool(B_AGCS) && get(F_AGRUPPO).empty() && get(F_ACONTO).empty() && get(F_ASOTTOCONTO).empty())
{
warning_box("Valorizzare almeno uno dei campi \"A gruppo\", \"A conto\", \"A sottoconto\" o togliere il filtro!");
ok = false;
}
if(get_real(F_AIMPORTO) != ZERO && get_real(F_DAIMPORTO) > get_real(F_AIMPORTO))
{
warning_box("Valore immesso in \"A importo\" è maggiore rispetto al valore in \"Da importo\"");
ok = false;
}
return ok;
}
TISAM_recordset TEsportaIva_msk::createRecset() const
@ -425,6 +445,9 @@ void TEsportaIva_msk::fill()
// Controllo se i campi corretti
if(!testFields())
return;
// Cambio pagina
show_page(1);
bool with_cms = get_int(F_JOB) == 1;
// Controllo che data mettere per partita chiusa

View File

@ -249,14 +249,14 @@ BEGIN
FLAGS "D"
END
NUMBER F_DAIMPORTO 10 2
NUMBER F_DAIMPORTO 18 2
BEGIN
PROMPT 0 9 "Da Importo:"
END
NUMBER F_AIMPORTO 10 2
NUMBER F_AIMPORTO 18 2
BEGIN
PROMPT 25 9 "A Importo:"
PROMPT 35 9 "A Importo:"
END