"Jumlah (LCY) harus memiliki tanda yang sama dengan Jumlah dalam Gen. Pesan kesalahan Baris Jurnal" ketika Anda memposting faktur untuk sebagian pesanan penjualan yang dikirim atau pesanan pembelian di mana bidang "Prabayar%" diatur ke 100 di Microsoft Dynamics NAV...

Berlaku Untuk
Dynamics NAV 2009

Artikel ini berlaku untuk Microsoft Dynamics NAV untuk semua negara dan semua bahasa lokal.

Gejala

Misalnya Anda membuat pesanan penjualan yang memiliki bidang Prabayar% diatur ke 100 di Microsoft Dynamics NAV 2009. Lalu Anda memposting faktur prabayar untuk pesanan penjualan. Selanjutnya, Anda memposting pengiriman sebagian untuk pesanan penjualan. Dalam situasi ini, saat Anda memposting faktur untuk pesanan penjualan, Anda menerima pesan kesalahan berikut:

Catatan

Amount (LCY) harus memiliki tanda yang sama dengan Amount in Gen. Baris Jurnal.

Masalah ini juga terjadi ketika Anda memposting faktur untuk sebagian pesanan pembelian yang dikirim di mana bidang Prabayar% diatur ke 100.
Masalah ini terjadi pada produk berikut ini:

  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics NAV 2009 Paket Layanan 1

      

Resolusi

Informasi hotfix

Hotfix yang didukung kini tersedia dari Microsoft. Namun, hanya dimaksudkan untuk memperbaiki masalah yang dijelaskan dalam artikel ini. Terapkan hanya ke sistem yang mengalami masalah khusus ini. Hotfix ini mungkin menerima pengujian tambahan. Oleh karena itu, jika Anda tidak terpengaruh oleh masalah ini, kami menyarankan agar Anda menunggu paket layanan Microsoft Dynamics NAV 2009 berikutnya atau versi Microsoft Dynamics NAV berikutnya yang berisi hotfix ini.

Catatan Dalam kasus khusus, biaya yang biasanya ditimbulkan untuk panggilan dukungan mungkin dibatalkan jika Profesional Dukungan Teknis untuk Microsoft Dynamics dan produk terkait menentukan bahwa pembaruan tertentu akan mengatasi masalah Anda. Biaya dukungan biasa akan berlaku untuk pertanyaan dan masalah dukungan tambahan yang tidak memenuhi syarat untuk pembaruan tertentu yang dimaksud.

            
          

Informasi penginstalan

Microsoft menyediakan contoh pemrograman untuk ilustrasi saja, tanpa jaminan baik tersurat maupun tersirat. Ini termasuk, tetapi tidak terbatas pada, jaminan tersirat dari kelayakan jual atau kesesuaian untuk tujuan tertentu. Artikel ini mengasumsikan bahwa Anda sudah terbiasa dengan bahasa pemrograman yang ditunjukkan dan dengan alat yang digunakan untuk membuat dan men-debug prosedur. Teknisi dukungan Microsoft dapat membantu menjelaskan fungsionalitas prosedur tertentu, tetapi mereka tidak akan mengubah contoh ini untuk menyediakan fungsionalitas tambahan atau prosedur konstruksi untuk memenuhi persyaratan tertentu Anda.

Catatan Sebelum Anda menginstal hotfix ini, verifikasi bahwa semua pengguna klien Microsoft Navision telah keluar dari sistem. Ini termasuk pengguna klien Microsoft Navision Application Services (NAS). Anda harus menjadi satu-satunya pengguna klien yang masuk ketika Anda menerapkan hotfix ini.

Untuk menerapkan hotfix ini, Anda harus memiliki lisensi pengembang.

Kami menyarankan agar akun pengguna di jendela Windows Logins atau di jendela Login Database diberi ID peran "SUPER". Jika akun pengguna tidak dapat ditetapkan sebagai ID peran "SUPER", Anda harus memverifikasi bahwa akun pengguna memiliki izin berikut:

  • Izin Ubah untuk objek yang akan Anda ubah.
  • Izin Jalankan untuk objek System Object ID 5210 dan untuk objek System Object ID 9015.

                
