Logg på med Microsoft
Logg på, eller opprett en konto.
Hei,
Velg en annen konto.
Du har flere kontoer
Velg kontoen du vil logge på med.

Symptomer

En feil bilagstype brukes når du importerer filer LSV DD (direkte debet) og avviste betalinger som finnes i den sveitsiske versjonen av Microsoft Dynamics NAV 2009. Når en betalingen ble avbrutt dokumenttypen fortsatt være satt til betaling. Imidlertid kan du bokføre poster på grunn av feil fortegnet for beløpet. Følg trinnene i delen kodeendringer for å løse dette problemet. Dette problemet oppstår i følgende produkter:

  • Sveitsisk versjon av Microsoft Dynamics NAV 2009 R2

  • Sveitsisk versjon av Microsoft Dynamics NAV 2009 SP1

Oppløsning

Informasjon om hurtigreparasjon

En støttet hurtigreparasjon er nå tilgjengelig fra Microsoft. Det er imidlertid bare ment å løse problemet som er beskrevet i denne artikkelen. Bruk den bare på systemer som har dette bestemte problemet. Denne hurtigreparasjonen kan gjennomgå ytterligere testing. Hvis du ikke er alvorlig påvirket av dette problemet, anbefaler vi derfor at du venter på neste oppdateringspakke for Microsoft Dynamics NAV 2009 eller den neste versjonen av Microsoft Dynamics NAV som inneholder denne hurtigreparasjonen.

Obs! I spesielle tilfeller avgifter som vanligvis påløper for støtte samtaler kan avbrytes hvis en kundestøttemedarbeider for Microsoft Dynamics og beslektede produkter avgjør at en bestemt oppdatering løser problemet. Vanlige kundestøttekostnader gjelder for ytterligere kundestøttespørsmål og problemer som ikke dekkes av den gjeldende oppdateringen.

Installasjonsinformasjon

Microsoft bruker ment som eksempler, uten garanti, verken direkte eller indirekte. Dette inkluderer, men er ikke begrenset til, eventuelle stilltiende garantier om salgbarhet eller anvendelighet for særskilte formål. Denne artikkelen forutsetter at du er kjent med programmeringsspråket som anvendes, og verktøyene som brukes til å opprette og feilsøke prosedyrer. Microsofts kundestøtteteknikere kan hjelpe deg med å forklare funksjonaliteten til en bestemt prosedyre. De endrer imidlertid ikke disse eksemplene for å lage forbedret funksjonalitet eller lage prosedyrer som dekker dine spesifikke behov.

Obs! Før du installerer denne hurtigreparasjonen, må du kontrollere at alle brukerne i Microsoft Dynamics NAV-klienten er logget av systemet. Dette inkluderer tjenester for Microsoft Dynamics NAV Application Server (NAS). Du skal bare klient-brukeren som er logget på når du implementerer denne hurtigreparasjonen.

Hvis du vil implementere denne hurtigreparasjonen, må du ha en utviklerlisens.

Vi anbefaler at kontoen i vinduet Windows-pålogging eller i vinduet Database-pålogging være tildelt "SUPER" rolle-ID. Hvis brukerkontoen ikke kan tilordnes "SUPER" rolle-IDen, må du kontrollere at brukerkontoen har følgende tillatelser:

  • Endre-tillatelse for objektet du vil endre.

  • Tilgangsnivået for systemet objekt-IDen til 5210 objektet og systemet objekt-ID-9015

    -objektet.

Obs! Du har ikke tilgangsrettigheter til datalagre med mindre du har til å utføre data reparasjon.

Kodeendringer

Obs! Alltid løser teste koden i et kontrollert miljø før du installerer hurtigreparasjoner til produksjonsdatamaskiner for.

