ใช้บัญชี G/L ที่ไม่ถูกต้องเมื่อคุณลงรายการบัญชีการชําระเงินเพื่อนําใบแจ้งหนี้ที่มีการใช้ "VAT เต็มจํานวน" ไปใช้ หากเปิดใช้งานการตั้งค่า "ปรับปรุงส่วนลดในการชําระเงิน" ในแบบฟอร์ม "การตั้งค่าบัญชีแยกประเภททั่วไป" ใน Microsoft Dynamics NAV 2009

นำไปใช้กับ
Dynamics NAV 2009 Dynamics NAV 2009 Service Pack 1

บทความที่เผยแพร่อย่างรวดเร็วให้ข้อมูลโดยตรงจากภายในองค์กรสนับสนุนของ Microsoft ข้อมูลที่อยู่ในที่นี้จะถูกสร้างขึ้นเพื่อตอบสนองต่อหัวข้อที่เกิดขึ้นใหม่หรือเฉพาะ หรือมีวัตถุประสงค์เพื่อเพิ่มเติมข้อมูลฐานความรู้อื่นๆ

บทความนี้ใช้กับ Microsoft Dynamics NAV สําหรับทุกประเทศและทุกภาษา

อาการ

สมมติว่ามีการเลือกกล่องกาเครื่องหมาย ปรับปรุงส่วนลดในการชําระเงิน บนแท็บ ทั่วไป ในแบบฟอร์ม การตั้งค่าบัญชีแยกประเภททั่วไป ใน Microsoft Dynamics NAV 2009 หากคุณลงรายการบัญชีการชําระเงินเพื่อใช้ใบแจ้งหนี้ที่มีการใช้ "VAT เต็มจํานวน" และคุณหักส่วนลดการชําระเงินที่คุณต้องปรับ VAT สําหรับส่วนลดการชําระเงิน บัญชี G/L ที่ไม่ถูกต้องจะถูกใช้ รายการสําหรับการปรับปรุง "VAT เต็มจํานวน" จะถูกลงทะเบียนสําหรับบัญชีเดบิตส่วนลดการชําระเงินแทนบัญชีเครดิตส่วนลดการชําระเงินในรายการ G/L

การแก้ปัญหา

ข้อมูลโปรแกรมแก้ไขด่วน

โปรแกรมแก้ไขด่วนที่ได้รับการสนับสนุนจาก Microsoft พร้อมใช้งานแล้ว อย่างไรก็ตาม มีไว้เพื่อแก้ไขปัญหาที่อธิบายไว้ในบทความนี้เท่านั้น นําไปใช้กับระบบที่พบปัญหานี้โดยเฉพาะเท่านั้น โปรแกรมแก้ไขด่วนนี้อาจได้รับการทดสอบเพิ่มเติม ดังนั้น ถ้าคุณจะไม่ได้รับผลกระทบอย่างร้ายแรงจากปัญหานี้ เราขอแนะนําให้คุณรอ Service Pack ถัดไปของ 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

                
หมายเหตุ คุณไม่มีสิทธิ์ในที่เก็บข้อมูล เว้นแต่คุณจะต้องดําเนินการซ่อมแซมข้อมูล

การเปลี่ยนแปลงโค้ด

หมายเหตุ ทดสอบการแก้ไขรหัสเสมอในสภาพแวดล้อมที่ควบคุมก่อนที่คุณจะนําการแก้ไขไปใช้กับคอมพิวเตอร์การผลิตของคุณ

เมื่อต้องการติดตั้งโปรแกรมแก้ไขด่วนนี้ ให้เปลี่ยนรหัสในรุ่น Jnl.-Post Line codeunit (12)

