Codeunit 442 Sales-Post Prepayments\RealizeGainLoss(GenJnlLine,SalesLine) Codeunit 80 Sales-Post\PrepayRealizeGainLoss(SalesLine) Codeunit 80 Sales-Post\OnRun() Codeunit 81 Sales-Post (Yes/No)\Code() Codeunit 81 Sales-Post (Yes/No)\OnRun() Form 42 Sales Order\<Control75> - OnPush()
... IF SalesLine.FINDSET THEN REPEAT IF SalesLine."Purch. Order Line No." <> 0 THEN UpdateAssocLines(SalesLine); IF (SalesLine."Prepayment %" <> 0) THEN BEGIN IF "Currency Code" <> '' THEN BEGIN TempPrePayDeductLCYSalesLine := SalesLine; IF TempPrePayDeductLCYSalesLine.FIND THEN SalesLine."Prepmt. Amount Inv. (LCY)" := SalesLine."Prepmt. Amount Inv. (LCY)" - TempPrePayDeductLCYSalesLine."Prepmt. Amount Inv. (LCY)"; END ELSE SalesLine."Prepmt. Amount Inv. (LCY)" := SalesLine."Prepmt. Amount Inv. (LCY)" - SalesLine."Prepmt Amt to Deduct"; PrepayRealizeGainLoss(SalesLine); <<<<<< ERROR ERROR ERROR ERROR END; ...
IF (SalesLine."Gen. Bus. Posting Group" <> GenPostingSetup."Gen. Bus. Posting Group") OR (SalesLine."Gen. Prod. Posting Group" <> GenPostingSetup."Gen. Prod. Posting Group") THEN GenPostingSetup.GET(SalesLine."Gen. Bus. Posting Group",SalesLine."Gen. Prod. Posting Group"); GenPostingSetup.TESTFIELD("Sales Prepayments Account"); GenJnlLine."Account Type" := GenJnlLine."Account Type"::"G/L Account"; GenJnlLine."Account No." := GenPostingSetup."Sales Prepayments Account"; GenJnlLine."System-Created Entry" := TRUE; GenJnlLine.Amount := SalesLine."Prepmt. Amount Inv. (LCY)"; Currency.GET(SalesLine."Currency Code"); <<<<<< ERROR ERROR ERROR ERROR ....
Comments
https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?WTNTZSMNWUKNTMMYLSVQUSPTNTNSMQPYQOZUVZRWVUZWNXQQNULVKUNWVYSVVNNL
Not sure if MS fixed this problem on 2009 R2 version.
I know, this isn't a solution of the underlying problem but at least you'll be able to post the document. The one official KB i once applied was no help to it.
Error message when you try to invoice a sales order in Microsoft Dynamics NAV 2009 Service Pack 1: "Currency Code '' does not exist"
http://support.microsoft.com/kb/979109
It didn't help my problem with posting the invoice. I was going to try to reopen the invoice and validate the quantities but couldnn't do that cause all the lines have been delivered.
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com
First they gave me the following suggestion
Aparently this didn't solve the issue either but will together with KB 979109 solve so this won't happen again. What I needed to do was to solve this occurence.
After further investigating I discovered following on the salesorder:
SalesLine3
Prepmt. Line Amount 29
Prepmt. Amt. Inv. 29
Prepmt. Amt. Incl. VAT 35,67
Prepmt. Amount Inv. Incl. VAT 35,67
Prepmt. Amount Inv. (LCY) -0,01
SalesLine2
Prepmt. Line Amount 2,46
Prepmt. Amt. Inv. 2,46
Prepmt. Amt. Incl. VAT 3,03
Prepmt. Amount Inv. Incl. VAT 3,03
Prepmt. Amount Inv. (LCY) 2,46
SalesLine1
Prepmt. Line Amount 1 217,04
Prepmt. Amt. Inv. 1 217,04
Prepmt. Amt. Incl. VAT 1 496,96
Prepmt. Amount Inv. Incl. VAT 1 496,96
Prepmt. Amount Inv. (LCY) 1 217,04
It seems like the reason to why Prepmt. Amount Inv. (LCY) = -0,01 on salesline3 is because somewhere it did a missmatch agains the lines on the prepayment invoice were the value 0,01 comes from the invoice rounding.
What I did to solve it was to change Prepmt. Amount Inv. (LCY) = Prepmt. Amt. Inv. on the on salesline3 and post it.
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com