Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decimal places for prices
10-05-2015, 02:21 AM,
Decimal places for prices
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?
10-05-2015, 10:55 AM,
RE: Decimal places for prices
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!

10-06-2015, 07:54 AM,
RE: Decimal places for prices
Exson is correct.
Look here for the item in question and make sure you allow decimal places in the quantity. See attachment    
12-14-2015, 11:13 PM,
RE: Decimal places for prices
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".

Forum Jump:

Users browsing this thread: 1 Guest(s)