Catatan Anda tidak harus memiliki hak untuk penyimpanan data kecuali Anda harus melakukan perbaikan data.

Perubahan kode

Catatan Selalu uji perbaikan kode di lingkungan terkontrol sebelum Anda menerapkan perbaikan pada komputer produksi Anda.
Untuk mengatasi masalah ini, ikuti langkah-langkah ini:

  1. Ubah kode dalam prosedur CalcVATAmountLines@35 dalam tabel "Baris Penjualan" (37) sebagai berikut:
    Kode yang sudah ada

    ...
    END ELSE BEGIN
    CASE "VAT Calculation Type" OF
    "VAT Calculation Type"::"Normal VAT",
    "VAT Calculation Type"::"Reverse Charge VAT":
    BEGIN
    "VAT Base" := "Line Amount" - "Invoice Discount Amount";
    "VAT Amount" :=
    "VAT Difference" +
    ROUND(
    PrevVatAmountLine."VAT Amount" +
    "VAT Base" * "VAT %" / 100 * (1 - SalesHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    "Amount Including VAT" := "Line Amount" - "Invoice Discount Amount" + "VAT Amount";
    IF Positive THEN
    PrevVatAmountLine.INIT
    
    // Delete the following lines.
    ELSE BEGIN
    PrevVatAmountLine := VATAmountLine;
    PrevVatAmountLine."VAT Amount" :=
    ROUND(PrevVatAmountLine."VAT Amount" -
    "VAT Base" * "VAT %" / 100 * (1 - SalesHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    END;
    // End of the lines.
    ...
    

    Kode pengganti

    ...
    END ELSE BEGIN
    CASE "VAT Calculation Type" OF
    "VAT Calculation Type"::"Normal VAT",
    "VAT Calculation Type"::"Reverse Charge VAT":
    BEGIN
    "VAT Base" := "Line Amount" - "Invoice Discount Amount";
    "VAT Amount" :=
    "VAT Difference" +
    ROUND(
    PrevVatAmountLine."VAT Amount" +
    "VAT Base" * "VAT %" / 100 * (1 - SalesHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    "Amount Including VAT" := "Line Amount" - "Invoice Discount Amount" + "VAT Amount";
    IF Positive THEN
    PrevVatAmountLine.INIT
    
    // Add the following lines.
    ELSE
    IF NOT "Includes Prepayment" THEN BEGIN
    PrevVatAmountLine := VATAmountLine;
    PrevVatAmountLine."VAT Amount" :=
    "VAT Base" * "VAT %" / 100 * (1 - SalesHeader."VAT Base Discount %" / 100);
    PrevVatAmountLine."VAT Amount" :=
    PrevVatAmountLine."VAT Amount" -
    ROUND(PrevVatAmountLine."VAT Amount",Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    END;
    // End of the lines.
    ... 
    
  2. Ubah kode dalam prosedur CalcVATAmountLines@24 dalam tabel "Baris Pembelian" (39) sebagai berikut:
    Kode yang sudah ada

    ...
    CASE "VAT Calculation Type" OF
    "VAT Calculation Type"::"Normal VAT",
    "VAT Calculation Type"::"Reverse Charge VAT":
    BEGIN
    "VAT Base" := "Line Amount" - "Invoice Discount Amount";
    "VAT Amount" :=
    "VAT Difference" +
    ROUND(
    PrevVatAmountLine."VAT Amount" +
    "VAT Base" * "VAT %" / 100 * (1 - PurchHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    "Amount Including VAT" := "Line Amount" - "Invoice Discount Amount" + "VAT Amount";
    IF Positive THEN
    PrevVatAmountLine.INIT
    
    // Delete the following lines.
    ELSE BEGIN
    PrevVatAmountLine := VATAmountLine;
    PrevVatAmountLine."VAT Amount" :=
    "VAT Base" * "VAT %" / 100 * (1 - PurchHeader."VAT Base Discount %" / 100);
    PrevVatAmountLine."VAT Amount" :=
    PrevVatAmountLine."VAT Amount" -
    ROUND(PrevVatAmountLine."VAT Amount",Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    END;
    // End of the lines.
    ...
    

    Kode pengganti

    ...
    CASE "VAT Calculation Type" OF
    "VAT Calculation Type"::"Normal VAT",
    "VAT Calculation Type"::"Reverse Charge VAT":
    BEGIN
    "VAT Base" := "Line Amount" - "Invoice Discount Amount";
    "VAT Amount" :=
    "VAT Difference" +
    ROUND(
    PrevVatAmountLine."VAT Amount" +
    "VAT Base" * "VAT %" / 100 * (1 - PurchHeader."VAT Base Discount %" / 100),
    Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    "Amount Including VAT" := "Line Amount" - "Invoice Discount Amount" + "VAT Amount";
    IF Positive THEN
    PrevVatAmountLine.INIT
    
    // Add the following lines.
    ELSE
    IF NOT "Includes Prepayment" THEN BEGIN
    PrevVatAmountLine := VATAmountLine;
    PrevVatAmountLine."VAT Amount" :=
    "VAT Base" * "VAT %" / 100 * (1 - PurchHeader."VAT Base Discount %" / 100);
    PrevVatAmountLine."VAT Amount" :=
    PrevVatAmountLine."VAT Amount" -
    ROUND(PrevVatAmountLine."VAT Amount",Currency."Amount Rounding Precision",Currency.VATRoundingDirection);
    END;
    // End of the lines.
    ...
    
  3. Ubah kode di pemicu OnRun dalam codeunit "Sales-Post" (80) sebagai berikut:
    Kode yang sudah ada 1

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    ReturnRcptLine."Quantity Invoiced" :=
    ReturnRcptLine."Quantity Invoiced" + QtyToBeInvoiced;
    ReturnRcptLine."Qty. Invoiced (Base)" :=
    ReturnRcptLine."Qty. Invoiced (Base)" + QtyToBeInvoicedBase;
    ReturnRcptLine."Return Qty. Rcd. Not Invd." :=
    ReturnRcptLine.Quantity - ReturnRcptLine."Quantity Invoiced";
    ReturnRcptLine.MODIFY;
    IF SalesLine.Type = SalesLine.Type::Item THEN
    PostItemJnlLine(
    SalesLine,
    0,0,
    QtyToBeInvoiced,
    QtyToBeInvoicedBase,
    
    // Delete the following line.
    {ReturnRcptLine."Item Rcpt. Entry No."}
    
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    EndLoop := (TempInvoicingSpecification.NEXT = 0)
    ELSE
    EndLoop :=
    (ReturnRcptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Return Qty. to Receive"));
    UNTIL EndLoop;
    END ELSE
    ERROR(
    Text025,
    SalesLine."Return Receipt Line No.",SalesLine."Return Receipt No.");
    END;
    ...
    

    Kode pengganti 1

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    ReturnRcptLine."Quantity Invoiced" :=
    ReturnRcptLine."Quantity Invoiced" + QtyToBeInvoiced;
    ReturnRcptLine."Qty. Invoiced (Base)" :=
    ReturnRcptLine."Qty. Invoiced (Base)" + QtyToBeInvoicedBase;
    ReturnRcptLine."Return Qty. Rcd. Not Invd." :=
    ReturnRcptLine.Quantity - ReturnRcptLine."Quantity Invoiced";
    ReturnRcptLine.MODIFY;
    IF SalesLine.Type = SalesLine.Type::Item THEN
    PostItemJnlLine(
    SalesLine,
    0,0,
    QtyToBeInvoiced,
    QtyToBeInvoicedBase,
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    EndLoop := (TempInvoicingSpecification.NEXT = 0)
    ELSE
    EndLoop :=
    (ReturnRcptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Return Qty. to Receive"));
    UNTIL EndLoop;
    END ELSE
    ERROR(
    Text025,
    SalesLine."Return Receipt Line No.",SalesLine."Return Receipt No.");
    END;
    ...
    

    Kode yang sudah ada 2

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    SalesShptLine."Quantity Invoiced" :=
    SalesShptLine."Quantity Invoiced" - QtyToBeInvoiced;
    SalesShptLine."Qty. Invoiced (Base)" :=
    SalesShptLine."Qty. Invoiced (Base)" - QtyToBeInvoicedBase;
    SalesShptLine."Qty. Shipped Not Invoiced" :=
    SalesShptLine.Quantity - SalesShptLine."Quantity Invoiced";
    SalesShptLine.MODIFY;
    IF SalesLine.Type = SalesLine.Type::Item THEN
    PostItemJnlLine(
    SalesLine,
    0,0,
    QtyToBeInvoiced,
    QtyToBeInvoicedBase,
    
    // Delete the following line.
    {SalesShptLine."Item Shpt. Entry No."}
    
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    EndLoop := (TempInvoicingSpecification.NEXT = 0)
    ELSE
    EndLoop :=
    (SalesShptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Qty. to Ship"))
    UNTIL EndLoop;
    END ELSE
    ERROR(
    Text026,
    SalesLine."Shipment Line No.",SalesLine."Shipment No.");
    END;
    

    Kode pengganti 2

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    SalesShptLine."Quantity Invoiced" :=
    SalesShptLine."Quantity Invoiced" - QtyToBeInvoiced;
    SalesShptLine."Qty. Invoiced (Base)" :=
    SalesShptLine."Qty. Invoiced (Base)" - QtyToBeInvoicedBase;
    SalesShptLine."Qty. Shipped Not Invoiced" :=
    SalesShptLine.Quantity - SalesShptLine."Quantity Invoiced";
    SalesShptLine.MODIFY;
    IF SalesLine.Type = SalesLine.Type::Item THEN
    PostItemJnlLine(
    SalesLine,
    0,0,
    QtyToBeInvoiced,
    QtyToBeInvoicedBase,
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    EndLoop := (TempInvoicingSpecification.NEXT = 0)
    ELSE
    EndLoop :=
    (SalesShptLine.NEXT = 0) OR (ABS(RemQtyToBeInvoiced) <= ABS(SalesLine."Qty. to Ship"))
    UNTIL EndLoop;
    END ELSE
    ERROR(
    Text026,
    SalesLine."Shipment Line No.",SalesLine."Shipment No.");
    END;
    ...
    
  4. Ubah kode dalam prosedur lokal AdjustPrepmtAmountLCY@84 dalam codeunit "Sales-Post" (80) sebagai berikut:
    Kode yang sudah ada 1

    ...
    TempPrepmtDeductLCYSalesLine.SETRANGE("Attached to Line No.",PrepmtSalesLine."Line No.");
    IF TempPrepmtDeductLCYSalesLine.FINDSET(TRUE) THEN
    REPEAT
    SalesLine := TempPrepmtDeductLCYSalesLine;
    SalesLine.FIND;
    IF SalesLine."Document Type" = SalesLine."Document Type"::Invoice THEN
    GetSalesOrderLine(SalesLine,SalesLine);
    DeductionFactor :=
    SalesLine."Prepmt Amt to Deduct" /
    (SalesLine."Prepmt. Amt. Inv." - SalesLine."Prepmt Amt Deducted");
    ...
    

    Kode pengganti 1

    ...
    TempPrepmtDeductLCYSalesLine.SETRANGE("Attached to Line No.",PrepmtSalesLine."Line No.");
    IF TempPrepmtDeductLCYSalesLine.FINDSET(TRUE) THEN
    REPEAT
    SalesLine := TempPrepmtDeductLCYSalesLine;
    SalesLine.FIND;
    IF SalesLine."Document Type" = SalesLine."Document Type"::Invoice THEN
    GetSalesOrderLine(SalesLine,SalesLine);
    
    // Add the following line.
    SalesLine."Prepmt Amt to Deduct" := CalcPrepmtAmtToDeduct(SalesLine);
    
    DeductionFactor :=
    SalesLine."Prepmt Amt to Deduct" /
    (SalesLine."Prepmt. Amt. Inv." - SalesLine."Prepmt Amt Deducted");
    ...
    

    Kode yang sudah ada 2

    ...
    IF ABS(TotalPrepmtVATAmtLCYDifference) <= GLSetup."Amount Rounding Precision" THEN
    TotalPrepmtVATAmtLCYDifference := 0;
    PrepmtSalesLine."Prepmt. VAT Amount Inv. (LCY)" := TotalPrepmtVATAmtLCYDifference;
    NewAmountIncludingVAT := PrepmtSalesLine.Amount + TotalPrepmtVATAmtLCY + TotalPrepmtVATAmtLCYDifference;
    Increment(TotalSalesLineLCY."Amount Including VAT",PrepmtSalesLine."Amount Including VAT" - NewAmountIncludingVAT);
    PrepmtSalesLine."Amount Including VAT" := NewAmountIncludingVAT;
    END;
    END;
    LOCAL PROCEDURE GetSalesOrderLine@85(VAR SalesOrderLine@1000 : Record 37;SalesLine@1001 : Record 37);
    ...
    

    Kode pengganti 2

    ...
    IF ABS(TotalPrepmtVATAmtLCYDifference) <= GLSetup."Amount Rounding Precision" THEN
    TotalPrepmtVATAmtLCYDifference := 0;
    PrepmtSalesLine."Prepmt. VAT Amount Inv. (LCY)" := TotalPrepmtVATAmtLCYDifference;
    NewAmountIncludingVAT := PrepmtSalesLine.Amount + TotalPrepmtVATAmtLCY + TotalPrepmtVATAmtLCYDifference;
    Increment(TotalSalesLineLCY."Amount Including VAT",PrepmtSalesLine."Amount Including VAT" - NewAmountIncludingVAT);
    
    // Add the following lines.
    IF SalesLine."Currency Code" = '' THEN
    TotalSalesLine."Amount Including VAT" := TotalSalesLineLCY."Amount Including VAT";
    // End of the lines.
    
    PrepmtSalesLine."Amount Including VAT" := NewAmountIncludingVAT;
    END;
    END;
    
    // Add the following lines.
    PROCEDURE CalcPrepmtAmtToDeduct@71(SalesLine@1000 : Record 37) : Decimal;
    VAR
    AllowedQtyToInvoice@1001 : Decimal;
    BEGIN
    WITH SalesLine DO BEGIN
    AllowedQtyToInvoice := "Qty. Shipped Not Invoiced";
    IF SalesHeader.Ship THEN
    AllowedQtyToInvoice := AllowedQtyToInvoice + "Qty. to Ship";
    IF "Qty. to Invoice" > AllowedQtyToInvoice THEN BEGIN
    "Qty. to Invoice" := AllowedQtyToInvoice;
    CalcPrepaymentToDeduct;
    END;
    EXIT("Prepmt Amt to Deduct");
    END;
    END;
    // End of the lines.
    
    LOCAL PROCEDURE GetSalesOrderLine@85(VAR SalesOrderLine@1000 : Record 37;SalesLine@1001 : Record 37);
    ...
    
  5. Ubah kode di pemicu OnRun dalam codeunit "Purch.-Post" (90) sebagai berikut:
    Kode yang sudah ada 1

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    ReturnShptLine."Quantity Invoiced" :=
    ReturnShptLine."Quantity Invoiced" - QtyToBeInvoiced;
    ReturnShptLine."Qty. Invoiced (Base)" :=
    ReturnShptLine."Qty. Invoiced (Base)" - QtyToBeInvoicedBase;
    ReturnShptLine."Return Qty. Shipped Not Invd." :=
    ReturnShptLine.Quantity - ReturnShptLine."Quantity Invoiced";
    ReturnShptLine.MODIFY;
    IF PurchLine.Type = PurchLine.Type::Item THEN
    PostItemJnlLine(
    PurchLine,
    0,0,
    QtyToBeInvoiced,QtyToBeInvoicedBase,
    
    // Delete the following line.
    {ReturnShptLine."Item Shpt. Entry No."}
    
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    ...
    

    Kode pengganti 1

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    ReturnShptLine."Quantity Invoiced" :=
    ReturnShptLine."Quantity Invoiced" - QtyToBeInvoiced;
    ReturnShptLine."Qty. Invoiced (Base)" :=
    ReturnShptLine."Qty. Invoiced (Base)" - QtyToBeInvoicedBase;
    ReturnShptLine."Return Qty. Shipped Not Invd." :=
    ReturnShptLine.Quantity - ReturnShptLine."Quantity Invoiced";
    ReturnShptLine.MODIFY;
    IF PurchLine.Type = PurchLine.Type::Item THEN
    PostItemJnlLine(
    PurchLine,
    0,0,
    QtyToBeInvoiced,QtyToBeInvoicedBase,
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    ...
    

    Kode yang sudah ada 2

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    PurchRcptLine."Quantity Invoiced" := PurchRcptLine."Quantity Invoiced" + QtyToBeInvoiced;
    PurchRcptLine."Qty. Invoiced (Base)" := PurchRcptLine."Qty. Invoiced (Base)" + QtyToBeInvoicedBase;
    PurchRcptLine."Qty. Rcd. Not Invoiced" :=
    PurchRcptLine.Quantity - PurchRcptLine."Quantity Invoiced";
    PurchRcptLine.MODIFY;
    IF PurchLine.Type = PurchLine.Type::Item THEN
    PostItemJnlLine(
    PurchLine,
    0,0,
    QtyToBeInvoiced,QtyToBeInvoicedBase,
    
    // Delete the following line.
    {PurchRcptLine."Item Rcpt. Entry No."}
    
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    ...
    

    Kode pengganti 2

    ...
    RemQtyToBeInvoiced := RemQtyToBeInvoiced - QtyToBeInvoiced;
    RemQtyToBeInvoicedBase := RemQtyToBeInvoicedBase - QtyToBeInvoicedBase;
    PurchRcptLine."Quantity Invoiced" := PurchRcptLine."Quantity Invoiced" + QtyToBeInvoiced;
    PurchRcptLine."Qty. Invoiced (Base)" := PurchRcptLine."Qty. Invoiced (Base)" + QtyToBeInvoicedBase;
    PurchRcptLine."Qty. Rcd. Not Invoiced" :=
    PurchRcptLine.Quantity - PurchRcptLine."Quantity Invoiced";
    PurchRcptLine.MODIFY;
    IF PurchLine.Type = PurchLine.Type::Item THEN
    PostItemJnlLine(
    PurchLine,
    0,0,
    QtyToBeInvoiced,QtyToBeInvoicedBase,
    ItemEntryRelation."Item Entry No.",'',TempInvoicingSpecification);
    IF TrackingSpecificationExists THEN
    ...
    
  6. Ubah kode dalam prosedur lokal AdjustPrepmtAmountLCY@84 dalam codeunit "Purch.-Post" (90) sebagai berikut:
    Kode yang sudah ada 1

    ...
    TempPrepmtDeductLCYPurchLine.SETRANGE("Attached to Line No.",PrepmtPurchLine."Line No.");
    IF TempPrepmtDeductLCYPurchLine.FINDSET(TRUE) THEN
    REPEAT
    PurchLine := TempPrepmtDeductLCYPurchLine;
    PurchLine.FIND;
    IF PurchLine."Document Type" = PurchLine."Document Type"::Invoice THEN
    GetPurchOrderLine(PurchLine,PurchLine);
    DeductionFactor :=
    PurchLine."Prepmt Amt to Deduct" /
    (PurchLine."Prepmt. Amt. Inv." - PurchLine."Prepmt Amt Deducted");
    PrepmtAmtLCYDifference :=
    ...
    

    Kode pengganti 1

    ...
    TempPrepmtDeductLCYPurchLine.SETRANGE("Attached to Line No.",PrepmtPurchLine."Line No.");
    IF TempPrepmtDeductLCYPurchLine.FINDSET(TRUE) THEN
    REPEAT
    PurchLine := TempPrepmtDeductLCYPurchLine;
    PurchLine.FIND;
    IF PurchLine."Document Type" = PurchLine."Document Type"::Invoice THEN
    GetPurchOrderLine(PurchLine,PurchLine);
    
    // Add the following line.
    PurchLine."Prepmt Amt to Deduct" := CalcPrepmtAmtToDeduct(PurchLine);
    
    DeductionFactor :=
    PurchLine."Prepmt Amt to Deduct" /
    (PurchLine."Prepmt. Amt. Inv." - PurchLine."Prepmt Amt Deducted");
    PrepmtAmtLCYDifference :=
    ...
    

    Kode yang sudah ada 2

    ...
    IF ABS(TotalPrepmtVATAmtLCYDifference) <= GLSetup."Amount Rounding Precision" THEN
    TotalPrepmtVATAmtLCYDifference := 0;
    PrepmtPurchLine."Prepmt. VAT Amount Inv. (LCY)" := -TotalPrepmtVATAmtLCYDifference;
    NewAmountIncludingVAT := PrepmtPurchLine.Amount - (TotalPrepmtVATAmtLCY + TotalPrepmtVATAmtLCYDifference);
    Increment(TotalPurchLineLCY."Amount Including VAT",-(PrepmtPurchLine."Amount Including VAT" - NewAmountIncludingVAT));
    PrepmtPurchLine."Amount Including VAT" := NewAmountIncludingVAT;
    END;
    END;
    LOCAL PROCEDURE GetPurchOrderLine@85(VAR PurchOrderLine@1000 : Record 39;PurchLine@1001 : Record 39);
    ...
    

    Kode pengganti 2

    ...
    IF ABS(TotalPrepmtVATAmtLCYDifference) <= GLSetup."Amount Rounding Precision" THEN
    TotalPrepmtVATAmtLCYDifference := 0;
    PrepmtPurchLine."Prepmt. VAT Amount Inv. (LCY)" := -TotalPrepmtVATAmtLCYDifference;
    NewAmountIncludingVAT := PrepmtPurchLine.Amount - (TotalPrepmtVATAmtLCY + TotalPrepmtVATAmtLCYDifference);
    Increment(TotalPurchLineLCY."Amount Including VAT",-(PrepmtPurchLine."Amount Including VAT" - NewAmountIncludingVAT));
    
    // Add the following lines.
    IF PurchLine."Currency Code" = '' THEN
    TotalPurchLine."Amount Including VAT" := TotalPurchLineLCY."Amount Including VAT";
    // End of the lines.
    
    PrepmtPurchLine."Amount Including VAT" := NewAmountIncludingVAT;
    END;
    END;
    
    // Add the following lines.
    LOCAL PROCEDURE CalcPrepmtAmtToDeduct@71(PurchLine@1000 : Record 39) : Decimal;
    VAR
    AllowedQtyToInvoice@1001 : Decimal;
    BEGIN
    WITH PurchLine DO BEGIN
    AllowedQtyToInvoice := "Qty. Rcd. Not Invoiced";
    IF PurchHeader.Receive THEN
    AllowedQtyToInvoice := AllowedQtyToInvoice + "Qty. to Receive";
    IF "Qty. to Invoice" > AllowedQtyToInvoice THEN BEGIN
    "Qty. to Invoice" := AllowedQtyToInvoice;
    CalcPrepaymentToDeduct;
    END;
    EXIT("Prepmt Amt to Deduct");
    END;
    END;
    // End of the lines.
    
    LOCAL PROCEDURE GetPurchOrderLine@85(VAR PurchOrderLine@1000 : Record 39;PurchLine@1001 : Record 39);
    ...
    

Prasyarat

Anda harus memiliki salah satu produk berikut yang terinstal untuk menerapkan hotfix ini:

  • Microsoft Dynamics NAV 2009 R2
  • Microsoft Dynamics NAV 2009 Paket Layanan 1

Informasi penghapusan

Anda tidak dapat menghapus hotfix ini.

Status

Microsoft telah mengonfirmasi bahwa ini adalah masalah dalam produk Microsoft sebagaimana tercantum di bagian "Berlaku untuk".

Catatan Ini adalah artikel "FAST PUBLISH" yang dibuat langsung dari dalam organisasi dukungan Microsoft. Informasi yang dimuat di sini disediakan sebagaimana adanya sebagai respons terhadap masalah yang muncul. Sebagai akibat dari kecepatan dalam membuatnya tersedia, materi mungkin menyertakan kesalahan pengetikan dan dapat direvisi kapan saja tanpa pemberitahuan. Lihat Ketentuan Penggunaan untuk pertimbangan lain.