บทความนี้ใช้กับ Microsoft สําหรับประเทศและภาษาต่อไปนี้
- อังกฤษ (แคนาดา) (en-ca)
- อังกฤษ (สหรัฐอเมริกา) (en-us)
- สเปน (เม็กซิโก) (es-mx)
- ฝรั่งเศส (แคนาดา) (fr-ca)
อาการ
สมมติว่า คุณตั้งค่า CAD เป็นสกุลเงินการรายงานเพิ่มเติมในกล่องโต้ตอบการตั้งค่าบัญชีแยกประเภททั่วไปใน Microsoft Dynamics NAV 2009 รุ่นอเมริกาเหนือ เมื่อคุณลงรายการบัญชีใบแจ้งหนี้การซื้อที่ประกอบด้วยภาษี คุณได้รับข้อความแสดงข้อผิดพลาดต่อไปนี้:
หมายเหตุ
ไม่สามารถทําธุรกรรมให้เสร็จสมบูรณ์ได้ เนื่องจากจะทําให้ธุรกรรมไม่สอดคล้องกันในตารางรายการ G/L ตรวจสอบตําแหน่งและวิธีใช้ฟังก์ชัน CONSISTENT ในธุรกรรมเพื่อค้นหาเหตุผลสําหรับข้อผิดพลาด
ปัญหานี้เกิดขึ้นในผลิตภัณฑ์ต่อไปนี้:
- Microsoft Dynamics NAV 2009 R2 เวอร์ชันอเมริกาเหนือ
- Microsoft Dynamics NAV 2009 Service Pack 1 เวอร์ชันอเมริกาเหนือ
การแก้ปัญหา
ข้อมูลโปรแกรมแก้ไขด่วน
โปรแกรมแก้ไขด่วนที่ได้รับการสนับสนุนจาก Microsoft พร้อมใช้งานแล้ว อย่างไรก็ตาม มีไว้เพื่อแก้ไขปัญหาที่อธิบายไว้ในบทความนี้เท่านั้น นําไปใช้กับระบบที่พบปัญหานี้โดยเฉพาะเท่านั้น โปรแกรมแก้ไขด่วนนี้อาจได้รับการทดสอบเพิ่มเติม ดังนั้น ถ้าคุณไม่ได้รับผลกระทบอย่างร้ายแรงจากปัญหานี้ เราขอแนะนําให้คุณรอ Service Pack 2009 สําหรับ Microsoft Dynamics NAV 2009 ถัดไป หรือ Microsoft Dynamics NAV เวอร์ชันถัดไปที่ประกอบด้วยโปรแกรมแก้ไขด่วนนี้
หมายเหตุ ในกรณีพิเศษ ค่าธรรมเนียมสําหรับการโทรติดต่อฝ่ายสนับสนุนตามปกติอาจถูกยกเลิกถ้าผู้เชี่ยวชาญฝ่ายสนับสนุนทางเทคนิคสําหรับ Microsoft Dynamics และผลิตภัณฑ์ที่เกี่ยวข้องระบุว่าการอัปเดตเฉพาะจะแก้ไขปัญหาของคุณได้ ค่าใช้จ่ายในการสนับสนุนปกติจะใช้กับคําถามและปัญหาการสนับสนุนเพิ่มเติมที่ไม่มีคุณสมบัติสําหรับการอัปเดตเฉพาะที่สงสัย
ข้อมูลการติดตั้ง
Microsoft แสดงตัวอย่างการเขียนโปรแกรมสําหรับภาพประกอบเท่านั้น โดยไม่มีการรับประกันทั้งโดยชัดแจ้งหรือโดยนัย ซึ่งรวมถึงแต่ไม่จํากัดเพียงการรับประกันโดยนัยถึงความสามารถในเชิงพาณิชย์หรือความเหมาะสมสําหรับวัตถุประสงค์เฉพาะ บทความนี้จะถือว่าคุณคุ้นเคยกับภาษาการเขียนโปรแกรมที่กําลังแสดงอยู่ และมีเครื่องมือที่ใช้สําหรับสร้างและแก้ไขจุดบกพร่องของกระบวนการ วิศวกรฝ่ายสนับสนุนของ Microsoft สามารถช่วยอธิบายฟังก์ชันการทํางานของกระบวนการเฉพาะได้ แต่จะไม่ปรับเปลี่ยนตัวอย่างเหล่านี้เพื่อให้มีฟังก์ชันการทํางานที่เพิ่มขึ้นหรือสร้างขั้นตอนต่างๆ เพื่อตอบสนองความต้องการเฉพาะของคุณ
หมายเหตุ ก่อนที่คุณจะติดตั้งโปรแกรมแก้ไขด่วนนี้ ตรวจสอบว่าผู้ใช้ไคลเอนต์ Microsoft Navision ทั้งหมดออกจากระบบ ซึ่งรวมถึงผู้ใช้ไคลเอนต์ Microsoft Navision Application Services (NAS) คุณควรเป็นผู้ใช้ไคลเอนต์เท่านั้นที่เข้าสู่ระบบเมื่อคุณใช้โปรแกรมแก้ไขด่วนนี้
เมื่อต้องการใช้โปรแกรมแก้ไขด่วนนี้
เราขอแนะนําให้ใช้บัญชีผู้ใช้ในหน้าต่าง ล็อกอินของ Windows หรือในหน้าต่าง ล็อกอินของฐานข้อมูล ถูกกําหนด ID บทบาท "SUPER" หากบัญชีผู้ใช้ไม่สามารถกําหนดรหัสบทบาท "SUPER" ได้ คุณต้องตรวจสอบว่าบัญชีผู้ใช้มีสิทธิ์ต่อไปนี้:
- สิทธิ์ในการปรับเปลี่ยนสําหรับวัตถุที่คุณจะเปลี่ยนแปลง
- สิทธิ์ Execute สําหรับวัตถุ System Object ID 5210 และสําหรับวัตถุ System Object ID 9015
หมายเหตุ คุณไม่มีสิทธิ์ในที่เก็บข้อมูล เว้นแต่คุณจะต้องดําเนินการซ่อมแซมข้อมูล
การเปลี่ยนแปลงโค้ด
หมายเหตุ ทดสอบการแก้ไขรหัสเสมอในสภาพแวดล้อมที่ควบคุมก่อนที่คุณจะนําการแก้ไขไปใช้กับคอมพิวเตอร์การผลิตของคุณ
เมื่อต้องการแก้ไขปัญหานี้ ให้ทําตามขั้นตอนต่อไปนี้:
เปลี่ยนรหัสในฟิลด์ในตารางบรรทัดยอดภาษีขาย (10011) ดังนี้:
รหัสที่มีอยู่... 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; ...รหัสทดแทน
... 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; ...เปลี่ยนรหัสในฟังก์ชัน PostSalesTaxToGL ใน Sales-Post Codeunit (80) ดังนี้:
รหัสที่มีอยู่... 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"; ...รหัสทดแทน
... 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"; ...เปลี่ยนรหัสในฟังก์ชัน PostSalesTaxToGL ใน Purch.-Post Codeunit (90) ดังต่อไปนี้:
รหัสที่มีอยู่... 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"; ...รหัสทดแทน
... 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"; ...เปลี่ยนรหัสในฟังก์ชัน PostProvincialSalesTaxToGL ใน Purch.-Post Codeunit (90) ดังนี้:
รหัสที่มีอยู่... 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; ...รหัสทดแทน
... 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; ...เปลี่ยนรหัสในฟังก์ชัน AddSalesLine ในโค้ดรันการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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"; ...รหัสทดแทน 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"; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddSalesInvoiceLines ในโค้ดหน่วยการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddSalesCrMemoLines ในโค้ดหน่วยการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddPurchLine ในโค้ดรันการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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"; ...รหัสทดแทน 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"; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddPurchInvoiceLines ในโค้ดหน่วยการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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"; ...รหัสทดแทน 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"; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddPurchCrMemoLines ในโค้ดหน่วยการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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"; ...รหัสทดแทน 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"; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddServiceLine ในโค้ดรันการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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"; ...รหัสทดแทน 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"; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddServInvoiceLines ในโค้ดหน่วยการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เปลี่ยนรหัสในฟังก์ชัน AddServCrMemoLines ในโค้ดหน่วยการคํานวณภาษีขาย (398) ดังนี้:
รหัสที่มีอยู่ 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"; ...รหัสทดแทน 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"; ...รหัสที่มีอยู่ 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; ...รหัสทดแทน 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; ...เพิ่มฟังก์ชัน SetTaxBaseAmount ในโค้ดรันการคํานวณภาษีขาย (398) ดังนี้:
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;
ข้อกำหนดเบื้องต้น
คุณต้องติดตั้งผลิตภัณฑ์ใดผลิตภัณฑ์หนึ่งต่อไปนี้เพื่อใช้โปรแกรมแก้ไขด่วนนี้:
- Microsoft Dynamics NAV 2009 R2 เวอร์ชันอเมริกาเหนือ
- Microsoft Dynamics NAV 2009 Service Pack 1 เวอร์ชันอเมริกาเหนือ
ลบข้อมูลออก
คุณไม่สามารถลบโปรแกรมแก้ไขด่วนนี้ได้
สถานะ
Microsoft ได้ยืนยันว่านี่เป็นปัญหาที่เกิดขึ้นกับผลิตภัณฑ์ของ Microsoft ที่แสดงไว้ในส่วน "นำไปใช้กับ"
หมายเหตุ นี่คือบทความ "เผยแพร่อย่างรวดเร็ว" ที่สร้างขึ้นโดยตรงจากภายในองค์กรสนับสนุนของ Microsoft ข้อมูลที่อยู่ในที่นี้มีให้เพื่อตอบสนองต่อปัญหาที่เกิดขึ้นใหม่ เนื่องจากความเร็วในการทําให้พร้อมใช้งานวัสดุอาจรวมถึงข้อผิดพลาดในการพิมพ์และอาจได้รับการแก้ไขได้ตลอดเวลาโดยไม่ต้องแจ้งให้ทราบ ดู ข้อตกลงการใช้งาน สําหรับข้อควรพิจารณาอื่นๆ