Topic: Annual Balance Breakdown Report -- Net Asset calculation

I reported a bug on Mantis here http://mantis.frontaccounting.com/view.php?id=3347
I could see that the annual balance report extension is miscalculating my Net_Assets as Liabilities - Assets, instead of Assets - Liabilities.

Notice that the errors do not exist when I use the native FrontAccounting Balance report, which does it the right way. But I would like to present the annual breakdown balance report (to show the monthly breakdown).

I've been looking into the code to see if i can invert the calculation and have it right, but it is taking some time. Workaround for now is exporting in Excel and doing the change in there, before printing to PDF.

If anyone has a quick_fix or want to discuss this, I would appreciate.

2 (edited by tm 10/20/2015 04:07:13 am)

Re: Annual Balance Breakdown Report -- Net Asset calculation

Line 401 seems to explicitly invert the values as they are being printed. Could that be the problem?

https://github.com/apmuthu/frontaccount … n.php#L401

$rep->AmountCol2($i, $i + 1, $sales[$i] * -1, $dec, 0, 4, 0, $fill, NULL, 1, true);

3 (edited by albertolima 10/20/2015 09:54:37 pm)

Re: Annual Balance Breakdown Report -- Net Asset calculation

TM,

yeb, that did the trick. Issue fixed, thanks.
Working fine now.

Will also report it on Mantis.

4 (edited by apmuthu 10/20/2015 11:56:54 pm)

Re: Annual Balance Breakdown Report -- Net Asset calculation

@joe: is this the fix?

Does the annual expense breakdown report work okay with line 402:

        $rep->AmountCol2($i, $i + 1, $sales[$i] * -1, $dec, 0, 4, 0, $fill, NULL, 1, true);

?

Re: Annual Balance Breakdown Report -- Net Asset calculation

Original line:
$rep->AmountCol2($i, $i + 1, $sales[$i] * -1, $dec, 0, 4, 0, $fill, NULL, 1, true);

To fix, we changed to:
$rep->AmountCol2($i, $i + 1, $sales[$i], $dec, 0, 4, 0, $fill, NULL, 1, true);

Re: Annual Balance Breakdown Report -- Net Asset calculation

Thank you guys for detecting this presentation bug. The file has been fixed and sent to Janusz, that will update the package.

/Joe

Re: Annual Balance Breakdown Report -- Net Asset calculation

Shouldn't this ought to be fixed in the annual expense breakdown report package as well?

Re: Annual Balance Breakdown Report -- Net Asset calculation

The current Annual Balance Breakdown Report pkg in the official repo has not been updated as yet despite a lot of version bumps in the last few times ending on 2015-10-25.

Re: Annual Balance Breakdown Report -- Net Asset calculation

Ok, I will ask Janusz again to update the repo.

Joe

Re: Annual Balance Breakdown Report -- Net Asset calculation

When doing so, he can refer my repo for many fixes to Charts (en_GB) and extensions (zen_import) and missing extensions.

Version bumps on addons with no changes in content should be avoided.