Applies ToDynamics NAV 2009

Symptomen

Een type document onjuist wordt gebruikt wanneer u LSV DD (incasso)-bestanden importeren en geweigerde betalingen in de Zwitserse versie van Microsoft Dynamics NAV 2009 aanwezig is. Wanneer een betaling is geannuleerd, wordt het documentsoort nog steeds ingesteld op betaling. Echter niet kunt u posten boeken omdat het onjuiste teken voor het bedrag. Volg de stappen in de sectie codewijzigingen oplossen van dit probleem. Dit probleem treedt op in de volgende producten:

  • De Zwitserse versie van Microsoft Dynamics NAV 2009 R2

  • De Zwitserse 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. De code in globale variabelen in de LSVMgt Codeunit (3010831) als volgt wijzigen:Bestaande code

    ...Text11500@1150080 : TextConst 'ENU=Could not find Transaction No. %1 in Debit Direct Order No. %2.';      FileMgt@1150042 : Codeunit 419;      FileSystemObject@1150081 : Automation "{420B2830-E718-11CF-893D-00A0C9054228} 1.0:{0D43FE01-F093-11CF-8940-00A0C9054228}:'Microsoft Scripting Runtime'.FileSystemObject";    PROCEDURE ReleaseCustLedgEntries@1(_GenJnlLine@1150000 : Record 81);    BEGIN...

    Nieuwe code

    ...Text11500@1150080 : TextConst 'ENU=Could not find Transaction No. %1 in Debit Direct Order No. %2.';      FileMgt@1150042 : Codeunit 419;      FileSystemObject@1150081 : Automation "{420B2830-E718-11CF-893D-00A0C9054228} 1.0:{0D43FE01-F093-11CF-8940-00A0C9054228}:'Microsoft Scripting Runtime'.FileSystemObject";// Add the following line.IsCancellationExist@1150082 : Boolean;// End of the added line.    PROCEDURE ReleaseCustLedgEntries@1(_GenJnlLine@1150000 : Record 81);    BEGIN...
  2. De code in de functie ImportDebitDirectFile in de LSVMgt Codeunit (3010831) als volgt wijzigen:Bestaande code 1

    ...FeeAmount := 0;      TotalRecRecords := 0;      TotalRecRecordsRev := 0;      // Journal name for no serie      GlBatchName.GET(ActGenJnlLine."Journal Template Name",ActGenJnlLine."Journal Batch Name");...

    Nieuwe code 1

    ...FeeAmount := 0;      TotalRecRecords := 0;      TotalRecRecordsRev := 0;// Add the following line.IsCancellationExist := FALSE;// End of the added line.      // Journal name for no serie      GlBatchName.GET(ActGenJnlLine."Journal Template Name",ActGenJnlLine."Journal Batch Name");...

    Bestaande code 2

    ...// Split File line into fields// Delete the following lines.FileID := COPYSTR(Line,1,3);IF FileID <> '036' THENERROR(Text049 + Text011);TA := COPYSTR(Line,36,2);IF NOT (TA = '97') THEN BEGINTotalRecord := FALSE;EVALUATE(InvoiceAmt,COPYSTR(Line,54,13));EVALUATE(yyCR,COPYSTR(Line,4,2));EVALUATE(mmCR,COPYSTR(Line,6,2));EVALUATE(ddCR,COPYSTR(Line,8,2));IF yyCR > 98 THENPostDate := DMY2DATE(ddCR,mmCR,1900 + yyCR)ELSEPostDate := DMY2DATE(ddCR,mmCR,2000 + yyCR);DebitDirectOrderNo := COPYSTR(Line,34,2);EVALUATE(DebitDirectRecordNo,COPYSTR(Line,38,6));EVALUATE(RejectionCode,COPYSTR(Line,543,2));Currency := COPYSTR(Line,51,3);// DEBIT DIRECTLsvJour.RESET;LsvJour.SETRANGE("Credit Date",PostDate);LsvJour.SETRANGE("DebitDirect Orderno.",DebitDirectOrderNo);IF NOT LsvJour.FIND('+') THENERROR(Text059,DebitDirectOrderNo,PostDate);LsvJournalLine.RESET;//CH0001.beginLsvJournalLine.SETCURRENTKEY("LSV Journal No.","Transaction No.");LsvJournalLine.SETRANGE("LSV Journal No.",LsvJour."No.");//LsvJournalLine.SETRANGE("Line No.",DebitDirectRecordNo);LsvJournalLine.SETRANGE("Transaction No.",DebitDirectRecordNo);//LsvJournalLine.FIND('-');IF NOT LsvJournalLine.FINDFIRST THEN BEGINd.CLOSE;ERROR(Text11500, DebitDirectRecordNo, DebitDirectOrderNo);END;//CH0001.endInInvoiceNo := LsvJournalLine."Applies-to Doc. No.";// END DEBIT DIRECT// Process transaction of credit recordCASE TA OF'81':  // CreditBEGINTransaction := Transaction::Credit;LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Open;LsvJournalLine."DD Rejection Reason" := LsvJournalLine."DD Rejection Reason"::" ";LsvJournalLine.MODIFY;IF LSVSetup.READPERMISSION THEN BEGINClosedByESR(InInvoiceNo);END;END;'84':  // Cancellation "Storno"BEGINIF RejectionCode <> 2 THENTransaction := Transaction::CorrectionELSETransaction := Transaction::Cancellation;LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Rejected;LsvJournalLine."DD Rejection Reason" := RejectionCode;LsvJournalLine.MODIFY;END;ELSE ERROR(Text023 + Text011);END;END ELSE BEGINTotalRecord := TRUE;EVALUATE(TempAmount,COPYSTR(Line,60,13));CreditAmount := CreditAmount + TempAmount / 100;EVALUATE(TempAmount,COPYSTR(Line,82,13));RejectionAmount := RejectionAmount + TempAmount / 100;EVALUATE(TempAmount,COPYSTR(Line,104,13));ReversalAmount := ReversalAmount + TempAmount / 100;EVALUATE(TempAmount,COPYSTR(Line,120,11));FeeAmount := FeeAmount + TempAmount / 100;// Credit CountEVALUATE(TempAmount,COPYSTR(Line,54,6));TotalRecRecords := TotalRecRecords + TempAmount;// Rejection CountEVALUATE(TempAmount,COPYSTR(Line,76,6));TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;// Reversal CountEVALUATE(TempAmount,COPYSTR(Line,98,6));TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;END;// END OF SPLITIF NOT (TotalRecord) AND (Transaction <> Transaction::Correction) THEN BEGIN// End of the deleted lines.          // Insert GL line          GenJournalLine.INIT;          GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";...

    Vervangende code 2

    ...// Split File line into fields// Add the following lines.FileID := COPYSTR(Line,1,3);IF FileID <> '036' THENERROR(Text049 + Text011);TA := COPYSTR(Line,36,2);IF NOT (TA = '97') THEN BEGINTotalRecord := FALSE;EVALUATE(InvoiceAmt,COPYSTR(Line,54,13));EVALUATE(yyCR,COPYSTR(Line,4,2));EVALUATE(mmCR,COPYSTR(Line,6,2));EVALUATE(ddCR,COPYSTR(Line,8,2));IF yyCR > 98 THENPostDate := DMY2DATE(ddCR,mmCR,1900 + yyCR)ELSEPostDate := DMY2DATE(ddCR,mmCR,2000 + yyCR);DebitDirectOrderNo := COPYSTR(Line,34,2);EVALUATE(DebitDirectRecordNo,COPYSTR(Line,38,6));EVALUATE(RejectionCode,COPYSTR(Line,543,2));Currency := COPYSTR(Line,51,3);// DEBIT DIRECTLsvJour.RESET;LsvJour.SETRANGE("Credit Date",PostDate);LsvJour.SETRANGE("DebitDirect Orderno.",DebitDirectOrderNo);IF NOT LsvJour.FIND('+') THENERROR(Text059,DebitDirectOrderNo,PostDate);LsvJournalLine.RESET;//CH0001.beginLsvJournalLine.SETCURRENTKEY("LSV Journal No.","Transaction No.");LsvJournalLine.SETRANGE("LSV Journal No.",LsvJour."No.");//LsvJournalLine.SETRANGE("Line No.",DebitDirectRecordNo);LsvJournalLine.SETRANGE("Transaction No.",DebitDirectRecordNo);//LsvJournalLine.FIND('-');IF NOT LsvJournalLine.FINDFIRST THEN BEGINd.CLOSE;ERROR(Text11500, DebitDirectRecordNo, DebitDirectOrderNo);END;//CH0001.endInInvoiceNo := LsvJournalLine."Applies-to Doc. No.";// END DEBIT DIRECT// Process transaction of credit recordCASE TA OF'81':  // CreditBEGINTransaction := Transaction::Credit;LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Open;LsvJournalLine."DD Rejection Reason" := LsvJournalLine."DD Rejection Reason"::" ";LsvJournalLine.MODIFY;IF LSVSetup.READPERMISSION THEN BEGINClosedByESR(InInvoiceNo);END;END;'84':  // Cancellation "Storno"BEGINIF RejectionCode <> 2 THENTransaction := Transaction::CorrectionELSETransaction := Transaction::Cancellation;LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Rejected;LsvJournalLine."DD Rejection Reason" := RejectionCode;LsvJournalLine.MODIFY;END;ELSEERROR(Text023 + Text011);END;END ELSE BEGINTotalRecord := TRUE;EVALUATE(TempAmount,COPYSTR(Line,60,13));CreditAmount := CreditAmount + TempAmount / 100;EVALUATE(TempAmount,COPYSTR(Line,82,13));RejectionAmount := RejectionAmount + TempAmount / 100;EVALUATE(TempAmount,COPYSTR(Line,104,13));ReversalAmount := ReversalAmount + TempAmount / 100;EVALUATE(TempAmount,COPYSTR(Line,120,11));FeeAmount := FeeAmount + TempAmount / 100;// Credit CountEVALUATE(TempAmount,COPYSTR(Line,54,6));TotalRecRecords := TotalRecRecords + TempAmount;// Rejection CountEVALUATE(TempAmount,COPYSTR(Line,76,6));TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;// Reversal CountEVALUATE(TempAmount,COPYSTR(Line,98,6));TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;END;// END OF SPLITIF NOT (TotalRecord) AND (Transaction <> Transaction::Correction) THEN BEGIN// End of the added lines.          // Insert GL line          GenJournalLine.INIT;          GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";...

    Bestaande code 3

    ...GenJournalLine.INIT;          GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";          GenJournalLine."Journal Batch Name" := ActGenJnlLine."Journal Batch Name";          LastLineNo := LastLineNo + 10000;          GenJournalLine."Line No." := LastLineNo;          GenJournalLine."Document No." := NextDocNo;...

    Vervangende code 3

    ... GenJournalLine.INIT;          GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";          GenJournalLine."Journal Batch Name" := ActGenJnlLine."Journal Batch Name";// Add the following lines.GenJournalLine."Posting Date" := PostDate;GenJournalLine."Account Type" := GenJournalLine."Account Type"::Customer;IF Transaction = Transaction::Cancellation THEN BEGINIsCancellationExist := TRUE;GenJournalLine."Document Type" := GenJournalLine."Document Type"::Refund;NextDocNo := NoSeriesMgt.GetNextNo(GlBatchName."No. Series",PostDate,FALSE);END ELSEGenJournalLine."Document Type" := GenJournalLine."Document Type"::Payment;// End of the added lines.     LastLineNo := LastLineNo + 10000;          GenJournalLine."Line No." := LastLineNo;          GenJournalLine."Document No." := NextDocNo;...

    Bestaande code 4

    ...LastLineNo := LastLineNo + 10000;          GenJournalLine."Line No." := LastLineNo;          GenJournalLine."Document No." := NextDocNo;// Delete the following lines.GenJournalLine."Posting Date" := PostDate;GenJournalLine."Account Type" := GenJournalLine."Account Type"::Customer;GenJournalLine."Document Type" := GenJournalLine."Document Type"::Payment;// End of the deleted lines.          GeneralLedgerSetup.GET;          IF GeneralLedgerSetup."LCY Code" <> Currency THEN...

    Vervangende code 4

    ... LastLineNo := LastLineNo + 10000;          GenJournalLine."Line No." := LastLineNo;          GenJournalLine."Document No." := NextDocNo;// Add the following lines.IF Transaction = Transaction::Cancellation THENNextDocNo := NoSeriesMgt.GetNextNo(GlBatchName."No. Series",PostDate,FALSE);// End of the added lines.          GeneralLedgerSetup.GET;          IF GeneralLedgerSetup."LCY Code" <> Currency THEN...

    Bestaande code 5

    ... IF CustLedgerEntry.FIND('-') THEN            GenJournalLine.VALIDATE("Account No.",CustLedgerEntry."Customer No.");// Delete the following lines.GenJournalLine."Applies-to Doc. Type" := GenJournalLine."Applies-to Doc. Type"::Invoice;GenJournalLine."Applies-to Doc. No." := InInvoiceNo;// End of the deleted lines.          IF GenJournalLine."Currency Code" <> CustLedgerEntry."Currency Code" THEN            GenJournalLine.VALIDATE("Currency Code",CustLedgerEntry."Currency Code");...

    Vervangende code 5

    ... IF CustLedgerEntry.FIND('-') THEN            GenJournalLine.VALIDATE("Account No.",CustLedgerEntry."Customer No.");// Add the following lines.IF Transaction <> Transaction::Cancellation THEN BEGINGenJournalLine."Applies-to Doc. Type" := GenJournalLine."Applies-to Doc. Type"::Invoice;GenJournalLine."Applies-to Doc. No." := InInvoiceNo;END;// End of the added lines.          IF GenJournalLine."Currency Code" <> CustLedgerEntry."Currency Code" THEN            GenJournalLine.VALIDATE("Currency Code",CustLedgerEntry."Currency Code");...

    Bestaande code 6

    ...// *** Bal account per line or as combined entry// Delete the following line.IF MultiplePostingDates THEN BEGIN// End of the deleted line.        // Bal Account per line        IF GenJournalLine.FIND('-') THEN          REPEAT...

    Vervangende code 6

    ...// *** Bal account per line or as combined entry// Add the following line.IF MultiplePostingDates OR IsCancellationExist THEN BEGIN// End of the added line.        // Bal Account per line        IF GenJournalLine.FIND('-') THEN          REPEAT...

Vereisten

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

  • De Zwitserse versie van Microsoft Dynamics NAV 2009 R2

  • De Zwitserse versie van Microsoft Dynamics NAV 2009 SP1

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.

Community's helpen u vragen te stellen en te beantwoorden, feedback te geven en te leren van experts met uitgebreide kennis.