Correzioni a errori segnalati da gabriella + 0244

git-svn-id: svn://10.65.10.50/trunk@343 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-10-11 14:46:21 +00:00
parent 999ecda037
commit 4e5d2443c1
2 changed files with 53 additions and 56 deletions

View File

@ -8,7 +8,7 @@
#include <nditte.h> #include <nditte.h>
#include <clifo.h> #include <clifo.h>
#include <saldi.h> #include <mov.h>
#include <comuni.h> #include <comuni.h>
#include <cfven.h> #include <cfven.h>
#include <indsp.h> #include <indsp.h>
@ -34,7 +34,7 @@ class CG1200_App : public TPrintapp
int _sort; int _sort;
int _interline; int _interline;
bool _mov_only; bool _mov_only;
TLocalisamfile* _saldi; TLocalisamfile* _mov;
TLocalisamfile* _comuni; TLocalisamfile* _comuni;
// etichette // etichette
@ -112,18 +112,18 @@ bool CG1200_App::preprocess_page(int file, int counter)
switch (file) switch (file)
{ {
case LF_CLIFO: case LF_CLIFO:
{
if (_mov_only) if (_mov_only)
{ {
// se non movimentato const TString16 tipocf(get_field(LF_CLIFO,CLI_TIPOCF));
_saldi->curr().zero(); const TString16 codice(get_field(LF_CLIFO,CLI_CODCF));
_saldi->curr().put(SLD_GRUPPO,get_field(LF_CLIFO,CLI_GRUPPO));
_saldi->curr().put(SLD_CONTO,get_field(LF_CLIFO, CLI_CONTO)); _mov->curr().zero();
_saldi->curr().put(SLD_SOTTOCONTO,get_field(LF_CLIFO,CLI_CODCF)); _mov->curr().put(MOV_TIPO, tipocf);
_saldi->read(); _mov->curr().put(MOV_CODCF, codice);
if (_saldi->curr().get(SLD_GRUPPO) == get_field(LF_CLIFO, CLI_GRUPPO) && _mov->read();
_saldi->curr().get(SLD_CONTO) == get_field(LF_CLIFO,CLI_CONTO) && if (_mov->get(MOV_TIPO) != tipocf ||
_saldi->curr().get(SLD_SOTTOCONTO) == get_field(LF_CLIFO,CLI_CODCF)) _mov->get(MOV_CODCF) != codice)
// OSTIA! e' MOVIMENTATO!
return FALSE; return FALSE;
} }
@ -157,15 +157,17 @@ bool CG1200_App::preprocess_page(int file, int counter)
_name = get_field(LF_CLIFO, CLI_RAGSOC); _name = get_field(LF_CLIFO, CLI_RAGSOC);
s = get_field(LF_CLIFO, CLI_CODANAGPER); s = get_field(LF_CLIFO, CLI_CODANAGPER);
_cpercip = ""; _cpercip = "";
if (s.not_empty()) _cpercip << get_field(LF_CLIFO, CLI_TIPOAPER) << " " << s; const TString16 tipoaper(get_field(LF_CLIFO, CLI_TIPOAPER));
// che mminghia sarrebbbe chisto aahnn??! if (s.not_empty()) _cpercip << tipoaper << " " << s;
// if (strcmp(get_field(LF_CLIFO, CLI_TIPOAPER),"F") == 0)
// { if (tipoaper == "F")
// TString surname = _name.mid(30,50); surname.trim(); {
// _name = _name.mid(0,30); _name.trim(); TString surname = _name.mid(30,50); surname.trim();
// _name << " " << surname; _name = _name.mid(0,30); _name.trim();
// } _name << " " << surname;
}
}
break; break;
case LF_INDSP: case LF_INDSP:
current_cursor()->items(); current_cursor()->items();
@ -188,9 +190,9 @@ bool CG1200_App::preprocess_page(int file, int counter)
_localita << " "; _localita << " ";
_localita << _comuni->curr().get(COM_PROVCOM); _localita << _comuni->curr().get(COM_PROVCOM);
break; break;
default: default:
break; break;
} }
return TRUE; return TRUE;
} }
@ -630,7 +632,7 @@ void CG1200_App::user_create()
_rel->add(LF_INDSP,"TIPOCF=TIPOCF|CODCF=CODCF"); _rel->add(LF_INDSP,"TIPOCF=TIPOCF|CODCF=CODCF");
} }
_saldi = new TLocalisamfile(LF_SALDI); _saldi->setkey(2); _mov = new TLocalisamfile(LF_MOV); _mov->setkey(3);
_comuni = new TLocalisamfile(LF_COMUNI); _comuni = new TLocalisamfile(LF_COMUNI);
_cur_1 = add_cursor(new TCursor(_rel,"",1)); _cur_1 = add_cursor(new TCursor(_rel,"",1));
_cur_2 = add_cursor(new TCursor(_rel,"",2)); _cur_2 = add_cursor(new TCursor(_rel,"",2));
@ -647,7 +649,7 @@ bool CG1200_App::destroy()
{ {
if (_rel) if (_rel)
delete _rel; delete _rel;
delete _saldi; delete _mov;
delete _comuni; delete _comuni;
return TRUE; return TRUE;
} }

View File

@ -6,22 +6,17 @@ RADIOBUTTON RDB_CG12_TYPE 22
BEGIN BEGIN
PROMPT 4 1 "Oggetto" PROMPT 4 1 "Oggetto"
HELP "Selezionare l'archivio che si desidera stampare" HELP "Selezionare l'archivio che si desidera stampare"
ITEM "1|Clienti" ITEM "1|Clienti" MESSAGE RESET,2@|SHOW,1@|HIDE,2@
MESSAGE CLEAR,2@|SHOW,1@ ITEM "2|Fornitori" MESSAGE RESET,1@|SHOW,2@|HIDE,1@
ITEM "2|Fornitori" ITEM "3|Entrambi" MESSAGE HIDE,1@|HIDE,2@|RESET,1@|RESET,2@
MESSAGE CLEAR,1@|SHOW,2@
ITEM "3|Entrambi"
MESSAGE CLEAR,1@|CLEAR,2@
END END
RADIOBUTTON RDB_CG12_SORT 22 RADIOBUTTON RDB_CG12_SORT 22
BEGIN BEGIN
PROMPT 4 6 "Ordinamento" PROMPT 4 6 "Ordinamento"
HELP "Selezionare il tipo di ordinamento dei record stampati" HELP "Selezionare il tipo di ordinamento dei record stampati"
ITEM "1|per Codice" ITEM "1|per Codice" MESSAGE CLEAR,4@|ENABLE,3@
MESSAGE DISABLE,4@|ENABLE,3@|RESET,4@ ITEM "2|per Ragione Sociale" MESSAGE CLEAR,3@|ENABLE,4@
ITEM "2|per Ragione Sociale"
MESSAGE DISABLE,3@|ENABLE,4@|RESET,3@
END END
GROUPBOX DLG_NULL 35 10 GROUPBOX DLG_NULL 35 10