Patch level : 1.7 at

Files correlati     : at0.exe
Ricompilazione Demo : [ ]
Commento            : Sblocco sospesi: adeguato il tracciato di stampa alle richieste di Rimini e Santarcangelo: motivi, telefoni e riga vuota tra i nomi


git-svn-id: svn://10.65.10.50/trunk@12790 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 2005-03-08 13:37:24 +00:00
parent 43f85a5e8d
commit 3a841185c5

View File

@ -43,7 +43,7 @@ class TSbloccoSospesi : public TPrintapp
TString16 _finesospensione; TString16 _finesospensione;
int _intsi_f1, _intsi_f2, _intsi_m, _intaf_m, _etadonne; int _intsi_f1, _intsi_f2, _intsi_m, _intaf_m, _etadonne;
int _numdon1, _numdon2; int _numdon1, _numdon2;
TString16 _catini1, _catfin1, _catini2, _catfin2, _motivoid; TString16 _catini1, _catfin1, _catini2, _catfin2;
bool _sttess2, _dataisc, _nomessage, _autoid; bool _sttess2, _dataisc, _nomessage, _autoid;
static bool filter_func_sbloccosospesi(const TRelation* rel); static bool filter_func_sbloccosospesi(const TRelation* rel);
@ -63,7 +63,7 @@ public:
void header_sezione(const TString16 codsez, const TString16 codsot); void header_sezione(const TString16 codsez, const TString16 codsot);
void footer_sezione(); void footer_sezione();
void fine_stampa(); void fine_stampa();
TSbloccoSospesi() : _data_sblocco(TODAY), _data_stampa(TODAY), _tiposo(""), _cognome_nome("",25), _operazione("",40) {} TSbloccoSospesi() : _data_sblocco(TODAY), _data_stampa(TODAY), _tiposo(""), _cognome_nome("",25), _operazione("",45) {}
}; };
HIDDEN inline TSbloccoSospesi& app() { return (TSbloccoSospesi&) main_app(); } HIDDEN inline TSbloccoSospesi& app() { return (TSbloccoSospesi&) main_app(); }
@ -148,6 +148,7 @@ void TSbloccoSospesi::filtra_sezioni()
bool TSbloccoSospesi::preprocess_page(int file, int counter) bool TSbloccoSospesi::preprocess_page(int file, int counter)
{ {
TRectype& recsog = current_cursor()->curr(); TRectype& recsog = current_cursor()->curr();
TRectype& reccon = current_cursor()->curr(LF_CONTSAN);
TString80 nome = recsog.get(SOG_COGNOME); TString80 nome = recsog.get(SOG_COGNOME);
nome << " "; nome << " ";
nome << recsog.get(SOG_NOME); nome << recsog.get(SOG_NOME);
@ -177,31 +178,19 @@ bool TSbloccoSospesi::preprocess_page(int file, int counter)
if (stato=="SO" && pros_stato==FINE_SOSPENSIONE && datafine.ok() && datafine<=app()._data_sblocco) if (stato=="SO" && pros_stato==FINE_SOSPENSIONE && datafine.ok() && datafine<=app()._data_sblocco)
{ {
const TDate datastato = recsog.get_date(SOG_DATASTATO); const TDate datastato = recsog.get_date(SOG_DATASTATO);
operazione << datastato.string(); operazione.format("%s %s %4s -- -- -- SO FS", datastato.string(), datafine.string(), (const char*) reccon.get(CON_MOTIVO));
operazione << " ";
operazione << datafine.string();
operazione << " ";
operazione << "-- -- -- SO FS";
} }
else else
if (statosi == "SO" && datafinesi.ok() && datafinesi <= app()._data_sblocco) if (statosi == "SO" && datafinesi.ok() && datafinesi <= app()._data_sblocco)
{ {
const TDate datastato = recsog.get_date(SOG_DATASI); const TDate datastato = recsog.get_date(SOG_DATASI);
operazione << datastato.string(); operazione.format("%s %s %4s SI SO ID", datastato.string(), datafinesi.string(), (const char*)reccon.get(CON_MOTIVO));
operazione << " ";
operazione << datafinesi.string();
operazione << " ";
operazione << "SI SO ID";
} }
else else
if (statoaf == "SO" && datafineaf.ok() && datafineaf <= app()._data_sblocco) if (statoaf == "SO" && datafineaf.ok() && datafineaf <= app()._data_sblocco)
{ {
const TDate datastato = recsog.get_date(SOG_DATAAF); const TDate datastato = recsog.get_date(SOG_DATAAF);
operazione << datastato.string(); operazione.format("%s %s %4s AF SO ID", datastato.string(), datafineaf.string(), (const char*)reccon.get(CON_MOTIVO));
operazione << " ";
operazione << datafineaf.string();
operazione << " ";
operazione << "AF SO ID";
} }
TDate datarif = app()._data_sblocco; TDate datarif = app()._data_sblocco;
datarif.set_year(datarif.year()-2); datarif.set_year(datarif.year()-2);
@ -378,7 +367,11 @@ void TSbloccoSospesi::set_page(int file, int cnt)
set_row(1,"@56g@S", FLD(LF_SOGGETTI,SOG_CODSEZ)); set_row(1,"@56g@S", FLD(LF_SOGGETTI,SOG_CODSEZ));
set_row(1,"@59g@S", FLD(LF_SOGGETTI,SOG_CODSOT)); set_row(1,"@59g@S", FLD(LF_SOGGETTI,SOG_CODSOT));
set_row(1,"@62g#a", &_operazione); set_row(1,"@62g#a", &_operazione);
set_row(1,"@105g@ld", FLD(LF_SOGGETTI,SOG_DATAPROSSI)); set_row(1,"@110g@ld", FLD(LF_SOGGETTI,SOG_DATAPROSSI));
set_row(1,"@121g@S", FLD(LF_SOGGETTI,SOG_TELABI));
set_row(2,"@121g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
set_row(3,"@121g@S", FLD(LF_SOGGETTI,SOG_TELALT));
set_row(4,"");
} }
bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel) bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
@ -497,7 +490,7 @@ void TSbloccoSospesi::crea_intestazione()
{ {
reset_header(); reset_header();
TString sep(115); TString sep(136);
if (_definitiva) if (_definitiva)
sep = "SBLOCCO DEFINITIVO SOSPESI "; sep = "SBLOCCO DEFINITIVO SOSPESI ";
else else
@ -512,13 +505,15 @@ void TSbloccoSospesi::crea_intestazione()
set_header(2,"@0g%10s", (const char*) data_stampa); set_header(2,"@0g%10s", (const char*) data_stampa);
sep = ""; sep = "";
sep << "Pag. @#"; sep << "Pag. @#";
set_header(2, "@88g%s", (const char*) sep); set_header(2, "@120g%s", (const char*) sep);
sep = ""; sep = "";
sep.fill('-'); sep.fill('-');
set_header(3, (const char *) sep); set_header(3, (const char *) sep);
set_header(4,"@0gCod.@9gC.@12gCognome e nome@38gNato il@49gTess.@56gSe/So@62gData sosp.@73gScadenza@84gDo Da A Sogg.@105gData pr.SI"); set_header(4,"@0gCod.@9gC.@12gCognome e nome@38gNato il@49gTess.@56gSe/So@62gData sosp.@73gScadenza@84gMot. @89gDo Da A Sogg.@110gData pr.SI@121gTel. abi.");
set_header(5,"@0g------@9g--@12g-------------------------@38g----------@49g------@56g-- --@62g----------@73g----------@84g---------------------@105g----------"); set_header(5,"@121gTel. lav.");
set_header(6,"@121gTel. altro");
set_header(7,"@0g------@9g--@12g-------------------------@38g----------@49g------@56g-- --@62g----------@73g----------@84g----@89g---------------------@110g----------@121g--------------");
printer().footerlen(3); printer().footerlen(3);
} }
@ -527,6 +522,7 @@ bool TSbloccoSospesi::user_create()
_msk = new TMask("at0700a"); _msk = new TMask("at0700a");
_msk->set_handler(F_DATA,data_handler); _msk->set_handler(F_DATA,data_handler);
_rel = new TRelation(LF_SOGGETTI); _rel = new TRelation(LF_SOGGETTI);
_rel->add(LF_CONTSAN,"CODICE==CODICE|DATACON==DATASTATO");
_rel->add(LF_SEZIONI,"CODSEZ==CODSEZ|CODSOT==CODSOT"); _rel->add(LF_SEZIONI,"CODSEZ==CODSEZ|CODSOT==CODSOT");
_rel->add("TCS", "CODTAB==STATO",1,0,ALIAS_TCS); _rel->add("TCS", "CODTAB==STATO",1,0,ALIAS_TCS);
_rel->add("CTD", "CODTAB==CATDON",1,0,ALIAS_CTD); _rel->add("CTD", "CODTAB==CATDON",1,0,ALIAS_CTD);