Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rounding of Decimal Places in Products and Quantities
#1
Hello,

Due to the type of products we need to see the quantity in MSF (Thousands of sq. ft.) however the price per quantity is rounded up to two decimal places. We need more.
Could there be a setup option that will stop the rounding to two places?

Thanks
Reply
#2
each user can define how many decimals they want to work with, it is in their preferences page.

if you just want the price/cost to be affected then some code changes are required
Joe
TSolucio
Reply
#3
(04-03-2019, 02:37 PM)joebordes Wrote: each user can define how many decimals they want to work with, it is in their preferences page.

if you just want the price/cost to be affected then some code changes are required

It don't seems to work in my instalation and the official demo.

For example in the demo:
I set it to admin user "Number Of Currency Decimals"  to  4 and create new invoice

http://demo.corebos.com/index.php?module=Invoice&parenttab=ptab&action=DetailView&record=43265

Gave Qty on 1.235 after saveing it display  1.12.
Attach screen shot


Attached Files Thumbnail(s)
   
Reply
#4
this commit

https://github.com/tsolucio/corebos/commit/8b0b9c873ebd3d9f7fa8cefb03c6831a85a9d485

will show you the quantity in the user format, but the quantity field in the database only has 3 decimals, so you are limited by that.

go to the database: vtiger_inventoryproductrel.quantity and increment the number of decimals
Joe
TSolucio
Reply
#5
(04-04-2019, 11:47 AM)joebordes Wrote: this commit

https://github.com/tsolucio/corebos/commit/8b0b9c873ebd3d9f7fa8cefb03c6831a85a9d485

will show you the quantity in the user format, but the quantity field in the database only has 3 decimals, so you are limited by that.

go to the database: vtiger_inventoryproductrel.quantity and increment the number of decimals

Thank you I will try it and update soon.

What abut the format of the output the customer.
In my case its Gendoc ODT file {InventoryDetails.quantity} parameter.
Do I need to change the code in order to control the number of decimals in the ODT file?
Reply
#6
I don't remember how that works, I would say that it should work correctly. Give it a try and let me know
Joe
TSolucio
Reply
#7
(04-04-2019, 11:47 AM)joebordes Wrote: this commit

https://github.com/tsolucio/corebos/commit/8b0b9c873ebd3d9f7fa8cefb03c6831a85a9d485

will show you the quantity in the user format, but the quantity field in the database only has 3 decimals, so you are limited by that.

go to the database: vtiger_inventoryproductrel.quantity and increment the number of decimals

It solve part of the problem.
The quantity stay in 2 digits in prat of the places.

Attach screen shot

Link to the demo:
http://demo.corebos.com/index.php?action=DetailView&module=SalesOrder&record=43265&parenttab=ptab


Quote: I don't remember how that works, I would say that it should work correctly. Give it a try and let me know

Regarding the output to the customer (PDF and Gendoc) the quantity stay in 2 digits.


Attached Files Thumbnail(s)
   
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)