X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fcustomer_allocation_inquiry.php;fp=sales%2Finquiry%2Fcustomer_allocation_inquiry.php;h=5630f04d20facd74821acb5918f19a9266f9c6ff;hb=9481e23e6d03f39f7d9e745f86bd1be5f703b96d;hp=2bd2d58e38f94c1d648e87065280d04c84f539fc;hpb=9549235b87720c573a2f1e2144d5a1bb55e6e8fc;p=fa-stable.git diff --git a/sales/inquiry/customer_allocation_inquiry.php b/sales/inquiry/customer_allocation_inquiry.php index 2bd2d58e..5630f04d 100644 --- a/sales/inquiry/customer_allocation_inquiry.php +++ b/sales/inquiry/customer_allocation_inquiry.php @@ -87,7 +87,7 @@ function due_date($row) function fmt_balance($row) { - return $row["TotalAmount"] - $row["Allocated"]; + return ($row["type"] == ST_JOURNAL && $row["TotalAmount"] < 0 ? -$row["TotalAmount"] : $row["TotalAmount"]) - $row["Allocated"]; } function alloc_link($row)