Patch level : 1.7 at
Files correlati : at8.exe Ricompilazione Demo : [ ] Commento : non carica i dimessi con piu' di 70 anni git-svn-id: svn://10.65.10.50/trunk@12458 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
06152123a2
commit
945d022ce3
@ -447,6 +447,7 @@ bool TCtpr2at::build_record(TAssoc_array& record, const TString& istruzione)
|
|||||||
|
|
||||||
bool TCtpr2at::soggetto(const TString& istruzione)
|
bool TCtpr2at::soggetto(const TString& istruzione)
|
||||||
{
|
{
|
||||||
|
const TDate oggi(TODAY);
|
||||||
int error = NOERR;
|
int error = NOERR;
|
||||||
TAssoc_array record;
|
TAssoc_array record;
|
||||||
if (build_record(record, istruzione))
|
if (build_record(record, istruzione))
|
||||||
@ -503,6 +504,18 @@ bool TCtpr2at::soggetto(const TString& istruzione)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (error != NOERR)
|
if (error != NOERR)
|
||||||
|
{
|
||||||
|
bool inserisci = TRUE;
|
||||||
|
const long eta = oggi - datanasc;
|
||||||
|
if (eta > 71)
|
||||||
|
{
|
||||||
|
const TString16& stato = (TString16&) record["DT_NASCITA"];
|
||||||
|
TRectype recpr1 = cache().get("PR1", stato);
|
||||||
|
TString16 catdon = recpr1.get("S6");
|
||||||
|
if (catdon.not_empty())
|
||||||
|
inserisci = cache().get("CTD", catdon).get_bool("B0");
|
||||||
|
}
|
||||||
|
if (inserisci)
|
||||||
{
|
{
|
||||||
recsog.zero();
|
recsog.zero();
|
||||||
recsog.put(SOG_COGNOME, cognome);
|
recsog.put(SOG_COGNOME, cognome);
|
||||||
@ -515,13 +528,16 @@ bool TCtpr2at::soggetto(const TString& istruzione)
|
|||||||
stampa = "Inserito da CETRAPLUS";
|
stampa = "Inserito da CETRAPLUS";
|
||||||
print_line(stampa);
|
print_line(stampa);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (error == NOERR)
|
||||||
|
{
|
||||||
if (update_record(recsog, record))
|
if (update_record(recsog, record))
|
||||||
{
|
{
|
||||||
TDate oggi(TODAY);
|
|
||||||
recsog.put(SOG_DATAULTAGG, oggi);
|
recsog.put(SOG_DATAULTAGG, oggi);
|
||||||
recsog.put(SOG_UTENULTAGG, "CETRAPLUS");
|
recsog.put(SOG_UTENULTAGG, "CETRAPLUS");
|
||||||
error = recsog.rewrite(_rel->lfile());
|
error = recsog.rewrite(_rel->lfile());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (error == NOERR);
|
return (error == NOERR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user