Improved float compare in certain files (AR/AP ledger)
[fa-stable.git] / reporting / rep201.php
index 79cd401f1dbeab815384eb73017412762447e841..4004c8a219c335bb279198fb0ff014c5e721bd08 100644 (file)
@@ -175,7 +175,7 @@ function print_supplier_balances()
                $rep->Line($rep->row + 4);
                while ($trans=db_fetch($res))
                {
-                       if ($no_zeros && $trans['TotalAmount'] == 0 && $trans['Allocated'] == 0) continue;
+                       if ($no_zeros && floatcmp(abs($trans['TotalAmount']), $trans['Allocated']) == 0) continue;
                        $rep->NewLine(1, 2);
                        $rep->TextCol(0, 1, $systypes_array[$trans['type']]);
                        $rep->TextCol(1, 2,     $trans['reference']);