Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : correzione errato giorn. don.: non correggeva se si era inserito un luogo donazione vuoto (solo il primo)


git-svn-id: svn://10.65.10.50/trunk@9422 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 2000-12-22 11:08:18 +00:00
parent 69ed3a710a
commit 4ae44008da

View File

@ -243,7 +243,6 @@ bool TCorreggiDC::modifica(TSheet_field& s)
s.destroy();
TLocalisamfile donaz(LF_DONAZ);
TLocalisamfile soggetti(LF_SOGGETTI);
TRectype r = donaz.curr();
soggetti.setkey(1);
donaz.setkey(4);
donaz.zero();
@ -257,14 +256,14 @@ bool TCorreggiDC::modifica(TSheet_field& s)
TString16 luogodon, tipodon;
TDate datadon;
bool leggi = TRUE;
int items = 0;
for(donaz.read(); !donaz.eof(); donaz.next())
{
const TRectype r(donaz.curr());
donaz.read(_isgteq) ;
while (!donaz.eof() && (donaz.curr() == r))
{
luogodon = donaz.get(DON_LUOGODON);
tipodon = donaz.get(DON_TIPODON);
datadon = donaz.get(DON_DATADON);
if ((luogodon!=_luogodon) || (tipodon!=_tipodon) || (datadon!=_datadon))
break;
if (_luogodon != luogodon || _tipodon != tipodon || _datadon != datadon) break;
if (_tipodon.empty())
{
if (luogodon == _luogodon)
@ -273,7 +272,17 @@ bool TCorreggiDC::modifica(TSheet_field& s)
leggi = FALSE;
}
else
leggi = TRUE;
{
if (_luogodon.empty())
{
if (luogodon.empty())
leggi = TRUE;
else
leggi = FALSE;
}
else
leggi = TRUE;
}
if (leggi)
{
if (!_nluogodon.blank())
@ -290,7 +299,7 @@ bool TCorreggiDC::modifica(TSheet_field& s)
if (_luogodon.not_empty())
donaz.put(DON_LUOGODON, _luogodon);
}
donaz.read(_isgteq);
}
return TRUE;
}
@ -317,7 +326,6 @@ int TCorreggiDC::read(TSheet_field& s)
for(donaz.read(_isgteq); !donaz.eof(); donaz.next())
{
if (donaz.curr() != r) break;
//if (_tipodon.empty() && _luogodon.not_empty())
if (_tipodon.empty())
{
luogodon = donaz.get(DON_LUOGODON);
@ -327,7 +335,16 @@ int TCorreggiDC::read(TSheet_field& s)
leggi = FALSE;
}
else
leggi = TRUE;
if (_luogodon.empty())
{
luogodon = donaz.get(DON_LUOGODON);
if (luogodon.empty())
leggi = TRUE;
else
leggi = FALSE;
}
else
leggi = TRUE;
if (leggi)
{
TToken_string& row = s.row(items);