Hello,
For our stock count we pull the part ID using the below code:
var metrixRowId = getValueFromListDataRow(row, "stock_count", "metrix_row_id");
var partId = getDBValue(stringFormat("Select part_id from stock_count where metrix_row_id = {0}", metrixRowId));
The problem with this is our Part IDs recently have been rounding off trailing zeroes for example
Part ID 13003.70 becomes 13003.7
1452.00 becomes 1452
In some cases if 1452 is a valid part, it will pull information from that other part ID.
It doesn’t seem to affect items with a leading zero so
00308.50 is not affected.
We have notes saying that the below code does not work because of an IFS bug, so this was fixed previously but is now broken again.
var partId = getValueFromListDataRow(row, "stock_count", "part_id"); //this returns the wrong value for varchars that end with '.00' due to IFS bug
I have tested the above and confirmed it has the same issue.
I am looking for workaround solutions such as converting the result to a varchar or string and back to ensure the trailing zeroes do not get rounded off.
I have also tried wrapping the partID in a convert and it caused every part to break, so there is something here I feel I am not understanding.
var partId = getDBValue(stringFormat("Select CONVERT(varchar, part_id) from stock_count where metrix_row_id = {0}", metrixRowId));
If there is a resource for the syntax for IFS specific SQL statements a link to that would be very helpful.
Thank you