function fmt_amount($row)
{
$value =
- $row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT || $row['type']==ST_JOURNAL ?
- -$row["TotalAmount"] : $row["TotalAmount"];
+ $row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT ? -$row["TotalAmount"] : $row["TotalAmount"];
return price_format($value);
}
function check_overdue($row)
{
return $row['OverDue'] == 1
- && floatcmp($row["TotalAmount"], $row["Allocated"]) != 0;
+ && floatcmp(ABS($row["TotalAmount"]), $row["Allocated"]) != 0;
}
//------------------------------------------------------------------------------------------------
div_start('totals_tbl');
if ($_POST['customer_id'] != "" && $_POST['customer_id'] != ALL_TEXT)
{
- $customer_record = get_customer_details(get_post('customer_id'), get_post('TransToDate'));
+ $customer_record = get_customer_details(get_post('customer_id'), get_post('TransToDate'), false);
display_customer_summary($customer_record);
echo "<br>";
}