Hi @fbartels,
Yes, it is actually a fairly frequent question that remains unsolved since Invoice Ninja version 4.X. They promised to fix this bug in version 5.X, but it still remains unsolved (https://forum.invoiceninja.com/t/invoice-rounding-amounts-not-limited-to-2-decimal-places/3978)
I have posted it here, in case someone in the community had the same thing and had found a way to solve it. Surely you have to touch some .php file that controls the rounding of taxes, but they are not accessible in the Cloudron package.
For example:
/tests/acceptance/TaxRatesCest.php
$total = $itemCost;
$total += round($itemCost * $invoiceTaxRate / 100, 2);
/app/Models/Invoice.php
/**
* @param $invoiceItem
* @param $invoiceTotal
*
* @return float|int
*/
public function getItemTaxable($invoiceItem, $invoiceTotal)
{
$total = $invoiceItem->qty * $invoiceItem->cost;
if ($this->discount != 0) {
if ($this->is_amount_discount) {
if ($invoiceTotal + $this->discount != 0) {
$total -= $invoiceTotal ? ($total / ($invoiceTotal + $this->discount) * $this->discount) : 0;
}
} else {
$total *= (100 - $this->discount) / 100;
}
}
if ($invoiceItem->discount != 0) {
if ($this->is_amount_discount) {
$total -= $invoiceItem->discount;
} else {
$total -= $total * $invoiceItem->discount / 100;
}
}
return round($total, 2);
}
5abc0208-75ae-47c4-a6ea-1ad887501672-image.png
If someone has found how to solve it ... 🙏