Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Decimal auto rounding

Rozanne Beauty   ( User )

Commented 7 years ago

Hi team,


There are several issues / bugs here:


  1. There is a problem when i add payment in an invoice with decimal amount. The paid amount will be rounded up and so is the income in the dashboard, which they shouldnt.


  2. Invoice settings are not functioning as well. (logo upload is not responding and running number is not showing in invoice creation page)

Denis Dulici   ( Admin )

Commented 7 years ago

Hi Rozanne,


1) You should use dot (.) for decimal amount, going to make this clear within the interface in the next version.


2) Can you please elaborate more on logo upload is not responding? What do you exactly get? I can confirm the number issue and will fix it within the next release.


Regards

Rozanne Beauty   ( User )

Commented 7 years ago

Hi Denis,


 


Thanks for replying.


 


1) I used dot for decimal when keying amount in "Add payment", however 0.50 in the paid amount shown in invoice will be auto rounded to 1.00, which is wrong. In the payment section, it shows the correct amount without rounding, it is just the invoice "Paid" amount is wrong.





















Subtotal: RM 1,042.50
Tax Total: RM 0.00
Paid: -RM 1,043.00
Total: -RM 0.50

 


2) I tested the upload in chrome, it allows me to select file but the upload has no response, no error message to tell me what was going wrong. In firefox, the select file dialog is not even showing when clicking "select file", it will just refresh the page when clicked.


 


3) downloading invoice pdf is also not functioning, leading me to a page "


Whoops, looks like something went wrong.

Karol Kovalik   ( User )

Commented 7 years ago

I am finding a similar (perhaps same) issue with invoice rounding.


 


I created an invoice for the amount 3,280.03. Now I used the menu item "Mark as paid". This is creating automatically a payment however the amount of the payment is 3,280.00. Leaving 0.03 rouding difference.

Gernot Weithofer   ( User )

Commented 7 years ago

Similar issue for decimal amount in quantity.


 


It works when creating or updating an invoice for the total, but when the invoice is printed the quantity is rounded.


 


using , causes an error as mentioned, but also . is not working and is not shown - total is correct.


 


Also tried to change the decimal setting without any result.


 


EDIT


 


Fixed it:


- go to your DB and change the type of invoice_items -> quantity from int(11) to double(15,8)


- open app->Http->Controllers->Items->Items.php line 251 change 


 


$quantity = (int) $item['quantity'];


to


$quantity = (double) $item['quantity'];


 


the second change fixes the ajax-call to calculate the totals.

Please login or register to leave a response.

Showing 1 to 5 of 5 discussions