Ask, reply and learn. Join the community of Akaunting.
Hi, I would need to place prices with 3 decimals in the items in my invoices, but they are always rounded at 2. Is there any way to place prices with 3? Thanks!
I have the same question, can anyone help?
I think I found I solution for this by editing the code:
We need to edit in two files:
1. Money.php
- Path: vendor\akaunting\laravel-money\src\Money.php
- Function: parseAmount
- Code:
Instead of:
if (is_float($amount)) {
return (float) $this->round($this->convertAmount($amount, $convert));
}
Replace it by this:
if (is_float($amount)) {
if (env('SETTING_ENABLE_MONEY_ROUNDING', true)) {
return (float) $this->round($this->convertAmount($amount, $convert));
}
return (float) $this->convertAmount($amount, $convert);
}
2. ".env" File
Add the line below at the end:
SETTING_ENABLE_MONEY_ROUNDING=false
Note: It's not a good solution because we are editing in the vendor folder
Showing 1 to 4 of 4 discussions