บทความนี้ใช้กับ Microsoft Dynamics NAV สําหรับตําแหน่งที่ตั้งของภาษาอเมริกาเหนือ (na)
อาการ
สมมติว่า คุณเปิดใช้งานพารามิเตอร์สรุปต่อผู้จัดจําหน่ายในแบบฟอร์มแนะนํา Payments ผู้จัดจําหน่ายใน Microsoft Dynamics NAV 2009 Service Pack 1 รุ่นอเมริกาเหนือ เมื่อคุณลงรายการบัญชีการชําระเงินบางส่วนในใบแจ้งหนี้สําหรับธนาคาร EFT และผู้จัดจําหน่าย คุณสังเกตเห็นว่า รายงานการชําระเงินผ่านธนาคารที่เกี่ยวข้องแสดงข้อมูลที่ไม่ถูกต้อง
การแก้ปัญหา
ข้อมูลโปรแกรมแก้ไขด่วน
โปรแกรมแก้ไขด่วนที่ได้รับการสนับสนุนจาก 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
หมายเหตุ คุณไม่มีสิทธิ์ในที่เก็บข้อมูล เว้นแต่คุณจะต้องดําเนินการซ่อมแซมข้อมูล
การเปลี่ยนแปลงโค้ด
หมายเหตุ ทดสอบการแก้ไขรหัสเสมอในสภาพแวดล้อมที่ควบคุมก่อนที่คุณจะนําการแก้ไขไปใช้กับคอมพิวเตอร์การผลิตของคุณ
เมื่อต้องการแก้ไขปัญหานี้ ให้ทําตามขั้นตอนต่อไปนี้:
เปลี่ยนรหัสในทริกเกอร์ OnAfterGetRecord ของรุ่น ข้อมูลของบรรทัดสมุดรายวันในรายงาน Payments ส่งออกอิเล็กทรอนิกส์ (10083) ดังนี้:
รหัสสรรพสามิต... VendLedgEntry.CALCFIELDS("Remaining Amt. (LCY)"); IF (VendLedgEntry."Pmt. Discount Date" >= SettleDate) AND (VendLedgEntry."Remaining Pmt. Disc. Possible" <>0) AND (-(ExportAmount + VendLedgEntry."Remaining Pmt. Disc. Possible") >= -VendLedgEntry."Remaining Amt. (LCY)") THEN BEGIN DiscountTaken := -VendLedgEntry."Remaining Pmt. Disc. Possible"; AmountPaid := -(VendLedgEntry."Remaining Amt. (LCY)" - VendLedgEntry."Remaining Pmt. Disc. Possible"); END ELSE IF -ExportAmount > -VendLedgEntry."Remaining Amt. (LCY)" THEN AmountPaid := -VendLedgEntry."Remaining Amt. (LCY)" ELSE AmountPaid := -ExportAmount; END; ... CustLedgEntry.CALCFIELDS("Remaining Amt. (LCY)"); IF (CustLedgEntry."Pmt. Discount Date" >= SettleDate) AND (CustLedgEntry."Remaining Pmt. Disc. Possible" <>0) AND (-(ExportAmount - CustLedgEntry."Remaining Pmt. Disc. Possible") >= -CustLedgEntry."Remaining Amt. (LCY)") THEN BEGIN DiscountTaken := -CustLedgEntry."Remaining Pmt. Disc. Possible"; AmountPaid := -(CustLedgEntry."Remaining Amt. (LCY)" - CustLedgEntry."Remaining Pmt. Disc. Possible"); END ELSE IF -ExportAmount > -CustLedgEntry."Remaining Amt. (LCY)" THEN AmountPaid := -CustLedgEntry."Remaining Amt. (LCY)" ELSE AmountPaid := -ExportAmount; END; ...รหัสทดแทน
... VendLedgEntry.CALCFIELDS("Remaining Amt. (LCY)"); IF (VendLedgEntry."Pmt. Discount Date" >= SettleDate) AND (VendLedgEntry."Remaining Pmt. Disc. Possible" <> 0) AND //Add the following line. (-(ExportAmount + VendLedgEntry."Remaining Pmt. Disc. Possible") >= -VendLedgEntry."Amount to Apply") //End of the added line. THEN BEGIN DiscountTaken := -VendLedgEntry."Remaining Pmt. Disc. Possible"; //Add the following lines. AmountPaid := -(VendLedgEntry."Amount to Apply" - VendLedgEntry."Remaining Pmt. Disc. Possible"); END ELSE IF -ExportAmount > -VendLedgEntry."Amount to Apply" THEN AmountPaid := -VendLedgEntry."Amount to Apply" //End of added lines. ELSE AmountPaid := -ExportAmount; END; ... CustLedgEntry.CALCFIELDS("Remaining Amt. (LCY)"); IF (CustLedgEntry."Pmt. Discount Date" >= SettleDate) AND (CustLedgEntry."Remaining Pmt. Disc. Possible" <> 0) AND //Add the following line. (-(ExportAmount - CustLedgEntry."Remaining Pmt. Disc. Possible") >= -CustLedgEntry."Amount to Apply") //End of the added line. THEN BEGIN DiscountTaken := -CustLedgEntry."Remaining Pmt. Disc. Possible"; //Add the following lines. AmountPaid := -(CustLedgEntry."Amount to Apply" - CustLedgEntry."Remaining Pmt. Disc. Possible"); END ELSE IF -ExportAmount > -CustLedgEntry."Amount to Apply" THEN AmountPaid := -CustLedgEntry."Amount to Apply" //End of the added lines. ELSE AmountPaid := -ExportAmount; END; ...เปลี่ยนรหัสในทริกเกอร์ OnAfterGetRecord ของไซต์ข้อมูลรายการบัญชีแยกประเภทของลูกค้าในรายงานส่งออก Payments อิเล็กทรอนิกส์ (10083) ดังนี้:
รหัสสรรพสามิต... CALCFIELDS("Remaining Amt. (LCY)"); IF ("Pmt. Discount Date" >= SettleDate) AND ("Remaining Pmt. Disc. Possible" <>0) AND ((-ExportAmount - TotalAmountPaid) - "Remaining Pmt. Disc. Possible" >= -"Remaining Amt. (LCY)") THEN BEGIN DiscountTaken := -"Remaining Pmt. Disc. Possible"; AmountPaid := -("Remaining Amt. (LCY)" - "Remaining Pmt. Disc. Possible"); END ELSE BEGIN DiscountTaken := 0; IF (-ExportAmount - TotalAmountPaid) > -"Remaining Amt. (LCY)" THEN AmountPaid := -"Remaining Amt. (LCY)" ELSE AmountPaid := -ExportAmount - TotalAmountPaid; END; TotalAmountPaid := TotalAmountPaid + AmountPaid; ...รหัสทดแทน
... CALCFIELDS("Remaining Amt. (LCY)"); IF ("Pmt. Discount Date" >= SettleDate) AND ("Remaining Pmt. Disc. Possible" <> 0) AND //Add the following line. ((-ExportAmount - TotalAmountPaid) - "Remaining Pmt. Disc. Possible" >= -"Amount to Apply") //End of added line. THEN BEGIN DiscountTaken := -"Remaining Pmt. Disc. Possible"; //Add the following line. AmountPaid := -("Amount to Apply" - "Remaining Pmt. Disc. Possible"); //End of added line. END ELSE BEGIN DiscountTaken := 0; //Add the following lines. IF (-ExportAmount - TotalAmountPaid) > -"Amount to Apply" THEN AmountPaid := -"Amount to Apply" //End of added lines. ELSE AmountPaid := -ExportAmount - TotalAmountPaid; END; TotalAmountPaid := TotalAmountPaid + AmountPaid; ...เปลี่ยนรหัสในทริกเกอร์ OnAfterGetRecord ของไซต์ข้อมูลรายการบัญชีแยกประเภทผู้ขายในรายงาน Payments ส่งออกอิเล็กทรอนิกส์ (10083) ดังนี้:
รหัสสรรพสามิต... CALCFIELDS("Remaining Amt. (LCY)"); IF ("Pmt. Discount Date" >= SettleDate) AND ("Remaining Pmt. Disc. Possible" <>0) AND ((-ExportAmount - TotalAmountPaid) - "Remaining Pmt. Disc. Possible" >= -"Remaining Amt. (LCY)") THEN BEGIN DiscountTaken := -"Remaining Pmt. Disc. Possible"; AmountPaid := -("Remaining Amt. (LCY)" - "Remaining Pmt. Disc. Possible"); END ELSE BEGIN DiscountTaken := 0; IF (-ExportAmount - TotalAmountPaid) > -"Remaining Amt. (LCY)" THEN AmountPaid := -"Remaining Amt. (LCY)" ELSE AmountPaid := -ExportAmount - TotalAmountPaid; END; TotalAmountPaid := TotalAmountPaid + AmountPaid; ...รหัสทดแทน
... CALCFIELDS("Remaining Amt. (LCY)"); IF ("Pmt. Discount Date" >= SettleDate) AND ("Remaining Pmt. Disc. Possible" <> 0) AND ((-ExportAmount - TotalAmountPaid) - "Remaining Pmt. Disc. Possible" >= -"Amount to Apply") THEN BEGIN DiscountTaken := -"Remaining Pmt. Disc. Possible"; AmountPaid := -("Amount to Apply" - "Remaining Pmt. Disc. Possible"); END ELSE BEGIN DiscountTaken := 0; IF (-ExportAmount - TotalAmountPaid) > -"Amount to Apply" THEN AmountPaid := -"Amount to Apply" ELSE AmountPaid := -ExportAmount - TotalAmountPaid; END; TotalAmountPaid := TotalAmountPaid + AmountPaid; ...เปลี่ยนรหัสในทริกเกอร์ OnAfterGetRecord ของ Dataitemin ที่ไม่ได้ใช้ รายงาน Payments ส่งออกอิเล็กทรอนิกส์ (10083) ดังนี้:
รหัสสรรพสามิต... AmountPaid := ExportAmount - TotalAmountPaid; ...รหัสทดแทน
... AmountPaid := -ExportAmount - TotalAmountPaid; ...
ข้อกำหนดเบื้องต้น
คุณต้องมี Microsoft Dynamics NAV 2009 Service Pack 1 รุ่นอเมริกาเหนือติดตั้งอยู่เพื่อใช้โปรแกรมแก้ไขด่วนนี้
ลบข้อมูลออก
คุณไม่สามารถลบโปรแกรมแก้ไขด่วนนี้ได้
สถานะ
Microsoft ได้ยืนยันว่านี่เป็นปัญหาที่เกิดขึ้นกับผลิตภัณฑ์ของ Microsoft ที่แสดงไว้ในส่วน "นำไปใช้กับ"
หมายเหตุ นี่คือบทความ "เผยแพร่อย่างรวดเร็ว" ที่สร้างขึ้นโดยตรงจากภายในองค์กรสนับสนุนของ Microsoft ข้อมูลที่อยู่ในที่นี้มีให้เพื่อตอบสนองต่อปัญหาที่เกิดขึ้นใหม่ เนื่องจากความเร็วในการทําให้พร้อมใช้งานวัสดุอาจรวมถึงข้อผิดพลาดในการพิมพ์และอาจได้รับการแก้ไขได้ตลอดเวลาโดยไม่ต้องแจ้งให้ทราบ ดู ข้อตกลงการใช้งาน สําหรับข้อควรพิจารณาอื่นๆ