Shrink Factor  No Decimals  SOLVED

11082018, 06:17 AM
(This post was last modified: 11112018 06:24 AM by VortecCPI.)
Post: #1




Shrink Factor  No Decimals  SOLVED
Stocks.php
Shrink Factor is rounding to zero decimal places. We use 20foot lengths of pipe that have loss due to curf so shrinkage is small but must be accounted for. The script writes the value to the database but shows a zero due to rounding during display. I changed the locale_number_format to use 'Variable' instead of '0'. Or maybe we should use $_POST['DecimalPlaces'] value at the part? Perhaps some of you have a better idea? https://www.linkedin.com/in/eclipsepaulbecker 

11092018, 01:24 PM
Post: #2




RE: Shrink Factor  No Decimals  SOLVED?
Well there is another function  filter_number_format in MiscFunctions.php that formats the number for SQL ... it sounds as though we have missed the conversion back to SQL format numbers.
Phil Daintree webERP Admin Logic Works Ltd http://www.logicworks.co.nz 

11092018, 08:42 PM
Post: #3




RE: Shrink Factor  No Decimals  SOLVED?
This is why I always ask the experts!
https://www.linkedin.com/in/eclipsepaulbecker 

11102018, 07:19 AM
Post: #4




RE: Shrink Factor  No Decimals  SOLVED?
Well I had a look and this rounding is happening in input as although you may have set to the shrink factor to 0.2 it rounds to 0 decimal places as you correctly point out  so next time you hit the enter button it is updated to zip  your solution sounds good or maybe just 2 dp might do the trick.
Phil Daintree webERP Admin Logic Works Ltd http://www.logicworks.co.nz 

11102018, 10:24 PM
Post: #5




RE: Shrink Factor  No Decimals  SOLVED?
The reason I have so many decimal places is because a length of pipe is twenty feet and each time the pipe is cut on the DoALL saw we have about 1/4" curf. We also lose some during the squareandbevel process so the number may be a little larger.
Typically 13 cuts per length so 13 x 0.25 in = 3.25 in 3.25 in of 20 ft = 3.25 / 240 = 0.013541 loss This is why we have such a small value. https://www.linkedin.com/in/eclipsepaulbecker 

« Next Oldest  Next Newest »

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