Patch level : 12.0 310
Files correlati : cg1.exe cg1300m.msk cgmenu.men Commento : Ricostruzione IVA Differita git-svn-id: svn://10.65.10.50/branches/R_10_00@23435 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
107471405b
commit
41334b6ce7
@ -293,15 +293,20 @@ void TCheck_ivadiff::check_year(long firm)
|
||||
TISAM_recordset recset("USE IVADIFF\nFROM NUMREG=#NR\nTO NUMREG=#NR");
|
||||
recset.set_var("#NR", numreg);
|
||||
TLocalisamfile& id = recset.cursor()->file();
|
||||
TImporto saldo;
|
||||
|
||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||
{
|
||||
const bool idchiusa = id.get_bool("CHIUSA");
|
||||
const TImporto imp(id.get_char("SEZIONE"), id.get_real("IMPORTO"));
|
||||
saldo += imp;
|
||||
}
|
||||
|
||||
if (idchiusa != chiusa)
|
||||
{
|
||||
id.put("CHIUSA", chiusa);
|
||||
id.rewrite();
|
||||
}
|
||||
bool idchiusa = saldo.is_zero();
|
||||
|
||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||
{
|
||||
id.put("CHIUSA", idchiusa);
|
||||
id.rewrite();
|
||||
}
|
||||
do
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user