เมื่อต้องการทำสิ่งนี้ ให้ทำตามขั้นตอนเหล่านี้:

  1. เปลี่ยนรหัสในฟังก์ชัน PostDtldCustLedgEntries ดังนี้:
    รหัสที่มีอยู่ 1

    …
                          GenPostingSetup.GET(
                            DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                            DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                          IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                            GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                            PaymentDiscAcc := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                          END ELSE BEGIN
    …
    
    

    รหัสทดแทน 1

    …
                          GenPostingSetup.GET(
                            DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                            DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                          IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                             (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                          THEN BEGIN
                            GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                            PaymentDiscAcc := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                          END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 2

    …
                          IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 2

    …
                          IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 3

    …
                          END ELSE IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 3

    …
                          END ELSE IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 4

    …
                          IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 4

    …
                          IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 5

    …
                          END ELSE IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 5

    …
                          END ELSE IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    
  2. เปลี่ยนรหัสในฟังก์ชัน AutoEntrForDtldCustLedgEntries ดังนี้:
    รหัสที่มีอยู่ 1

    …
                  GenPostingSetup.GET(
                    DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                    GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                    AccNo := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                  END ELSE BEGIN
    …
    
    

    รหัสทดแทน 1

    …
                  GenPostingSetup.GET(
                    DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                     (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                  THEN BEGIN
                    GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                    AccNo := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                  END ELSE BEGIN
    …
    
    
    

    รหัสที่มีอยู่ 2

    …
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  CASE GLSetup."Payment Tolerance Posting" OF
                    GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts":
                      IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                      END ELSE BEGIN
    …
    
    

    รหัสทดแทน 2

    …
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  CASE GLSetup."Payment Tolerance Posting" OF
                    GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts":
                      IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                         (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                      THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                      END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 3

     …
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Credit Acc.";
                      END;
                    GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts":
                      IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                      END ELSE BEGIN
    …
    
    

    รหัสทดแทน 3

    …
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Credit Acc.";
                      END;
                    GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts":
                      IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                         (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                      THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                      END ELSE BEGIN
    …
    
    
    

    รหัสที่มีอยู่ 4

    …
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  CASE GLSetup."Pmt. Disc. Tolerance Posting" OF
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts":
                      IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                      END ELSE BEGIN
    …
    
    

    รหัสทดแทน 4

    …
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  CASE GLSetup."Pmt. Disc. Tolerance Posting" OF
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts":
                      IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                         (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                      THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Tol. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Debit Acc.";
                      END ELSE BEGIN
    …
    
    
    

    รหัสที่มีอยู่ 5

    …
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Credit Acc.";
                      END;
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts":
                      IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                      END ELSE BEGIN
    …
    
    
    

    รหัสทดแทน 5

    …
                        AccNo := GenPostingSetup."Sales Pmt. Tol. Credit Acc.";
                      END;
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts":
                      IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                         (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                      THEN BEGIN
                        GenPostingSetup.TESTFIELD("Sales Pmt. Disc. Debit Acc.");
                        AccNo := GenPostingSetup."Sales Pmt. Disc. Debit Acc.";
                      END ELSE BEGIN
    …
    
    
    
    
    
  3. เปลี่ยนรหัสในฟังก์ชัน PostDtldVendLedgEntries ดังนี้:
    รหัสที่มีอยู่ 1

    …
                          GenPostingSetup.GET(
                            DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                            DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                          IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                            GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                            PaymentDiscAcc := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                          END ELSE BEGIN
    …
    
    

    รหัสทดแทน 1

    …
                          GenPostingSetup.GET(
                            DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                            DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                          IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                             (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                          THEN BEGIN
                            GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                            PaymentDiscAcc := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                          END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 2

    …
                          IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 2

    …
                          IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 3

    …
                          END ELSE IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 3

    …
                          END ELSE IF GLSetup."Payment Tolerance Posting" =
                            GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 4

    …
                          IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 4

    …
                          IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 5

    …
                          END ELSE IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    

    รหัสทดแทน 5

    …
                          END ELSE IF GLSetup."Pmt. Disc. Tolerance Posting" =
                            GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts"
                          THEN BEGIN
                            IF (DtldCVLedgEntryBuf."Amount (LCY)" <= 0) AND
                               (DtldCVLedgEntryBuf."VAT Amount (LCY)" <= 0)
                            THEN BEGIN
                              GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                              PaymentTolAcc := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                            END ELSE BEGIN
    …
    
    
  4. เปลี่ยนรหัสในฟังก์ชัน AutoEntrForDtldVendLedgEntries ดังนี้:
    รหัสที่มีอยู่ 1

    …
                  GenPostingSetup.GET(
                    DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                    GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                    AccNo := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                  END ELSE BEGIN
    …
    
    

    รหัสทดแทน 1

    …
                  GenPostingSetup.GET(
                    DtldCVLedgEntryBuf."Gen. Bus. Posting Group",
                    DtldCVLedgEntryBuf."Gen. Prod. Posting Group");
                  IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                     (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                  THEN BEGIN
                    GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                    AccNo := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                  END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 2

    …
                  CASE GLSetup."Payment Tolerance Posting" OF
                    GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts":
                      BEGIN
                        IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                        END ELSE BEGIN
    …
    
    
    

    รหัสทดแทน 2

    …
                  CASE GLSetup."Payment Tolerance Posting" OF
                    GLSetup."Payment Tolerance Posting"::"Payment Tolerance Accounts":
                      BEGIN
                        IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                           (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                        THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                        END ELSE BEGIN
    …
    
    
    

    รหัสที่มีอยู่ 3

    …
                      END;
                    GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts":
                      BEGIN
                        IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                        END ELSE BEGIN
    …
    
    
    

    รหัสทดแทน 3

    …
                      END;
                    GLSetup."Payment Tolerance Posting"::"Payment Discount Accounts":
                      BEGIN
                        IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                           (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                        THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                        END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 4

    …
                  CASE GLSetup."Pmt. Disc. Tolerance Posting" OF
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts":
                      BEGIN
                        IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                        END ELSE BEGIN
    …
    
    

    รหัสทดแทน 4

    …
                  CASE GLSetup."Pmt. Disc. Tolerance Posting" OF
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Tolerance Accounts":
                      BEGIN
                        IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                           (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                        THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Tol. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Tol. Debit Acc.";
                        END ELSE BEGIN
    …
    
    

    รหัสที่มีอยู่ 5

    …
                      END;
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts":
                      BEGIN
                        IF DtldCVLedgEntryBuf."Amount (LCY)" > 0 THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                        END ELSE BEGIN
    …
    
    
    

    รหัสทดแทน 5

    …
                      END;
                    GLSetup."Pmt. Disc. Tolerance Posting"::"Payment Discount Accounts":
                      BEGIN
                        IF (DtldCVLedgEntryBuf."Amount (LCY)" > 0) OR
                           (DtldCVLedgEntryBuf."VAT Amount (LCY)" > 0)
                        THEN BEGIN
                          GenPostingSetup.TESTFIELD("Purch. Pmt. Disc. Debit Acc.");
                          AccNo := GenPostingSetup."Purch. Pmt. Disc. Debit Acc.";
                        END ELSE BEGIN
    …
    
    

ข้อกำหนดเบื้องต้น

คุณต้องติดตั้ง Microsoft Dynamics NAV 2009 Service Pack 1 เพื่อใช้โปรแกรมแก้ไขด่วนนี้

ลบข้อมูลออก

คุณไม่สามารถลบโปรแกรมแก้ไขด่วนนี้ได้

สถานะ

Microsoft ได้ยืนยันว่านี่เป็นปัญหาที่เกิดขึ้นกับผลิตภัณฑ์ของ Microsoft ที่แสดงไว้ในส่วน "นำไปใช้กับ"

MICROSOFT และ/หรือผู้จําหน่ายของ MICROSOFT ไม่ได้รับรองหรือรับประกันเกี่ยวกับความเหมาะสม ความน่าเชื่อถือ หรือความถูกต้องของข้อมูลที่มีอยู่ในเอกสารและกราฟิกที่เกี่ยวข้องที่เผยแพร่บนเว็บไซต์นี้ ("เนื้อหา") เพื่อวัตถุประสงค์ใดๆ

วัสดุอาจรวมถึงความไม่ถูกต้องทางเทคนิคหรือข้อผิดพลาดในการพิมพ์ และอาจมีการแก้ไขได้ตลอดเวลาโดยไม่ต้องแจ้งให้ทราบ ภายใต้ขอบเขตสูงสุดที่กฎหมายที่บังคับใช้อนุญาต MICROSOFT และ/หรือผู้จําหน่ายของไมโครซอฟท์จะปฏิเสธความรับผิดชอบและแยกการรับรอง การรับประกัน และเงื่อนไขทั้งหมดไม่ว่าจะโดยชัดแจ้ง โดยนัย หรือโดยกฎหมาย รวมถึงแต่ไม่จํากัดเพียงการแสดง การรับประกัน หรือเงื่อนไขของชื่อเรื่อง การไม่ละเมิด เงื่อนไขหรือคุณภาพที่น่าพอใจ ความสามารถในเชิงพาณิชย์และความเหมาะสมสําหรับวัตถุประสงค์เฉพาะ ที่เกี่ยวข้องกับวัสดุ