Hvis du vil løse dette problemet, gjør du følgende:

  1. Endre koden i globale variabler i LSVMgt Codeunit (3010831) som følger:
    Eksisterende kode

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

    Ny kode

    ...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. Endre koden i ImportDebitDirectFile -funksjonen i LSVMgt Codeunit (3010831) som følger:
    Eksisterende kode 1

    ...FeeAmount := 0;
    TotalRecRecords := 0;
    TotalRecRecordsRev := 0;

    // Journal name for no serie
    GlBatchName.GET(ActGenJnlLine."Journal Template Name",ActGenJnlLine."Journal Batch Name");
    ...

    Ny kode 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");
    ...

    Eksisterende kode 2

    ...// Split File line into fields

    // Delete the following lines.
    FileID := COPYSTR(Line,1,3);
    IF FileID <> '036' THEN
    ERROR(Text049 + Text011);
    TA := COPYSTR(Line,36,2);
    IF NOT (TA = '97') THEN BEGIN
    TotalRecord := 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 THEN
    PostDate := DMY2DATE(ddCR,mmCR,1900 + yyCR)
    ELSE
    PostDate := 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 DIRECT
    LsvJour.RESET;
    LsvJour.SETRANGE("Credit Date",PostDate);
    LsvJour.SETRANGE("DebitDirect Orderno.",DebitDirectOrderNo);
    IF NOT LsvJour.FIND('+') THEN
    ERROR(Text059,DebitDirectOrderNo,PostDate);

    LsvJournalLine.RESET;
    //CH0001.begin
    LsvJournalLine.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 BEGIN
    d.CLOSE;
    ERROR(Text11500, DebitDirectRecordNo, DebitDirectOrderNo);
    END;
    //CH0001.end
    InInvoiceNo := LsvJournalLine."Applies-to Doc. No.";
    // END DEBIT DIRECT

    // Process transaction of credit record
    CASE TA OF
    '81': // Credit
    BEGIN
    Transaction := Transaction::Credit;
    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Open;
    LsvJournalLine."DD Rejection Reason" := LsvJournalLine."DD Rejection Reason"::" ";
    LsvJournalLine.MODIFY;

    IF LSVSetup.READPERMISSION THEN BEGIN
    ClosedByESR(InInvoiceNo);
    END;
    END;
    '84': // Cancellation "Storno"
    BEGIN
    IF RejectionCode <> 2 THEN
    Transaction := Transaction::Correction
    ELSE
    Transaction := Transaction::Cancellation;

    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Rejected;
    LsvJournalLine."DD Rejection Reason" := RejectionCode;
    LsvJournalLine.MODIFY;
    END;
    ELSE
    ERROR(Text023 + Text011);
    END;
    END ELSE BEGIN
    TotalRecord := 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 Count
    EVALUATE(TempAmount,COPYSTR(Line,54,6));
    TotalRecRecords := TotalRecRecords + TempAmount;
    // Rejection Count
    EVALUATE(TempAmount,COPYSTR(Line,76,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    // Reversal Count
    EVALUATE(TempAmount,COPYSTR(Line,98,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    END;
    // END OF SPLIT

    IF 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";
    ...

    Ny kode 2

    ...// Split File line into fields

    // Add the following lines.
    FileID := COPYSTR(Line,1,3);
    IF FileID <> '036' THEN
    ERROR(Text049 + Text011);
    TA := COPYSTR(Line,36,2);
    IF NOT (TA = '97') THEN BEGIN
    TotalRecord := 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 THEN
    PostDate := DMY2DATE(ddCR,mmCR,1900 + yyCR)
    ELSE
    PostDate := 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 DIRECT
    LsvJour.RESET;
    LsvJour.SETRANGE("Credit Date",PostDate);
    LsvJour.SETRANGE("DebitDirect Orderno.",DebitDirectOrderNo);
    IF NOT LsvJour.FIND('+') THEN
    ERROR(Text059,DebitDirectOrderNo,PostDate);

    LsvJournalLine.RESET;
    //CH0001.begin
    LsvJournalLine.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 BEGIN
    d.CLOSE;
    ERROR(Text11500, DebitDirectRecordNo, DebitDirectOrderNo);
    END;
    //CH0001.end
    InInvoiceNo := LsvJournalLine."Applies-to Doc. No.";
    // END DEBIT DIRECT

    // Process transaction of credit record
    CASE TA OF
    '81': // Credit
    BEGIN
    Transaction := Transaction::Credit;
    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Open;
    LsvJournalLine."DD Rejection Reason" := LsvJournalLine."DD Rejection Reason"::" ";
    LsvJournalLine.MODIFY;

    IF LSVSetup.READPERMISSION THEN BEGIN
    ClosedByESR(InInvoiceNo);
    END;
    END;
    '84': // Cancellation "Storno"
    BEGIN
    IF RejectionCode <> 2 THEN
    Transaction := Transaction::Correction
    ELSE
    Transaction := Transaction::Cancellation;

    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Rejected;
    LsvJournalLine."DD Rejection Reason" := RejectionCode;
    LsvJournalLine.MODIFY;
    END;
    ELSE
    ERROR(Text023 + Text011);
    END;
    END ELSE BEGIN
    TotalRecord := 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 Count
    EVALUATE(TempAmount,COPYSTR(Line,54,6));
    TotalRecRecords := TotalRecRecords + TempAmount;
    // Rejection Count
    EVALUATE(TempAmount,COPYSTR(Line,76,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    // Reversal Count
    EVALUATE(TempAmount,COPYSTR(Line,98,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    END;
    // END OF SPLIT

    IF 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";
    ...

    Eksisterende kode 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;
    ...

    Ny kode 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 BEGIN
    IsCancellationExist := TRUE;
    GenJournalLine."Document Type" := GenJournalLine."Document Type"::Refund;
    NextDocNo := NoSeriesMgt.GetNextNo(GlBatchName."No. Series",PostDate,FALSE);
    END ELSE
    GenJournalLine."Document Type" := GenJournalLine."Document Type"::Payment;

    // End of the added lines.

    LastLineNo := LastLineNo + 10000;
    GenJournalLine."Line No." := LastLineNo;
    GenJournalLine."Document No." := NextDocNo;
    ...

    Eksisterende kode 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
    ...

    Ny kode 4

    ... LastLineNo := LastLineNo + 10000;
    GenJournalLine."Line No." := LastLineNo;
    GenJournalLine."Document No." := NextDocNo;

    // Add the following lines.

    IF Transaction = Transaction::Cancellation THEN
    NextDocNo := NoSeriesMgt.GetNextNo(GlBatchName."No. Series",PostDate,FALSE);
    // End of the added lines.

    GeneralLedgerSetup.GET;
    IF GeneralLedgerSetup."LCY Code" <> Currency THEN
    ...

    Eksisterende kode 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");
    ...

    Ny kode 5

    ... IF CustLedgerEntry.FIND('-') THEN
    GenJournalLine.VALIDATE("Account No.",CustLedgerEntry."Customer No.");

    // Add the following lines.
    IF Transaction <> Transaction::Cancellation THEN BEGIN
    GenJournalLine."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");
    ...

    Eksisterende kode 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
    ...

    Ny kode 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
    ...

Forutsetninger

Du må ha én av de følgende programmene installert for å bruke denne hurtigreparasjonen:

  • Sveitsisk versjon av Microsoft Dynamics NAV 2009 R2

  • Sveitsisk versjon av Microsoft Dynamics NAV 2009 SP1

Informasjon om fjerning

Du kan ikke fjerne denne hurtigreparasjonen.

Status

Microsoft har bekreftet at dette er et problem i Microsoft-produktene som er oppført i delen "Gjelder for".

Obs! Dette er en "RASKT PUBLISERE" artikkel opprettet direkte fra innenfor organisasjonen Microsoft Kundestøtte. Informasjonen i dette dokumentet tilbys som-er som svar på nye problemer. Som et resultat av hastigheten i å gjøre den tilgjengelig materialene kan inkludere typografiske feil, og den kunne bli revidert når som helst uten varsel. Se Vilkårene for Brukfor andre hensyn.

Trenger du mer hjelp?

Vil du ha flere alternativer?

Utforsk abonnementsfordeler, bla gjennom opplæringskurs, finn ut hvordan du sikrer enheten og mer.

Fellesskap hjelper deg med å stille og svare på spørsmål, gi tilbakemelding og høre fra eksperter med stor kunnskap.

Var denne informasjonen nyttig?

Hvor fornøyd er du med språkkvaliteten?
Hva påvirket opplevelsen din?
Når du trykker på Send inn, blir tilbakemeldingen brukt til å forbedre Microsoft-produkter og -tjenester. IT-administratoren kan samle inn disse dataene. Personvernerklæring.

Takk for tilbakemeldingen!

×