webERP Forum

Full Version: Decimal places for prices
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If we wish to buy 200 small steel washers that are priced at £7.64 per 1000, what is the correct way to set-up the inventory item and its purchasing data, bearing in mind that 5 decimal places would be necessary, for the correct price calculation to be performed for the purchase order?

We have tried entering £0.00764 as the price for each washer, but there are insufficient decimal places to make the correct calculation, in terms of rounding for VAT.

Then we have tried creating a UoM called '1000' with a conversion factor of 1000 and entering £7.64 as the price, and by entering an order quantity of 0.2 (200/1000) we get the right price calculation. Unfortunately, after updating the PO order line, the Order Quantity field displays as zero, despite accepting 0.2 at point of entry.

We have already changed Standard Cost Decimal Places to 4, in System Parameters.

How would I go about modifying the code to allow 5 decimal places?
Hi,
I'm not sure I understand your question properly.
You can try to modify the decimal places from 4 to 5 at line around 741~744 in PO_Items.php which will let the price display 5 decimal places for Prices which is less than 1. It's fixed at 4 places.
For quantity ordered, you need to set up the decimal at Modify Item details interface to change "Decimal Places for display Quantity:". The default is zero.
Hope it's helpful.

Best regards!

Exson
Exson is correct.
Look here for the item in question and make sure you allow decimal places in the quantity. See attachment [attachment=396]
Thanks to Exson and agaluski for your help.

I have now managed to get prices at 5 decimal places - both purchasing prices and standard costs.

In order to allow 5 decimal places in Standard Cost, I needed to modify SystemParameters.php (Line 51 and 749), and in database table stockmaster, the data type settings in fields; actualcost, lastcost, materialcost, labourcost, overheadcost.

In order to allow 5 decimal places in Purchase Price, I needed to modify PO_Items.php (Line 742 and 743), and in database table purchdata, the data type settings in field "price".