Are Prepayment Realized Gains/Losses buggy in 2009SP1?

Miklos_Hollender
Member Posts: 1,598
I get huge, absolutely unrealistic Realized Losses at the point when a Purchase Prepayment Invoice is either deducted or credited, but not always, just in two cases. Unfortunately I have not yet found how to reproduce it.
I am asking it because did anyone have the same problem and found what triggers it, how to reproduce it?
Nothing in KB or Hotfix list.
To me in CU444 RealizeGainsLosses the line GenJnlLine.Amount := -PurchLine."Prepmt. Amount Inv. (LCY)"; just "stinks". I checked it and it was totally redesigned in NAV2013... so I cannot use an idea from there.
I need to find out where this "Prepmt. Amount Inv. (LCY)" comes from, my bet was on the Receipt Line (we use Get Receipt Lines) but it doesn't. Any ideas? Has anyone found this one?
I am asking it because did anyone have the same problem and found what triggers it, how to reproduce it?
Nothing in KB or Hotfix list.
To me in CU444 RealizeGainsLosses the line GenJnlLine.Amount := -PurchLine."Prepmt. Amount Inv. (LCY)"; just "stinks". I checked it and it was totally redesigned in NAV2013... so I cannot use an idea from there.
I need to find out where this "Prepmt. Amount Inv. (LCY)" comes from, my bet was on the Receipt Line (we use Get Receipt Lines) but it doesn't. Any ideas? Has anyone found this one?
0
Comments
-
What I found so far (no solution, no real cause yet):
PurchLine = the original PO
CU90:
PurchLine."Prepmt. Amount Inv. (LCY)" := PurchLine."Prepmt. Amount Inv. (LCY)" - PurchLine."Prepmt Amt to Deduct";
PrepayRealizeGainLoss(PurchLine);
CU444:
GenJnlLine.Amount := -PurchLine."Prepmt. Amount Inv. (LCY)";
And this is booked as Realized Loss.
So if PurchLine."Prepmt Amt to Deduct" = 0 then PurchLine."Prepmt. Amount Inv. (LCY)" gets fully written off as Realized Loss which is exactly what happened here.
But why would it be 0?0 -
Checked 2009 R2, no changes in the code
Have I just found an unknown bug? But still no ways to reproduce it... if you can some how make the PurchLine."Prepmt. Amount Inv. (LCY)" equal the originally booked prepayment amount i.e. the code that does the deductions does not do anything, and you have the PO in a foreign currency then it happens.
But I was wrong when I assumed that the deduction that does not run (propery) is the PurchLine."Prepmt. Amount Inv. (LCY)" := PurchLine."Prepmt. Amount Inv. (LCY)" - PurchLine."Prepmt Amt to Deduct"; because that code does not run when you have a document in a foreign currency.
It's more like the
IF "Currency Code" <> '' THEN BEGIN
TempPrePayDeductLCYPurchLine := PurchLine;
IF TempPrePayDeductLCYPurchLine.FIND THEN
TempPurchLine."Prepmt. Amount Inv. (LCY)" := TempPurchLine."Prepmt. Amount Inv. (LCY)" -
TempPrePayDeductLCYPurchLine."Prepmt. Amount Inv. (LCY)";
?????? :-k :-k :-k0 -
Getting closer - this part of the application is OK. Rather I have way too high amounts written in the purchase order line, in Prepmt. Amount Inv. (LCY) so even after the correctly done deduction there was too much left over.
Hmmm...0 -
I have found that at posting the original prepayment invoice too high amounts were stored in "Prepmt. Amount Inv. (LCY)" despite the fact that the invoice was otherwise posted correctly. And this caused the very high exchange loss booked at the point of deduction.
Unfortunately I have no idea how to reproduce it even though it happened twice. Any ideas?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions