Stampa di controllo donazioni: possibilita' di stampare da sezione a

sezione
Patch level         :
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/trunk@6375 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 1998-03-17 09:23:20 +00:00
parent 230717eef1
commit 7b81b48b17
3 changed files with 76 additions and 68 deletions

View File

@ -22,8 +22,8 @@ class TControlloDonazioni : public TPrintapp
int _contatore, _totfinestampa; int _contatore, _totfinestampa;
TDate _dataold, _dataini, _datafin; TDate _dataold, _dataini, _datafin;
TString16 _tipodon, _luogodon, _luogoold, _sezold; TString16 _tipodon, _luogodon, _luogoold, _sezold;
TString16 _sezini, _sotini, _tipostampa,_ordinamento; TString16 _sezini, _sotini, _sezfin, _sotfin;
TString16 _controllo, _prima; TString16 _tipostampa, _ordinamento, _controllo, _prima;
bool _stampa80, _primedon, _breve; bool _stampa80, _primedon, _breve;
TParagraph_string _cognome_nome; TParagraph_string _cognome_nome;
TArray _giorni, _mesi, _giornifinale; TArray _giorni, _mesi, _giornifinale;
@ -373,6 +373,8 @@ bool TControlloDonazioni::set_print(int m)
{ {
_sezini = _msk->get(F_SEZINI); _sezini = _msk->get(F_SEZINI);
_sotini = _msk->get(F_SOTINI); _sotini = _msk->get(F_SOTINI);
_sezfin = _msk->get(F_SEZFIN);
_sotfin = _msk->get(F_SOTFIN);
_dataini = _msk->get_date(F_DATAINI); _dataini = _msk->get_date(F_DATAINI);
_datafin = _msk->get_date(F_DATAFIN); _datafin = _msk->get_date(F_DATAFIN);
_tipodon = _msk->get(F_TIPODON); _tipodon = _msk->get(F_TIPODON);
@ -434,25 +436,31 @@ bool TControlloDonazioni::set_print(int m)
filtro << format("(PRIMADON == \"X\")"); filtro << format("(PRIMADON == \"X\")");
} }
} }
TString16 inizio = "";
inizio << _sezini;
inizio << _sotini;
TString16 fine = "";
fine << _sezfin;
fine << _sotfin;
// filtro per sezione/sottogruppo // filtro per sezione/sottogruppo
if (_sezini.not_empty()) if (inizio.not_empty())
{ {
if (filtro.empty()) if (filtro.empty())
filtro = format("(90->CODSEZ == \"%s\")",(const char*)_sezini); filtro = format("(90->CODSEZ+90->CODSOT >= \"%s\")",(const char*)inizio);
else else
{ {
filtro << " && "; filtro << " && ";
filtro << format("(90->CODSEZ == \"%s\")",(const char*)_sezini); filtro << format("(90->CODSEZ+90->CODSOT >= \"%s\")",(const char*)inizio);
} }
if (_sotini.not_empty()) if (fine.not_empty())
{ {
if (filtro.empty()) if (filtro.empty())
filtro = format("(90->CODSOT == \"%s\")",(const char*)_sotini); filtro = format("(90->CODSEZ+90->CODSOT <= \"%s\")",(const char*)fine);
else else
{ {
filtro << " && "; filtro << " && ";
filtro << format("(90->CODSOT == \"%s\")",(const char*)_sotini); filtro << format("(90->CODSEZ+90->CODSOT <= \"%s\")",(const char*)fine);
} }
} }
} }

View File

@ -5,10 +5,10 @@
#define F_D_SEZINI 102 #define F_D_SEZINI 102
#define F_SOTINI 103 #define F_SOTINI 103
#define F_D_SOTINI 104 #define F_D_SOTINI 104
//#define F_SEZFIN 105 #define F_SEZFIN 105
//#define F_D_SEZFIN 106 #define F_D_SEZFIN 106
//#define F_SOTFIN 107 #define F_SOTFIN 107
//#define F_D_SOTFIN 108 #define F_D_SOTFIN 108
#define F_DATAINI 109 #define F_DATAINI 109
#define F_DATAFIN 110 #define F_DATAFIN 110
#define F_TIPODON 111 #define F_TIPODON 111

View File

