Correzioni alla lista movimenti
git-svn-id: svn://10.65.10.50/trunk@1144 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7151add9d7
commit
5f59076287
@ -680,19 +680,12 @@ void TListaMov_application::stampa_errori_rmov()
|
|||||||
if (saldi.read() != NOERR)
|
if (saldi.read() != NOERR)
|
||||||
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.");
|
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.");
|
||||||
|
|
||||||
//TRecnotype numrec = current_cursor()->file(LF_RMOV).recno();
|
|
||||||
if (gruppoc != 0 || contoc != 0 || sottocontoc != 0l)
|
if (gruppoc != 0 || contoc != 0 || sottocontoc != 0l)
|
||||||
stampa_errori_contropartita(gruppoc, contoc, sottocontoc, tipoc);
|
stampa_errori_contropartita(gruppoc, contoc, sottocontoc, tipoc);
|
||||||
//current_cursor()->file(LF_RMOV).readat(numrec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TListaMov_application::stampa_errori_contropartita(int gruppo, int conto, long sottoconto, char t)
|
void TListaMov_application::stampa_errori_contropartita(int gruppo, int conto, long sottoconto, char t)
|
||||||
{
|
{
|
||||||
//TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
|
||||||
//int gruppo = rmov.get_int (RMV_GRUPPOC);
|
|
||||||
//int conto = rmov.get_int (RMV_CONTOC);
|
|
||||||
//long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
|
||||||
//char t;
|
|
||||||
bool g = FALSE;
|
bool g = FALSE;
|
||||||
|
|
||||||
TConto tc;
|
TConto tc;
|
||||||
@ -1693,12 +1686,6 @@ else _err.set(3);
|
|||||||
//controlli sulla contropartita
|
//controlli sulla contropartita
|
||||||
bool TListaMov_application::contropartita(int gruppo, int conto, long sottoconto, char t)
|
bool TListaMov_application::contropartita(int gruppo, int conto, long sottoconto, char t)
|
||||||
{
|
{
|
||||||
//char t;
|
|
||||||
//TLocalisamfile rmov(LF_RMOV,FALSE);
|
|
||||||
//int gruppo = rmov.get_int (RMV_GRUPPOC);
|
|
||||||
//int conto = rmov.get_int (RMV_CONTOC);
|
|
||||||
//long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
|
||||||
|
|
||||||
TConto tc;
|
TConto tc;
|
||||||
TRectype pc (_pcon->curr());
|
TRectype pc (_pcon->curr());
|
||||||
tc.set(gruppo,0,0l);
|
tc.set(gruppo,0,0l);
|
||||||
@ -1746,10 +1733,13 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
|||||||
int gruppo, conto, anno, gruppoc, contoc;
|
int gruppo, conto, anno, gruppoc, contoc;
|
||||||
long sottoconto, sottocontoc;
|
long sottoconto, sottocontoc;
|
||||||
TDate datareg;
|
TDate datareg;
|
||||||
char sez, tipo, t, tipoc;
|
char sez, tipo, t, tipoc;
|
||||||
|
real importo;
|
||||||
|
real dare, avere;
|
||||||
|
|
||||||
if (current_cursor()->is_first_match(LF_RMOV))
|
if (current_cursor()->is_first_match(LF_RMOV))
|
||||||
{
|
{
|
||||||
|
dare = avere = ZERO;
|
||||||
TRecnotype nrec = rmov.recno();
|
TRecnotype nrec = rmov.recno();
|
||||||
rmov.zero();
|
rmov.zero();
|
||||||
rmov.setkey(1);
|
rmov.setkey(1);
|
||||||
@ -1770,16 +1760,21 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
|||||||
datareg = rec.get_date(RMV_DATAREG);
|
datareg = rec.get_date(RMV_DATAREG);
|
||||||
sez = rec.get_char(RMV_SEZIONE);
|
sez = rec.get_char(RMV_SEZIONE);
|
||||||
tipo = rec.get_char(RMV_TIPOC);
|
tipo = rec.get_char(RMV_TIPOC);
|
||||||
|
importo = rec.get_real(RMV_IMPORTO);
|
||||||
|
|
||||||
|
if (sez == 'D')
|
||||||
|
dare += importo;
|
||||||
|
if (sez == 'A')
|
||||||
|
avere += importo;
|
||||||
|
|
||||||
TConto tc (gruppo,conto,sottoconto);
|
TConto tc (gruppo,conto,sottoconto);
|
||||||
|
|
||||||
// TRecnotype numerorec = rmov.recno();
|
if (gruppoc != 0 || contoc != 0 || sottocontoc != 0l)
|
||||||
if (contropartita(gruppoc, contoc, sottocontoc, tipoc))
|
if (contropartita(gruppoc, contoc, sottocontoc, tipoc))
|
||||||
// {
|
{
|
||||||
// rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
// }
|
}
|
||||||
// rmov.readat(numerorec);
|
|
||||||
|
|
||||||
if (anno != _annoeser || datareg != _datareg)
|
if (anno != _annoeser || datareg != _datareg)
|
||||||
{
|
{
|
||||||
@ -1884,7 +1879,12 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
|||||||
rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
} //for
|
||||||
|
if (dare != avere)
|
||||||
|
{
|
||||||
|
rmov.readat(nrec);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user