git-svn-id: svn://10.65.10.50/trunk@2709 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
nik 1996-03-29 17:17:10 +00:00
parent b13b944326
commit 172900c7b3
2 changed files with 36 additions and 8 deletions

View File

@ -1098,7 +1098,27 @@ bool TRic_tab::occasionali(TString& ocfpi)
ocfpi = chiave;
}
else
ric = FALSE;
{
_occas->setkey(1);
_occas->zero();
_occas->put("CFPI", ocfpi);
if (_occas->read() == NOERR)
{
TRecnotype rec = _occas->recno();
_occas->setkey(1);
_occas->zero();
for (_occas->first(); !_occas->eof(); _occas->next())
{
TString cfpi = _occas->get(OCC_CFPI);
if (cfpi.mid(0,3) == "RIC")
prog = atol(cfpi.mid(3,13));
}
prog++;
chiave = format("%3s%13ld", (const char*) "RIC", prog);
ocfpi = chiave;
_occas->readat(rec);
}
}
// }
// else
// {
@ -1122,8 +1142,7 @@ bool TRic_tab::occasionali(TString& ocfpi)
_occas->rewrite();
else
{
if (ric)
_occas->put(OCC_CFPI, chiave);
_occas->put(OCC_CFPI, ocfpi);
_occas->write();
}

View File

@ -55,7 +55,7 @@ class TRic_ListaMov : public TPrintapp
TString _record;
bool _mov_sez, _errore_grave, _esiste_conto, _is_exist, _risposta, _continua;
char _sdt, _sezione, _tipocf;
int _ae, _anno, _gruppo, _conto, _tipocr, _tipod, _tiporeg;
int _ae, _anno, _gruppo, _conto, _tipocr, _tipod, _tiporeg, _annoese;
int _gruppoc, _contoc, _gruppocr, _contocr, _annoiva;
TDate _datacomp, _datadoc, _datareg, _data74tr;
real _importo, _impo, _impos, _tot_dare, _tot_avere, _tot_doc;
@ -381,6 +381,9 @@ bool TRic_ListaMov::controlla_mov()
}
}
int pp;
_annoese = date2esc(_datacomp, &pp); // Esercizio in corso
if ( !TDate::isdate(_datacomp.string()) )
{
_errore_grave = TRUE;
@ -1149,6 +1152,8 @@ void TRic_ListaMov::aggiorna_mov()
{
TLocalisamfile& mov = current_cursor()->file(LF_MOV);
if (_anno == 0)
mov.put(MOV_ANNOES, _annoese);
mov.put(MOV_DATACOMP, _datacomp);
mov.put(MOV_ANNOIVA, _annoiva);
mov.put(MOV_REG, _registro);
@ -1164,8 +1169,10 @@ void TRic_ListaMov::aggiorna_mov()
void TRic_ListaMov::aggiorna_rmov(char tipoc, char tipocc)
{
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
// rmov.put(RMV_ANNOES, _annoese);
if (_anno == 0)
rmov.put(RMV_ANNOES, _annoese);
rmov.put(RMV_TIPOC, tipoc);
rmov.put(RMV_TIPOCC, tipocc);
@ -1175,8 +1182,10 @@ void TRic_ListaMov::aggiorna_rmov(char tipoc, char tipocc)
void TRic_ListaMov::aggiorna_iva(char tipo)
{
TLocalisamfile& riva = current_cursor()->file(LF_RMOVIVA);
// riva.put(RMI_ANNOES, _annoese);
if (_anno == 0)
riva.put(RMI_ANNOES, _annoese);
if (_tipodoc == "NC" || _tipodoc == "ST")
{
_impo = _impo * -1;