Rounding of Decimal Places in Products and Quantities - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8) +--- Thread: Rounding of Decimal Places in Products and Quantities (/showthread.php?tid=1455) |
Rounding of Decimal Places in Products and Quantities - addady2 - 04-01-2019 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 RE: Rounding of Decimal Places in Products and Quantities - joebordes - 04-03-2019 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 RE: Rounding of Decimal Places in Products and Quantities - addady2 - 04-04-2019 (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. 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 RE: Rounding of Decimal Places in Products and Quantities - joebordes - 04-04-2019 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 RE: Rounding of Decimal Places in Products and Quantities - addady2 - 04-04-2019 (04-04-2019, 11:47 AM)joebordes Wrote: this commit 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? RE: Rounding of Decimal Places in Products and Quantities - joebordes - 04-05-2019 I don't remember how that works, I would say that it should work correctly. Give it a try and let me know RE: Rounding of Decimal Places in Products and Quantities - addady2 - 04-07-2019 (04-04-2019, 11:47 AM)joebordes Wrote: this commit 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. |