Skip to forum content
FrontAccounting forum
It's much more fun, when you can discuss your problems with others...
You are not logged in. Please login or register.
Active topics Unanswered topics
Search options
I did check it -- dropped log statements in methodically (just downloaded yesterday, code is new to me, and php is not my strong suite).
The gl_items class (which is the culprit) is defined in items_cart.inc, not intuitive, but can't hide from grep
EDIT: To also be clear, it's not just the display. When an item is added to the gl_items list it uses the constructor in the gl_items class which does the rounding, so the rounded number is what gets pushed to the sql table.
We need 8 decimal places for GL entries and despite setting the precision adding a new journal entry always rounded to 2 places.
If we go back and update the entry, then the full number would stay.
In includes/ui/items_cart.inc, the definition for class gl_item ignores the user precision at line 535 (line 534 in the GitMaster):
$this->amount = round($amount, 2);
Whereas the function update_gl_item does not round (line 161):
$this->gl_items[$index]->amount = $amount;
I've hacked the file, but would probably be better to update -- not sure where to submit a pull request on sourceforge.
Thanks!
Posts found: 2