Corretti errori 1129r 1143

git-svn-id: svn://10.65.10.50/trunk@382 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-10-14 18:42:04 +00:00
parent 11b5d7a072
commit 0a90ee7de7
2 changed files with 7 additions and 13 deletions

View File

@ -220,19 +220,14 @@ HIDDEN bool gruppo_handler(TMask_field& f, KEY key)
const int gruppo = atoi(m.get(FLD_CM1_GRUPPO)); const int gruppo = atoi(m.get(FLD_CM1_GRUPPO));
const int conto = atoi(m.get(FLD_CM1_CONTO)); const int conto = atoi(m.get(FLD_CM1_CONTO));
const long sottoc = atol(m.get(FLD_CM1_SOTTOCONTO)); const long sottoc = atol(m.get(FLD_CM1_SOTTOCONTO));
const TFixed_string descrizione(m.get(FLD_CM1_DESC)); if (gruppo == 0 && conto == 0 && sottoc == 0)
return TRUE;
CG0100_application* app = (CG0100_application*) MainApp(); CG0100_application* app = (CG0100_application*) MainApp();
TLocalisamfile& pconti = app->get_relation()->lfile(); TLocalisamfile& pconti = app->get_relation()->lfile();
if (gruppo == 0 && conto == 0 && sottoc == 0 && descrizione.not_empty()) if ((gruppo == 0) && (conto != 0 || sottoc != 0))
return TRUE;
if (gruppo == 0)
{
if (conto != 0 || sottoc != 0)
return f.warning_box("Codice conto impossibile!"); return f.warning_box("Codice conto impossibile!");
else
return f.error_box("E' obbligatorio l'inserimento del gruppo");
}
if (conto > 0 && sottoc == 0) // conto => ricerca gruppo if (conto > 0 && sottoc == 0) // conto => ricerca gruppo
{ {
pconti.zero() ; pconti.zero() ;

View File

@ -26,7 +26,6 @@ BEGIN
DISPLAY "Descrizione@50" DESCR DISPLAY "Descrizione@50" DESCR
OUTPUT FLD_CM1_GRUPPO GRUPPO OUTPUT FLD_CM1_GRUPPO GRUPPO
OUTPUT FLD_CM1_DESC DESCR OUTPUT FLD_CM1_DESC DESCR
VALIDATE NOT_EMPTY_FUNC
END END
NUMBER FLD_CM1_CONTO 3 NUMBER FLD_CM1_CONTO 3
@ -35,7 +34,7 @@ BEGIN
FIELD LF_PCON->CONTO FIELD LF_PCON->CONTO
FLAGS "R" FLAGS "R"
KEY 1 KEY 1
USE LF_PCON KEY 1 SELECT (CONTO!="") && (SOTTOCONTO="") USE LF_PCON KEY 1 SELECT SOTTOCONTO=""
COPY INPUT FLD_CM1_GRUPPO COPY INPUT FLD_CM1_GRUPPO
INPUT CONTO FLD_CM1_CONTO INPUT CONTO FLD_CM1_CONTO
DISPLAY "Gruppo" GRUPPO DISPLAY "Gruppo" GRUPPO
@ -52,7 +51,7 @@ BEGIN
FIELD LF_PCON->SOTTOCONTO FIELD LF_PCON->SOTTOCONTO
FLAGS "R" FLAGS "R"
KEY 1 KEY 1
USE LF_PCON KEY 1 SELECT SOTTOCONTO!="" USE LF_PCON KEY 1
COPY INPUT FLD_CM1_CONTO COPY INPUT FLD_CM1_CONTO
INPUT SOTTOCONTO FLD_CM1_SOTTOCONTO INPUT SOTTOCONTO FLD_CM1_SOTTOCONTO
DISPLAY "Gruppo" GRUPPO DISPLAY "Gruppo" GRUPPO