Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Corretto ordine nella destroy(); se la stampa non e' per sezione, l'ordinamento e' alfabetico e non sezione+alfabetico git-svn-id: svn://10.65.10.50/trunk@6915 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
564a22eb4a
commit
06df1556ff
@ -12,6 +12,7 @@
|
|||||||
#define ALIAS_TCS 200
|
#define ALIAS_TCS 200
|
||||||
#define ALIAS_CTD 700
|
#define ALIAS_CTD 700
|
||||||
#define FINE_SOSPENSIONE "FS"
|
#define FINE_SOSPENSIONE "FS"
|
||||||
|
#define SOSPENSIONE "SO"
|
||||||
|
|
||||||
// nomi campi maschera
|
// nomi campi maschera
|
||||||
#include "at0700a.h"
|
#include "at0700a.h"
|
||||||
@ -297,19 +298,26 @@ bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
|
|||||||
const TString16 statopros = recsog.get(SOG_PROS_STATO);
|
const TString16 statopros = recsog.get(SOG_PROS_STATO);
|
||||||
const TString16 statosi = recsog.get(SOG_STATOSI);
|
const TString16 statosi = recsog.get(SOG_STATOSI);
|
||||||
const TString16 statoaf = recsog.get(SOG_STATOAF);
|
const TString16 statoaf = recsog.get(SOG_STATOAF);
|
||||||
|
filtrato = ((statosi == SOSPENSIONE) || (statoaf == SOSPENSIONE));
|
||||||
TDate datafine(NULLDATE);
|
if (app()._tiposo.not_empty())
|
||||||
if (statopros == FINE_SOSPENSIONE)
|
filtrato = filtrato || ((stato == app()._tiposo) && (statopros == FINE_SOSPENSIONE));
|
||||||
datafine = recsog.get_date(SOG_DATA_PROS);
|
else
|
||||||
TDate datafinesi(NULLDATE);
|
filtrato = filtrato || ((rel->lfile(-ALIAS_TCS).get("S6") == "S") && (statopros == FINE_SOSPENSIONE));
|
||||||
TDate datafineaf(NULLDATE);
|
if (filtrato)
|
||||||
if (statosi == "SO")
|
{
|
||||||
datafinesi = recsog.get_date(SOG_FINESOSSI);
|
TDate datafine(NULLDATE);
|
||||||
if (statoaf == "SO")
|
if (statopros == FINE_SOSPENSIONE)
|
||||||
datafineaf = recsog.get_date(SOG_FINESOSAF);
|
datafine = recsog.get_date(SOG_DATA_PROS);
|
||||||
filtrato = (datafine.ok()) && (datafine <= app()._data_sblocco) && (statopros == FINE_SOSPENSIONE);
|
TDate datafinesi(NULLDATE);
|
||||||
if ((!filtrato) && (datafinesi.ok() || datafineaf.ok()))
|
TDate datafineaf(NULLDATE);
|
||||||
filtrato = ((datafinesi.ok() && (datafinesi <= app()._data_sblocco)) || (datafineaf.ok() && (datafineaf <= app()._data_sblocco)));
|
if (statosi == "SO")
|
||||||
|
datafinesi = recsog.get_date(SOG_FINESOSSI);
|
||||||
|
if (statoaf == "SO")
|
||||||
|
datafineaf = recsog.get_date(SOG_FINESOSAF);
|
||||||
|
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)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return filtrato;
|
return filtrato;
|
||||||
}
|
}
|
||||||
@ -353,10 +361,15 @@ bool TSbloccoSospesi::set_print(int)
|
|||||||
_persezione = _msk->get_bool(F_PERSEZIONE);
|
_persezione = _msk->get_bool(F_PERSEZIONE);
|
||||||
_contatore = 0;
|
_contatore = 0;
|
||||||
_totale = 0;
|
_totale = 0;
|
||||||
|
filtra_sezioni();
|
||||||
|
if (_persezione)
|
||||||
|
((TSorted_cursor*)current_cursor())->change_order("90->CODSEZ|90->CODSOT|90->COGNOME|90->NOME|90->DATANASC");
|
||||||
|
else
|
||||||
|
((TSorted_cursor*)current_cursor())->change_order("90->COGNOME|90->NOME|90->DATANASC");
|
||||||
reset_files();
|
reset_files();
|
||||||
add_file(LF_SOGGETTI);
|
add_file(LF_SOGGETTI);
|
||||||
filtra_sezioni();
|
|
||||||
// filtro per tipo sospensione
|
// filtro per tipo sospensione
|
||||||
|
/*
|
||||||
TString256 filtro = "";
|
TString256 filtro = "";
|
||||||
if (_tiposo.not_empty())
|
if (_tiposo.not_empty())
|
||||||
filtro.format("(((STATO == \"%s\") && (PROS_STATO == \"FS\"))",(const char*)_tiposo);
|
filtro.format("(((STATO == \"%s\") && (PROS_STATO == \"FS\"))",(const char*)_tiposo);
|
||||||
@ -364,6 +377,7 @@ bool TSbloccoSospesi::set_print(int)
|
|||||||
filtro << "(((TCS->S6 == \"S\") && (PROS_STATO == \"FS\"))";
|
filtro << "(((TCS->S6 == \"S\") && (PROS_STATO == \"FS\"))";
|
||||||
filtro << " || (STATOSI == \"SO\") || (STATOAF == \"SO\"))";
|
filtro << " || (STATOSI == \"SO\") || (STATOAF == \"SO\"))";
|
||||||
current_cursor()->setfilter(filtro, TRUE);
|
current_cursor()->setfilter(filtro, TRUE);
|
||||||
|
*/
|
||||||
current_cursor()->set_filterfunction(filter_func_sbloccosospesi,TRUE);
|
current_cursor()->set_filterfunction(filter_func_sbloccosospesi,TRUE);
|
||||||
reset_print();
|
reset_print();
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
@ -410,7 +424,7 @@ bool TSbloccoSospesi::user_create()
|
|||||||
_rel->add("TCS", "CODTAB==STATO",1,0,ALIAS_TCS);
|
_rel->add("TCS", "CODTAB==STATO",1,0,ALIAS_TCS);
|
||||||
_rel->add("CTD", "CODTAB==CATDON",1,0,ALIAS_CTD);
|
_rel->add("CTD", "CODTAB==CATDON",1,0,ALIAS_CTD);
|
||||||
//cursore ordinamento per sezione+sottogruppo+cognome+nome
|
//cursore ordinamento per sezione+sottogruppo+cognome+nome
|
||||||
_cur = add_cursor(new TCursor(_rel, "", 3));
|
add_cursor(new TSorted_cursor(_rel,"","",3));
|
||||||
_contsan = new TLocalisamfile(LF_CONTSAN);
|
_contsan = new TLocalisamfile(LF_CONTSAN);
|
||||||
_idoneita = new TLocalisamfile(LF_IDONEITA);
|
_idoneita = new TLocalisamfile(LF_IDONEITA);
|
||||||
_scontrolli = new TRecord_array(LF_CONTSAN, CON_PROGCON);
|
_scontrolli = new TRecord_array(LF_CONTSAN, CON_PROGCON);
|
||||||
@ -427,12 +441,12 @@ bool TSbloccoSospesi::user_create()
|
|||||||
|
|
||||||
bool TSbloccoSospesi::user_destroy()
|
bool TSbloccoSospesi::user_destroy()
|
||||||
{
|
{
|
||||||
|
delete _sidoneita;
|
||||||
|
delete _scontrolli;
|
||||||
|
delete _idoneita;
|
||||||
|
delete _contsan;
|
||||||
delete _rel;
|
delete _rel;
|
||||||
delete _msk;
|
delete _msk;
|
||||||
delete _contsan;
|
|
||||||
delete _idoneita;
|
|
||||||
delete _scontrolli;
|
|
||||||
delete _sidoneita;
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user