Šis raksts attiecas uz Microsoft Dynamics NAV visās valstīs un visu valodu lokalizācijās.
Pazīmes
Pieņemsim, ka uzņēmuma ārvalstu valūtas laukā Summas noapaļošanas precizitāte esat iestatījis vērtību 0,001. Grāmatojot priekšapmaksas rēķinu, kurā tiek izmantota ārvalstu valūta, tiek parādīts šāds kļūdas ziņojums:
Piezīme
Transakciju nevar pabeigt, jo tā radīs neatbilstības DK ierakstu tabulā. Pārbaudiet, kur un kā transakcijā tiek izmantota funkcija CONSIVE, lai atrastu kļūdas iemeslu. Sazinieties ar savu sistēmas administratoru.
Tabulu var atzīmēt kā neatbilstīgas visaptverošu uzdevumu izpildē, piemēram, publicējot ziņojumus. Tas novērš nepareizu datu atjaunināšanu.
Konsekvences kļūda rodas tādēļ, ka debets un kredīts papildu pārskatu valūtai (ARC) neatbilst. Tāpēc debets un kredīts vietējā valūtā (viet.val.) atbilst, kā paredzēts.
Šī problēma rodas, ja uzņēmumam ir esoši ieraksti.
Šī problēma rodas šādos produktos:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 1. servisa pakotne (SP1)
Risinājums
Informācija par labojumfailu
Atbalstīts labojumfails tagad ir pieejams no Microsoft. Tomēr tas ir paredzēts tikai šajā rakstā aprakstītās problēmas novēršanai. Lietojiet to tikai sistēmām, kurās rodas šī konkrētā problēma. Šim labojumfailam var tikt veiktas papildu pārbaudes. Tāpēc, ja šī problēma jūs nopietni neietekmē, ieteicams gaidīt nākamo Microsoft Dynamics NAV 2009 servisa pakotni vai nākamo Microsoft Dynamics NAV versiju, kurā ir šis labojumfails.
Piezīme Īpašos gadījumos maksa, kas parasti tiek piemērota par atbalsta zvaniem, var tikt atcelta, ja Microsoft Dynamics un saistīto produktu tehniskā atbalsta speciālists nosaka, ka problēma tiks novērsta, instalējot noteiktu atjauninājumu. Parasti atbalsta izmaksas attiecas uz jautājumiem par papildu atbalstu un problēmām, kas neskar specifisko atjauninājumu apspriešanu.
Informācija par instalāciju
Microsoft sniedz programmēšanas piemērus tikai ilustrācijai, bez tiešas vai netiešas garantijas. Tas ietver, bet neaprobežojas ar netiešām garantijām par piemērotību pārdošanai vai piemērotībai noteiktam mērķim. Šajā rakstā tiek pieņemts, ka pārzināt demonstrējamo programmēšanas valodu un rīkus, kas tiek izmantoti procedūru izveidei un atkļūdošanai. Microsoft atbalsta inženieri var palīdzēt izskaidrot konkrētās procedūras funkcionalitāti, bet viņi šos piemērus nemodificēs, lai nodrošinātu papildu funkcionalitāti vai veidotu procedūras, kas atbilst jūsu specifiskajām prasībām.
Piezīme Pirms šī labojumfaila instalēšanas pārliecinieties, vai visi Microsoft Navision klienta lietotāji ir atteikušies no sistēmas. Tas ietver Microsoft Navision lietojumprogrammu pakalpojumu (NAS) klienta lietotājus. Jūs esat vienīgais klienta lietotājs, kurš ir pieteicies, ieviešot šo labojumfailu.
Lai ieviestu šo labojumfailu, ir nepieciešama izstrādātāja licence.
Iesakām lietotāja kontam logā Windows pieteikšanās vai datu bāzes pieteikšanās logā piešķirt lomas ID "SUPER". Ja lietotāja kontam nevar piešķirt "SUPER" lomas ID, jums ir jāpārbauda, vai lietotāja kontam ir šādas atļaujas:
- Modificēt objektu, kuru mainīsit.
- Izpildes atļauja sistēmas objekta ID 5210 un sistēmas objekta ID 9015.
Piezīme. Jums nav tiesību uz datu krātuvēm, ja vien jums nav jāveic datu labošana.
Koda izmaiņas
Piezīme Pirms labojumu lietošanas ražošanas datoros vienmēr pārbaudiet koda labojumus kontrolētā vidē.
Lai atrisinātu šo problēmu, veiciet tālāk norādītās darbības.
Mainiet kodu OnRun trigerī Sales-Post koda vienībā (80), rīkojoties šādi:
Esošais kods... 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'); ...Aizstāšanas kods
... 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'); ...Mainiet kodu funkcijā FillInvPostingBuffer Sales-Post koda vienībā (80) šādi:
Esošais kods... 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 ...Aizstāšanas kods
... 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 ...Pievienojiet jaunu funkciju DecrementPrepmtAmtInvLCY Sales-Post koda vienībā (80) šādi:
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)";Mainiet kodu OnRun trigerī Purch.-Post codeunit (90) šādi:
Esošais kods... 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 ...Aizstāšanas kods
... 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. ...Mainiet funkcijas FillInvPostingBuffer kodu lodziņā Purch.-Post codeunit (90) šādi:
Esošais kods... 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 ...Aizstāšanas kods
... 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 ...Lodziņā Purch.-Post codeunit (90) pievienojiet jaunu funkciju DecrementPrepmtAmtInvLCY šādi:
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)";Mainiet funkcijas RoundAmounts kodu Sales-Post priekšapmaksas koda vienībā (442) šādi:
Esošais kods... 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); ...Aizstāšanas kods
... 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); ...Mainiet funkcijas InitInvoiceRoundingLine kodu Sales-Post priekšapmaksas kodu koda vienībā (442) šādi:
Esošais kods... "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);Aizstāšanas kods
... "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);Mainiet Purchase-Post priekšapmaksas koda vienība (444) funkcijas RoundAmounts kodu šādi:
Esošais kods... 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); ...Aizstāšanas kods
... 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); ...Mainiet funkcijas InitInvoiceRoundingLine kodu Purchase-Post priekšapmaksas koda vienībā (444) šādi:
Esošais kods... "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);Aizstāšanas kods
... "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);
Priekšnosacījumi
Lai lietotu šo labojumfailu, ir jābūt instalētam vienam no šiem produktiem:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 1. servisa pakotne
Noņemšanas informācija
Šo labojumfailu nevar noņemt.
Statuss
Microsoft apstiprināja, ka šī ir problēma Microsoft produktos, kas norādīti sadaļā "attiecas uz".
Piezīme Šis ir "ĀTRĀS PUBLICĒŠANAS" raksts, kas izveidots tieši Microsoft atbalsta organizācijā. Šeit ietvertā informācija tiek sniegta tāda, kāda tā ir, reaģējot uz jauniem jautājumiem. Ātrās pieejamības rezultātā materiālos var būt drukas kļūdas, un tos var pārskatīt jebkurā laikā bez iepriekšēja brīdinājuma. Citus apsvērumus skatiet lietošanas nosacījumos .