Fixed handling extended journal entries in various places.
[fa-stable.git] / sales / inquiry / customer_inquiry.php
index 14457aa9a119a60cdfae5d9f3240bd6abb850cab..b90eacec5b5a41b3e637717ba31c3796a38f29a4 100644 (file)
@@ -138,7 +138,7 @@ function gl_view($row)
 function fmt_debit($row)
 {
        $value =
-           $row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT ?
+           $row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT || $row['type']==ST_JOURNAL ?
                -$row["TotalAmount"] : $row["TotalAmount"];
        return $value>=0 ? price_format($value) : '';
 
@@ -147,11 +147,12 @@ function fmt_debit($row)
 function fmt_credit($row)
 {
        $value =
-           !($row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT) ?
+           !($row['type']==ST_CUSTCREDIT || $row['type']==ST_CUSTPAYMENT || $row['type']==ST_BANKDEPOSIT || $row['type']==ST_JOURNAL) ?
                -$row["TotalAmount"] : $row["TotalAmount"];
        return $value>0 ? price_format($value) : '';
 }
 
+
 function credit_link($row)
 {
        global $page_nested;