"Giao dịch không thể hoàn tất vì nó sẽ gây ra sự không nhất định trong G/L Entry bảng" thông báo lỗi khi bạn gửi hóa đơn mua hàng trong phiên bản Bắc Mỹ của Microsoft Dynamics NAV 2009

Áp dụng cho
Dynamics NAV 2009

Bài viết này áp dụng cho Microsoft cho các quốc gia và ngôn ngữ sau.

  • Tiếng Anh (Canada) (en-ca)
  • Tiếng Anh (Mỹ) (en-us)
  • Tiếng Tây Ban Nha (Mexico) (es-mx)
  • Tiếng Pháp (Canada) (fr-ca)

Triệu chứng

Giả sử bạn đặt CAD làm giá trị Tiền tệ Báo cáo Bổ sung trong hộp thoại Thiết lập Sổ cái Chung trong phiên bản Bắc Mỹ của Microsoft Dynamics NAV 2009. Khi bạn đăng một hóa đơn mua có chứa thuế, bạn nhận được thông báo lỗi sau đây:

Lưu ý

Giao dịch không thể hoàn tất vì nó sẽ gây ra sự không nhất trí trong bảng G/L Entry. Kiểm tra vị trí và cách dùng hàm NHẤT QUÁN trong giao dịch để tìm nguyên nhân lỗi.

Sự cố này xảy ra trong các sản phẩm sau:

  • Phiên bản Bắc Mỹ của Microsoft Dynamics NAV 2009 R2
  • Phiên bản Bắc Mỹ của Microsoft Dynamics NAV 2009 Gói Dịch vụ 1

      

Giải pháp

Thông tin cập nhật nóng

Hotfix được hỗ trợ hiện có sẵn từ Microsoft. Tuy nhiên, nó chỉ là nhằm sửa chữa vấn đề được mô tả trong bài viết này. Áp dụng nó chỉ cho hệ thống đang gặp này cụ thể vấn đề. Hotfix này có thể nhận được thử nghiệm bổ sung. Do đó, nếu bạn không bị ảnh hưởng nghiêm trọng bởi sự cố này, chúng tôi khuyên bạn nên đợi gói dịch vụ Microsoft Dynamics NAV 2009 tiếp theo hoặc phiên bản Microsoft Dynamics NAV tiếp theo có chứa hotfix này.

Lưu ý Trong trường hợp đặc biệt, các khoản phí thường phát sinh đối với các cuộc gọi hỗ trợ có thể bị hủy nếu Chuyên gia Hỗ trợ Kỹ thuật dành cho Microsoft Dynamics và các sản phẩm liên quan xác định rằng một bản cập nhật cụ thể sẽ giải quyết sự cố của bạn. Chi phí hỗ trợ thông thường sẽ áp dụng cho các câu hỏi và sự cố hỗ trợ bổ sung không đủ điều kiện cho bản cập nhật cụ thể được đề cập.

            
          

Thông tin cài đặt

Microsoft chỉ cung cấp các ví dụ lập trình để minh họa mà không cần bảo hành dù là rõ ràng hay ngụ ý. Điều này bao gồm, nhưng không giới hạn ở, bảo hành ngụ ý về khả năng bán được hoặc sự thích hợp cho một mục đích cụ thể. Bài viết này giả định rằng bạn đã quen thuộc với ngôn ngữ lập trình đang được chứng minh và với các công cụ được sử dụng để tạo và gỡ lỗi thủ tục. Các kỹ sư hỗ trợ của Microsoft có thể giúp giải thích chức năng của một quy trình cụ thể, nhưng họ sẽ không sửa đổi các ví dụ này để cung cấp chức năng bổ sung hoặc quy trình xây dựng để đáp ứng các yêu cầu cụ thể của bạn.

Lưu ý Trước khi bạn cài đặt hotfix này, hãy xác minh rằng tất cả người dùng máy khách Microsoft Navision đã được đăng xuất khỏi hệ thống. Điều này bao gồm người dùng máy khách Dịch vụ Ứng dụng Microsoft Navision (NAS). Bạn nên là người dùng khách duy nhất đăng nhập khi bạn thực hiện hotfix này.

Để thực hiện hotfix này, bạn phải có giấy phép nhà phát triển.

