Stable merged into unstable again (due to failure on binary file during previous...
[fa-stable.git] / purchasing / includes / db / supp_trans_db.inc
index 0574ee51d5885a3cae327383f2aaef144036bd05..8a7464d79fc4f1a65b0bf4826d7820ad06dccdd3 100644 (file)
@@ -154,7 +154,7 @@ function post_void_supp_trans($type, $type_no)
                return true;
        }
 
-       if ($type == SUPPRECEIVE)
+       if ($type == ST_SUPPRECEIVE)
        {
                return void_grn($type_no);
        }
@@ -180,7 +180,7 @@ function get_sql_for_supplier_inquiry()
        (trans.ov_amount + trans.ov_gst  + trans.ov_discount) AS TotalAmount, 
                trans.alloc AS Allocated,
                ((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue,
-       (ABS(trans.ov_amount + trans.ov_gst  + trans.ov_discount - trans.alloc) <= 0.005) AS Settled
+       (ABS(trans.ov_amount + trans.ov_gst  + trans.ov_discount) - trans.alloc <= ".FLOAT_COMP_DELTA.") AS Settled
        FROM ".TB_PREF."supp_trans as trans, ".TB_PREF."suppliers as supplier
        WHERE supplier.supplier_id = trans.supplier_id
        AND trans.tran_date >= '$date_after'