// 2008-09-20 Joe Hunt
if ($date != "")
exchange_variation($type, $type_no, $row['trans_type_to'], $row['trans_no_to'], $date,
- $row['amt'], payment_person_types::supplier(), true);
+ $row['amt'], PT_SUPPLIER, true);
//////////////////////
}
$supp_sql = " AND trans.supplier_id = ".db_escape($supplier_id);
$sql = get_alloc_supp_sql("round(ABS(ov_amount+ov_gst+ov_discount)-alloc,6) <= 0 AS settled",
- "(type=22 OR type=21 OR type=1) AND (ov_amount < 0) " . $settled_sql . $supp_sql);
+ "(type=".ST_SUPPAYMENT." OR type=".ST_SUPPCREDIT." OR type=".ST_BANKPAYMENT.") AND (ov_amount < 0) " . $settled_sql . $supp_sql);
return $sql;
}
else
{
$sql = get_alloc_supp_sql(null, "round(ABS(ov_amount+ov_gst+ov_discount)-alloc,6) > 0
- AND trans.type != 22
+ AND trans.type != ".ST_SUPPAYMENT."
AND trans.supplier_id=$supplier_id");
}