บทความนี้ใช้กับ Microsoft สําหรับทุกประเทศและทุกภาษา
อาการ
สมมติว่า คุณลงรายการบัญชีใบแจ้งหนี้สําหรับใบสั่งซื้อใน Microsoft Dynamics NAV 2009 จากนั้นคุณออกอินวอยซ์บรรทัดค่าธรรมเนียมสินค้าที่มีค่าปริมาณที่ระบุสําหรับใบสั่งซื้อ ในสถานการณ์นี้ เมื่อคุณดูรายการบัญชีแยกประเภทสินค้าสําหรับใบสั่งซื้อ จะไม่มีการลงทะเบียนค่าปริมาณสําหรับบรรทัดค่าธรรมเนียมสินค้า ปัญหานี้เกิดขึ้นในผลิตภัณฑ์ต่อไปนี้:
- 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
หมายเหตุ คุณไม่มีสิทธิ์ในที่เก็บข้อมูล เว้นแต่คุณจะต้องดําเนินการซ่อมแซมข้อมูล
การเปลี่ยนแปลงโค้ด
หมายเหตุ ทดสอบการแก้ไขรหัสเสมอในสภาพแวดล้อมที่ควบคุมก่อนที่คุณจะนําการแก้ไขไปใช้กับคอมพิวเตอร์การผลิตของคุณ
เมื่อต้องการแก้ไขปัญหานี้ ให้ทําตามขั้นตอนต่อไปนี้:
เปลี่ยนรหัสในทริกเกอร์ OnRun ในโค้ด unit Sales-Post (80) ดังนี้:
รหัสที่มีอยู่ 1... TempPrePmtAmtToDeduct@1003 : Decimal; TransactionLogEntryNo@1024 : Integer; BEGIN IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN ...รหัสทดแทน 1
... TempPrePmtAmtToDeduct@1003 : Decimal; TransactionLogEntryNo@1024 : Integer; // Add the following line. SalesLineForCharge@1025 : Record 37; BEGIN IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN ...รหัสที่มีอยู่ 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type"); // Delete the following line. TempItemChargeAssgntSales.SETFILTER("Applies-to Doc. Type",'<>%1',"Document Type"); TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No."); IF TempItemChargeAssgntSales.FINDSET THEN ...รหัสทดแทน 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type"); TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No."); IF TempItemChargeAssgntSales.FINDSET THEN ...รหัสที่มีอยู่ 3
... CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment: // Delete the following lines. PostItemChargePerShpt(SalesLine); TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt": PostItemChargePerRetRcpt(SalesLine); END; TempItemChargeAssgntSales.MARK(TRUE); // End of the lines. UNTIL TempItemChargeAssgntSales.NEXT = 0; END; END; ...รหัสทดแทน 3
... CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment: // Add the following line BEGIN PostItemChargePerShpt(SalesLine); TempItemChargeAssgntSales.MARK(TRUE); END; TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt": BEGIN PostItemChargePerRetRcpt(SalesLine); TempItemChargeAssgntSales.MARK(TRUE); END; TempItemChargeAssgntSales."Applies-to Doc. Type"::Order, TempItemChargeAssgntSales."Applies-to Doc. Type"::Invoice: BEGIN IF SalesLineForCharge.GET( TempItemChargeAssgntSales."Applies-to Doc. Type", TempItemChargeAssgntSales."Applies-to Doc. No.", TempItemChargeAssgntSales."Applies-to Doc. Line No.") THEN IF (SalesLineForCharge."Qty. to Ship (Base)" = 0) AND (SalesLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text054); END; TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Order", TempItemChargeAssgntSales."Applies-to Doc. Type"::"Credit Memo": BEGIN IF SalesLineForCharge.GET( TempItemChargeAssgntSales."Applies-to Doc. Type", TempItemChargeAssgntSales."Applies-to Doc. No.", TempItemChargeAssgntSales."Applies-to Doc. Line No.") THEN IF (SalesLineForCharge."Return Qty. to Receive (Base)" = 0) AND (SalesLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text054); END; END; // End of the lines. UNTIL TempItemChargeAssgntSales.NEXT = 0; END; END; ...รหัสที่มีอยู่ 4
... Text052@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text053@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); BEGIN ...รหัสทดแทน 4
... Text052@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text053@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; // Add the following line. Text054@1102601002 : TextConst 'ENU=The order line that the item charge has originally been assigned to has been partially or fully posted. You must reassign the item charge to the posted receipt or shipment instead.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); BEGIN ...เปลี่ยนรหัสในทริกเกอร์ OnRun ในชุดรหัสไปรษณีย์ (90) ดังต่อไปนี้:
รหัสที่มีอยู่ 1... ICInboxPurchHdr@1012 : Record 436; SalesHeader@1041 : Record 36; UpdateAnalysisView@1002 : Codeunit 410; UpdateItemAnalysisView@1008 : Codeunit 7150; ...รหัสทดแทน 1
... ICInboxPurchHdr@1012 : Record 436; SalesHeader@1041 : Record 36; // Add the following line. PurchLineForCharge@1042 : Record 39; UpdateAnalysisView@1002 : Codeunit 410; UpdateItemAnalysisView@1008 : Codeunit 7150; ...รหัสที่มีอยู่ 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntPurch.SETCURRENTKEY("Applies-to Doc. Type"); // Delete the following line. TempItemChargeAssgntPurch.SETFILTER("Applies-to Doc. Type",'<>%1',"Document Type"); TempItemChargeAssgntPurch.SETRANGE("Document Line No.",PurchLine."Line No."); IF TempItemChargeAssgntPurch.FINDSET THEN ...รหัสทดแทน 2
... ClearItemChargeAssgntFilter; TempItemChargeAssgntPurch.SETCURRENTKEY("Applies-to Doc. Type"); TempItemChargeAssgntPurch.SETRANGE("Document Line No.",PurchLine."Line No."); IF TempItemChargeAssgntPurch.FINDSET THEN ...รหัสที่มีอยู่ 3
... CASE TempItemChargeAssgntPurch."Applies-to Doc. Type" OF TempItemChargeAssgntPurch."Applies-to Doc. Type"::Receipt: // Delete the following lines. PostItemChargePerRcpt(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt": PostItemChargePerTransfer(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment": PostItemChargePerRetShpt(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment": PostItemChargePerSalesShpt(PurchLine); TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt": PostItemChargePerRetRcpt(PurchLine); END; TempItemChargeAssgntPurch.MARK(TRUE); // End of the lines. UNTIL TempItemChargeAssgntPurch.NEXT = 0; END; END; ...รหัสทดแทน 3
... CASE TempItemChargeAssgntPurch."Applies-to Doc. Type" OF TempItemChargeAssgntPurch."Applies-to Doc. Type"::Receipt: // Add the following lines. BEGIN PostItemChargePerRcpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Transfer Receipt": BEGIN PostItemChargePerTransfer(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Shipment": BEGIN PostItemChargePerRetShpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Sales Shipment": BEGIN PostItemChargePerSalesShpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Receipt": BEGIN PostItemChargePerRetRcpt(PurchLine); TempItemChargeAssgntPurch.MARK(TRUE); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::Order, TempItemChargeAssgntPurch."Applies-to Doc. Type"::Invoice: BEGIN IF PurchLineForCharge.GET( TempItemChargeAssgntPurch."Applies-to Doc. Type", TempItemChargeAssgntPurch."Applies-to Doc. No.", TempItemChargeAssgntPurch."Applies-to Doc. Line No.") THEN IF (PurchLineForCharge."Qty. to Receive (Base)" = 0) AND (PurchLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text061); END; TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Return Order", TempItemChargeAssgntPurch."Applies-to Doc. Type"::"Credit Memo": BEGIN IF PurchLineForCharge.GET( TempItemChargeAssgntPurch."Applies-to Doc. Type", TempItemChargeAssgntPurch."Applies-to Doc. No.", TempItemChargeAssgntPurch."Applies-to Doc. Line No.") THEN IF (PurchLineForCharge."Return Qty. to Ship (Base)" = 0) AND (PurchLineForCharge."Qty. to Invoice (Base)" = 0) THEN ERROR(Text061); END; END; // End of the lines. UNTIL TempItemChargeAssgntPurch.NEXT = 0; END; END; ...รหัสที่มีอยู่ 4
... Text059@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text060@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); ...รหัสทดแทน 4
... Text059@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.'; Text060@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.'; // Add the following line. Text061@1102601002 : TextConst 'ENU=The order line that the item charge has originally been assigned to has been partially or fully posted. You must reassign the item charge to the posted receipt or shipment instead.'; PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date); ...
ข้อกำหนดเบื้องต้น
คุณต้องติดตั้งผลิตภัณฑ์ใดผลิตภัณฑ์หนึ่งต่อไปนี้เพื่อใช้โปรแกรมแก้ไขด่วนนี้:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 Service Pack 1
ลบข้อมูลออก
คุณไม่สามารถลบโปรแกรมแก้ไขด่วนนี้ได้
สถานะ
Microsoft ได้ยืนยันว่านี่เป็นปัญหาที่เกิดขึ้นกับผลิตภัณฑ์ของ Microsoft ที่แสดงไว้ในส่วน "นำไปใช้กับ"
หมายเหตุ นี่คือบทความ "เผยแพร่อย่างรวดเร็ว" ที่สร้างขึ้นโดยตรงจากภายในองค์กรสนับสนุนของ Microsoft ข้อมูลที่อยู่ในที่นี้มีให้เพื่อตอบสนองต่อปัญหาที่เกิดขึ้นใหม่ เนื่องจากความเร็วในการทําให้พร้อมใช้งานวัสดุอาจรวมถึงข้อผิดพลาดในการพิมพ์และอาจได้รับการแก้ไขได้ตลอดเวลาโดยไม่ต้องแจ้งให้ทราบ ดู ข้อตกลงการใช้งาน สําหรับข้อควรพิจารณาอื่นๆ