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)
|
||||
{
|
||||
const TDate oggi(TODAY);
|
||||
int error = NOERR;
|
||||
TAssoc_array record;
|
||||
if (build_record(record, istruzione))
|
||||
@ -503,24 +504,39 @@ bool TCtpr2at::soggetto(const TString& istruzione)
|
||||
}
|
||||
}
|
||||
if (error != NOERR)
|
||||
{
|
||||
recsog.zero();
|
||||
recsog.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
recsog.put(SOG_NOTIZIARIO, 'X');
|
||||
recsog.put(SOG_BENEM, 'X');
|
||||
recsog.put(SOG_CODICE, get_next_key());
|
||||
error = recsog.write(_rel->lfile());
|
||||
stampa = "Inserito da CETRAPLUS";
|
||||
print_line(stampa);
|
||||
{
|
||||
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.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
recsog.put(SOG_NOTIZIARIO, 'X');
|
||||
recsog.put(SOG_BENEM, 'X');
|
||||
recsog.put(SOG_CODICE, get_next_key());
|
||||
error = recsog.write(_rel->lfile());
|
||||
stampa = "Inserito da CETRAPLUS";
|
||||
print_line(stampa);
|
||||
}
|
||||
}
|
||||
if (update_record(recsog, record))
|
||||
if (error == NOERR)
|
||||
{
|
||||
TDate oggi(TODAY);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "CETRAPLUS");
|
||||
error = recsog.rewrite(_rel->lfile());
|
||||
if (update_record(recsog, record))
|
||||
{
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "CETRAPLUS");
|
||||
error = recsog.rewrite(_rel->lfile());
|
||||
}
|
||||
}
|
||||
return (error == NOERR);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user