// 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::customer(), true);
+ $row['amt'], PT_CUSTOMER, true);
//////////////////////
}
$cust_sql = " AND trans.debtor_no = ".db_escape($customer_id);
$sql = get_alloc_trans_sql("round(ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount-alloc,6) <= 0 AS settled",
- "(type=12 OR type=11 OR type=2) AND (trans.ov_amount > 0) " . $settled_sql . $cust_sql);
+ "(type=".ST_CUSTPAYMENT." OR type=".ST_CUSTCREDIT." OR type=".ST_BANKDEPOSIT.") AND (trans.ov_amount > 0) " . $settled_sql . $cust_sql);
return $sql;
}
else
{
$sql = get_alloc_trans_sql(null, "round(ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount-alloc,6) > 0
- AND trans.type != " . systypes::cust_payment() . "
- AND trans.type != " . systypes::bank_deposit() . "
- AND trans.type != 11
- AND trans.type != 13
+ AND trans.type <> " . ST_CUSTPAYMENT . "
+ AND trans.type <> " . ST_BANKDEPOSIT . "
+ AND trans.type <> " . ST_CUSTCREDIT . "
+ AND trans.type <> " . ST_CUSTDELIVERY . "
AND trans.debtor_no=".db_escape($customer_id));
}