Patch level : at
Files correlati : Ricompilazione Demo : [ ] Commento : stampa convoc. per punto prelievo con scelte sulle categorie e possibilita'di stampare suddiviso per data git-svn-id: svn://10.65.10.50/trunk@10617 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b98ad3834c
commit
822fa39351
107
at/at4400.cpp
107
at/at4400.cpp
@ -47,8 +47,8 @@ class TConvocazioniPerPunto : public TPrintapp
|
||||
int _cur;
|
||||
TParagraph_string _cognome_nome, _dencom;
|
||||
TDate _data_stampa;
|
||||
TDate _dataini, _datafin;
|
||||
bool _aggiorna, _persezione, _tutti;
|
||||
TDate _dataini, _datafin, _dataatt;
|
||||
bool _aggiorna, _persezione, _tutti, _perdata;
|
||||
char _gruppiaz;
|
||||
TString16 _punto,_tipo, _ordina;
|
||||
TString16 _codsez, _codsot, _sezini,_sotini, _sezfin,_sotfin;
|
||||
@ -57,7 +57,7 @@ class TConvocazioniPerPunto : public TPrintapp
|
||||
TString80 _note, _intest1, _intest2, _intest3, _intest4;
|
||||
bool _usasez;
|
||||
ts _tipostampa;
|
||||
int _contxsez, _contatore;
|
||||
int _contxsez, _contxdata, _contatore;
|
||||
int _etlarghezza, _etcolonne;
|
||||
|
||||
//static bool filter_func_stconvoc(const TRelation* rel);
|
||||
@ -74,7 +74,9 @@ protected:
|
||||
public:
|
||||
void crea_intestazione();
|
||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||
void header_data(const TDate data);
|
||||
void footer_sezione();
|
||||
void footer_data();
|
||||
void fine_stampa();
|
||||
void dati_sezione(const TString16 codsez, const TString16 codsot);
|
||||
TMask& app_mask() { return *_msk; }
|
||||
@ -112,14 +114,6 @@ void TConvocazioniPerPunto::fine_stampa()
|
||||
{
|
||||
// stampa totale soggetti a fine stampa
|
||||
|
||||
//reset_footer();
|
||||
//printer().footerlen(20);
|
||||
//TString sep(80);
|
||||
//sep.fill('-');
|
||||
//set_footer(1, (const char *) sep);
|
||||
//set_footer(2,"TOTALE SOGGETTI CONVOCATI %d", _contatore);
|
||||
//printer().formfeed();
|
||||
//reset_footer();
|
||||
reset_footer();
|
||||
TString sep(80);
|
||||
sep.fill('-');
|
||||
@ -164,43 +158,6 @@ void TConvocazioniPerPunto::set_page(int file, int cnt)
|
||||
case cartoline:
|
||||
{
|
||||
TPrint_section& corpo = _form_car->get_body();
|
||||
/*
|
||||
const TString16 codsez = current_cursor()->curr().get(SOG_CODSEZ);
|
||||
const TString16 codsot = current_cursor()->curr().get(SOG_CODSOT);
|
||||
if ((_codsez!=codsez)||(_codsot!=codsot))
|
||||
{
|
||||
_codsez = codsez;
|
||||
_codsot = codsot;
|
||||
dati_sezione(codsez, codsot);
|
||||
corpo.reset();
|
||||
TForm_item& intest1 = corpo.find_field(CAR_INTEST1);
|
||||
intest1.set(_intest1);
|
||||
TForm_item& intest2 = corpo.find_field(CAR_INTEST2);
|
||||
intest2.set(_intest2);
|
||||
TForm_item& intest3 = corpo.find_field(CAR_INTEST3);
|
||||
intest3.set(_intest3);
|
||||
TForm_item& intest4 = corpo.find_field(CAR_INTEST4);
|
||||
intest4.set(_intest4);
|
||||
TForm_item& invito = corpo.find_field(CAR_INVITOPER);
|
||||
invito.set(_invitoper);
|
||||
TForm_item& data = corpo.find_field(CAR_DATA);
|
||||
data.set(_data);
|
||||
TForm_item& presso1 = corpo.find_field(CAR_PRESSO1);
|
||||
presso1.set(_presso1);
|
||||
TForm_item& presso2 = corpo.find_field(CAR_PRESSO2);
|
||||
presso2.set(_presso2);
|
||||
TForm_item& presso3 = corpo.find_field(CAR_PRESSO3);
|
||||
presso3.set(_presso3);
|
||||
TForm_item& presso4 = corpo.find_field(CAR_PRESSO4);
|
||||
presso4.set(_presso4);
|
||||
TForm_item& orario = corpo.find_field(CAR_ORARIO);
|
||||
orario.set(_orario);
|
||||
TForm_item& datacart = corpo.find_field(CAR_DATACART);
|
||||
datacart.set(_datacart);
|
||||
TForm_item& note = corpo.find_field(CAR_NOTE);
|
||||
note.set(_note);
|
||||
}
|
||||
*/
|
||||
corpo.update();
|
||||
for (word i = 0; i < corpo.height(); i++)
|
||||
{
|
||||
@ -256,7 +213,9 @@ print_action TConvocazioniPerPunto::postprocess_print(int file, int counter)
|
||||
{
|
||||
if (_contxsez > 0)
|
||||
footer_sezione();
|
||||
if ((_contatore > 0) && ((_contatore != _contxsez) || (!_persezione)))
|
||||
if (_contxdata > 0)
|
||||
footer_data();
|
||||
if ((_contatore > 0) && ((_contatore != _contxsez) || (!_persezione)) && ((_contatore != _contxdata) || (!_perdata)))
|
||||
fine_stampa();
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
@ -300,6 +259,16 @@ bool TConvocazioniPerPunto::preprocess_page(int file, int counter)
|
||||
_codsot = codsot;
|
||||
header_sezione(codsez, codsot);
|
||||
}
|
||||
const TDate data = current_cursor()->curr().get_date(RCV_DATACONV);
|
||||
if (_dataatt!=data)
|
||||
{
|
||||
if (_dataatt.ok())
|
||||
footer_data();
|
||||
_contxdata = 0;
|
||||
_dataatt = data;
|
||||
header_data(data);
|
||||
}
|
||||
_contxdata++;
|
||||
_contxsez++;
|
||||
_contatore++;
|
||||
}
|
||||
@ -324,6 +293,21 @@ void TConvocazioniPerPunto::footer_sezione()
|
||||
}
|
||||
}
|
||||
|
||||
void TConvocazioniPerPunto::footer_data()
|
||||
{
|
||||
if (_perdata)
|
||||
{
|
||||
// stampa totale sezione
|
||||
reset_footer();
|
||||
TString sep(80);
|
||||
sep.fill('-');
|
||||
set_footer(2, (const char *) sep);
|
||||
set_footer(3,"TOTALE CONVOCATI DEL GIORNO %d", _contxdata);
|
||||
printer().formfeed();
|
||||
reset_footer();
|
||||
}
|
||||
}
|
||||
|
||||
void TConvocazioniPerPunto::header_sezione(const TString16 codsez, const TString16 codsot)
|
||||
{
|
||||
if (_persezione)
|
||||
@ -351,6 +335,19 @@ void TConvocazioniPerPunto::header_sezione(const TString16 codsez, const TString
|
||||
return;
|
||||
}
|
||||
|
||||
void TConvocazioniPerPunto::header_data(const TDate data)
|
||||
{
|
||||
if (_perdata)
|
||||
{
|
||||
TString intestazione(80);
|
||||
intestazione = "Data cartolina: ";
|
||||
intestazione << data.string();
|
||||
intestazione.center_just();
|
||||
set_header(1,"@0g%s", (const char*) intestazione);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void TConvocazioniPerPunto::dati_sezione(const TString16 codsez, const TString16 codsot)
|
||||
{
|
||||
_intest1 = current_cursor()->curr(LF_SEZIONI).get(SEZ_INTESTAZ1);
|
||||
@ -416,6 +413,7 @@ bool TConvocazioniPerPunto::set_print(int m)
|
||||
_persezione = _msk->get_bool(F_PERSEZIONE);
|
||||
_tutti = (_msk->get(F_TUTTI)[0] == 'T');
|
||||
_ordina = _msk->get(F_ORDINA);
|
||||
_perdata = FALSE;
|
||||
TString256 chiave = "";
|
||||
if (_tipostampa==cartoline)
|
||||
chiave = "90->GRUPPOAZIE|";
|
||||
@ -430,6 +428,12 @@ bool TConvocazioniPerPunto::set_print(int m)
|
||||
case 'C':
|
||||
chiave << "90->DOM_CAP|UPPER(90->COGNOME)|UPPER(90->NOME)|116->DATACONV";
|
||||
break;
|
||||
case 'D':
|
||||
{
|
||||
chiave << "116->DATACONV|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
||||
_perdata = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
TString256 filtro = "";
|
||||
filtro << "(116->ANNULLATO != \"X\")";
|
||||
@ -501,10 +505,11 @@ bool TConvocazioniPerPunto::set_print(int m)
|
||||
a.put(RCV_DATACONV, _datafin);
|
||||
_cur = add_cursor(new TSorted_cursor(_rel, (const char*) chiave,"", 2, &da, &a));
|
||||
current_cursor()->setfilter((const char*) filtro, TRUE);
|
||||
//current_cursor()->set_filterfunction(filter_func_stconvoc);
|
||||
_codsez = "**";
|
||||
_codsot = "**";
|
||||
_contxsez = 0;
|
||||
_dataatt = NULLDATE;
|
||||
_contxsez = 0;
|
||||
_contxdata = 0;
|
||||
_contatore = 0;
|
||||
reset_files();
|
||||
add_file(LF_RCONVOC);
|
||||
|
27
at/at4400a.h
27
at/at4400a.h
@ -15,10 +15,6 @@
|
||||
#define F_D_SEZFIN 112
|
||||
#define F_SOTFIN 113
|
||||
#define F_D_SOTFIN 114
|
||||
//#define F_CODSEZ 107
|
||||
//#define F_DENSEZ 108
|
||||
//#define F_CODSOT 109
|
||||
//#define F_DENSOT 110
|
||||
#define F_ORDINA 115
|
||||
#define F_PERSEZIONE 116
|
||||
|
||||
@ -26,8 +22,21 @@
|
||||
#define F_AGGIORNA 118
|
||||
#define F_SCELTAGRUPPI 119
|
||||
|
||||
#define F_SINTETICO 151
|
||||
#define F_COMPLETO 152
|
||||
#define F_ETICHETTE 153
|
||||
#define F_CARTOLINE 154
|
||||
#define F_AZZERA 155
|
||||
#define F_CAT1 201
|
||||
#define F_D_CAT1 202
|
||||
#define F_CAT2 203
|
||||
#define F_D_CAT2 204
|
||||
#define F_CAT3 205
|
||||
#define F_D_CAT3 206
|
||||
#define F_CAT4 207
|
||||
#define F_D_CAT4 208
|
||||
#define F_CAT5 209
|
||||
#define F_D_CAT5 210
|
||||
#define F_CAT6 211
|
||||
#define F_D_CAT6 212
|
||||
|
||||
#define F_SINTETICO 351
|
||||
#define F_COMPLETO 352
|
||||
#define F_ETICHETTE 353
|
||||
#define F_CARTOLINE 354
|
||||
#define F_AZZERA 355
|
||||
|
153
at/at4400a.uml
153
at/at4400a.uml
@ -156,24 +156,151 @@ BEGIN
|
||||
HELP "Sottogruppo finale"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 5
|
||||
BEGIN
|
||||
PROMPT 1 4 "Categorie"
|
||||
END
|
||||
|
||||
|
||||
STRING F_CAT1 2
|
||||
BEGIN
|
||||
PROMPT 2 5 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT1
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@30" S0
|
||||
OUTPUT F_CAT1 CODTAB
|
||||
OUTPUT F_D_CAT1 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT1 30
|
||||
BEGIN
|
||||
PROMPT 8 5 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT2 2
|
||||
BEGIN
|
||||
PROMPT 2 6 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT2
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT2 CODTAB
|
||||
OUTPUT F_D_CAT2 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT2 30
|
||||
BEGIN
|
||||
PROMPT 8 6 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT3 2
|
||||
BEGIN
|
||||
PROMPT 2 7 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT3
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT3 CODTAB
|
||||
OUTPUT F_D_CAT3 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT3 30
|
||||
BEGIN
|
||||
PROMPT 8 7 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT4 2
|
||||
BEGIN
|
||||
PROMPT 40 5 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT4
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT4 CODTAB
|
||||
OUTPUT F_D_CAT4 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT4 30
|
||||
BEGIN
|
||||
PROMPT 46 5 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT5 2
|
||||
BEGIN
|
||||
PROMPT 40 6 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT5
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT5 CODTAB
|
||||
OUTPUT F_D_CAT5 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT5 30
|
||||
BEGIN
|
||||
PROMPT 46 6 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CAT6 2
|
||||
BEGIN
|
||||
PROMPT 40 7 ""
|
||||
FLAGS "U"
|
||||
USE CTD
|
||||
INPUT CODTAB F_CAT6
|
||||
COPY DISPLAY F_CAT1
|
||||
OUTPUT F_CAT6 CODTAB
|
||||
OUTPUT F_D_CAT6 S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice non presente"
|
||||
HELP "Categoria di appartenenza"
|
||||
END
|
||||
|
||||
STRING F_D_CAT6 30
|
||||
BEGIN
|
||||
PROMPT 46 7 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 77 13
|
||||
BEGIN
|
||||
PROMPT 1 4 "Opzioni per la stampa convocazioni"
|
||||
PROMPT 1 9 "Opzioni per la stampa convocazioni"
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 2 5 "Data iniziale "
|
||||
PROMPT 2 10 "Data iniziale "
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
BEGIN
|
||||
PROMPT 2 6 "Data finale "
|
||||
PROMPT 2 11 "Data finale "
|
||||
END
|
||||
|
||||
STRING F_PUNTO 4
|
||||
BEGIN
|
||||
PROMPT 2 7 "Punto prelievo "
|
||||
PROMPT 2 12 "Punto prelievo "
|
||||
FLAGS "U"
|
||||
USE LDN
|
||||
INPUT CODTAB F_PUNTO
|
||||
@ -187,13 +314,13 @@ END
|
||||
|
||||
STRING F_D_PUNTO 50
|
||||
BEGIN
|
||||
PROMPT 25 7 ""
|
||||
PROMPT 25 12 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_TIPO 2
|
||||
BEGIN
|
||||
PROMPT 2 8 "Tipo donazione "
|
||||
PROMPT 2 13 "Tipo donazione "
|
||||
FLAGS "U"
|
||||
USE TDN
|
||||
INPUT CODTAB F_TIPO
|
||||
@ -206,13 +333,13 @@ END
|
||||
|
||||
STRING F_D_TIPO 25
|
||||
BEGIN
|
||||
PROMPT 23 8 ""
|
||||
PROMPT 23 13 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
LISTBOX F_ORDINA 24
|
||||
BEGIN
|
||||
PROMPT 2 9 "Ordinamento "
|
||||
PROMPT 2 14 "Ordinamento "
|
||||
FLAGS "U"
|
||||
ITEM "A|Sez./Sott.+Alfabetico"
|
||||
MESSAGE ENABLE,F_PERSEZIONE
|
||||
@ -220,19 +347,21 @@ BEGIN
|
||||
MESSAGE RESET,F_PERSEZIONE|DISABLE, F_PERSEZIONE
|
||||
ITEM "S|Sez./Sott.+CAP"
|
||||
MESSAGE ENABLE,F_PERSEZIONE
|
||||
ITEM "D|Data cart.+Alfabetico"
|
||||
MESSAGE RESET,F_PERSEZIONE|DISABLE, F_PERSEZIONE
|
||||
END
|
||||
|
||||
RADIOBUTTON F_TUTTI 75
|
||||
BEGIN
|
||||
FLAG "Z"
|
||||
PROMPT 2 10 "Stampa"
|
||||
PROMPT 2 15 "Stampa"
|
||||
ITEM "S|Convocazioni non stampate"
|
||||
ITEM "T|Tutte le convocazioni"
|
||||
END
|
||||
|
||||
LISTBOX F_SCELTAGRUPPI 37
|
||||
BEGIN
|
||||
PROMPT 2 13 "Opzioni per gruppi aziendali "
|
||||
PROMPT 2 18 "Opzioni per gruppi aziendali "
|
||||
FLAGS "U"
|
||||
ITEM "N|Nessuna selezione sui gruppi az."
|
||||
ITEM "S|Stampa solo appartenenti a gruppi az."
|
||||
@ -241,13 +370,13 @@ END
|
||||
|
||||
BOOLEAN F_PERSEZIONE
|
||||
BEGIN
|
||||
PROMPT 2 14 "Stampa suddivisa per sezione"
|
||||
PROMPT 2 19 "Stampa suddivisa per sezione"
|
||||
HELP "Indicare se si vuole la stampa suddivisa per sezione di appartenenza"
|
||||
END
|
||||
|
||||
BOOLEAN F_AGGIORNA
|
||||
BEGIN
|
||||
PROMPT 2 15 "Aggiorna campo convocazione stampata"
|
||||
PROMPT 2 20 "Aggiorna campo convocazione stampata"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
Loading…
x
Reference in New Issue
Block a user