Applies ToDynamics NAV 2009

Symptomen

Na installatie van KB3034441 in de Spaanse versie van Microsoft Dynamics NAV 2009 als u een normale betaling en een factuur van de klant-of leveranciersposten, verwijzen de geboekte grootboekposten op de dezelfde account, onjuist is. Volg de stappen in de sectie codewijzigingen oplossen van dit probleem. Dit probleem treedt op in de volgende producten:

  • De Spaanse versie van Microsoft Dynamics NAV 2009 R2

  • De Spaanse versie van Microsoft Dynamics NAV 2009 SP1

Oplossing

Informatie over de hotfix

Een ondersteunde hotfix is nu beschikbaar bij Microsoft. Het is echter alleen bedoeld om het probleem dat wordt beschreven in dit artikel. Pas deze alleen toe op systemen waarop dit specifieke probleem zich voordoet. Deze hotfix moet wellicht extra worden getest. Als u geen ernstige problemen ondervindt, is het daarom raadzaam te wachten op het volgende servicepack voor Microsoft Dynamics NAV 2009 of de volgende Microsoft Dynamics NAV versie waarin deze hotfix is opgenomen.Opmerking In speciale gevallen kunnen kosten die verbonden zijn aan ondersteuningsoproepen ondersteuning worden geannuleerd als een medewerker van Technical Support voor Microsoft Dynamics en verwante producten bepaalt dat een specifieke update de oplossing van uw probleem. De normale ondersteuningskosten blijven gelden voor extra ondersteuningsvragen die niet in aanmerking voor de specifieke update in kwestie komen.

Informatie over de installatie

Microsoft verstrekt programmeervoorbeelden uitsluitend ter illustratie, zonder expliciete of impliciete garantie. Dit omvat, maar is niet beperkt tot, de impliciete garanties van verkoopbaarheid of geschiktheid voor een bepaald doel. In dit artikel wordt ervan uitgegaan dat u bekend met de programmeertaal die wordt aangetoond en met de hulpprogramma's die worden gebruikt bent voor het maken van en naar procedures voor foutopsporing. Ondersteuningstechnici van Microsoft kunnen voor uitleg over de functionaliteit van een bepaalde procedure. Zij zal deze voorbeelden bieden extra functionaliteit of desgewenst uw specifieke vereisten echter niet wijzigen.Opmerking Voordat u deze hotfix hebt geïnstalleerd, controleert u of dat alle gebruikers van Microsoft Dynamics NAV-clients zijn afgemeld bij het systeem. Dit omvat services voor Microsoft Dynamics NAV Application Server (NAS). U moet de alleen clientgebruiker die is aangemeld wanneer u deze hotfix gaat implementeren.Als u deze hotfix gaat implementeren, hebt u een ontwikkelaarslicentie voor.Is raadzaam dat de gebruikersaccount in het venster Windows-aanmeldingen of Databaseaanmeldingen de rol-id 'SUPER'. Als de gebruikersaccount kan worden toegewezen als de ID 'SUPER' rol, moet u controleren of de gebruikersaccount de volgende machtigingen heeft:

  • De machtiging wijzigen voor het object dat u wijzigt.

  • De machtiging uitvoeren voor het object System Object ID 5210 en voor de System Object ID 9015-object.

Opmerking Er geen rechten voor de opgeslagen gegevens hebben, tenzij u gegevens herstellen.

Codewijzigingen

Opmerking Altijd test code worden opgelost in een testomgeving voordat u de correcties in de productieomgeving.U kunt dit probleem oplossen door de volgende stappen uit te voeren:

  1. Wijzig de code in de functie PostDtldCustLedgEntries in Alg. verz.-regel doorboeken (12) als volgt:Bestaande 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];...

    Nieuwe 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];...

    Bestaande 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;...

    Vervangende 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;...

    Bestaande 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...

    Vervangende 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...

    Bestaande 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);...

    Vervangende code 4

    ... END;            InsertGLEntry(TRUE);            GenJnlLine."Posting Date" := OriginalPostingDate;          END;// Add the following lines.WITH DtldCustLedgEntry3 DO BEGINSETCURRENTKEY("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);...
  2. Wijzig de code in de functie PostDtldVendLedgEntries in Alg. verz.-regel doorboeken (12) als volgt:Bestaande 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];...

    Nieuwe 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];...

    Bestaande 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;...

    Vervangende 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;...

    Bestaande 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...

    Vervangende 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...

    Bestaande 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);...

    Vervangende code 4

    ...END;            InsertGLEntry(TRUE);            GenJnlLine."Posting Date" := OriginalPostingDate;          END;// Add the following lines.WITH DtldVendLedgEntry3 DO BEGINSETCURRENTKEY("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);...
  3. Wijzig de code in de functie PostPayableDocs in Alg. verz.-regel doorboeken (12) als volgt:Bestaande 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...

    Nieuwe 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...

    Bestaande 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 BEGINIF (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);...

    Vervangende 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) OREntryUnappliedTHEN 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);...
  4. Wijzig de code in de functie PostReceivableDocs in Alg. verz.-regel doorboeken (12) als volgt:Bestaande 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;...

    Nieuwe 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;...

    Bestaande 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 BEGINIF (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);...

    Vervangende 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) OREntryUnappliedTHEN 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);...

Vereisten

Hebt u een van de volgende producten geïnstalleerd om deze hotfix:

  • De Spaanse versie van Microsoft Dynamics NAV 2009 R2

  • De Spaanse versie van Microsoft Dynamics NAV 2009 SP1

Bovendien hebt u KB3034441 geïnstalleerd.

Informatie over verwijderen

U kunt deze hotfix niet verwijderen.

Status

Microsoft heeft bevestigd dat dit probleem kan optreden in de Microsoft-producten die worden vermeld in de sectie 'Van toepassing op'.

Opmerking Dit is een 'Snel publiceren' artikel dat rechtstreeks door het ondersteuningsteam van Microsoft is gemaakt. De informatie wordt geleverd zoals het is in reactie op de opkomende problemen. Omdat het artikel snel beschikbaar moest zijn, kunnen de materialen typografische fouten bevatten en op elk gewenst moment zonder voorafgaande kennisgeving worden gewijzigd. Zie de Gebruiksvoorwaardenvoor andere overwegingen.

Meer hulp nodig?

Meer opties?

Verken abonnementsvoordelen, blader door trainingscursussen, leer hoe u uw apparaat kunt beveiligen en meer.