Patch level : 1.7 at 682
Files correlati : at0.exe Ricompilazione Demo : [ ] Commento : Chiusra periodica: non chiude chi ha rifatto l'idoneita entro la data limite, anche se non ha fatto donazioni git-svn-id: svn://10.65.10.50/trunk@11778 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c264128878
commit
5ddb89d148
@ -141,6 +141,8 @@ bool TChiusuraPeriodica::preprocess_page(int file, int counter)
|
||||
_operazione << cat_emeriti;
|
||||
if (_definitiva)
|
||||
{
|
||||
recsog.put(SOG_DATACONV,"");
|
||||
recsog.put(SOG_NUMCONV,"");
|
||||
recsog.put(SOG_CATDON,cat_emeriti);
|
||||
recsog.put(SOG_DATADIM, _data_chiusura);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
@ -159,6 +161,8 @@ bool TChiusuraPeriodica::preprocess_page(int file, int counter)
|
||||
_operazione << cat_estinti;
|
||||
if (_definitiva)
|
||||
{
|
||||
recsog.put(SOG_DATACONV,"");
|
||||
recsog.put(SOG_NUMCONV,"");
|
||||
recsog.put(SOG_CATDON,cat_estinti);
|
||||
recsog.put(SOG_DATADIM, _data_chiusura);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
@ -189,11 +193,6 @@ bool TChiusuraPeriodica::preprocess_page(int file, int counter)
|
||||
_operazione << _catfin1;
|
||||
if (_definitiva)
|
||||
{
|
||||
recsog.put(SOG_CATDON,_catfin1);
|
||||
recsog.put(SOG_DATADIM, oggi);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, user());
|
||||
filesog.rewrite();
|
||||
if (_contsan1.not_empty())
|
||||
{
|
||||
int err = _scontrolli->read(key);
|
||||
@ -214,6 +213,13 @@ bool TChiusuraPeriodica::preprocess_page(int file, int counter)
|
||||
keyi->put(IDO_CODICE, codice);
|
||||
err = _sidoneita->read(keyi);
|
||||
con_reord(recsog, _scontrolli, _sidoneita);
|
||||
recsog.put(SOG_DATACONV,"");
|
||||
recsog.put(SOG_NUMCONV,"");
|
||||
recsog.put(SOG_CATDON,_catfin1);
|
||||
recsog.put(SOG_DATADIM, oggi);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, user());
|
||||
filesog.rewrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -228,11 +234,6 @@ bool TChiusuraPeriodica::preprocess_page(int file, int counter)
|
||||
_operazione << _catfin2;
|
||||
if (_definitiva)
|
||||
{
|
||||
recsog.put(SOG_CATDON, _catfin2);
|
||||
recsog.put(SOG_DATADIM, oggi);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, user());
|
||||
filesog.rewrite();
|
||||
if (_contsan2.not_empty())
|
||||
{
|
||||
int err = _scontrolli->read(key);
|
||||
@ -253,6 +254,13 @@ bool TChiusuraPeriodica::preprocess_page(int file, int counter)
|
||||
keyi->put(IDO_CODICE, codice);
|
||||
err = _sidoneita->read(keyi);
|
||||
con_reord(recsog, _scontrolli, _sidoneita);
|
||||
recsog.put(SOG_DATACONV,"");
|
||||
recsog.put(SOG_NUMCONV,"");
|
||||
recsog.put(SOG_CATDON, _catfin2);
|
||||
recsog.put(SOG_DATADIM, oggi);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, user());
|
||||
filesog.rewrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -377,6 +385,7 @@ bool TChiusuraPeriodica::filter_func_chiusura(const TRelation* rel)
|
||||
if (!dimesso)
|
||||
{
|
||||
TDate dataultdon = recsog.get(SOG_DATAULTDON);
|
||||
|
||||
if (dataultdon.ok())
|
||||
{
|
||||
dataultdon.addyear(intesti);
|
||||
@ -428,6 +437,25 @@ bool TChiusuraPeriodica::filter_func_chiusura(const TRelation* rel)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (filtrato)
|
||||
{
|
||||
TRectype* key = new TRectype(LF_IDONEITA);
|
||||
long codice = recsog.get_long(SOG_CODICE);
|
||||
key->put(IDO_CODICE, codice);
|
||||
TRecord_array& idoneita = *app()._sidoneita;
|
||||
int err = idoneita.read(key);
|
||||
if (err == NOERR)
|
||||
{
|
||||
int ultimariga = idoneita.last_row();
|
||||
if (ultimariga > 0)
|
||||
{
|
||||
const TRectype& riga = idoneita.row(ultimariga);
|
||||
data = riga.get_date(IDO_DATAIDO);
|
||||
if (data >= app()._dataud)
|
||||
filtrato = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user