Corretto cazzutissimo confronto tra Timporti

git-svn-id: svn://10.65.10.50/trunk@2638 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-02-23 15:22:26 +00:00
parent 95bdee40f2
commit 52e9cf519d

View File

@ -1615,9 +1615,8 @@ const TImporto& TImporto::normalize(
int TImporto::compare(const TSortable& s) const
{
const TImporto& i = (const TImporto&)s;
const real d = valore() - i.valore();
int res = d.sign();
if (res == 0 && !is_zero())
res = sezione() != i.sezione();
const real v = i.sezione() == sezione() ? i.valore() : -i.valore();
const real d = valore() - v;
const int res = d.sign();
return res;
}