modifiche per adeguare i tracciati alle richieste della commissione informatica nazionale
git-svn-id: svn://10.65.10.50/trunk@3988 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
364e3b63f6
commit
aa008393bc
@ -43,7 +43,7 @@ class TSospesi_application : public TPrintapp
|
|||||||
ts _tipo_stampa;
|
ts _tipo_stampa;
|
||||||
TString16 _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
|
|
||||||
static bool filter_func_sospesi(const TRelation *);
|
static bool filter_func_sospesi(const TRelation* rel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -129,11 +129,9 @@ void TSospesi_application::set_page(int file, int cnt)
|
|||||||
|
|
||||||
bool TSospesi_application::filter_func_sospesi(const TRelation* rel)
|
bool TSospesi_application::filter_func_sospesi(const TRelation* rel)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
|
|
||||||
TLocalisamfile& sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
|
// filtro per categorie
|
||||||
TAssoc_array categorie = app()._categorie;
|
TAssoc_array categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
class TPereta_application : public TPrintapp
|
class TPereta_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool filter_func_pereta(const TRelation *);
|
static bool filter_func_pereta(const TRelation* rel);
|
||||||
|
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
@ -135,8 +135,7 @@ bool TPereta_application::filter_func_pereta(const TRelation* rel)
|
|||||||
{
|
{
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
TLocalisamfile& sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
|
// filtro per categorie
|
||||||
// fiiltro per categorie
|
|
||||||
TAssoc_array categorie = app()._categorie;
|
TAssoc_array categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
class TEsclusi_application : public TPrintapp
|
class TEsclusi_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool filter_func_esclusi(const TRelation *);
|
static bool filter_func_esclusi(const TRelation* rel);
|
||||||
|
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
@ -127,8 +127,7 @@ void TEsclusi_application::set_page(int file, int cnt)
|
|||||||
bool TEsclusi_application::filter_func_esclusi(const TRelation * rel)
|
bool TEsclusi_application::filter_func_esclusi(const TRelation * rel)
|
||||||
{
|
{
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
TLocalisamfile sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
|
|
||||||
//filtro per categorie
|
//filtro per categorie
|
||||||
TAssoc_array categorie = app()._categorie;
|
TAssoc_array categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
class TBenem_application : public TPrintapp
|
class TBenem_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool filter_func_benem(const TRelation *);
|
static bool filter_func_benem(const TRelation* rel);
|
||||||
|
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
|
@ -130,13 +130,15 @@ void TIdonei_application::set_page(int file, int cnt)
|
|||||||
bool TIdonei_application::filter_func_idonei(const TRelation * rel)
|
bool TIdonei_application::filter_func_idonei(const TRelation * rel)
|
||||||
{
|
{
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
TLocalisamfile sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
|
// filtro per categorie
|
||||||
TAssoc_array categorie = app()._categorie;
|
TAssoc_array categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
{
|
{
|
||||||
TString16 catsog = sog.get(SOG_CATDON);
|
TString16 catsog = sog.get(SOG_CATDON);
|
||||||
filtrato = categorie.is_key((const char*) catsog);
|
filtrato = categorie.is_key((const char*) catsog);
|
||||||
}
|
}
|
||||||
|
// filtro per idoneità
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
TAssoc_array idoneita;
|
TAssoc_array idoneita;
|
||||||
|
@ -126,13 +126,15 @@ void TIscritti_application::set_page(int file, int cnt)
|
|||||||
bool TIscritti_application::filter_func_iscritti(const TRelation * rel)
|
bool TIscritti_application::filter_func_iscritti(const TRelation * rel)
|
||||||
{
|
{
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
TLocalisamfile sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
|
// filtro per categorie
|
||||||
TAssoc_array categorie = app()._categorie;
|
TAssoc_array categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
{
|
{
|
||||||
TString16 cat = sog.get(SOG_CATDON);
|
TString16 cat = sog.get(SOG_CATDON);
|
||||||
filtrato = categorie.is_key((const char*) cat);
|
filtrato = categorie.is_key((const char*) cat);
|
||||||
}
|
}
|
||||||
|
// filtrp per date iscrizione/dimissione
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
if (app()._tipo_iscdim == ISCRITTI)
|
if (app()._tipo_iscdim == ISCRITTI)
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
#define STATO_IDONEO 'I' // IDONEITA'
|
#define STATO_IDONEO 'I' // IDONEITA'
|
||||||
#define STATO_FINESO 'F' // FINE SOSPENSIONE
|
#define STATO_FINESO 'F' // FINE SOSPENSIONE
|
||||||
|
// tpi di stampa
|
||||||
enum ts { undefined = 0, elenco = 1, etichette = 2, cartoline = 3 }; //tipi di stampe
|
enum ts { undefined = 0, elenco = 1, etichette = 2, cartoline = 3 };
|
||||||
|
|
||||||
// definizione form per etichette e cartoline
|
// definizione form per etichette e cartoline
|
||||||
class TConv_form : public TForm
|
class TConv_form : public TForm
|
||||||
@ -35,7 +35,7 @@ public:
|
|||||||
|
|
||||||
class TConv_application : public TPrintapp
|
class TConv_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool filter_func_conv(const TRelation *);
|
static bool filter_func_conv(const TRelation* rel);
|
||||||
|
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
@ -147,15 +147,12 @@ void TConv_application::set_page(int file, int cnt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TConv_application::filter_func_conv (const TRelation * rel)
|
bool TConv_application::filter_func_conv (const TRelation* rel)
|
||||||
{
|
{
|
||||||
TLocalisamfile& sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
TDate dataprossi = sog.get_date(SOG_DATAPROSSI);
|
TDate dataprossi = sog.get_date(SOG_DATAPROSSI);
|
||||||
|
|
||||||
const char stato = rel->curr(-ALIAS_TABTCS).get_char("S6");
|
const char stato = rel->curr(-ALIAS_TABTCS).get_char("S6");
|
||||||
const bool dimesso = rel->curr(-ALIAS_TABCTD).get_char("B0");
|
const bool dimesso = rel->curr(-ALIAS_TABCTD).get_char("B0");
|
||||||
|
|
||||||
|
|
||||||
//TDate dataultconv = sog.curr().get_date(SOG_DATAULTCONV);
|
//TDate dataultconv = sog.curr().get_date(SOG_DATAULTCONV);
|
||||||
if (dataprossi.ok())
|
if (dataprossi.ok())
|
||||||
{
|
{
|
||||||
@ -163,7 +160,6 @@ bool TConv_application::filter_func_conv (const TRelation * rel)
|
|||||||
long intconvsi = app()._dataconv - dataprossi;
|
long intconvsi = app()._dataconv - dataprossi;
|
||||||
// intervallo tra data convocazione e data ultima convocazione
|
// intervallo tra data convocazione e data ultima convocazione
|
||||||
//long intultconvsi = app()._data - dataultconv;
|
//long intultconvsi = app()._data - dataultconv;
|
||||||
|
|
||||||
if ((intconvsi >= 0) && (intconvsi < app()._intmax) && ((stato == STATO_IDONEO) || (stato == STATO_FINESO)) && (dimesso != 'X'))
|
if ((intconvsi >= 0) && (intconvsi < app()._intmax) && ((stato == STATO_IDONEO) || (stato == STATO_FINESO)) && (dimesso != 'X'))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
|
@ -40,7 +40,7 @@ class TTessere_application : public TPrintapp
|
|||||||
ts _tipo_stampa;
|
ts _tipo_stampa;
|
||||||
TString _riepilogodon;
|
TString _riepilogodon;
|
||||||
|
|
||||||
static bool filter_func_tessere(const TRelation *);
|
static bool filter_func_tessere(const TRelation* rel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
class TUrgenze_application : public TPrintapp
|
class TUrgenze_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool filter_func_urgenze(const TRelation *);
|
static bool filter_func_urgenze(const TRelation* rel);
|
||||||
|
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
@ -130,12 +130,10 @@ void TUrgenze_application::set_page(int file, int cnt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TUrgenze_application::filter_func_urgenze(const TRelation * rel)
|
bool TUrgenze_application::filter_func_urgenze(const TRelation* rel)
|
||||||
{
|
{
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
|
|
||||||
TLocalisamfile& sog = rel->lfile();
|
TLocalisamfile& sog = rel->lfile();
|
||||||
|
|
||||||
//filtro per categorie
|
//filtro per categorie
|
||||||
TAssoc_array& categorie = app()._categorie;
|
TAssoc_array& categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
@ -154,12 +152,10 @@ bool TUrgenze_application::filter_func_urgenze(const TRelation * rel)
|
|||||||
{
|
{
|
||||||
long giorni_sez = rel->lfile(LF_SEZIONI).get_long(SEZ_INTMINCONV);
|
long giorni_sez = rel->lfile(LF_SEZIONI).get_long(SEZ_INTMINCONV);
|
||||||
long giorni = (giorni_sez > app()._giorni) ? giorni_sez : app()._giorni;
|
long giorni = (giorni_sez > app()._giorni) ? giorni_sez : app()._giorni;
|
||||||
TRectype from = sog.curr();
|
|
||||||
from.zero();
|
|
||||||
TDate data(TODAY);
|
TDate data(TODAY);
|
||||||
data = data - (const long) giorni;
|
data = data - (const long) giorni;
|
||||||
from.put(SOG_DATAULTDON, data);
|
TDate dataultdon = sog.get(SOG_DATAULTDON);
|
||||||
filtrato = (sog.curr()<= from);
|
filtrato = (dataultdon <= data);
|
||||||
}
|
}
|
||||||
return filtrato;
|
return filtrato;
|
||||||
}
|
}
|
||||||
@ -196,7 +192,6 @@ bool TUrgenze_application::preprocess_page(int file, int counter)
|
|||||||
TString16 codsot = current_cursor()->curr().get(SOG_CODSOT);
|
TString16 codsot = current_cursor()->curr().get(SOG_CODSOT);
|
||||||
if ((_codsez!=codsez)||(_codsot!=codsot))
|
if ((_codsez!=codsez)||(_codsot!=codsot))
|
||||||
{
|
{
|
||||||
//if (!_codsez.blank())
|
|
||||||
if (_codsez != "**")
|
if (_codsez != "**")
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
_codsez = codsez;
|
_codsez = codsez;
|
||||||
@ -237,8 +232,6 @@ bool TUrgenze_application::set_print(int)
|
|||||||
{
|
{
|
||||||
case F_ELENCO:
|
case F_ELENCO:
|
||||||
_tipo_stampa = elenco;
|
_tipo_stampa = elenco;
|
||||||
//_codsez.spaces(2);
|
|
||||||
//_codsot.spaces(2);
|
|
||||||
_codsez = "**";
|
_codsez = "**";
|
||||||
_codsot = "**";
|
_codsot = "**";
|
||||||
break;
|
break;
|
||||||
@ -251,7 +244,6 @@ bool TUrgenze_application::set_print(int)
|
|||||||
reset_files();
|
reset_files();
|
||||||
add_file(LF_SOGGETTI);
|
add_file(LF_SOGGETTI);
|
||||||
filtra_sezioni();
|
filtra_sezioni();
|
||||||
|
|
||||||
// filtro per categorie
|
// filtro per categorie
|
||||||
TString16 catpri = _msk->get(F_CAT1);
|
TString16 catpri = _msk->get(F_CAT1);
|
||||||
TString16 catsec = _msk->get(F_CAT2);
|
TString16 catsec = _msk->get(F_CAT2);
|
||||||
@ -271,7 +263,6 @@ bool TUrgenze_application::set_print(int)
|
|||||||
_categorie.add((const char*) catqui);
|
_categorie.add((const char*) catqui);
|
||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty() && catses.ok())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
|
|
||||||
// filtro per tipizzazione
|
// filtro per tipizzazione
|
||||||
_sangue->zero();
|
_sangue->zero();
|
||||||
TString16 gruppoab0 = _msk->get(F_GRUPPOAB0);
|
TString16 gruppoab0 = _msk->get(F_GRUPPOAB0);
|
||||||
@ -289,9 +280,7 @@ bool TUrgenze_application::set_print(int)
|
|||||||
_sangue->put(SOG_FENOTIPORH, fenotiporh);
|
_sangue->put(SOG_FENOTIPORH, fenotiporh);
|
||||||
if ((du.ok()) && (du.not_empty()))
|
if ((du.ok()) && (du.not_empty()))
|
||||||
_sangue->put(SOG_DU, du);
|
_sangue->put(SOG_DU, du);
|
||||||
|
_giorni = _msk->get_long(F_GIORNI);
|
||||||
long giorni = _msk->get_long(F_GIORNI);
|
|
||||||
|
|
||||||
// filtra solo idonei
|
// filtra solo idonei
|
||||||
current_cursor()->setfilter("TCS->S6 == \"I\"", TRUE);
|
current_cursor()->setfilter("TCS->S6 == \"I\"", TRUE);
|
||||||
// filtra per categorie, tipizzazione e data donazione
|
// filtra per categorie, tipizzazione e data donazione
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
class TModificati_application : public TPrintapp
|
class TModificati_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool filter_func_modificati(const TRelation *);
|
static bool filter_func_modificati(const TRelation* rel);
|
||||||
|
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
@ -126,12 +126,10 @@ void TModificati_application::set_page(int file, int cnt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TModificati_application::filter_func_modificati(const TRelation * rel)
|
bool TModificati_application::filter_func_modificati(const TRelation* rel)
|
||||||
{
|
{
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
|
TLocalisamfile& sog = rel->lfile();
|
||||||
TLocalisamfile sog = rel->lfile();
|
|
||||||
|
|
||||||
//filtro per categorie
|
//filtro per categorie
|
||||||
TAssoc_array& categorie = app()._categorie;
|
TAssoc_array& categorie = app()._categorie;
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
@ -257,7 +255,7 @@ bool TModificati_application::set_print(int)
|
|||||||
if (catses.not_empty() && catses.ok())
|
if (catses.not_empty() && catses.ok())
|
||||||
_categorie.add((const char*) catses);
|
_categorie.add((const char*) catses);
|
||||||
|
|
||||||
current_cursor()->set_filterfunction (filter_func_modificati);
|
current_cursor()->set_filterfunction(filter_func_modificati);
|
||||||
reset_print();
|
reset_print();
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
113
at/at3500.cpp
113
at/at3500.cpp
@ -36,16 +36,17 @@ class TScadenze_application : public TPrintapp
|
|||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
TScadenze_form* _form_eti;
|
TScadenze_form* _form_eti;
|
||||||
|
TAssoc_array _categorie;
|
||||||
|
|
||||||
int _cur1, _cur2, _cur3, _cur4;
|
int _cur1, _cur2, _cur3, _cur4;
|
||||||
TParagraph_string _cognome_nome;
|
TParagraph_string _cognome_nome;
|
||||||
TDate _data_stampa;
|
TDate _data_stampa;
|
||||||
TDate _dataini, _datafin;
|
TDate _dataini, _datafin;
|
||||||
TString _procdon;
|
TString16 _procdon;
|
||||||
ts _tipo_stampa;
|
ts _tipo_stampa;
|
||||||
TString _codsez, _codsot;
|
TString16 _codsez, _codsot;
|
||||||
|
|
||||||
static bool filter_func_scadenze(const TRelation *);
|
static bool filter_func_scadenze(const TRelation* rel);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -57,7 +58,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
void crea_intestazione();
|
void crea_intestazione();
|
||||||
void filtra_sezioni();
|
void filtra_sezioni();
|
||||||
void header_sezione(TString codsez, TString codsot);
|
void header_sezione(TString16 codsez, TString16 codsot);
|
||||||
TMask& app_mask() { return *_msk; }
|
TMask& app_mask() { return *_msk; }
|
||||||
TScadenze_application() : _data_stampa(TODAY), _cognome_nome("",25) {}
|
TScadenze_application() : _data_stampa(TODAY), _cognome_nome("",25) {}
|
||||||
};
|
};
|
||||||
@ -70,10 +71,10 @@ TRelation* TScadenze_form::relation() const { return cursor()->relation(); }
|
|||||||
|
|
||||||
void TScadenze_application::filtra_sezioni()
|
void TScadenze_application::filtra_sezioni()
|
||||||
{
|
{
|
||||||
TString sezini = _msk->get(F_SEZINI);
|
TString16 sezini = _msk->get(F_SEZINI);
|
||||||
TString sotini = _msk->get(F_SOTINI);
|
TString16 sotini = _msk->get(F_SOTINI);
|
||||||
TString sezfin = _msk->get(F_SEZFIN);
|
TString16 sezfin = _msk->get(F_SEZFIN);
|
||||||
TString sotfin = _msk->get(F_SOTFIN);
|
TString16 sotfin = _msk->get(F_SOTFIN);
|
||||||
select_cursor(_cur4);
|
select_cursor(_cur4);
|
||||||
TLocalisamfile& fl = current_cursor()->file(LF_SOGGETTI);
|
TLocalisamfile& fl = current_cursor()->file(LF_SOGGETTI);
|
||||||
TRectype da(fl.curr());
|
TRectype da(fl.curr());
|
||||||
@ -128,49 +129,22 @@ void TScadenze_application::set_page(int file, int cnt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TScadenze_application::filter_func_scadenze(const TRelation * rel)
|
bool TScadenze_application::filter_func_scadenze(const TRelation* rel)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool filtrato = TRUE;
|
bool filtrato = TRUE;
|
||||||
|
TLocalisamfile& sog = rel->lfile();
|
||||||
TLocalisamfile* sog = &(rel->lfile(LF_SOGGETTI));
|
// filtro per categorie
|
||||||
|
TAssoc_array categorie = app()._categorie;
|
||||||
TAssoc_array categorie;
|
|
||||||
|
|
||||||
TMask& msk = app().app_mask();
|
|
||||||
|
|
||||||
TString cat = msk.get(F_CAT1);
|
|
||||||
if (cat.not_empty() && cat.ok())
|
|
||||||
categorie.add((const char*) cat);
|
|
||||||
cat = msk.get(F_CAT2);
|
|
||||||
if (cat.not_empty() && cat.ok())
|
|
||||||
categorie.add((const char*) cat);
|
|
||||||
cat = msk.get(F_CAT3);
|
|
||||||
if (cat.not_empty() && cat.ok())
|
|
||||||
categorie.add((const char*) cat);
|
|
||||||
cat = msk.get(F_CAT4);
|
|
||||||
if (cat.not_empty() && cat.ok())
|
|
||||||
categorie.add((const char*) cat);
|
|
||||||
cat = msk.get(F_CAT5);
|
|
||||||
if (cat.not_empty() && cat.ok())
|
|
||||||
categorie.add((const char*) cat);
|
|
||||||
cat = msk.get(F_CAT6);
|
|
||||||
if (cat.not_empty() && cat.ok())
|
|
||||||
categorie.add((const char*) cat);
|
|
||||||
|
|
||||||
if (categorie.items() != 0)
|
if (categorie.items() != 0)
|
||||||
{
|
{
|
||||||
TString catsog = sog->curr().get(SOG_CATDON);
|
TString16 cat = sog.get(SOG_CATDON);
|
||||||
if (categorie.is_key((const char*) catsog))
|
filtrato = categorie.is_key((const char*) cat);
|
||||||
filtrato = TRUE;
|
|
||||||
else
|
|
||||||
filtrato = FALSE;
|
|
||||||
}
|
}
|
||||||
|
// filtro per data di prossima donazione
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
// filtro per età
|
TRectype from = sog->curr();
|
||||||
TRectype from (sog->curr());
|
TRectype to = sog->curr();
|
||||||
TRectype to (sog->curr());
|
|
||||||
from.zero();
|
from.zero();
|
||||||
to.zero();
|
to.zero();
|
||||||
if (app()._dataini.ok())
|
if (app()._dataini.ok())
|
||||||
@ -187,11 +161,7 @@ bool TScadenze_application::filter_func_scadenze(const TRelation * rel)
|
|||||||
else
|
else
|
||||||
to.put(SOG_DATAPROSAF, app()._datafin);
|
to.put(SOG_DATAPROSAF, app()._datafin);
|
||||||
}
|
}
|
||||||
if ((sog->curr() >= from) && (sog->curr() <= to))
|
filtrato = (sog->curr() >= from) && (sog->curr() <= to);
|
||||||
filtrato = TRUE;
|
|
||||||
else
|
|
||||||
filtrato = FALSE;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return filtrato;
|
return filtrato;
|
||||||
}
|
}
|
||||||
@ -202,14 +172,14 @@ bool TScadenze_application::preprocess_page(int file, int counter)
|
|||||||
// per ora non c'è
|
// per ora non c'è
|
||||||
if (_tipo_stampa == elenco)
|
if (_tipo_stampa == elenco)
|
||||||
{
|
{
|
||||||
TString nome = current_cursor()->curr().get(SOG_COGNOME);
|
TString80 nome = current_cursor()->curr().get(SOG_COGNOME);
|
||||||
nome << " ";
|
nome << " ";
|
||||||
nome << current_cursor()->curr().get(SOG_NOME);
|
nome << current_cursor()->curr().get(SOG_NOME);
|
||||||
_cognome_nome = nome;
|
_cognome_nome = nome;
|
||||||
|
|
||||||
// salto pagina se cambio sezione
|
// salto pagina se cambio sezione
|
||||||
TString codsez = current_cursor()->curr().get(SOG_CODSEZ);
|
TString16 codsez = current_cursor()->curr().get(SOG_CODSEZ);
|
||||||
TString codsot = current_cursor()->curr().get(SOG_CODSOT);
|
TString16 codsot = current_cursor()->curr().get(SOG_CODSOT);
|
||||||
if ((_codsez!=codsez)||(_codsot!=codsot))
|
if ((_codsez!=codsez)||(_codsot!=codsot))
|
||||||
{
|
{
|
||||||
if (_codsez != "**")
|
if (_codsez != "**")
|
||||||
@ -222,11 +192,11 @@ bool TScadenze_application::preprocess_page(int file, int counter)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TScadenze_application::header_sezione(TString codsez, TString codsot)
|
void TScadenze_application::header_sezione(TString16 codsez, TString16 codsot)
|
||||||
{
|
{
|
||||||
TString densez = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSEZ);
|
TString80 densez = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSEZ);
|
||||||
TString densot = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSOT);
|
TString80 densot = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSOT);
|
||||||
TString intestazione(132);
|
TString256 intestazione(132);
|
||||||
intestazione = "Sezione: ";
|
intestazione = "Sezione: ";
|
||||||
intestazione << codsez;
|
intestazione << codsez;
|
||||||
intestazione << "/";
|
intestazione << "/";
|
||||||
@ -268,16 +238,33 @@ bool TScadenze_application::set_print(int m)
|
|||||||
_dataini = _msk->get(F_DATAINI);
|
_dataini = _msk->get(F_DATAINI);
|
||||||
_datafin = _msk->get(F_DATAFIN);
|
_datafin = _msk->get(F_DATAFIN);
|
||||||
_procdon = _msk->get(F_PROCDON1);
|
_procdon = _msk->get(F_PROCDON1);
|
||||||
|
// filtro per sezioni selezionati
|
||||||
// filtro per sezioni selezionati
|
|
||||||
filtra_sezioni();
|
filtra_sezioni();
|
||||||
|
// filtro per categorie
|
||||||
|
TString16 catpri = _msk->get(F_CAT1);
|
||||||
|
TString16 catsec = _msk->get(F_CAT2);
|
||||||
|
TString16 catter = _msk->get(F_CAT3);
|
||||||
|
TString16 catqua = _msk->get(F_CAT4);
|
||||||
|
TString16 catqui = _msk->get(F_CAT5);
|
||||||
|
TString16 catses = _msk->get(F_CAT6);
|
||||||
|
if (catpri.not_empty() && catpri.ok())
|
||||||
|
_categorie.add((const char*) catpri);
|
||||||
|
if (catsec.not_empty() && catsec.ok())
|
||||||
|
_categorie.add((const char*) catsec);
|
||||||
|
if (catter.not_empty() && catter.ok())
|
||||||
|
_categorie.add((const char*) catter);
|
||||||
|
if (catqua.not_empty() && catqua.ok())
|
||||||
|
_categorie.add((const char*) catqua);
|
||||||
|
if (catqui.not_empty() && catqui.ok())
|
||||||
|
_categorie.add((const char*) catqui);
|
||||||
|
if (catses.not_empty() && catses.ok())
|
||||||
|
_categorie.add((const char*) catses);
|
||||||
// filtro per idoneo e non escluso
|
// filtro per idoneo e non escluso
|
||||||
current_cursor()->setfilter("((TCS->S6 == \"I\" ) || (TCS->S6 == \"F\")) && (ESCLUSO == \"\")", TRUE);
|
current_cursor()->setfilter("((TCS->S6 == \"I\" ) || (TCS->S6 == \"F\")) && (ESCLUSO == \"\")", TRUE);
|
||||||
|
|
||||||
// filtro per procedura di donazione (controllo che abbia la data)
|
// filtro per procedura di donazione (controllo che abbia la data)
|
||||||
/* questo filtro è nella filter_function
|
/* questo filtro è nella filter_function
|
||||||
TString procdon = _msk->get(F_PROCDON1);
|
TString16 procdon = _msk->get(F_PROCDON1);
|
||||||
if (procdon == IDON_SI)
|
if (procdon == IDON_SI)
|
||||||
current_cursor()->setfilter("(DATAPROSSI == \"\")", TRUE);
|
current_cursor()->setfilter("(DATAPROSSI == \"\")", TRUE);
|
||||||
else
|
else
|
||||||
@ -299,9 +286,9 @@ void TScadenze_application::crea_intestazione()
|
|||||||
|
|
||||||
if (_tipo_stampa == elenco)
|
if (_tipo_stampa == elenco)
|
||||||
{
|
{
|
||||||
TString sep(132);
|
TString256 sep(132);
|
||||||
sep = "SCADENZE DI DONAZIONE ";
|
sep = "SCADENZE DI DONAZIONE ";
|
||||||
TString procdon = _msk->get(F_PROCDON1);
|
TString16 procdon = _msk->get(F_PROCDON1);
|
||||||
sep << procdon ;
|
sep << procdon ;
|
||||||
TDate data = _msk->get(F_DATAINI);
|
TDate data = _msk->get(F_DATAINI);
|
||||||
if (data.ok())
|
if (data.ok())
|
||||||
@ -317,7 +304,7 @@ void TScadenze_application::crea_intestazione()
|
|||||||
}
|
}
|
||||||
sep.center_just();
|
sep.center_just();
|
||||||
set_header(2, "@0g%s", (const char*) sep);
|
set_header(2, "@0g%s", (const char*) sep);
|
||||||
TString data_stampa = _data_stampa.string();
|
TString16 data_stampa = _data_stampa.string();
|
||||||
set_header(2,"@0g%10s", (const char*) data_stampa);
|
set_header(2,"@0g%10s", (const char*) data_stampa);
|
||||||
sep = "";
|
sep = "";
|
||||||
sep << "Pag. @#";
|
sep << "Pag. @#";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user