Support decimals in TAX %
-
I noted there were few other older posts about the issue but it seems unresolved.
Recently Finnish general VAT changed from 24% to 25.5% which surfaced the issue for us, report shows 26% instead of 25.5%.
Did a quick look in the source and found the following lines to do the rounding and changing decimal places from 0 to 1 worked fine.
But would be lovely to have the plugin support directly. I’m not sure if there are any downsides to it (possible rounding errors?) but I’d suggest rounding to two decimals. Or better yet, add an option for rounding accuracy.
./src/plugin/AccountingReport.php:103:
return number_format((reset($tax_rates)['rate']), 0) . '%';
./src/plugin/AccountingReport.php:117:
$return_array[] = number_format(($tax_rate['rate']), 0) . '%';
./src/plugin/AccountingReport.php:141:
$tax_items_labels[$tax_item->get_rate_id()] = number_format($tax_item->get_rate_percent(), 0);
./src/plugin/AccountingReport.php:268:
$tax_rate_percent = number_format(reset($rates)['rate'], 0) . '%';
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.