@ -9,7 +9,7 @@ END
STRING F_SEZINI 2 STRING F_SEZINI 2
BEGIN BEGIN
PROMPT 2 2 "Sezione " PROMPT 2 2 "Da "
FLAGS "U" FLAGS "U"
USE LF_SEZIONI USE LF_SEZIONI
INPUT CODSEZ F_SEZINI INPUT CODSEZ F_SEZINI
@ -28,7 +28,7 @@ END
STRING F_D_SEZINI 25 STRING F_D_SEZINI 25
BEGIN BEGIN
PROMPT 20 2 "" PROMPT 11 2 ""
FLAGS "U" FLAGS "U"
USE LF_SEZIONI KEY 2 USE LF_SEZIONI KEY 2
INPUT DENSEZ F_D_SEZINI INPUT DENSEZ F_D_SEZINI
@ -43,7 +43,7 @@ END
STRING F_SOTINI 2 STRING F_SOTINI 2
BEGIN BEGIN
PROMPT 2 3 "Sottogruppo " PROMPT 2 3 " "
COPY ALL F_SEZINI COPY ALL F_SEZINI
CHECKTYPE SEARCH CHECKTYPE SEARCH
HELP "Codice sottogruppo da stampare" HELP "Codice sottogruppo da stampare"
@ -51,7 +51,7 @@ END
STRING F_D_SOTINI 25 STRING F_D_SOTINI 25
BEGIN BEGIN
PROMPT 20 3 "" PROMPT 11 3 ""
FLAGS "U" FLAGS "U"
COPY USE F_D_SEZINI COPY USE F_D_SEZINI
INPUT DENSEZ F_D_SEZINI INPUT DENSEZ F_D_SEZINI
@ -62,60 +62,60 @@ BEGIN
HELP "Sottogruppo da cui partire" HELP "Sottogruppo da cui partire"
END END
//STRING F_SEZFIN 2 STRING F_SEZFIN 2
//BEGIN BEGIN
// PROMPT 41 2 "A " PROMPT 41 2 "A "
// FLAGS "U" FLAGS "U"
// USE LF_SEZIONI USE LF_SEZIONI
// INPUT CODSEZ F_SEZFIN INPUT CODSEZ F_SEZFIN
// INPUT CODSOT F_SOTFIN INPUT CODSOT F_SOTFIN
// DISPLAY "Cod.sez" CODSEZ DISPLAY "Cod.sez" CODSEZ
// DISPLAY "Cod.sot." CODSOT DISPLAY "Cod.sot." CODSOT
// DISPLAY "Sezione@25" DENSEZ DISPLAY "Sezione@25" DENSEZ
// DISPLAY "Sottogruppo@25" DENSOT DISPLAY "Sottogruppo@25" DENSOT
// OUTPUT F_SEZFIN CODSEZ OUTPUT F_SEZFIN CODSEZ
// OUTPUT F_D_SEZFIN DENSEZ OUTPUT F_D_SEZFIN DENSEZ
// OUTPUT F_SOTFIN CODSOT OUTPUT F_SOTFIN CODSOT
// OUTPUT F_D_SOTFIN DENSOT OUTPUT F_D_SOTFIN DENSOT
// CHECKTYPE SEARCH CHECKTYPE SEARCH
// HELP "Codice sezione finale" HELP "Codice sezione finale"
//END END
//STRING F_D_SEZFIN 25 STRING F_D_SEZFIN 25
//BEGIN BEGIN
// PROMPT 49 2 "" PROMPT 49 2 ""
// FLAGS "U" FLAGS "U"
// USE LF_SEZIONI KEY 2 USE LF_SEZIONI KEY 2
// INPUT DENSEZ F_D_SEZFIN INPUT DENSEZ F_D_SEZFIN
// DISPLAY "Sezione@25" DENSEZ DISPLAY "Sezione@25" DENSEZ
// DISPLAY "Sottogruppo@25" DENSOT DISPLAY "Sottogruppo@25" DENSOT
// DISPLAY "Cod.sez" CODSEZ DISPLAY "Cod.sez" CODSEZ
// DISPLAY "Cod.sot." CODSOT DISPLAY "Cod.sot." CODSOT
// COPY OUTPUT F_SEZFIN COPY OUTPUT F_SEZFIN
// CHECKTYPE NORMAL CHECKTYPE NORMAL
// HELP "Sezione finale" HELP "Sezione finale"
//END END
//STRING F_SOTFIN 2 STRING F_SOTFIN 2
//BEGIN BEGIN
// PROMPT 41 3 " " PROMPT 41 3 " "
// COPY ALL F_SEZFIN COPY ALL F_SEZFIN
// CHECKTYPE SEARCH CHECKTYPE SEARCH
// HELP "Codice sottogruppo finale" HELP "Codice sottogruppo finale"
//END END
//STRING F_D_SOTFIN 25 STRING F_D_SOTFIN 25
//BEGIN BEGIN
// PROMPT 49 3 "" PROMPT 49 3 ""
// FLAGS "U" FLAGS "U"
// COPY USE F_D_SEZFIN COPY USE F_D_SEZFIN
// INPUT DENSEZ F_D_SEZFIN INPUT DENSEZ F_D_SEZFIN
// INPUT DENSOT F_D_SOTFIN INPUT DENSOT F_D_SOTFIN
// COPY DISPLAY F_D_SEZFIN COPY DISPLAY F_D_SEZFIN
// COPY OUTPUT F_D_SEZFIN COPY OUTPUT F_D_SEZFIN
// CHECKTYPE NORMAL CHECKTYPE NORMAL
// HELP "Sottogruppo finale" HELP "Sottogruppo finale"
//END END
GROUPBOX DLG_NULL 77 7 GROUPBOX DLG_NULL 77 7
BEGIN BEGIN