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.
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.
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.
Creative Director
Quiet City Design