Sostituito n != ZERO con !n.is_zero()
git-svn-id: svn://10.65.10.50/branches/R_10_00@22668 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
20fc8e1492
commit
f03f803125
@ -421,15 +421,16 @@ void TRiparti_app::write_rows()
|
|||||||
if ( has_tot)
|
if ( has_tot)
|
||||||
diff -= rec.get_real(RRIP_RIPARTO);
|
diff -= rec.get_real(RRIP_RIPARTO);
|
||||||
}
|
}
|
||||||
if (has_tot && _msk->get_real(F_DIFFERENZA) != ZERO)
|
if (has_tot && !_msk->get_real(F_DIFFERENZA).is_zero())
|
||||||
if (yesno_box(FR("Il totale da ripartire differisce di %s\ndal totale delle righe devo aggiungere la differenza all'ultima riga"), abs(diff).stringa()))
|
{
|
||||||
|
if (yesno_box(FR("Il totale da ripartire differisce di %s\ndal totale delle righe devo aggiungere la differenza all'ultima riga"), diff.stringa()))
|
||||||
a[a.last_row()].add(RRIP_RIPARTO, diff);
|
a[a.last_row()].add(RRIP_RIPARTO, diff);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRectype & rec = a.row(-1, true);
|
TRectype & rec = a.row(-1, true);
|
||||||
rec.put(RRIP_RIPARTO, diff);
|
rec.put(RRIP_RIPARTO, diff);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
a.rewrite();
|
a.rewrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,7 +469,6 @@ bool TRiparti_app::get_next_key(TToken_string& key)
|
|||||||
TString query;
|
TString query;
|
||||||
query << "USE RIP\nFROM TIPO=" << tipo << "\nTO TIPO=" << tipo;
|
query << "USE RIP\nFROM TIPO=" << tipo << "\nTO TIPO=" << tipo;
|
||||||
TISAM_recordset rip_recset(query);
|
TISAM_recordset rip_recset(query);
|
||||||
const long items = rip_recset.items();
|
|
||||||
|
|
||||||
if (rip_recset.move_last())
|
if (rip_recset.move_last())
|
||||||
num += rip_recset.get(RIP_CODICE).as_int();
|
num += rip_recset.get(RIP_CODICE).as_int();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user