Problembeschreibung
Nach der Installation KB3034441 in der spanischen Version von Microsoft Dynamics NAV 2009 beim Anwenden einer normalen Zahlung und eine Rechnung von Debitoren-oder Kreditorenposten finden die gebuchten Sachposten mit demselben Konto falsch ist. Folgen Sie den Schritten im Abschnitt ändert sich dieses Problem lösen. Dieses Problem tritt in den folgenden Produkten auf:
-
Die spanische Version von Microsoft Dynamics NAV 2009 R2
-
Die spanische Version von Microsoft Dynamics NAV 2009 SP1
Problemlösung
Hotfix-Informationen
Ein unterstützter Hotfix ist inzwischen von Microsoft erhältlich. Allerdings ist es lediglich zur Behebung dieses Problems. Wenden Sie es nur auf Systeme an, bei denen dieses spezielle Problem auftritt. Dieser Hotfix wird möglicherweise noch getestet. Wenn Ihr System durch dieses Problem nicht schwerwiegend beeinträchtigt ist, empfehlen wir, dass Sie warten auf das nächste Servicepack für Microsoft Dynamics NAV 2009 oder die nächste Microsoft Dynamics NAV-Version, die diesen Hotfix enthält.
Hinweis In besonderen Fällen bestimmt Gebühren fallen normalerweise Support aufrufen Wenn Experte Support für Microsoft Dynamics und zugehörige Produkte storniert werden können, dass ein bestimmtes Update Ihr Problem behebt. Die normalen Supportkosten gilt für zusätzliche Supportfragen und Probleme, die nicht für das betreffende Update qualifizieren.
Informationen zur Installation
Microsoft bietet Programmierbeispiele lediglich zur Veranschaulichung, ohne ausdrückliche oder konkludente Gewährleistung. Dies beinhaltet, ist jedoch nicht beschränkt auf, konkludente Gewährleistungen der Tauglichkeit oder Eignung für einen bestimmten Zweck. Dieser Artikel setzt voraus, dass Sie mit der von Beispielen verwendeten Programmiersprache und den Tools, die zum Erstellen und Debuggen von Prozeduren verwendet werden, vertraut sind. Microsoft-Supporttechniker helfen der Erläuterung der Funktionalität bestimmter Prozeduren. Allerdings werden sie diese Beispiele nicht ändern, um zusätzliche Funktionalität bereitzustellen oder Prozeduren erstellen, die Ihren spezifischen Bedürfnisse erfüllen.
Hinweis Bevor Sie diesen Hotfix installieren, stellen Sie sicher, dass alle Microsoft Dynamics NAV-Clientbenutzer vom System abgemeldet werden. Hierzu gehören Dienste Microsoft Dynamics NAV Application Server (NAS). Sie sollte nur-Client-Benutzers, der angemeldet ist, wenn Sie diesen Hotfix installieren.
Muss eine Entwicklerlizenz verfügen, um diesen Hotfix installieren können.
Es wird empfohlen, das Benutzerkonto im Fenster Windows-Benutzernamen oder im Fenster Datenbank-Anmeldenamen "SUPER" Rollen-ID zugewiesen werden Wenn das Benutzerkonto die Rollen-ID "SUPER" nicht zugeordnet werden kann, müssen Sie sicherstellen, dass das Benutzerkonto die folgenden Berechtigungen verfügt:
-
Änderungsberechtigung für das Objekt, das Sie ändern.
-
Ausführungsberechtigung für System Object ID 5210 und System Object ID 9015
Objekt.
Hinweis Sie müssen keine Rechte für die Datenspeicher haben, es sei denn, Sie müssen eine Datenreparatur durchführen.
Ändern von Code
Hinweis Testen Sie Programmcodeverbesserungen generell erst in einem Testsytem, bevor Sie sie im Produktionssystem verwenden.
Gehen Sie folgendermaßen vor, um dieses Problem zu beheben:
-
Ändern Sie den Code in Funktion PostDtldCustLedgEntries im Fibu Buch.-Post Line Codeunit (12) wie folgt:
Vorhandener Code 1...LOCAL PROCEDURE PostDtldCustLedgEntries@46(GenJnlLine2@1000 : Record 81;VAR DtldCVLedgEntryBuf@1001 : Record 383;CustPostingGr@1002 : Record 92;GLSetup@1003 : Record 98;NextTransactionNo@1004 : Integer;CustLedgEntryInserted@1012 : Boolean);
VAR
DtldCustLedgEntry@1005 : Record 379;
Currency@1007 : Record 4;
GenPostingSetup@1008 : Record 252;
TotalAmountLCY@1009 : Decimal;
TotalAmountAddCurr@1010 : Decimal;
PaymentDiscAcc@1011 : Code[20];
DtldCustLedgEntryNoOffset@1006 : Integer;
PaymentTolAcc@1013 : Code[20];
...Neuer Code 1
...LOCAL PROCEDURE PostDtldCustLedgEntries@46(GenJnlLine2@1000 : Record 81;VAR DtldCVLedgEntryBuf@1001 : Record 383;CustPostingGr@1002 : Record 92;GLSetup@1003 : Record 98;NextTransactionNo@1004 : Integer;CustLedgEntryInserted@1012 : Boolean);
VAR
DtldCustLedgEntry@1005 : Record 379;
Currency@1007 : Record 4;
GenPostingSetup@1008 : Record 252;
// Add the following line.
DtldCustLedgEntry3@1100044 : Record 379;
// End of the added line.
TotalAmountLCY@1009 : Decimal;
TotalAmountAddCurr@1010 : Decimal;
PaymentDiscAcc@1011 : Code[20];
DtldCustLedgEntryNoOffset@1006 : Integer;
PaymentTolAcc@1013 : Code[20];
...Vorhandener Code 2
...ReceivableAccAmtLCY@1100001 : Decimal;
ReceivableAccAmtAddCurr@1100000 : Decimal;
DtldCustLedgEntry2@1100003 : TEMPORARY Record 379;
ExistDtldCVLedgEntryBuf@1000003 : Boolean;
FindBill@1100004 : Boolean;
BEGIN
TotalAmountLCY := 0;
TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
...Neuer Code 2
...ReceivableAccAmtLCY@1100001 : Decimal;
ReceivableAccAmtAddCurr@1100000 : Decimal;
DtldCustLedgEntry2@1100003 : TEMPORARY Record 379;
ExistDtldCVLedgEntryBuf@1000003 : Boolean;
FindBill@1100004 : Boolean;
// Add the following line.
EntryUnapplied@1100051 : Boolean;
// End of the added line.
BEGIN
TotalAmountLCY := 0;
TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
...Vorhandenen Code 3
... TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
NegativeLCYAppAmt := 0;
NegativeACYAppAmt := 0;
IF GenJnlLine2."Account Type" = GenJnlLine2."Account Type"::Customer THEN BEGIN
IF DtldCustLedgEntry.FINDLAST THEN
DtldCustLedgEntryNoOffset := DtldCustLedgEntry."Entry No."
ELSE
...Neuer Code 3
...TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
NegativeLCYAppAmt := 0;
NegativeACYAppAmt := 0;
// Add the following line.
EntryUnapplied := FALSE;
// End of the added line.
IF GenJnlLine2."Account Type" = GenJnlLine2."Account Type"::Customer THEN BEGIN
IF DtldCustLedgEntry.FINDLAST THEN
DtldCustLedgEntryNoOffset := DtldCustLedgEntry."Entry No."
ELSE
...Vorhandenen Code 4
... END;
InsertGLEntry(TRUE);
GenJnlLine."Posting Date" := OriginalPostingDate;
END;
// Delete the following line.
PostReceivableDocs(GenJnlLine);
// End of the deleted line.
IF NOT GLEntryTmp.FINDFIRST AND ExistDtldCVLedgEntryBuf THEN BEGIN
InitGLEntry(CustPostingGr."Receivables Account",PositiveLCYAppAmt,PositiveACYAppAmt,FALSE,TRUE);
InsertGLEntry(FALSE);
InitGLEntry(CustPostingGr."Receivables Account",NegativeLCYAppAmt,NegativeACYAppAmt,FALSE,TRUE);
...Neuer Code 4
... END;
InsertGLEntry(TRUE);
GenJnlLine."Posting Date" := OriginalPostingDate;
END;
// Add the following lines.
WITH DtldCustLedgEntry3 DO BEGIN
SETCURRENTKEY("Cust. Ledger Entry No.");
SETRANGE("Cust. Ledger Entry No.",DtldCustLedgEntry."Cust. Ledger Entry No.");
SETFILTER("Applies-to Bill No.",'<>%1','');
SETRANGE(Unapplied,TRUE);
EntryUnapplied := NOT ISEMPTY;
END;
PostReceivableDocs(EntryUnapplied);
// End of the added lines.
IF NOT GLEntryTmp.FINDFIRST AND ExistDtldCVLedgEntryBuf THEN BEGIN
InitGLEntry(CustPostingGr."Receivables Account",PositiveLCYAppAmt,PositiveACYAppAmt,FALSE,TRUE);
InsertGLEntry(FALSE);
InitGLEntry(CustPostingGr."Receivables Account",NegativeLCYAppAmt,NegativeACYAppAmt,FALSE,TRUE);
... -
Ändern Sie den Code in PostDtldVendLedgEntries Funktion im Fibu Buch.-Post Line Codeunit (12) wie folgt:
Vorhandener Code 1... PROCEDURE PostDtldVendLedgEntries@32(GenJnlLine2@1000 : Record 81;VAR DtldCVLedgEntryBuf@1001 : Record 383;VendPostingGr@1002 : Record 93;NextTransactionNo@1003 : Integer;VendLedgEntryInserted@1011 : Boolean);
VAR
DtldVendLedgEntry@1004 : Record 380;
Currency@1006 : Record 4;
GenPostingSetup@1007 : Record 252;
TotalAmountLCY@1008 : Decimal;
TotalAmountAddCurr@1009 : Decimal;
PaymentDiscAcc@1010 : Code[20];
DtldVendLedgEntryNoOffset@1005 : Integer;
PaymentTolAcc@1012 : Code[20];
...Neuer Code 1
...PROCEDURE PostDtldVendLedgEntries@32(GenJnlLine2@1000 : Record 81;VAR DtldCVLedgEntryBuf@1001 : Record 383;VendPostingGr@1002 : Record 93;NextTransactionNo@1003 : Integer;VendLedgEntryInserted@1011 : Boolean);
VAR
DtldVendLedgEntry@1004 : Record 380;
Currency@1006 : Record 4;
GenPostingSetup@1007 : Record 252;
// Add the following line.
DtldVendLedgEntry3@1100055 : Record 380;
// End of the added line.
TotalAmountLCY@1008 : Decimal;
TotalAmountAddCurr@1009 : Decimal;
PaymentDiscAcc@1010 : Code[20];
DtldVendLedgEntryNoOffset@1005 : Integer;
PaymentTolAcc@1012 : Code[20];
...Vorhandener Code 2
...PayableAccAmtLCY@1100002 : Decimal;
PayableAccAmtAddCurr@1100010 : Decimal;
DtldVendLedgEntry2@1100003 : Record 380;
ExistDtldCVLedgEntryBuf@1100004 : Boolean;
FindBill@1100005 : Boolean;
BEGIN
TotalAmountLCY := 0;
TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
...Neuer Code 2
...PayableAccAmtLCY@1100002 : Decimal;
PayableAccAmtAddCurr@1100010 : Decimal;
DtldVendLedgEntry2@1100003 : Record 380;
ExistDtldCVLedgEntryBuf@1100004 : Boolean;
FindBill@1100005 : Boolean;
// Add the following line.
EntryUnapplied@1100051 : Boolean;
// End of the added line.
BEGIN
TotalAmountLCY := 0;
TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
...Vorhandenen Code 3
...TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
NegativeLCYAppAmt := 0;
NegativeACYAppAmt := 0;
IF GenJnlLine2."Account Type" = GenJnlLine2."Account Type"::Vendor THEN BEGIN
IF DtldVendLedgEntry.FINDLAST THEN
DtldVendLedgEntryNoOffset := DtldVendLedgEntry."Entry No."
ELSE
...Neuer Code 3
...TotalAmountAddCurr := 0;
PositiveLCYAppAmt := 0;
PositiveACYAppAmt := 0;
NegativeLCYAppAmt := 0;
NegativeACYAppAmt := 0;
// Add the following line.
EntryUnapplied := FALSE;
// End of the added line.
IF GenJnlLine2."Account Type" = GenJnlLine2."Account Type"::Vendor THEN BEGIN
IF DtldVendLedgEntry.FINDLAST THEN
DtldVendLedgEntryNoOffset := DtldVendLedgEntry."Entry No."
ELSE
...Vorhandenen Code 4
...END;
InsertGLEntry(TRUE);
GenJnlLine."Posting Date" := OriginalPostingDate;
END;
// Delete the following line.
PostPayableDocs(GenJnlLine);
// End of the deleted line.
IF NOT GLEntryTmp.FINDFIRST AND ExistDtldCVLedgEntryBuf THEN BEGIN
InitGLEntry(VendPostingGr."Payables Account",PositiveLCYAppAmt,PositiveACYAppAmt,FALSE,TRUE);
InsertGLEntry(FALSE);
InitGLEntry(VendPostingGr."Payables Account",NegativeLCYAppAmt,NegativeACYAppAmt,FALSE,TRUE);
...Neuer Code 4
...END;
InsertGLEntry(TRUE);
GenJnlLine."Posting Date" := OriginalPostingDate;
END;
// Add the following lines.
WITH DtldVendLedgEntry3 DO BEGIN
SETCURRENTKEY("Vendor Ledger Entry No.");
SETRANGE("Vendor Ledger Entry No.",DtldVendLedgEntry."Vendor Ledger Entry No.");
SETFILTER("Applies-to Bill No.",'<>%1','');
SETRANGE(Unapplied,TRUE);
EntryUnapplied := NOT ISEMPTY;
END;
PostPayableDocs(EntryUnapplied);
// End of the added lines.
IF NOT GLEntryTmp.FINDFIRST AND ExistDtldCVLedgEntryBuf THEN BEGIN
InitGLEntry(VendPostingGr."Payables Account",PositiveLCYAppAmt,PositiveACYAppAmt,FALSE,TRUE);
InsertGLEntry(FALSE);
InitGLEntry(VendPostingGr."Payables Account",NegativeLCYAppAmt,NegativeACYAppAmt,FALSE,TRUE);
... -
Ändern Sie den Code in PostPayableDocs Funktion im Fibu Buch.-Post Line Codeunit (12) wie folgt:
Vorhandener Code 1...ELSE
VATEntry."Bill-to/Pay-to No." := GenJnlLine2."Account No.";
END;
END;
// Delete the following line.
LOCAL PROCEDURE PostPayableDocs@1100009(VAR GenJnlLine@1100000 : Record 81);
// End of the deleted line.
BEGIN
IF (DocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
IF DocAmountLCY <> 0 THEN BEGIN
...Neuer Code 1
...ELSE
VATEntry."Bill-to/Pay-to No." := GenJnlLine2."Account No.";
END;
END;
// Add the following line.
LOCAL PROCEDURE PostPayableDocs@1100009(EntryUnapplied@1100001 : Boolean);
// End of the added line.
BEGIN
IF (DocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
IF DocAmountLCY <> 0 THEN BEGIN
...Vorhandener Code 2
...BEGIN
IF (DocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
IF DocAmountLCY <> 0 THEN BEGIN
// Delete the following lines.
// VSTF330588.begin
//IF (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Invoice) THEN BEGIN
IF (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Invoice) OR
(GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::" ")
THEN BEGIN
// VSTF330588.end
// End of the deleted lines.
VendPostingGr.TESTFIELD("Payables Account");
InitGLEntry(VendPostingGr."Payables Account",DocAmountLCY,DocAmtCalcAddCurrency(DocAmountLCY),TRUE,TRUE);
GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type";
GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
InsertGLEntry(TRUE);
...Neuer Code 2
...BEGIN
IF (DocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
IF DocAmountLCY <> 0 THEN BEGIN
// Add the following lines.
IF (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Invoice) OR
EntryUnapplied
THEN BEGIN
// End of the added lines.
VendPostingGr.TESTFIELD("Payables Account");
InitGLEntry(VendPostingGr."Payables Account",DocAmountLCY,DocAmtCalcAddCurrency(DocAmountLCY),TRUE,TRUE);
GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type";
GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
InsertGLEntry(TRUE);
... -
Ändern Sie den Code in PostReceivableDocs Funktion im Fibu Buch.-Post Line Codeunit (12) wie folgt:
Vorhandener Code 1... GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
InsertGLEntry(TRUE);
END;
END;
// Delete the following line.
LOCAL PROCEDURE PostReceivableDocs@1100003(VAR GenJnlLine@1100000 : Record 81);
// End of the deleted line.
BEGIN
IF (DocAmountLCY <> 0) OR (DiscDocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) OR (RejDocAmountLCY <> 0) OR
(DiscRiskFactAmountLCY <> 0) OR (DiscUnriskFactAmountLCY <> 0) OR (CollFactAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
...Neuer Code 1
...GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
InsertGLEntry(TRUE);
END;
END;
// Add the following line.
LOCAL PROCEDURE PostReceivableDocs@1100003(EntryUnapplied@1100001 : Boolean);
// End of the added line.
BEGIN
IF (DocAmountLCY <> 0) OR (DiscDocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) OR (RejDocAmountLCY <> 0) OR
(DiscRiskFactAmountLCY <> 0) OR (DiscUnriskFactAmountLCY <> 0) OR (CollFactAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
...Vorhandener Code 2
...IF (DocAmountLCY <> 0) OR (DiscDocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) OR (RejDocAmountLCY <> 0) OR
(DiscRiskFactAmountLCY <> 0) OR (DiscUnriskFactAmountLCY <> 0) OR (CollFactAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
IF DocAmountLCY <> 0 THEN BEGIN
// Delete the following lines.
// VSTF330588.begin
//IF (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Invoice) THEN BEGIN
IF (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Invoice) OR
(GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::" ")
THEN BEGIN
// VSTF330588.end
// End of the deleted lines.
CustPostingGr.TESTFIELD("Receivables Account");
InitGLEntry(CustPostingGr."Receivables Account",DocAmountLCY,DocAmtCalcAddCurrency(DocAmountLCY),TRUE,TRUE);
GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type";
GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
InsertGLEntry(TRUE);
...Neuer Code 2
...IF (DocAmountLCY <> 0) OR (DiscDocAmountLCY <> 0) OR (CollDocAmountLCY <> 0) OR (RejDocAmountLCY <> 0) OR
(DiscRiskFactAmountLCY <> 0) OR (DiscUnriskFactAmountLCY <> 0) OR (CollFactAmountLCY <> 0) THEN
IF NextEntryNo2 = NextEntryNo THEN
NextEntryNo := NextEntryNo - 1;
IF DocAmountLCY <> 0 THEN BEGIN
// Add the following lines.
IF (GenJnlLine."Applies-to Doc. Type" = GenJnlLine."Applies-to Doc. Type"::Invoice) OR
EntryUnapplied
THEN BEGIN
// End of the added lines.
CustPostingGr.TESTFIELD("Receivables Account");
InitGLEntry(CustPostingGr."Receivables Account",DocAmountLCY,DocAmtCalcAddCurrency(DocAmountLCY),TRUE,TRUE);
GLEntry."Bal. Account Type" := GenJnlLine."Bal. Account Type";
GLEntry."Bal. Account No." := GenJnlLine."Bal. Account No.";
InsertGLEntry(TRUE);
...
Voraussetzungen
Sie müssen eines der folgenden Produkte verfügen, um diesen Hotfix installieren:
-
Die spanische Version von Microsoft Dynamics NAV 2009 R2
-
Die spanische Version von Microsoft Dynamics NAV 2009 SP1
Darüber hinaus müssen KB3034441 installiert haben.
Informationen zur Deinstallation
Dieser Hotfix kann nicht entfernt werden.
Status
Microsoft hat bestätigt, dass es sich um ein Problem bei den Microsoft-Produkten handelt, die im Abschnitt „Eigenschaften“ aufgeführt sind.
Hinweis Dies ist ein im Schnellverfahren veröffentlichter Artikel, der direkt in der Microsoft Support-Organisation erstellt wurde. Die hierin enthaltenen Informationen werden ohne Mängelgewähr in Reaktion auf neue Probleme bereitgestellt. Aufgrund der schnellen Bereitstellung kann das Material möglicherweise typografische Fehler enthalten und jederzeit ohne vorherige Ankündigung geändert werden. Weitere Hinweise finden Sie unter Geschäftsbedingungen.