Denne artikkelen gjelder for Microsoft Dynamics NAV for alle land og alle språkinnstillinger.
Symptomer
Anta at du angir 0,001-verdien i feltet Beløp avrundingspresisjon for en utenlandsk valuta i et firma. Når du legger inn en forskuddsbetalingsfaktura som bruker utenlandsk valuta, får du følgende feilmelding:
Obs!
Transaksjonen kan ikke fullføres fordi det vil føre til inkonsekvenser i tabellen Finanspost. Kontroller hvor og hvordan CONSISTENT-funksjonen brukes i transaksjonen for å finne årsaken til feilen. Kontakt systemansvarlig.
Tabeller kan merkes som inkonsekvente under omfattende aktiviteter, for eksempel postering. Dette hindrer at data oppdateres feil.
Konsekvensfeilen oppstår fordi debet- og kreditten for tilleggsrapporteringsvalutaen (ARC) ikke samsvarer. Debet og kreditt for den lokale valutaen (NOK) samsvarer derfor som forventet.
Dette problemet oppstår hvis firmaet har eksisterende oppføringer.
Dette problemet oppstår i følgende produkter:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
Oppløsning
Hurtigreparasjonsinformasjon
En støttet hurtigreparasjon er nå tilgjengelig fra Microsoft. Det er imidlertid bare ment å rette opp problemet som er beskrevet i denne artikkelen. Bruk den bare på systemer som opplever dette spesifikke problemet. Denne hurtigreparasjonen kan få ytterligere testing. Hvis du ikke er alvorlig påvirket av dette problemet, anbefaler vi derfor at du venter på den neste Microsoft Dynamics NAV 2009-oppdateringspakken eller den neste Microsoft Dynamics NAV-versjonen som inneholder denne hurtigreparasjonen.
Obs! I spesielle tilfeller kan kostnader som vanligvis påløper for støtteanrop, bli avbrutt hvis en technical support professional for Microsoft Dynamics og relaterte produkter bestemmer at en bestemt oppdatering vil løse problemet. De vanlige støttekostnadene gjelder for ytterligere støttespørsmål og problemer som ikke kvalifiserer for den aktuelle oppdateringen.
Installasjonsinformasjon
Microsoft tilbyr programmeringseksempler bare for illustrasjon, uten garanti enten uttrykt eller underforstått. Dette omfatter, men er ikke begrenset til, de underforståtte garantiene om salgbarhet eller egnethet for et bestemt formål. Denne artikkelen antar at du er kjent med programmeringsspråket som demonstreres, og med verktøyene som brukes til å opprette og feilsøke prosedyrer. Microsoft kundestøtteteknikere kan bidra til å forklare funksjonaliteten til en bestemt prosedyre, men de vil ikke endre disse eksemplene for å gi ekstra funksjonalitet eller konstruere prosedyrer for å oppfylle dine spesifikke krav.
Obs! Før du installerer denne hurtigreparasjonen, må du kontrollere at alle Microsoft Navision-klientbrukere er logget av systemet. Dette inkluderer microsoft Navision Application Services (NAS)-klientbrukere. Du bør være den eneste klientbrukeren som er logget på når du implementerer denne hurtigreparasjonen.
Hvis du vil implementere denne hurtigreparasjonen, må du ha en utviklerlisens.
Vi anbefaler at brukerkontoen i Windows-påloggingsvinduet eller i vinduet Pålogginger for database tilordnes rolle-ID-en SUPER. Hvis brukerkontoen ikke kan tilordnes rolle-IDen SUPER, må du kontrollere at brukerkontoen har følgende tillatelser:
- Endre-tillatelsen for objektet du skal endre.
- Execute-tillatelsen for Objektet System Object ID 5210 og systemobjekt-ID 9015-objektet.
Vær oppmerksom på at du ikke trenger å ha rettigheter til datalagrene med mindre du må utføre datareparasjon.
Kodeendringer
Obs! Test alltid kodeløsninger i et kontrollert miljø før du bruker løsningene på produksjonsdatamaskinene.
Følg disse trinnene for å løse dette problemet:
Endre koden i OnRun-utløseren i Sales-Post kodeenhet (80) på følgende måte:
Eksisterende kode... GenJnlLine."External Document No." := GenJnlLineExtDocNo; GenJnlLine."Currency Code" := "Currency Code"; GenJnlLine.Amount := -TotalSalesLine."Amount Including VAT"; GenJnlLine."Source Currency Code" := "Currency Code"; GenJnlLine."Source Currency Amount" := -TotalSalesLine."Amount Including VAT"; // Delete the following line. GenJnlLine."Amount (LCY)" := -TotalSalesLineLCY."Amount Including VAT"; IF SalesHeader."Currency Code" = '' THEN GenJnlLine."Currency Factor" := 1 ELSE GenJnlLine."Currency Factor" := SalesHeader."Currency Factor"; GenJnlLine.Correction := Correction; ... IF SalesLine."Qty. to Invoice" <> 0 THEN BEGIN SalesLine."Prepmt Amt Deducted" := SalesLine."Prepmt Amt Deducted" + SalesLine."Prepmt Amt to Deduct"; SalesLine."Prepmt VAT Diff. Deducted" := SalesLine."Prepmt VAT Diff. Deducted" + SalesLine."Prepmt VAT Diff. to Deduct"; // Delete the following lines. 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)" := ROUND( ROUND( ROUND(SalesLine."Unit Price" * (SalesLine.Quantity - SalesLine."Quantity Shipped"), Currency."Amount Rounding Precision") * (1 - SalesLine."Line Discount %" / 100),Currency."Amount Rounding Precision") * SalesLine."Prepayment %" / 100,Currency."Amount Rounding Precision"); // End of the lines. SalesLine."Prepmt Amt to Deduct" := SalesLine."Prepmt. Amt. Inv." - SalesLine."Prepmt Amt Deducted"; SalesLine."Prepmt VAT Diff. to Deduct" := 0; END; END; ... IF ABS(TempSalesLine."Quantity Invoiced") > ABS(TempSalesLine."Quantity Shipped") THEN ERROR( Text014, TempSalesLine."Document No."); TempSalesLine.InitQtyToInvoice; // Delete the following lines. TempSalesLine."Prepmt Amt Deducted" := TempSalesLine."Prepmt Amt Deducted" + SalesLine."Prepmt Amt to Deduct"; TempSalesLine."Prepmt VAT Diff. Deducted" := TempSalesLine."Prepmt VAT Diff. Deducted" + SalesLine."Prepmt VAT Diff. to Deduct"; IF "Currency Code" <> '' THEN BEGIN TempPrePayDeductLCYSalesLine := SalesLine; IF TempPrePayDeductLCYSalesLine.FIND THEN TempSalesLine."Prepmt. Amount Inv. (LCY)" := TempSalesLine."Prepmt. Amount Inv. (LCY)" - TempPrePayDeductLCYSalesLine."Prepmt. Amount Inv. (LCY)"; END ELSE TempSalesLine."Prepmt. Amount Inv. (LCY)" := TempSalesLine."Prepmt. Amount Inv. (LCY)" - SalesLine."Prepmt Amt to Deduct"; IF (TempSalesLine."Quantity Invoiced" = TempSalesLine.Quantity) AND (TempSalesLine."Prepayment %" <> 0) THEN PrepayRealizeGainLoss(TempSalesLine); TempSalesLine."Prepmt Amt to Deduct" := TempSalesLine."Prepmt. Amt. Inv." - TempSalesLine."Prepmt Amt Deducted"; TempSalesLine."Prepmt VAT Diff. to Deduct" := 0; // End of the lines. TempSalesLine.InitOutstanding; IF (TempSalesLine."Purch. Order Line No." <> 0) AND (TempSalesLine.Quantity = TempSalesLine."Quantity Invoiced") THEN UpdateAssocLines(TempSalesLine); ... InsertTrackingSpecification; IF SalesLine.FINDSET THEN REPEAT IF SalesLine."Purch. Order Line No." <> 0 THEN UpdateAssocLines(SalesLine); // Delete the following lines. 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); END; // End of the lines. UNTIL SalesLine.NEXT = 0; END; END; SalesLine.SETFILTER("Blanket Order Line No.",'<>0'); ...Erstatningskode
... GenJnlLine."External Document No." := GenJnlLineExtDocNo; GenJnlLine."Currency Code" := "Currency Code"; GenJnlLine.Amount := -TotalSalesLine."Amount Including VAT"; GenJnlLine."Source Currency Code" := "Currency Code"; GenJnlLine."Source Currency Amount" := -TotalSalesLine."Amount Including VAT"; // Add the following line. GenJnlLine."Amount (LCY)" := ROUND(-TotalSalesLineLCY."Amount Including VAT",GLSetup."Amount Rounding Precision"); IF SalesHeader."Currency Code" = '' THEN GenJnlLine."Currency Factor" := 1 ELSE GenJnlLine."Currency Factor" := SalesHeader."Currency Factor"; GenJnlLine.Correction := Correction; ... IF SalesLine."Qty. to Invoice" <> 0 THEN BEGIN SalesLine."Prepmt Amt Deducted" := SalesLine."Prepmt Amt Deducted" + SalesLine."Prepmt Amt to Deduct"; SalesLine."Prepmt VAT Diff. Deducted" := SalesLine."Prepmt VAT Diff. Deducted" + SalesLine."Prepmt VAT Diff. to Deduct"; // Add the following line. DecrementPrepmtAmtInvLCY(SalesLine,SalesLine."Prepmt. Amount Inv. (LCY)"); SalesLine."Prepmt Amt to Deduct" := SalesLine."Prepmt. Amt. Inv." - SalesLine."Prepmt Amt Deducted"; SalesLine."Prepmt VAT Diff. to Deduct" := 0; END; END; ... IF ABS(TempSalesLine."Quantity Invoiced") > ABS(TempSalesLine."Quantity Shipped") THEN ERROR( Text014, TempSalesLine."Document No."); TempSalesLine.InitQtyToInvoice; // Add the following lines. IF TempSalesLine."Prepayment %" <> 0 THEN BEGIN TempSalesLine."Prepmt Amt Deducted" := TempSalesLine."Prepmt Amt Deducted" + SalesLine."Prepmt Amt to Deduct"; TempSalesLine."Prepmt VAT Diff. Deducted" := TempSalesLine."Prepmt VAT Diff. Deducted" + SalesLine."Prepmt VAT Diff. to Deduct"; DecrementPrepmtAmtInvLCY(SalesLine,TempSalesLine."Prepmt. Amount Inv. (LCY)"); TempSalesLine."Prepmt Amt to Deduct" := TempSalesLine."Prepmt. Amt. Inv." - TempSalesLine."Prepmt Amt Deducted"; TempSalesLine."Prepmt VAT Diff. to Deduct" := 0; END; // End of the lines. TempSalesLine.InitOutstanding; IF (TempSalesLine."Purch. Order Line No." <> 0) AND (TempSalesLine.Quantity = TempSalesLine."Quantity Invoiced") THEN UpdateAssocLines(TempSalesLine); ... InsertTrackingSpecification; IF SalesLine.FINDSET THEN REPEAT IF SalesLine."Purch. Order Line No." <> 0 THEN UpdateAssocLines(SalesLine); // Add the following lines. IF (SalesLine."Prepayment %" <> 0) THEN DecrementPrepmtAmtInvLCY(SalesLine,SalesLine."Prepmt. Amount Inv. (LCY)"); // End of the lines. UNTIL SalesLine.NEXT = 0; END; END; SalesLine.SETFILTER("Blanket Order Line No.",'<>0'); ...Endre koden i FillInvPostingBuffer-funksjonen i Sales-Post kodeenhet (80) på følgende måte:
Eksisterende kode... TempDocDim.SETRANGE("Table ID",DATABASE::"Sales Line"); TempDocDim.SETRANGE("Line No.",SalesLine."Line No."); TotalVAT := SalesLine."Amount Including VAT" - SalesLine.Amount; TotalVATACY := SalesLineACY."Amount Including VAT" - SalesLineACY.Amount; // Delete the following line. TotalAmount := SalesLine.Amount; TotalAmountACY := SalesLineACY.Amount; IF SalesSetup."Discount Posting" IN [SalesSetup."Discount Posting"::"Invoice Discounts",SalesSetup."Discount Posting"::"All Discounts"] THEN BEGIN IF SalesLine."VAT Calculation Type" = SalesLine."VAT Calculation Type"::"Reverse Charge VAT" THEN ...Erstatningskode
... TempDocDim.SETRANGE("Table ID",DATABASE::"Sales Line"); TempDocDim.SETRANGE("Line No.",SalesLine."Line No."); TotalVAT := SalesLine."Amount Including VAT" - SalesLine.Amount; TotalVATACY := SalesLineACY."Amount Including VAT" - SalesLineACY.Amount; // Add the following line. TotalAmount := ROUND(SalesLine.Amount,GLSetup."Amount Rounding Precision"); TotalAmountACY := SalesLineACY.Amount; IF SalesSetup."Discount Posting" IN [SalesSetup."Discount Posting"::"Invoice Discounts",SalesSetup."Discount Posting"::"All Discounts"] THEN BEGIN IF SalesLine."VAT Calculation Type" = SalesLine."VAT Calculation Type"::"Reverse Charge VAT" THEN ...Legg til en ny DecrementPrepmtAmtInvLCY-funksjon i Sales-Post kodeenhet (80) på følgende måte:
LOCAL PROCEDURE DecrementPrepmtAmtInvLCY@86(SalesLine@1000 : Record 37;VAR PrepmtAmountInvLCY@1001 : Decimal); TempPrePayDeductLCYSalesLine := SalesLine; IF TempPrePayDeductLCYSalesLine.FIND THEN PrepmtAmountInvLCY := PrepmtAmountInvLCY - TempPrePayDeductLCYSalesLine."Prepmt. Amount Inv. (LCY)";Endre koden i OnRun-utløseren i Purch.-Post codeunit (90) på følgende måte:
Eksisterende kode... GenJnlLine."External Document No." := GenJnlLineExtDocNo; GenJnlLine."Currency Code" := "Currency Code"; GenJnlLine.Amount := -TotalPurchLine."Amount Including VAT"; GenJnlLine."Source Currency Code" := "Currency Code"; GenJnlLine."Source Currency Amount" := -TotalPurchLine."Amount Including VAT"; // Delete the following line. GenJnlLine."Amount (LCY)" := -TotalPurchLineLCY."Amount Including VAT"; IF PurchHeader."Currency Code" = '' THEN GenJnlLine."Currency Factor" := 1 ELSE GenJnlLine."Currency Factor" := PurchHeader."Currency Factor"; GenJnlLine."Sales/Purch. (LCY)" := -TotalPurchLineLCY.Amount; ... IF PurchLine."Qty. to Invoice" <> 0 THEN BEGIN PurchLine."Prepmt Amt Deducted" := PurchLine."Prepmt Amt Deducted" + PurchLine."Prepmt Amt to Deduct"; PurchLine."Prepmt VAT Diff. Deducted" := PurchLine."Prepmt VAT Diff. Deducted" + PurchLine."Prepmt VAT Diff. to Deduct"; // Delete the following line. IF "Currency Code" <> '' THEN BEGIN TempPrePayDeductLCYPurchLine := PurchLine; IF TempPrePayDeductLCYPurchLine.FIND THEN PurchLine."Prepmt. Amount Inv. (LCY)" := PurchLine."Prepmt. Amount Inv. (LCY)" - TempPrePayDeductLCYPurchLine."Prepmt. Amount Inv. (LCY)"; END ELSE PurchLine."Prepmt. Amount Inv. (LCY)" := ROUND( ROUND( ROUND(PurchLine."Direct Unit Cost" * (PurchLine.Quantity - PurchLine."Quantity Received"), Currency."Amount Rounding Precision") * (1 - PurchLine."Line Discount %" / 100),Currency."Amount Rounding Precision") * PurchLine."Prepayment %" / 100,Currency."Amount Rounding Precision"); PurchLine."Prepmt Amt to Deduct" := PurchLine."Prepmt. Amt. Inv." - PurchLine."Prepmt Amt Deducted"; // End of the lines. PurchLine."Prepmt VAT Diff. to Deduct" := 0; END; END; UpdateBlanketOrderLine(PurchLine,Receive,Ship,Invoice); ... Text018 + Text99000000, TempPurchLine."Sales Order No."); END; TempPurchLine.InitQtyToInvoice; // Delete the following lines. TempPurchLine."Prepmt Amt Deducted" := TempPurchLine."Prepmt Amt Deducted" + PurchLine."Prepmt Amt to Deduct"; TempPurchLine."Prepmt VAT Diff. Deducted" := TempPurchLine."Prepmt VAT Diff. Deducted" + PurchLine."Prepmt VAT Diff. to Deduct"; IF "Currency Code" <> '' THEN BEGIN TempPrePayDeductLCYPurchLine := PurchLine; IF TempPrePayDeductLCYPurchLine.FIND THEN TempPurchLine."Prepmt. Amount Inv. (LCY)" := TempPurchLine."Prepmt. Amount Inv. (LCY)" - TempPrePayDeductLCYPurchLine."Prepmt. Amount Inv. (LCY)"; END ELSE TempPurchLine."Prepmt. Amount Inv. (LCY)" := TempPurchLine."Prepmt. Amount Inv. (LCY)" - PurchLine."Prepmt Amt to Deduct"; IF (TempPurchLine."Quantity Invoiced" = TempPurchLine.Quantity) AND (TempPurchLine."Prepayment %" <> 0) THEN PrepayRealizeGainLoss(TempPurchLine); TempPurchLine."Prepmt Amt to Deduct" := TempPurchLine."Prepmt. Amt. Inv." - TempPurchLine."Prepmt Amt Deducted"; TempPurchLine."Prepmt VAT Diff. to Deduct" := 0; // End of the lines. TempPurchLine.InitOutstanding; TempPurchLine.MODIFY; END; UNTIL PurchLine.NEXT = 0; InsertTrackingSpecification; ... PurchLine.SETRANGE("Return Shipment No."); END; ELSE IF PurchLine.FINDSET THEN REPEAT // Delete the following lines. IF (PurchLine."Prepayment %" <> 0) THEN BEGIN IF "Currency Code" <> '' THEN BEGIN TempPrePayDeductLCYPurchLine := PurchLine; IF TempPrePayDeductLCYPurchLine.FIND THEN PurchLine."Prepmt. Amount Inv. (LCY)" := PurchLine."Prepmt. Amount Inv. (LCY)" - TempPrePayDeductLCYPurchLine."Prepmt. Amount Inv. (LCY)"; END ELSE PurchLine."Prepmt. Amount Inv. (LCY)" := PurchLine."Prepmt. Amount Inv. (LCY)" - PurchLine."Prepmt Amt to Deduct"; PrepayRealizeGainLoss(PurchLine); END; // End of the lines. UNTIL PurchLine.NEXT = 0; END; PurchLine.SETFILTER("Blanket Order Line No.",'<>0'); IF PurchLine.FINDSET THEN ...Erstatningskode
... GenJnlLine."External Document No." := GenJnlLineExtDocNo; GenJnlLine."Currency Code" := "Currency Code"; GenJnlLine.Amount := -TotalPurchLine."Amount Including VAT"; GenJnlLine."Source Currency Code" := "Currency Code"; GenJnlLine."Source Currency Amount" := -TotalPurchLine."Amount Including VAT"; // Add the following line. GenJnlLine."Amount (LCY)" := ROUND(-TotalPurchLineLCY."Amount Including VAT",GLSetup."Amount Rounding Precision"); IF PurchHeader."Currency Code" = '' THEN GenJnlLine."Currency Factor" := 1 ELSE GenJnlLine."Currency Factor" := PurchHeader."Currency Factor"; GenJnlLine."Sales/Purch. (LCY)" := -TotalPurchLineLCY.Amount; ... IF PurchLine."Qty. to Invoice" <> 0 THEN BEGIN PurchLine."Prepmt Amt Deducted" := PurchLine."Prepmt Amt Deducted" + PurchLine."Prepmt Amt to Deduct"; PurchLine."Prepmt VAT Diff. Deducted" := PurchLine."Prepmt VAT Diff. Deducted" + PurchLine."Prepmt VAT Diff. to Deduct"; // Add the following lines. DecrementPrepmtAmtInvLCY(PurchLine,PurchLine."Prepmt. Amount Inv. (LCY)"); PurchLine."Prepmt Amt to Deduct" := PurchLine."Prepmt. Amt. Inv." - PurchLine."Prepmt Amt Deducted"; // End of the lines. PurchLine."Prepmt VAT Diff. to Deduct" := 0; END; END; UpdateBlanketOrderLine(PurchLine,Receive,Ship,Invoice); ... Text018 + Text99000000, TempPurchLine."Sales Order No."); END; TempPurchLine.InitQtyToInvoice; // Add the following lines. IF TempPurchLine."Prepayment %" <> 0 THEN BEGIN TempPurchLine."Prepmt Amt Deducted" := TempPurchLine."Prepmt Amt Deducted" + PurchLine."Prepmt Amt to Deduct"; TempPurchLine."Prepmt VAT Diff. Deducted" := TempPurchLine."Prepmt VAT Diff. Deducted" + PurchLine."Prepmt VAT Diff. to Deduct"; DecrementPrepmtAmtInvLCY(PurchLine,TempPurchLine."Prepmt. Amount Inv. (LCY)"); TempPurchLine."Prepmt Amt to Deduct" := TempPurchLine."Prepmt. Amt. Inv." - TempPurchLine."Prepmt Amt Deducted"; TempPurchLine."Prepmt VAT Diff. to Deduct" := 0; END; // End of the lines. TempPurchLine.InitOutstanding; TempPurchLine.MODIFY; END; UNTIL PurchLine.NEXT = 0; InsertTrackingSpecification; ... // Add the following lines. IF (PurchLine."Prepayment %" <> 0) THEN DecrementPrepmtAmtInvLCY(PurchLine,PurchLine."Prepmt. Amount Inv. (LCY)"); // End of the lines. ...Endre koden i FillInvPostingBuffer-funksjonen i Purch.-Post codeunit (90) på følgende måte:
Eksisterende kode... TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line"); TempDocDim.SETRANGE("Line No.",PurchLine."Line No."); TotalVAT := PurchLine."Amount Including VAT" - PurchLine.Amount; TotalVATACY := PurchLineACY."Amount Including VAT" - PurchLineACY.Amount; // Delete the following line. TotalAmount := PurchLine.Amount; TotalAmountACY := PurchLineACY.Amount; IF PurchSetup."Discount Posting" IN [PurchSetup."Discount Posting"::"Invoice Discounts",PurchSetup."Discount Posting"::"All Discounts"] THEN BEGIN CASE PurchLine."VAT Calculation Type" OF ...Erstatningskode
... TempDocDim.SETRANGE("Table ID",DATABASE::"Purchase Line"); TempDocDim.SETRANGE("Line No.",PurchLine."Line No."); TotalVAT := PurchLine."Amount Including VAT" - PurchLine.Amount; TotalVATACY := PurchLineACY."Amount Including VAT" - PurchLineACY.Amount; // Add the following line. TotalAmount := ROUND(PurchLine.Amount,GLSetup."Amount Rounding Precision"); TotalAmountACY := PurchLineACY.Amount; TotalAmountACY := PurchLineACY.Amount; IF PurchSetup."Discount Posting" IN [PurchSetup."Discount Posting"::"Invoice Discounts",PurchSetup."Discount Posting"::"All Discounts"] THEN BEGIN CASE PurchLine."VAT Calculation Type" OF ...Legg til en ny DecrementPrepmtAmtInvLCY-funksjon i Purch.-Post codeunit (90) på følgende måte:
LOCAL PROCEDURE DecrementPrepmtAmtInvLCY@86(PurchLine@1000 : Record 39;VAR PrepmtAmountInvLCY@1001 : Decimal); TempPrePayDeductLCYPurchLine := PurchLine; IF TempPrePayDeductLCYPurchLine.FIND THEN PrepmtAmountInvLCY := PrepmtAmountInvLCY - TempPrePayDeductLCYPurchLine."Prepmt. Amount Inv. (LCY)";Endre koden i RoundAmounts-funksjonen i kodeenheten for Sales-Post forskuddsbetalinger (442) på følgende måte:
Eksisterende kode... IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBuf,SalesHeader,DummySalesLine,FALSE,0); IF SalesHeader."Currency Code" <> '' THEN BEGIN VAT := PrepmtInvLineBuf.Amount <> PrepmtInvLineBuf."Amount Incl. VAT"; // Delete the following lines. PrepmtInvLineBuf."Amount Incl. VAT" := AmountToLCY( SalesHeader,TotalPrepmtInvLineBuf."Amount Incl. VAT",TotalPrepmtInvLineBufLCY."Amount Incl. VAT"); // End of the lines. IF VAT THEN PrepmtInvLineBuf.Amount := ROUND(PrepmtInvLineBuf."Amount Incl. VAT" / (1 + PrepmtInvLineBuf."VAT %" / 100)) ELSE PrepmtInvLineBuf.Amount := PrepmtInvLineBuf."Amount Incl. VAT"; PrepmtInvLineBuf."VAT Amount" := PrepmtInvLineBuf."Amount Incl. VAT" - PrepmtInvLineBuf.Amount; IF PrepmtInvLineBuf."VAT Base Amount" <> 0 THEN PrepmtInvLineBuf."VAT Base Amount" := PrepmtInvLineBuf.Amount; END; IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBufLCY,SalesHeader,DummySalesLine,FALSE,0); ...Erstatningskode
... IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBuf,SalesHeader,DummySalesLine,FALSE,0); IF SalesHeader."Currency Code" <> '' THEN BEGIN VAT := PrepmtInvLineBuf.Amount <> PrepmtInvLineBuf."Amount Incl. VAT"; // Add the following lines. PrepmtInvLineBuf."Amount Incl. VAT" := ROUND( AmountToLCY( SalesHeader,TotalPrepmtInvLineBuf."Amount Incl. VAT",TotalPrepmtInvLineBufLCY."Amount Incl. VAT"), GLSetup."Amount Rounding Precision"); // End of the lines. IF VAT THEN PrepmtInvLineBuf.Amount := ROUND(PrepmtInvLineBuf."Amount Incl. VAT" / (1 + PrepmtInvLineBuf."VAT %" / 100)) ELSE PrepmtInvLineBuf.Amount := PrepmtInvLineBuf."Amount Incl. VAT"; PrepmtInvLineBuf."VAT Amount" := PrepmtInvLineBuf."Amount Incl. VAT" - PrepmtInvLineBuf.Amount; IF PrepmtInvLineBuf."VAT Base Amount" <> 0 THEN PrepmtInvLineBuf."VAT Base Amount" := PrepmtInvLineBuf.Amount; END; IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBufLCY,SalesHeader,DummySalesLine,FALSE,0); ...Endre koden i InitInvoiceRoundingLine-funksjonen i Sales-Post Prepayments codeunit (442) på følgende måte:
Eksisterende kode... "Unit Price", ROUND( InvoiceRoundingAmount / (1 + (1 - SalesHeader."VAT Base Discount %" / 100) * "VAT %" / 100), Currency."Amount Rounding Precision")); VALIDATE("Amount Including VAT",InvoiceRoundingAmount); END; EXIT(TRUE);Erstatningskode
... "Unit Price", ROUND( InvoiceRoundingAmount / (1 + (1 - SalesHeader."VAT Base Discount %" / 100) * "VAT %" / 100), Currency."Amount Rounding Precision")); // Add the following line. VALIDATE("Prepayment Amount",InvoiceRoundingAmount); VALIDATE("Amount Including VAT",InvoiceRoundingAmount); END; EXIT(TRUE);Endre koden i RoundAmounts-funksjonen i kodeenheten for Purchase-Post forskuddsbetalinger (444) på følgende måte:
Eksisterende kode... IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBuf,PurchHeader,DummyPurchLine,FALSE,0); IF PurchHeader."Currency Code" <> '' THEN BEGIN VAT := PrepmtInvLineBuf.Amount <> PrepmtInvLineBuf."Amount Incl. VAT"; PrepmtInvLineBuf."Amount Incl. VAT" := // Delete the following lines. AmountToLCY( PurchHeader,TotalPrepmtInvLineBuf."Amount Incl. VAT",TotalPrepmtInvLineBufLCY."Amount Incl. VAT"); IF VAT THEN PrepmtInvLineBuf.Amount := ROUND(PrepmtInvLineBuf."Amount Incl. VAT" / (1 + PrepmtInvLineBuf."VAT %" / 100)) ELSE PrepmtInvLineBuf.Amount := PrepmtInvLineBuf."Amount Incl. VAT"; // End of the lines. PrepmtInvLineBuf."VAT Amount" := PrepmtInvLineBuf."Amount Incl. VAT" - PrepmtInvLineBuf.Amount; IF PrepmtInvLineBuf."VAT Base Amount" <> 0 THEN PrepmtInvLineBuf."VAT Base Amount" := PrepmtInvLineBuf.Amount; END; IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBufLCY,PurchHeader,DummyPurchLine,FALSE,0); ...Erstatningskode
... IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBuf,PurchHeader,DummyPurchLine,FALSE,0); IF PurchHeader."Currency Code" <> '' THEN BEGIN VAT := PrepmtInvLineBuf.Amount <> PrepmtInvLineBuf."Amount Incl. VAT"; PrepmtInvLineBuf."Amount Incl. VAT" := // Add the following lines. ROUND( AmountToLCY( PurchHeader,TotalPrepmtInvLineBuf."Amount Incl. VAT",TotalPrepmtInvLineBufLCY."Amount Incl. VAT"), GLSetup."Amount Rounding Precision"); IF VAT THEN PrepmtInvLineBuf.Amount := ROUND(PrepmtInvLineBuf."Amount Incl. VAT" / (1 + PrepmtInvLineBuf."VAT %" / 100)) ELSE PrepmtInvLineBuf.Amount := PrepmtInvLineBuf."Amount Incl. VAT"; // End of the lines. PrepmtInvLineBuf."VAT Amount" := PrepmtInvLineBuf."Amount Incl. VAT" - PrepmtInvLineBuf.Amount; IF PrepmtInvLineBuf."VAT Base Amount" <> 0 THEN PrepmtInvLineBuf."VAT Base Amount" := PrepmtInvLineBuf.Amount; END; IncrAmounts(PrepmtInvLineBuf,TotalPrepmtInvLineBufLCY,PurchHeader,DummyPurchLine,FALSE,0); ...Endre koden i InitInvoiceRoundingLine-funksjonen i Purchase-Post prepayments codeunit (444) som følger:
Eksisterende kode... "Direct Unit Cost", ROUND( InvoiceRoundingAmount / (1 + (1 - PurchHeader."VAT Base Discount %" / 100) * "VAT %" / 100), Currency."Amount Rounding Precision")); VALIDATE("Amount Including VAT",InvoiceRoundingAmount); END; EXIT(TRUE);Erstatningskode
... "Direct Unit Cost", ROUND( InvoiceRoundingAmount / (1 + (1 - PurchHeader."VAT Base Discount %" / 100) * "VAT %" / 100), Currency."Amount Rounding Precision")); // Add the following line. VALIDATE("Prepayment Amount",InvoiceRoundingAmount); VALIDATE("Amount Including VAT",InvoiceRoundingAmount); END; EXIT(TRUE);
Forutsetninger
Du må ha ett av følgende produkter installert for å bruke denne hurtigreparasjonen:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 Service Pack 1
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 «FAST PUBLISH»-artikkel som er opprettet direkte fra Microsofts støtteorganisasjon. Informasjonen i dette er angitt som svar på nye problemer. Som et resultat av hastigheten på å gjøre det tilgjengelig, kan materialene inkludere typografiske feil og kan bli revidert når som helst uten varsel. Se vilkår for bruk for andre hensyn.