Chúng tôi khuyên bạn nên gán tài khoản người dùng trong cửa sổ Đăng nhập Windows hoặc trong cửa sổ Đăng nhập Cơ sở dữ liệu. Nếu tài khoản người dùng không thể được gán ID vai trò "SIÊU", bạn phải xác minh rằng tài khoản người dùng có các quyền sau đây:

  • Quyền Sửa đổi đối với đối tượng mà bạn sẽ thay đổi.
  • Quyền Thực thi đối với đối tượng ID Đối tượng Hệ thống 5210 và đối với đối tượng ID Đối tượng Hệ thống 9015.

                
Lưu ý Bạn không phải có quyền đối với các kho dữ liệu trừ khi bạn phải thực hiện sửa chữa dữ liệu.

Thay đổi mã

Lưu ý Luôn kiểm tra các bản sửa lỗi mã trong môi trường được kiểm soát trước khi bạn áp dụng các bản sửa lỗi cho máy tính sản xuất của bạn.

Để giải quyết vấn đề này, hãy làm theo các bước sau:

  1. Thay đổi mã trong trường trong bảng Dòng Số tiền Thuế Bán hàng (10011) như sau:
    Mã hiện có

    ...
    ESM=Es Informe jurisdicci¢n;
                                                                    FRC=Est une juridiction fiscale;
                                                                    ENC=Is Report-to Jurisdiction];
                                                         Editable=No }
        }
        KEYS
        {
          {    ;Tax Area Code for Key,Tax Jurisdiction Code,Tax %,Tax Group Code,Expense/Capitalize,Tax Type,Use Tax;
    ...
    

    Mã thay thế

    ...
    
    ESM=Es Informe jurisdicci¢n;
                                                                    FRC=Est une juridiction fiscale;
                                                                    ENC=Is Report-to Jurisdiction];
                                                         Editable=No }
    
    // Add the following line.
    { 10044;  ;Tax Base Amount FCY ;Decimal        }
    // End of the added line.
    
        }
        KEYS
        {
          {    ;Tax Area Code for Key,Tax Jurisdiction Code,Tax %,Tax Group Code,Expense/Capitalize,Tax Type,Use Tax;
    ...
    
  2. Thay đổi mã trong hàm PostSalesTaxToGL trong codeunit Sales-Post (80) như sau:
    Mã hiện có

    ...
    END;
                  GenJnlLine."Tax Jurisdiction Code" := TempSalesTaxAmtLine."Tax Jurisdiction Code";
                  IF TempSalesTaxAmtLine."Tax Amount" <> 0 THEN BEGIN
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt +
    
    // Delete the following lines.
                      CurrExchRate.ExchangeAmtLCYToFCY(
                        UseDate,SalesHeader."Currency Code",TempSalesTaxAmtLine."Tax Amount",SalesHeader."Currency Factor");
    // End of the deleted lines.
    
                    GenJnlLine."Source Curr. VAT Amount" :=
                      SalesTaxCalculate.ArithmeticRound(RemSalesTaxSrcAmt,Currency."Amount Rounding Precision");
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt - GenJnlLine."Source Curr. VAT Amount";
                    RemSalesTaxAmt := RemSalesTaxAmt + TempSalesTaxAmtLine."Tax Amount";
    ...
    

    Mã thay thế

    ...
    END;
                  GenJnlLine."Tax Jurisdiction Code" := TempSalesTaxAmtLine."Tax Jurisdiction Code";
                  IF TempSalesTaxAmtLine."Tax Amount" <> 0 THEN BEGIN
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt +
    
    // Add the following lines.
                      TempSalesTaxAmtLine."Tax Base Amount FCY" * TempSalesTaxAmtLine."Tax %" / 100;
    // End of the added lines.
    
                    GenJnlLine."Source Curr. VAT Amount" :=
                      SalesTaxCalculate.ArithmeticRound(RemSalesTaxSrcAmt,Currency."Amount Rounding Precision");
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt - GenJnlLine."Source Curr. VAT Amount";
                    RemSalesTaxAmt := RemSalesTaxAmt + TempSalesTaxAmtLine."Tax Amount";
    ...
    
  3. Thay đổi mã trong hàm PostSalesTaxToGL trong Codeunit Purch.-Post (90) như sau:
    Mã hiện có

    ...
    END;
                  GenJnlLine."Tax Jurisdiction Code" := TempSalesTaxAmtLine."Tax Jurisdiction Code";
                  IF TempSalesTaxAmtLine."Tax Amount" <> 0 THEN BEGIN
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt +
    
    // Delete the following lines.
                      CurrExchRate.ExchangeAmtLCYToFCY(
                        Usedate,PurchHeader."Currency Code",TempSalesTaxAmtLine."Tax Amount",PurchHeader."Currency Factor");
    // End of the deleted lines.
    
                    GenJnlLine."Source Curr. VAT Amount" :=
                      SalesTaxCalculate.ArithmeticRound(RemSalesTaxSrcAmt,Currency."Amount Rounding Precision");
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt - GenJnlLine."Source Curr. VAT Amount";
                    RemSalesTaxAmt := RemSalesTaxAmt + TempSalesTaxAmtLine."Tax Amount";
    ...
    

    Mã thay thế

    ...
    END;
                  GenJnlLine."Tax Jurisdiction Code" := TempSalesTaxAmtLine."Tax Jurisdiction Code";
                  IF TempSalesTaxAmtLine."Tax Amount" <> 0 THEN BEGIN
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt +
    
    // Add the following line.
                      TempSalesTaxAmtLine."Tax Base Amount FCY" * TempSalesTaxAmtLine."Tax %" / 100;
    // End of the added line.
    
                    GenJnlLine."Source Curr. VAT Amount" :=
                      SalesTaxCalculate.ArithmeticRound(RemSalesTaxSrcAmt,Currency."Amount Rounding Precision");
                    RemSalesTaxSrcAmt := RemSalesTaxSrcAmt - GenJnlLine."Source Curr. VAT Amount";
                    RemSalesTaxAmt := RemSalesTaxAmt + TempSalesTaxAmtLine."Tax Amount";
    ...
    
  4. Thay đổi mã trong hàm PostProvincialSalesTaxToGL trong Codeunit Purch.-Post (90) như sau:
    Mã hiện có

    ...
    TaxJurisdiction.TESTFIELD("Tax Account (Purchases)");
                      GenJnlLine."Account No." := TaxJurisdiction."Tax Account (Purchases)";
                    END;
                    GenJnlLine.Amount := GenJnlLine."VAT Amount";
    
    // Delete the following lines.
                    GenJnlLine."Source Curr. VAT Base Amount" := 0;
                    GenJnlLine."VAT Base Amount (LCY)" := 0;
                    GenJnlLine."VAT Base Amount" := 0;
                    GenJnlLine."Source Curr. VAT Amount" := 0;
    // End of the deleted lines.
    
                    GenJnlLine."VAT Amount (LCY)" := 0;
                    GenJnlLine."VAT Amount" := 0;
                    GenJnlLine.Quantity := 0;
                    GenJnlLine."VAT Difference" := 0;
    ...
    

    Mã thay thế

    ...
    TaxJurisdiction.TESTFIELD("Tax Account (Purchases)");
                      GenJnlLine."Account No." := TaxJurisdiction."Tax Account (Purchases)";
                    END;
                    GenJnlLine.Amount := GenJnlLine."VAT Amount";
    
    // Add the following lines.
                    GenJnlLine."Source Currency Amount" := GenJnlLine."Source Curr. VAT Amount";
                    GenJnlLine."Source Curr. VAT Base Amount" := 0;
                    GenJnlLine."VAT Base Amount (LCY)" := 0;
                    GenJnlLine."VAT Base Amount" := 0;
    // End of the added lines.
    
                    GenJnlLine."VAT Amount (LCY)" := 0;
                    GenJnlLine."VAT Amount" := 0;
                    GenJnlLine.Quantity := 0;
                    GenJnlLine."VAT Difference" := 0;
    ...
    
  5. Thay đổi mã trong hàm AddSalesLine trong Đơn vị Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Round Tax" := TaxArea."Round Tax";
                    TaxJurisdiction.GET("Tax Jurisdiction Code");
                    "Is Report-to Jurisdiction" := ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                  END;
    
    // Delete the following line.
                  "Tax Base Amount" := (SalesLine."Line Amount" - SalesLine."Inv. Discount Amount") / ExchangeFactor;
    // End of the deleted line.
    
                  "Line Amount" := SalesLine."Line Amount" / ExchangeFactor;
                  "Tax Liable" := SalesLine."Tax Liable";
                  Quantity := SalesLine."Quantity (Base)";
                  "Invoice Discount Amount" := SalesLine."Inv. Discount Amount";
    ...
    

    Mã thay thế 1

    ...
    "Round Tax" := TaxArea."Round Tax";
                    TaxJurisdiction.GET("Tax Jurisdiction Code");
                    "Is Report-to Jurisdiction" := ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                  END;
    
    // Add the following line.
                  SetTaxBaseAmount(TempSalesTaxLine,SalesLine."Line Amount" - SalesLine."Inv. Discount Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                  "Line Amount" := SalesLine."Line Amount" / ExchangeFactor;
                  "Tax Liable" := SalesLine."Tax Liable";
                  Quantity := SalesLine."Quantity (Base)";
                  "Invoice Discount Amount" := SalesLine."Inv. Discount Amount";
    ...
    

    Mã hiện có 2

    ...
    END ELSE BEGIN
                  "Line Amount" := "Line Amount" + (SalesLine."Line Amount" / ExchangeFactor);
                  IF SalesLine."Tax Liable" THEN
                    "Tax Liable" := SalesLine."Tax Liable";
    
    // Delete the following line.
                  "Tax Base Amount" := "Tax Base Amount" + ((SalesLine."Line Amount" - SalesLine."Inv. Discount Amount") / ExchangeFactor);
    // End of the deleted line.
    
                  "Tax Amount" := 0;
                  Quantity := Quantity + SalesLine."Quantity (Base)";
                  "Invoice Discount Amount" := "Invoice Discount Amount" + SalesLine."Inv. Discount Amount";
                  MODIFY;
    ...
    

    Mã thay thế 2

    ...
    END ELSE BEGIN
                  "Line Amount" := "Line Amount" + (SalesLine."Line Amount" / ExchangeFactor);
                  IF SalesLine."Tax Liable" THEN
                    "Tax Liable" := SalesLine."Tax Liable";
    
    // Add the following line.
                  SetTaxBaseAmount(TempSalesTaxLine,SalesLine."Line Amount" - SalesLine."Inv. Discount Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                  "Tax Amount" := 0;
                  Quantity := Quantity + SalesLine."Quantity (Base)";
                  "Invoice Discount Amount" := "Invoice Discount Amount" + SalesLine."Inv. Discount Amount";
                  MODIFY;
    ...
    
  6. Thay đổi mã trong hàm AddSalesInvoiceLines trong Codeunit Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := SalesInvoiceLine."Line Amount" / ExchangeFactor;
    
    // Delete the following line.
                         "Tax Base Amount" := SalesInvoiceLine."VAT Base Amount" / ExchangeFactor;
    // End of the deleted line.
    
                         Quantity := SalesInvoiceLine.Quantity;
                         "Tax Liable" := SalesInvoiceLine."Tax Liable";
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
                         InsertRec := TRUE;
    ...
    

    Mã thay thế 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := SalesInvoiceLine."Line Amount" / ExchangeFactor;
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,SalesInvoiceLine."VAT Base Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                         Quantity := SalesInvoiceLine.Quantity;
                         "Tax Liable" := SalesInvoiceLine."Tax Liable";
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
                         InsertRec := TRUE;
    ...
    

    Mã hiện có 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (SalesInvoiceLine."Line Amount" / ExchangeFactor);
    
    // Delete the following line.
                         "Tax Base Amount" := "Tax Base Amount" + (SalesInvoiceLine."VAT Base Amount" / ExchangeFactor);
    // End of the deleted line.
    
                         Quantity := Quantity + SalesInvoiceLine.Quantity;
                         IF SalesInvoiceLine."Tax Liable" THEN
                           "Tax Liable" := SalesInvoiceLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    

    Mã thay thế 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (SalesInvoiceLine."Line Amount" / ExchangeFactor);
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,SalesInvoiceLine."VAT Base Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                         Quantity := Quantity + SalesInvoiceLine.Quantity;
                         IF SalesInvoiceLine."Tax Liable" THEN
                           "Tax Liable" := SalesInvoiceLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    
  7. Thay đổi mã trong hàm AddSalesCrMemoLines trong Codeunit Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := SalesCrMemoLine."Line Amount" / ExchangeFactor;
    
    // Delete the following line.
                         "Tax Base Amount" := SalesCrMemoLine."VAT Base Amount" / ExchangeFactor;
    // End of the deleted line.
    
                         Quantity := SalesCrMemoLine.Quantity;
                         "Tax Liable" := SalesCrMemoLine."Tax Liable";
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
                         InsertRec := TRUE;
    ...
    

    Mã thay thế 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := SalesCrMemoLine."Line Amount" / ExchangeFactor;
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,SalesCrMemoLine."VAT Base Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                         Quantity := SalesCrMemoLine.Quantity;
                         "Tax Liable" := SalesCrMemoLine."Tax Liable";
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
                         InsertRec := TRUE;
    ...
    

    Mã hiện có 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (SalesCrMemoLine."Line Amount" / ExchangeFactor);
    
    // Delete the following line.
                         "Tax Base Amount" := "Tax Base Amount" + (SalesCrMemoLine."VAT Base Amount" / ExchangeFactor);
    // End of the deleted line.
    
                         Quantity := Quantity + SalesCrMemoLine.Quantity;
                         IF SalesCrMemoLine."Tax Liable" THEN
                           "Tax Liable" := SalesCrMemoLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    

    Mã thay thế 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (SalesCrMemoLine."Line Amount" / ExchangeFactor);
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,SalesCrMemoLine."VAT Base Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                         Quantity := Quantity + SalesCrMemoLine.Quantity;
                         IF SalesCrMemoLine."Tax Liable" THEN
                           "Tax Liable" := SalesCrMemoLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    
  8. Thay đổi mã trong hàm AddPurchLine trong Codeunit Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Round Tax" := TaxArea."Round Tax";
                    TaxJurisdiction.GET("Tax Jurisdiction Code");
                    "Is Report-to Jurisdiction" := ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                  END;
    
    // Delete the following line.
                  "Tax Base Amount" := (PurchLine."Line Amount" - PurchLine."Inv. Discount Amount") / ExchangeFactor;
    // End of the deleted line.
    
                  "Line Amount" := PurchLine."Line Amount" / ExchangeFactor;
                  "Tax Liable" := PurchLine."Tax Liable";
                  "Use Tax" := PurchLine."Use Tax";
    ...
    

    Mã thay thế 1

    ...
    "Round Tax" := TaxArea."Round Tax";
                    TaxJurisdiction.GET("Tax Jurisdiction Code");
                    "Is Report-to Jurisdiction" := ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                  END;
    
    // Add the following line.
                  SetTaxBaseAmount(TempSalesTaxLine,PurchLine."Line Amount" - PurchLine."Inv. Discount Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
              "Line Amount" := PurchLine."Line Amount" / ExchangeFactor;
                  "Tax Liable" := PurchLine."Tax Liable";
                  "Use Tax" := PurchLine."Use Tax";
    ...
    

    Mã hiện có 2

    ...
    END ELSE BEGIN
                  "Line Amount" := "Line Amount" + (PurchLine."Line Amount" / ExchangeFactor);
                  IF PurchLine."Tax Liable" THEN
                    "Tax Liable" := PurchLine."Tax Liable";
    
    // Delete the following line.
                  "Tax Base Amount" := "Tax Base Amount" + ((PurchLine."Line Amount" - PurchLine."Inv. Discount Amount") / ExchangeFactor);
    // End of the deleted line.
    
                  "Tax Amount" := 0;
                  Quantity := Quantity + PurchLine."Quantity (Base)";
                  "Invoice Discount Amount" := "Invoice Discount Amount" + PurchLine."Inv. Discount Amount";
                  MODIFY;
    ...
    

    Mã thay thế 2

    ...
    END ELSE BEGIN
                  "Line Amount" := "Line Amount" + (PurchLine."Line Amount" / ExchangeFactor);
                  IF PurchLine."Tax Liable" THEN
                    "Tax Liable" := PurchLine."Tax Liable";
    
    // Add the following line.
                  SetTaxBaseAmount(TempSalesTaxLine,PurchLine."Line Amount" - PurchLine."Inv. Discount Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                  "Tax Amount" := 0;
                  Quantity := Quantity + PurchLine."Quantity (Base)";
                  "Invoice Discount Amount" := "Invoice Discount Amount" + PurchLine."Inv. Discount Amount";
                  MODIFY;
    ...
    
  9. Thay đổi mã trong hàm AddPurchInvoiceLines trong Codeunit Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := PurchInvLine."Line Amount" / ExchangeFactor;
    
    // Delete the following line.
                         "Tax Base Amount" := PurchInvLine."VAT Base Amount" / ExchangeFactor;
    // End of the deleted line.
    
                         Quantity := PurchInvLine.Quantity;
                         "Tax Liable" := PurchInvLine."Tax Liable";
                         "Use Tax" := PurchInvLine."Use Tax";
    ...
    

    Mã thay thế 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := PurchInvLine."Line Amount" / ExchangeFactor;
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,PurchInvLine."VAT Base Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                         Quantity := PurchInvLine.Quantity;
                         "Tax Liable" := PurchInvLine."Tax Liable";
                         "Use Tax" := PurchInvLine."Use Tax";
    ...
    

    Mã hiện có 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (PurchInvLine."Line Amount" / ExchangeFactor);
    
    // Delete the following line.
                         "Tax Base Amount" := "Tax Base Amount" + (PurchInvLine."VAT Base Amount" / ExchangeFactor);
    // End of the deleted line.
    
                         Quantity := Quantity + PurchInvLine.Quantity;
                         IF PurchInvLine."Tax Liable" THEN
                           "Tax Liable" := PurchInvLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    

    Mã thay thế 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (PurchInvLine."Line Amount" / ExchangeFactor);
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,PurchInvLine."VAT Base Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                         Quantity := Quantity + PurchInvLine.Quantity;
                         IF PurchInvLine."Tax Liable" THEN
                           "Tax Liable" := PurchInvLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    
  10. Thay đổi mã trong hàm AddPurchCrMemoLines trong Codeunit Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := PurchCrMemoLine."Line Amount" / ExchangeFactor;
    
    // Delete the following line.
                         "Tax Base Amount" := PurchCrMemoLine."VAT Base Amount" / ExchangeFactor;
    // End of the deleted line.
    
                         Quantity := PurchCrMemoLine.Quantity;
                         "Tax Liable" := PurchCrMemoLine."Tax Liable";
                         "Use Tax" := PurchCrMemoLine."Use Tax";
    ...
    

    Mã thay thế 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := PurchCrMemoLine."Line Amount" / ExchangeFactor;
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,PurchCrMemoLine."VAT Base Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                         Quantity := PurchCrMemoLine.Quantity;
                         "Tax Liable" := PurchCrMemoLine."Tax Liable";
                         "Use Tax" := PurchCrMemoLine."Use Tax";
    ...
    

    Mã hiện có 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (PurchCrMemoLine."Line Amount" / ExchangeFactor);
    
    // Delete the following line.
                         "Tax Base Amount" := "Tax Base Amount" + (PurchCrMemoLine."VAT Base Amount" / ExchangeFactor);
    // End of the deleted line.
    
                         Quantity := Quantity + PurchCrMemoLine.Quantity;
                         IF PurchCrMemoLine."Tax Liable" THEN
                           "Tax Liable" := PurchCrMemoLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    

    Mã thay thế 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (PurchCrMemoLine."Line Amount" / ExchangeFactor);
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,PurchCrMemoLine."VAT Base Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                         Quantity := Quantity + PurchCrMemoLine.Quantity;
                         IF PurchCrMemoLine."Tax Liable" THEN
                           "Tax Liable" := PurchCrMemoLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    
  11. Thay đổi mã trong hàm AddServiceLine trong Codeunit Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Round Tax" := TaxArea."Round Tax";
                    TaxJurisdiction.GET("Tax Jurisdiction Code");
                    "Is Report-to Jurisdiction" := ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                  END;
    
    // Delete the following line.
                  "Tax Base Amount" := (ServiceLine."Line Amount" - ServiceLine."Inv. Discount Amount") / ExchangeFactor;
    // End of the deleted line.
    
                  "Line Amount" := ServiceLine."Line Amount" / ExchangeFactor;
                  "Tax Liable" := ServiceLine."Tax Liable";
                  Quantity := ServiceLine."Quantity (Base)";
                  "Invoice Discount Amount" := ServiceLine."Inv. Discount Amount";
    ...
    

    Mã thay thế 1

    ...
    "Round Tax" := TaxArea."Round Tax";
                    TaxJurisdiction.GET("Tax Jurisdiction Code");
                    "Is Report-to Jurisdiction" := ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                  END;
    
    // Add the following line.
                  SetTaxBaseAmount(TempSalesTaxLine,ServiceLine."Line Amount" - ServiceLine."Inv. Discount Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                  "Line Amount" := ServiceLine."Line Amount" / ExchangeFactor;
                  "Tax Liable" := ServiceLine."Tax Liable";
                  Quantity := ServiceLine."Quantity (Base)";
                  "Invoice Discount Amount" := ServiceLine."Inv. Discount Amount";
    ...
    

    Mã hiện có 2

    ...
    END ELSE BEGIN
                  "Line Amount" := "Line Amount" + (ServiceLine."Line Amount" / ExchangeFactor);
                  IF ServiceLine."Tax Liable" THEN
                    "Tax Liable" := ServiceLine."Tax Liable";
    
    // Delete the following line.
                  "Tax Base Amount" :=
                    "Tax Base Amount" + ((ServiceLine."Line Amount" - ServiceLine."Inv. Discount Amount") / ExchangeFactor);
    // End of the deleted line.
    
              "Tax Amount" := 0;
                  Quantity := Quantity + ServiceLine."Quantity (Base)";
                  "Invoice Discount Amount" := "Invoice Discount Amount" + ServiceLine."Inv. Discount Amount";
                  MODIFY;
    ...
    

    Mã thay thế 2

    ...
    END ELSE BEGIN
                  "Line Amount" := "Line Amount" + (ServiceLine."Line Amount" / ExchangeFactor);
                  IF ServiceLine."Tax Liable" THEN
                    "Tax Liable" := ServiceLine."Tax Liable";
    
    // Add the following line.
                  SetTaxBaseAmount(TempSalesTaxLine,ServiceLine."Line Amount" - ServiceLine."Inv. Discount Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                  "Tax Amount" := 0;
                  Quantity := Quantity + ServiceLine."Quantity (Base)";
                  "Invoice Discount Amount" := "Invoice Discount Amount" + ServiceLine."Inv. Discount Amount";
                  MODIFY;
    ...
    
  12. Thay đổi mã trong hàm AddServInvoiceLines trong Đơn vị Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := ServInvLine."Line Amount" / ExchangeFactor;
    
    // Delete the following lines.
                         "Tax Base Amount" := ServInvLine."VAT Base Amount" / ExchangeFactor;
                         Quantity := ServInvLine.Quantity;
                         "Tax Liable" := ServInvLine."Tax Liable";
    
    // End of the deleted line.
    
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
                         InsertRec := TRUE;
                         INSERT;
    ...
    

    Mã thay thế 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := ServInvLine."Line Amount" / ExchangeFactor;
    
    // Add the following lines.
                         SetTaxBaseAmount(TempSalesTaxLine,ServInvLine."VAT Base Amount",ExchangeFactor,FALSE);
                         Quantity := ServInvLine.Quantity;
                         "Tax Liable" := ServInvLine."Tax Liable";
    // End of the added lines.
    
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
                         InsertRec := TRUE;
                         INSERT;
    ...
    

    Mã hiện có 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (ServInvLine."Line Amount" / ExchangeFactor);
    
    // Delete the following line.
                         "Tax Base Amount" := "Tax Base Amount" + (ServInvLine."VAT Base Amount" / ExchangeFactor);
    // End of the deleted line.
    
                         Quantity := Quantity + ServInvLine.Quantity;
                         IF ServInvLine."Tax Liable" THEN
                           "Tax Liable" := ServInvLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    

    Mã thay thế 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (ServInvLine."Line Amount" / ExchangeFactor);
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,ServInvLine."VAT Base Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                         Quantity := Quantity + ServInvLine.Quantity;
                         IF ServInvLine."Tax Liable" THEN
                           "Tax Liable" := ServInvLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    
  13. Thay đổi mã trong hàm AddServCrMemoLines trong Đơn vị Tính Thuế Bán hàng (398) như sau:
    Mã hiện có 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := ServCrMemoLine."Line Amount" / ExchangeFactor;
    
    // Delete the following line.
                         "Tax Base Amount" := ServCrMemoLine."VAT Base Amount" / ExchangeFactor;
    // End of the deleted line.
    
                         Quantity := ServCrMemoLine.Quantity;
                         "Tax Liable" := ServCrMemoLine."Tax Liable";
    
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
    ...
    

    Mã thay thế 1

    ...
    "Is Report-to Jurisdiction" :=
                             ("Tax Jurisdiction Code" = TaxJurisdiction."Report-to Jurisdiction");
                         END;
                         "Line Amount" := ServCrMemoLine."Line Amount" / ExchangeFactor;
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,ServCrMemoLine."VAT Base Amount",ExchangeFactor,FALSE);
    // End of the added line.
    
                         Quantity := ServCrMemoLine.Quantity;
                         "Tax Liable" := ServCrMemoLine."Tax Liable";
    
                         "Calculation Order" :=  TaxAreaLine."Calculation Order";
    ...
    

    Mã hiện có 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (ServCrMemoLine."Line Amount" / ExchangeFactor);
    
    // Delete the following line.
                         "Tax Base Amount" := "Tax Base Amount" + (ServCrMemoLine."VAT Base Amount" / ExchangeFactor);
    // End of the deleted line.
    
                         Quantity := Quantity + ServCrMemoLine.Quantity;
                         IF ServCrMemoLine."Tax Liable" THEN
                           "Tax Liable" := ServCrMemoLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    

    Mã thay thế 2

    ...
    InsertRec := TRUE;
                         INSERT;
                       END ELSE BEGIN
                         "Line Amount" := "Line Amount" + (ServCrMemoLine."Line Amount" / ExchangeFactor);
    
    // Add the following line.
                         SetTaxBaseAmount(TempSalesTaxLine,ServCrMemoLine."VAT Base Amount",ExchangeFactor,TRUE);
    // End of the added line.
    
                         Quantity := Quantity + ServCrMemoLine.Quantity;
                         IF ServCrMemoLine."Tax Liable" THEN
                           "Tax Liable" := ServCrMemoLine."Tax Liable";
                         InsertRec := FALSE;
    ...
    
  14. Thêm hàm SetTaxBaseAmount vào Codeunit Tính Thuế Bán hàng (398) như sau:

    LOCAL PROCEDURE SetTaxBaseAmount@1020031(VAR SalesTaxAmountLine@1020001 : Record 10011;Value@1020000 : Decimal;ExchangeFactor@1020002 : Decimal;Increment@1020003 : Boolean);
          BEGIN
            WITH SalesTaxAmountLine DO BEGIN
              IF Increment THEN
                "Tax Base Amount FCY" += Value
              ELSE
                "Tax Base Amount FCY" := Value;
              "Tax Base Amount" := "Tax Base Amount FCY" / ExchangeFactor;
            END;
          END;
    

            
          

Điều kiện tiên quyết

Bạn phải cài đặt một trong các sản phẩm sau để áp dụng bản cập nhật nóng này:

  • Phiên bản Bắc Mỹ của Microsoft Dynamics NAV 2009 R2
  • Phiên bản Bắc Mỹ của Microsoft Dynamics NAV 2009 Gói Dịch vụ 1

Loại bỏ thông tin

Bạn không thể loại bỏ hotfix này.

Trạng thái

Microsoft đã xác nhận rằng đây là sự cố trong các sản phẩm của Microsoft được liệt kê trong mục "áp dụng cho".

Lưu ý Đây là bài viết "PHÁT HÀNH NHANH" được tạo trực tiếp từ trong tổ chức hỗ trợ của Microsoft. Thông tin có trong tài liệu này được cung cấp tương tự để đáp ứng các vấn đề mới xuất hiện. Do tốc độ làm cho nó có sẵn, các tài liệu có thể bao gồm lỗi đánh máy và có thể được sửa đổi bất cứ lúc nào mà không cần thông báo. Hãy xem Điều khoản Sử dụng để biết những điều cần cân nhắc khác.