Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Sostituiti tipi di controlli fissi (ID, FS) con i corrispondenti tipi dei controlli sanitari, in modo che funzioni anche con modifiche sostanziali alla tabella controlli sanitari


git-svn-id: svn://10.65.10.50/trunk@7935 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 1999-03-15 10:56:56 +00:00
parent 0425f399f2
commit 6030adf851

View File

@ -146,7 +146,8 @@ void con_reord(TRectype& soggetto, TRecord_array* controlli, TRecord_array* idon
{ {
soggetto.put(SOG_STATOSI, tipo); soggetto.put(SOG_STATOSI, tipo);
soggetto.put(SOG_DATASI, dataultstato); soggetto.put(SOG_DATASI, dataultstato);
if (prosstipo == "FS") //if (prosstipo == "FS")
if (modstato_tcs(prosstipo)=='F')
soggetto.put(SOG_FINESOSSI, prossdata); soggetto.put(SOG_FINESOSSI, prossdata);
else else
soggetto.put(SOG_FINESOSSI, datanulla); soggetto.put(SOG_FINESOSSI, datanulla);
@ -161,7 +162,8 @@ void con_reord(TRectype& soggetto, TRecord_array* controlli, TRecord_array* idon
{ {
soggetto.put(SOG_STATOAF, tipo); soggetto.put(SOG_STATOAF, tipo);
soggetto.put(SOG_DATAAF, dataultstato); soggetto.put(SOG_DATAAF, dataultstato);
if (prosstipo == "FS") //if (prosstipo == "FS")
if (modstato_tcs(prosstipo)=='F')
soggetto.put(SOG_FINESOSAF, prossdata); soggetto.put(SOG_FINESOSAF, prossdata);
else else
soggetto.put(SOG_FINESOSAF, datanulla); soggetto.put(SOG_FINESOSAF, datanulla);
@ -245,13 +247,18 @@ void con_reord(TRectype& soggetto, TRecord_array* controlli, TRecord_array* idon
{ {
TString16 stato = soggetto.get(SOG_STATO); TString16 stato = soggetto.get(SOG_STATO);
char modstato = modstato_tcs(stato); char modstato = modstato_tcs(stato);
if ((statosi == IDONEITA) || (statoaf == IDONEITA)) const char tipostatosi = modstato_tcs(statosi);
const char tipostatoaf = modstato_tcs(statoaf);
//if ((statosi == IDONEITA) || (statoaf == IDONEITA))
if ((tipostatosi == 'I') || (tipostatoaf == 'I'))
if ((modstato != 'I') || (modstato != 'F')) if ((modstato != 'I') || (modstato != 'F'))
stato = IDONEITA; stato = IDONEITA;
//if ((statosi == SOSPENSIONE || statosi.empty()) && (statoaf == SOSPENSIONE || statoaf.empty())) //if ((statosi == SOSPENSIONE || statosi.empty()) && (statoaf == SOSPENSIONE || statoaf.empty()))
if ((statosi == SOSPENSIONE) && (statoaf == SOSPENSIONE)) //if ((statosi == SOSPENSIONE) && (statoaf == SOSPENSIONE))
if ((tipostatosi == 'S') && (tipostatoaf == 'S'))
if (modstato != 'S') if (modstato != 'S')
stato = SOSPENSIONE; //stato = SOSPENSIONE;
stato == statosi;
char statocalcolato = modstato_tcs(stato); char statocalcolato = modstato_tcs(stato);
if (modstato != statocalcolato) if (modstato != statocalcolato)
{ {
@ -372,18 +379,25 @@ void don_datepross(TRectype& soggetto)
} }
TString16 statoparziale; TString16 statoparziale;
TDate datastatoparziale; TDate datastatoparziale;
char tipostato;
statoparziale = soggetto.get(SOG_STATOSI); statoparziale = soggetto.get(SOG_STATOSI);
datastatoparziale = soggetto.get_date(SOG_DATASI); datastatoparziale = soggetto.get_date(SOG_DATASI);
if (statoparziale == SOSPENSIONE) tipostato = modstato_tcs(statoparziale);
//if (statoparziale == SOSPENSIONE)
if (tipostato == 'S')
datasi = NULLDATE; datasi = NULLDATE;
if (statoparziale == IDONEITA) //if (statoparziale == IDONEITA)
if (tipostato == 'I')
if (datastatoparziale > datasi) if (datastatoparziale > datasi)
datasi = datastatoparziale; datasi = datastatoparziale;
statoparziale = soggetto.get(SOG_STATOAF); statoparziale = soggetto.get(SOG_STATOAF);
datastatoparziale = soggetto.get_date(SOG_DATAAF); datastatoparziale = soggetto.get_date(SOG_DATAAF);
if (statoparziale == SOSPENSIONE) tipostato = modstato_tcs(statoparziale);
//if (statoparziale == SOSPENSIONE)
if (tipostato == 'S')
dataaf = NULLDATE; dataaf = NULLDATE;
if (statoparziale == IDONEITA) //if (statoparziale == IDONEITA)
if (tipostato = 'I')
if (datastatoparziale > dataaf) if (datastatoparziale > dataaf)
dataaf = datastatoparziale; dataaf = datastatoparziale;
soggetto.put(SOG_DATAPROSSI,datasi); soggetto.put(SOG_DATAPROSSI,datasi);