From 9c2bde38aec1f6f0409c3433081f6701757a656d Mon Sep 17 00:00:00 2001 From: luca Date: Thu, 14 Apr 2011 08:40:15 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@21954 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- at/at1500.cpp | 11 ++++++++--- at/at1500a.h | 3 +++ at/at1500a.uml | 12 +++++++++++- at/at7300.cpp | 43 ++++++++++++++++++++++--------------------- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/at/at1500.cpp b/at/at1500.cpp index 27b32f107..face459c1 100755 --- a/at/at1500.cpp +++ b/at/at1500.cpp @@ -29,7 +29,7 @@ class TControlloBenemerenze : public TPrintapp TDate _data_stampa; TString16 _lettini, _lettfin; TString16 _gruppoazie, _gruppoold; - bool _pergruppo; + bool _pergruppo,_soloprem; int _contatore; TString16 _codsez, _codsot; TString256 _intestazione1, _intestazione2; @@ -220,7 +220,7 @@ bool TControlloBenemerenze::preprocess_page(int file, int counter) key->put(BEN_CODICE,codice); const int err = _sbenemerenze->read(key); const int items = _sbenemerenze->rows(); - if (items <= 0) + if ((items <= 0) && (_soloprem)) return false; for (int r=1; r<=items; r++) { @@ -284,6 +284,8 @@ bool TControlloBenemerenze::set_print(int m) _contatore = 0; TString80 chiave = ""; _pergruppo = _msk->get_bool(F_PERGRUPPO); + _soloprem = _msk->get_bool(F_SOLOPREM); + const bool ordinealf = _msk->get_bool(F_ORDINEALF); if (_pergruppo) { _gruppoazie = _msk->get(F_GRUPPOAZIE); @@ -292,7 +294,10 @@ bool TControlloBenemerenze::set_print(int m) } else chiave << "90->CODSEZ|90->CODSOT|"; - chiave << "90->TOTDON|90->COGNOME|90->NOME"; + if (ordinealf) + chiave << "90->COGNOME|90->NOME"; + else + chiave << "90->TOTDON|90->COGNOME|90->NOME"; _lettini = _msk->get(F_LETTINI); _lettini.left(15); _lettfin = _msk->get(F_LETTFIN); diff --git a/at/at1500a.h b/at/at1500a.h index 47e29e2d2..d0ce081b8 100755 --- a/at/at1500a.h +++ b/at/at1500a.h @@ -28,3 +28,6 @@ #define F_D_GRUPPOAZIE 403 #define F_LETTINI 405 #define F_LETTFIN 406 +#define F_SOLOPREM 407 +#define F_ORDINEALF 408 + diff --git a/at/at1500a.uml b/at/at1500a.uml index e3d8f13a6..5cf23ba47 100755 --- a/at/at1500a.uml +++ b/at/at1500a.uml @@ -247,7 +247,7 @@ BEGIN FLAGS "D" END -GROUPBOX DLG_NULL 77 4 +GROUPBOX DLG_NULL 77 5 BEGIN PROMPT 1 9 "Opzioni di stampa" END @@ -303,5 +303,15 @@ BEGIN FLAG "U" END +BOOLEAN F_SOLOPREM +BEGIN + PROMPT 2 12 "Stampa solo donatori con almeno una benemerenza" +END + +BOOLEAN F_ORDINEALF +BEGIN + PROMPT 40 12 "Ordine alfabetico" +END + ENDPAGE ENDMASK diff --git a/at/at7300.cpp b/at/at7300.cpp index e4ba462bf..ee92ce56e 100755 --- a/at/at7300.cpp +++ b/at/at7300.cpp @@ -393,16 +393,16 @@ bool TStampeSingole::user_create() _rel->add("LDN", "CODTAB==LUOGODON",1,LF_DONAZ, ALIAS_LDNDON); _rel->add(LF_BENEM, "CODICE==CODICE", 1); _rel->add("BNZ", "CODTAB==TIPOBEN", 1, LF_BENEM, ALIAS_BNZ); - _rel->add("CTD", "CODTAB==CATDON",1,0,ALIAS_CTD); - _rel->add("CTN", "CODTAB==CATNOND1",1,0,ALIAS_CTN1); - _rel->add("CTN", "CODTAB==CATNOND2",1,0,ALIAS_CTN2); - _rel->add("TCS", "CODTAB==STATO",1,0,ALIAS_TCS); - _rel->add("LDN", "CODTAB==PUNTORACC",1,0,ALIAS_LDN); - _rel->add("LCP", "CODTAB==DOM_CODLOC",1,0,ALIAS_LCPDOM); - _rel->add(LF_COMUNI, "COM==DOM_CODCOM",1,0,ALIAS_COMDOM); - _rel->add(LF_COMUNI, "COM==COMNASC",1,0,ALIAS_COMNAS); - _rel->add(LF_SEZIONI, "CODSEZ==CODSEZ|CODSOT==CODSOT"); - _rel->add(LF_MEDICI, "CODMED==CODMED"); + _rel->add("CTD", "CODTAB==CATDON",1,LF_SOGGETTI, ALIAS_CTD); + _rel->add("CTN", "CODTAB==CATNOND1",1, LF_SOGGETTI, ALIAS_CTN1); + _rel->add("CTN", "CODTAB==CATNOND2",1, LF_SOGGETTI, ALIAS_CTN2); + _rel->add("TCS", "CODTAB==STATO",1, LF_SOGGETTI, ALIAS_TCS); + _rel->add("LDN", "CODTAB==PUNTORACC",1, LF_SOGGETTI, ALIAS_LDN); + _rel->add("LCP", "CODTAB==DOM_CODLOC",1, LF_SOGGETTI, ALIAS_LCPDOM); + _rel->add(LF_COMUNI, "COM==DOM_CODCOM",1, LF_SOGGETTI, ALIAS_COMDOM); + _rel->add(LF_COMUNI, "COM==COMNASC",1, LF_SOGGETTI, ALIAS_COMNAS); + _rel->add(LF_SEZIONI, "CODSEZ==CODSEZ|CODSOT==CODSOT", 1, LF_SOGGETTI); + _rel->add(LF_MEDICI, "CODMED==CODMED", 1, LF_SOGGETTI); _donaz = new TLocalisamfile(LF_DONAZ); _benem = new TLocalisamfile(LF_BENEM); _sdonazioni = new TRecord_array(LF_DONAZ,DON_PROGDON); @@ -478,17 +478,18 @@ bool TStampeSingole::soggetti_notify(TSheet_field& s, int r, KEY k) { TToken_string& row = s.row(r); const long codsog = row.get_long(0); - if (codsog != 0) - for (int i=s.items()-1; i>=0; i--) - { - if (i != r) - { - TToken_string& row = s.row(i); - if (codsog == row.get_long(0)) - return s.sheet_mask().field(F_S_CODICE).error_box("Soggetto gia' inserito"); - } - } - else + //if (codsog != 0) + // for (int i=s.items()-1; i>=0; i--) + // { + // if (i != r) + // { + // TToken_string& row = s.row(i); + // if (codsog == row.get_long(0)) + // return s.sheet_mask().field(F_S_CODICE).error_box("Soggetto gia' inserito"); + // } + // } + //else + if (codsog==0) { const char* cognome = row.get(1); if ((cognome != NULL) && (cognome != "\0"))