Topic: Logical Bug in Customer Balances Report

If a customer transaction is not fully allocated (partially allocated), Selecting
Suppress Zeros to Yes And
Show Balances to Yes

in Customer Balances Report is giving a misleading Customer Net Balance.

Ideally Suppress Zero shall Suppress only Voided Transactions from the Report But Since it is also removing Fully Settled Transactions, the running balance is not revealing correct final balance if Show Balance is Set to Yes

For Better Understanding you may check Customer Balance of 4 Dimension in the following system

fa.boxygen.biz/fa2325

id: admin
pass: Pakistan1947
company: gp

www.boxygen.pk

Re: Logical Bug in Customer Balances Report

May be changing following line create correct result.

//if (($no_zeros && floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0)) continue;
if ($no_zeros && $show_balance && $trans['TotalAmount']== 0) continue;
if (($no_zeros && !$show_balance && floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0)) continue;

www.boxygen.pk

Re: Logical Bug in Customer Balances Report

To replace line 206 in reporting/rep101.php:

            if ($no_zeros && floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0) continue;

with

if ($no_zeros) {
    if ($show_balance) {
        if ($trans['TotalAmount']== 0) continue;
    } else {
        if (floatcmp($trans['TotalAmount'], $trans['Allocated']) == 0)) continue;
    }
}

@joe: want to commit it?
Committed

Re: Logical Bug in Customer Balances Report

Sure, willdo.

Joe