Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decimal places for standard cost
02-07-2012, 11:27 AM (This post was last modified: 02-07-2012 11:29 AM by PakRicard.)
Post: #1
Decimal places for standard cost
When functional currency is IDR or any other used usually with 0 decimal places, it is a big nuissance to have the standard cost with 4 decimals as it leads to errors from user.

Also in systems with currencies with 2 decimal places, the standard cost decimal places depends on the business itself (may be wholesale needs 3,4,5 decimals but retailers might probably be OK with 2).

I propose to make this field a parameter so:
1) Update table currencies adding a field called decimalplacesstandardcost, next to the current decimalplaces
2) Using this parameter instead of the fixed 4 in StockCostUpdate.php

I can easily code and submit this, but need help: In which script is $_SESSION['CompanyRecord']['decimalplaces'] set, so I can set $_SESSION['CompanyRecord']['decimalplacesstandardcost']?

is it a good idea? Any different approach?

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
02-07-2012, 12:56 PM
Post: #2
RE: Decimal places for standard cost
Yes I agree, probably best to have this as a parameter - or default to the same as the currency. Or perhaps defaulting to the same as the functional currency +1 (or a parameter) would be the best.

The script includes/GetConfig.php is where CompanyRecord is setup. If it was a parameter is would come through as $_SESSION['Config']['standardcostdecimalplaces']

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
02-07-2012, 02:33 PM (This post was last modified: 02-07-2012 02:34 PM by PakRicard.)
Post: #3
RE: Decimal places for standard cost
OK. You are right. This is a company property, not a currency property, so the best place should be as a parameter.

I'll code it and forward asap.

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
02-07-2012, 05:11 PM
Post: #4
RE: Decimal places for standard cost
Already coded and submitted.
Modified files:
SystemParameters.php
StockCostUpdate.php
Selectproduct.php

and DB needs
INSERT INTO `config` VALUES ('StandardCostDecimalPlaces','2'); as default to 2

Regards,
Pak Ricard
Find all posts by this user
Quote this message in a reply
02-07-2012, 05:31 PM
Post: #5
RE: Decimal places for standard cost
Superb ... reviewed diffs and committed and tested.
Thanks

Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)