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:
guy 2012-06-07 15:57:37 +00:00
parent 20fc8e1492
commit f03f803125

View File

@ -421,15 +421,16 @@ void TRiparti_app::write_rows()
if ( has_tot)
diff -= rec.get_real(RRIP_RIPARTO);
}
if (has_tot && _msk->get_real(F_DIFFERENZA) != 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 (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"), diff.stringa()))
a[a.last_row()].add(RRIP_RIPARTO, diff);
else
{
TRectype & rec = a.row(-1, true);
rec.put(RRIP_RIPARTO, diff);
}
}
a.rewrite();
}
@ -468,7 +469,6 @@ bool TRiparti_app::get_next_key(TToken_string& key)
TString query;
query << "USE RIP\nFROM TIPO=" << tipo << "\nTO TIPO=" << tipo;
TISAM_recordset rip_recset(query);
const long items = rip_recset.items();
if (rip_recset.move_last())
num += rip_recset.get(RIP_CODICE).as_int();