X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fcustomer_inquiry.php;h=5bdbe785e4b7f4fcee10767fc09fed31718d6a74;hb=15637f687c7fc48fde54904fe54c0386b7e90859;hp=989e6ddd61467bbea0b0814fa932cedf384e9e43;hpb=9e61d0860639941a0aceace8f4c14ced1c635e7f;p=fa-stable.git diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 989e6ddd..5bdbe785 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -58,9 +58,13 @@ function gl_view($row) 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['type']==ST_JOURNAL && $row['TotalAmount'] < 0) ? -$row["TotalAmount"] : $row["TotalAmount"]; + */ + $value = + $row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT ? -$row["TotalAmount"] : $row["TotalAmount"]; return price_format($value); } @@ -106,7 +110,7 @@ function prt_link($row) function check_overdue($row) { return $row['OverDue'] == 1 - && floatcmp($row["TotalAmount"], $row["Allocated"]) != 0; + && floatcmp(ABS($row["TotalAmount"]), $row["Allocated"]) != 0; } //------------------------------------------------------------------------------------------------