[Invoicing Module] Feedback

avatar Len Marshall Pro Sep 8. 2010. 8:50 am
I've fixed the rounding problem with adding payments. I've been going crazy trying to work around it - editing my database and manually fixing things - so I started looking into a solution.

The problem is that when you add items in the invoice, the system calculates to as many decimals is requred, but displays a rounded dollar & cent value. When you try to add a payment for the dollar & cent value, the system balances it to the extreme decimal value. Since you cannot enter a value less than $0.01, the system cannot complete the invoice as billed.

Now for the simple solution: round the taxed_total to 2 decimals before it's passed and saved into the database.

Open up activecollab\application\modules\invoicing\models\invoices\Invoices.class.php

Search for the comment "// now we have total tax for invoice, we need to round it up to 2 decimals". This was the tip-off, but it doesn't work.

Add this new line:

$this->taxed_total = round($this->taxed_total, 2);

after this existing line:

$this->taxed_total = $this->total + $this->tax;

which is line 350 in my case.

I've tested this with many invoices and it seems to do the trick. I'm not a PHP programmer, but my research and Visual Quickstart Guide seem to be working out.
Len Marshall
Creative Director
Quiet City Design
avatar Ilija Studen Staff Sep 8. 2010. 2:36 pm
Hello Len,

Which exact version of activeCollab do you use? Version number is displayed in System Information block on Administration page.

Try activeCollab free for 30 days, No credit card required!

Instant access to activeCollab, no installation needed.

.tryactivecollab.com

If you are already a user of activeCollab, you can log in here.