I started this same thread at mibuso but with no luck. So, maybe some here has a comment…
Ehh… I just need confirmation is this has been corrected in some of updates or maybe it is not a bug at all.
Situation:
On purchase line there is a field called Unit Price (LCY). This field is populated with “Unit Price” from the item card.
If foreign currency is used on Purchase Order then this field gets a wrong value (actually it gets value multiplied with currency factor if currency used on Purchase Order). Original value is taken from the item card wich holds LCY value not FCY so it does not need to be calculated to FCY (“unit price (LCY)” is name of the field in purchase line).
I searched through code of table Purchase Line and found Function called UpdateUOMQtyPerStockQty where next lines has been added after 3.6v Navision:
You may see here that it calculates LCY to FCY amount and stores it to a field that is LCY.
This is 4.0 SP3. On 3.6, there is the same function but without this line.
Update:
I found that these lines are not added in 4.0 SP1 which means that they came with 4.0 SP2.
This specific line does not exists till 4.0SP2. It is added in 4.0SP2. When this line is added, I have wrong values in that field, and the name of function in line looks wrong.
I do not have a 5.0DB at this moment (has it at home) would you pls be kind to check does this line exists in 5.0 or not? (I’m little bit confused with your answer and just need clarification).
If this line still exists in 5.0 then either they didn’t noticed problem or they think it is not a problem.
And I said that it was not there in 3.60, not till SP2 4.0, that part confused me, Eric. Well, I’ll contact MS for further details, cause this gaves me a lot of headaches in some custiomization (that was working on 3.60 [:)]).
Thnx a lot, both of you.
P.S. “something went wrong” message on posting this message… Several time (whole day).
Today or yesterday? Yesterday the database had run full (too many posts too quick), which gave problems when posting new posts. But I have expanded it, so there should not be problems with posts now… I hope!
Ok, MS confirmed me that this is a bug with low priority resolution. They think that the name of the field is wrong and that the field has to contain FCY value (which means that the line is correct and needs to be there, the problem is in the LCY field).
I received an update by Microsoft with a solution (which was obvious). It seems that the field name Is ok and update of the field values was wrong so that line has to be deleted:
old code
IF PurchHeader.“Currency Code” <> ‘’ THEN BEGIN
“Unit Cost” :=
CurrExchRate.ExchangeAmtLCYToFCY(
GetDate,PurchHeader.“Currency Code”,
“Unit Cost (LCY)”,PurchHeader.“Currency Factor”);