Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Possibilita' di stampare suddiviso per sezione o no git-svn-id: svn://10.65.10.50/trunk@6815 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
15296d7547
commit
b5e3b8f973
@ -36,7 +36,7 @@ class TSbloccoSospesi : public TPrintapp
|
||||
TDate _data_stampa;
|
||||
TString16 _tiposo; // tipo sospesione da sbloccare
|
||||
TString16 _codsez, _codsot;
|
||||
bool _definitiva, _anchedimessi;
|
||||
bool _definitiva, _anchedimessi, _persezione;
|
||||
TParagraph_string _cognome_nome, _operazione;
|
||||
TString16 _finesospensione;
|
||||
int _intsi_f1, _intsi_f2, _intsi_m, _intaf_m, _etadonne;
|
||||
@ -95,16 +95,17 @@ void TSbloccoSospesi::fine_stampa()
|
||||
|
||||
void TSbloccoSospesi::footer_sezione()
|
||||
{
|
||||
if (_contatore > 0)
|
||||
{
|
||||
reset_footer();
|
||||
TString sep(80);
|
||||
sep.fill('-');
|
||||
set_footer(2, (const char *) sep);
|
||||
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||
printer().formfeed();
|
||||
reset_footer();
|
||||
}
|
||||
if (_persezione)
|
||||
if (_contatore > 0)
|
||||
{
|
||||
reset_footer();
|
||||
TString sep(80);
|
||||
sep.fill('-');
|
||||
set_footer(2, (const char *) sep);
|
||||
set_footer(3,"TOTALE SOGGETTI STAMPATI %d", _contatore);
|
||||
printer().formfeed();
|
||||
reset_footer();
|
||||
}
|
||||
}
|
||||
|
||||
void TSbloccoSospesi::filtra_sezioni()
|
||||
@ -275,10 +276,12 @@ void TSbloccoSospesi::set_page(int file, int cnt)
|
||||
set_row(1,"@12g#a", &_cognome_nome);
|
||||
set_row(1,"@38g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
||||
set_row(1,"@49g@S", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
||||
set_row(1,"@56g@S", FLD(LF_SOGGETTI,SOG_CODSEZ));
|
||||
set_row(1,"@59g@S", FLD(LF_SOGGETTI,SOG_CODSOT));
|
||||
//set_row(1,"@57g@ld", FLD(LF_SOGGETTI,SOG_DATASTATO));
|
||||
//set_row(1,"@68g@ld", FLD(LF_SOGGETTI,SOG_DATA_PROS));
|
||||
//set_row(1,"@79g#a", &_operazione);
|
||||
set_row(1,"@57g#a", &_operazione);
|
||||
set_row(1,"@62g#a", &_operazione);
|
||||
}
|
||||
|
||||
bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
|
||||
@ -296,7 +299,7 @@ bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
|
||||
const TString16 statoaf = recsog.get(SOG_STATOAF);
|
||||
|
||||
TDate datafine(NULLDATE);
|
||||
if (statopros == "FS")
|
||||
if (statopros == FINE_SOSPENSIONE)
|
||||
datafine = recsog.get_date(SOG_DATA_PROS);
|
||||
TDate datafinesi(NULLDATE);
|
||||
TDate datafineaf(NULLDATE);
|
||||
@ -304,7 +307,7 @@ bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
|
||||
datafinesi = recsog.get_date(SOG_FINESOSSI);
|
||||
if (statoaf == "SO")
|
||||
datafineaf = recsog.get_date(SOG_FINESOSAF);
|
||||
filtrato = (datafine.ok()) && (datafine <= app()._data_sblocco);
|
||||
filtrato = (datafine.ok()) && (datafine <= app()._data_sblocco) && (statopros == FINE_SOSPENSIONE);
|
||||
if ((!filtrato) && (datafinesi.ok() || datafineaf.ok()))
|
||||
filtrato = ((datafinesi.ok() && (datafinesi <= app()._data_sblocco)) || (datafineaf.ok() && (datafineaf <= app()._data_sblocco)));
|
||||
}
|
||||
@ -313,22 +316,25 @@ bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
|
||||
|
||||
void TSbloccoSospesi::header_sezione(const TString16 codsez, const TString16 codsot)
|
||||
{
|
||||
const TString80 densez = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSEZ);
|
||||
const TString80 densot = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSOT);
|
||||
TString intestazione(100);
|
||||
intestazione = "Sezione: ";
|
||||
intestazione << codsez;
|
||||
intestazione << "/";
|
||||
intestazione << codsot;
|
||||
intestazione << " ";
|
||||
intestazione << densez;
|
||||
if ((densot.ok())&& (densot.not_empty()))
|
||||
if (_persezione)
|
||||
{
|
||||
const TString80 densez = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSEZ);
|
||||
const TString80 densot = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSOT);
|
||||
TString intestazione(100);
|
||||
intestazione = "Sezione: ";
|
||||
intestazione << codsez;
|
||||
intestazione << "/";
|
||||
intestazione << densot;
|
||||
}
|
||||
intestazione.center_just();
|
||||
set_header(1,"@0g%s", (const char*) intestazione);
|
||||
intestazione << codsot;
|
||||
intestazione << " ";
|
||||
intestazione << densez;
|
||||
if ((densot.ok())&& (densot.not_empty()))
|
||||
{
|
||||
intestazione << "/";
|
||||
intestazione << densot;
|
||||
}
|
||||
intestazione.center_just();
|
||||
set_header(1,"@0g%s", (const char*) intestazione);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -344,6 +350,7 @@ bool TSbloccoSospesi::set_print(int)
|
||||
_tiposo = _msk->get(F_TIPO);
|
||||
_definitiva = _msk->get_bool(F_DEFINITIVA);
|
||||
_anchedimessi = _msk->get_bool(F_ANCHEDIMESSI);
|
||||
_persezione = _msk->get_bool(F_PERSEZIONE);
|
||||
_contatore = 0;
|
||||
_totale = 0;
|
||||
reset_files();
|
||||
@ -390,8 +397,8 @@ void TSbloccoSospesi::crea_intestazione()
|
||||
sep = "";
|
||||
sep.fill('-');
|
||||
set_header(3, (const char *) sep);
|
||||
set_header(4,"@0gCod.@9gC.@12gCognome e nome@38gNato il@49gTessera@57gData sosp.@68gScadenza@79gDo Da A Sogg.");
|
||||
set_header(5,"@0g------@9g--@12g-------------------------@38g----------@49g-------@57g----------@68g----------@79g---------------");
|
||||
set_header(4,"@0gCod.@9gC.@12gCognome e nome@38gNato il@49gTessera@57gSe/So@62gData sosp.@73gScadenza@84gDo Da A Sogg.");
|
||||
set_header(5,"@0g------@9g--@12g-------------------------@38g----------@49g-------@57g-- --@62g----------@73g----------@84g---------------");
|
||||
printer().footerlen(3);
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#define F_D_SOTFIN 108
|
||||
#define F_DATA 109
|
||||
#define F_TIPO 110
|
||||
#define F_D_TIPO 111
|
||||
#define F_ANCHEDIMESSI 112
|
||||
#define F_D_TIPO 111
|
||||
#define F_ANCHEDIMESSI 112
|
||||
#define F_DEFINITIVA 113
|
||||
#define F_PERSEZIONE 114
|
||||
|
@ -132,7 +132,7 @@ BEGIN
|
||||
HELP "Sottogruppo finale"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 6
|
||||
GROUPBOX DLG_NULL 77 7
|
||||
BEGIN
|
||||
PROMPT 1 5 "Opzioni per lo sblocco"
|
||||
END
|
||||
@ -177,5 +177,11 @@ BEGIN
|
||||
HELP "Se sblocco definitivo, i soggetti stampati vengono sbloccati"
|
||||
END
|
||||
|
||||
BOOLEAN F_PERSEZIONE
|
||||
BEGIN
|
||||
PROMPT 2 10 "Stampa suddivisa per sezione"
|
||||
HELP "Indicare se si vuole la stampa suddivisa per sezione di appartenenza"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
Loading…
x
Reference in New Issue
Block a user