ส่วนลดในการชําระเงินถูกคํานวณอย่างไม่ถูกต้องในใบแจ้งหนี้การซื้อและอินวอยซ์การขายถ้าค่า % ส่วนลดในการชําระเงินไม่เป็นศูนย์ใน Microsoft Dynamics NAV 2009 Service Pack 1 เวอร์ชันภาษาสเปน

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

บทความนี้ใช้กับ Microsoft Dynamics NAV สําหรับภาษาสเปน (es) ภาษาท้องถิ่น

อาการ

ถ้าค่า % ส่วนลดในการชําระเงิน ไม่เป็นศูนย์ในเวอร์ชันภาษาสเปนของ Microsoft Dynamics NAV 2009 Service Pack 1 (SP1) ส่วนลดการชําระเงินจะถูกคํานวณอย่างไม่ถูกต้องในใบแจ้งหนี้การซื้อและอินวอยซ์การขาย

การแก้ปัญหา

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

โปรแกรมแก้ไขด่วนที่ได้รับการสนับสนุนจาก 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

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

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

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

  1. เปลี่ยนรหัสในฟังก์ชัน CalculateInvoiceDiscount ใน Sales-Calc Codeunit ส่วนลด (60) ดังต่อไปนี้:
    รหัสที่มีอยู่ 1

    ...
            SalesSetup@1003 : Record 311;
            TempServiceChargeLine@1005 : TEMPORARY Record 37;
            GLAcc@1100000 : Record 15;
          BEGIN
            SalesSetup.GET;
            WITH SalesLine DO BEGIN
    ...
    
    

    รหัสทดแทน 1

    ...
            SalesSetup@1003 : Record 311;
            TempServiceChargeLine@1005 : TEMPORARY Record 37;
            GLAcc@1100000 : Record 15;
    
            // Add the following line.
            TempSalesLine@1100001 : TEMPORARY Record 37;
            // End of the line.
    
          BEGIN
            SalesSetup.GET;
            WITH SalesLine DO BEGIN
    ...
    
    

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

    ...
                      (SalesLine2."Prepayment %" = 0)
                    THEN
                      SalesLine2.VALIDATE("Inv. Discount Amount");
    
                    // Delete the following lines.
                    IF SalesLine2."Allow Invoice Disc." THEN
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::" ",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                        SalesLine2."Inv. Discount Amount" :=
                          ROUND(SalesLine2."Line Amount" * CustInvDisc."Discount %" / 100,0.000001);
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.":
                          SalesLine2."Inv. Discount Amount" :=
                            ROUND(
                              (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount" ) *
                              CustInvDisc."Discount %" / 100,0.000001);
                            END;
                        IF GLSetup."Payment Discount Type" =
                           GLSetup."Payment Discount Type"::"Calc. Pmt. Disc. on Lines"
                        THEN BEGIN
                          GLSetup.TESTFIELD("Discount Calculation");
                          CASE GLSetup."Discount Calculation" OF
                            GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                            GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.":
                              SalesLine2."Pmt. Disc. Given Amount" :=
                                ROUND(
                                  (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount")
                                  * SalesHeader."Payment Discount %" / 100,0.01);
                            GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.",
                            GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                              SalesLine2."Pmt. Disc. Given Amount" :=
                                ROUND(
                                  (SalesLine2."Line Amount" - SalesLine2."Inv. Discount Amount") *
                                  SalesHeader."Payment Discount %" / 100,0.01);
                          END;
                        END;
                    // End of the lines.
    
                    IF (SalesLine2.Type <> SalesLine2.Type::"Charge (Item)") AND
                      (SalesLine2."Prepayment %" = 0)
    ...
    
    

    รหัสทดแทน 2

    ...
                      (SalesLine2."Prepayment %" = 0)
                    THEN
                      SalesLine2.VALIDATE("Inv. Discount Amount");
    
                    // Add the following lines.
                    IF SalesLine2."Allow Invoice Disc." THEN BEGIN
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::" ",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempSalesLine."Inv. Discount Amount" :=
                              TempSalesLine."Inv. Discount Amount" +
                              SalesLine2."Line Amount" * CustInvDisc."Discount %" / 100;
                            SalesLine2."Inv. Discount Amount" := ROUND(TempSalesLine."Inv. Discount Amount",0.000001);
                          END;
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempSalesLine."Inv. Discount Amount" :=
                              TempSalesLine."Inv. Discount Amount" +
                              (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount") *
                              CustInvDisc."Discount %" / 100;
                            SalesLine2."Inv. Discount Amount" := ROUND(TempSalesLine."Inv. Discount Amount",0.000001);
                          END;
                      END;
                      TempSalesLine."Inv. Discount Amount" :=
                        TempSalesLine."Inv. Discount Amount" - SalesLine2."Inv. Discount Amount";
                    END;
                    IF GLSetup."Payment Discount Type" =
                       GLSetup."Payment Discount Type"::"Calc. Pmt. Disc. on Lines"
                    THEN BEGIN
                      GLSetup.TESTFIELD("Discount Calculation");
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.":
                          BEGIN
                            TempSalesLine."Pmt. Disc. Given Amount" :=
                              TempSalesLine."Pmt. Disc. Given Amount" +
                              (SalesLine2."Line Amount" + SalesLine2."Line Discount Amount") *
                              SalesHeader."Payment Discount %" / 100;
                            SalesLine2."Pmt. Disc. Given Amount" := ROUND(TempSalesLine."Pmt. Disc. Given Amount",0.01);
                          END;
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempSalesLine."Pmt. Disc. Given Amount" :=
                              TempSalesLine."Pmt. Disc. Given Amount" +
                              (SalesLine2."Line Amount" - SalesLine2."Inv. Discount Amount") *
                              SalesHeader."Payment Discount %" / 100;
                            SalesLine2."Pmt. Disc. Given Amount" :=
                              ROUND(TempSalesLine."Pmt. Disc. Given Amount",0.01);
                          END;
                      END;
                      TempSalesLine."Pmt. Disc. Given Amount" :=
                        TempSalesLine."Pmt. Disc. Given Amount" - SalesLine2."Pmt. Disc. Given Amount";
                    END;
                    // End of the lines.
    
                    IF (SalesLine2.Type <> SalesLine2.Type::"Charge (Item)") AND
                      (SalesLine2."Prepayment %" = 0)
    ...
    
    
  2. เปลี่ยนรหัสในฟังก์ชัน CalculateInvoiceDiscount ในโค้ดโค้ดของ Purch.-Calc.Discount (70) ดังต่อไปนี้:
    รหัสที่มีอยู่ 1

    ...
            PurchSetup@1003 : Record 312;
            TempServiceChargeLine@1005 : TEMPORARY Record 39;
            GLAcc@1100000 : Record 15;
          BEGIN
            PurchSetup.GET;
            WITH PurchLine DO BEGIN
    ...
    
    

    รหัสทดแทน 1

    ...
            PurchSetup@1003 : Record 312;
            TempServiceChargeLine@1005 : TEMPORARY Record 39;
            GLAcc@1100000 : Record 15;
    
            // Add the following line.
            TempPurchLine@1100001 : TEMPORARY Record 39;
            // End of the line.
    
          BEGIN
            PurchSetup.GET;
            WITH PurchLine DO BEGIN
    ...
    
    

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

    ...
                      (PurchLine2."Prepayment %" = 0)
                    THEN
                      PurchLine2.VALIDATE("Inv. Discount Amount");
    
                    // Delete the following lines.
                    IF PurchLine2."Allow Invoice Disc." THEN
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::" ",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          PurchLine2."Inv. Discount Amount" :=
                            ROUND(PurchLine2."Line Amount" * VendInvDisc."Discount %" / 100,0.01);
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.":
                          PurchLine2."Inv. Discount Amount" :=
                            ROUND(
                              (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount" ) *
                              VendInvDisc."Discount %" / 100,0.01);
                      END;
                    IF GLSetup."Payment Discount Type" =
                       GLSetup."Payment Discount Type"::"Calc. Pmt. Disc. on Lines"
                    THEN BEGIN
                       GLSetup.TESTFIELD("Discount Calculation");
                       CASE GLSetup."Discount Calculation" OF
                         GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                         GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.":
                           PurchLine2."Pmt. Disc. Rcd. Amount" :=
                             ROUND(
                               (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount") *
                               PurchHeader."Payment Discount %" / 100,0.01);
                         GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.",
                         GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                            PurchLine2."Pmt. Disc. Rcd. Amount" :=
                              ROUND(
                                (PurchLine2."Line Amount" - PurchLine2."Inv. Discount Amount") *
                                PurchHeader."Payment Discount %" / 100,0.01);
                         END;
                       END;
                    // End of the lines.
    
                      IF (PurchLine2.Type <> PurchLine2.Type::"Charge (Item)") AND
    ...
    
    

    รหัสทดแทน 2

    ...
                      (PurchLine2."Prepayment %" = 0)
                    THEN
                      PurchLine2.VALIDATE("Inv. Discount Amount");
    
                    // Add the following lines.
                    IF PurchLine2."Allow Invoice Disc." THEN BEGIN
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::" ",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempPurchLine."Inv. Discount Amount" :=
                              TempPurchLine."Inv. Discount Amount"  + PurchLine2."Line Amount" * VendInvDisc."Discount %" / 100;
                            PurchLine2."Inv. Discount Amount" := ROUND(TempPurchLine."Inv. Discount Amount",0.01);
                          END;
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempPurchLine."Inv. Discount Amount" :=
                              TempPurchLine."Inv. Discount Amount" +
                              (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount") *
                              VendInvDisc."Discount %" / 100;
                            PurchLine2."Inv. Discount Amount" := ROUND(TempPurchLine."Inv. Discount Amount",0.01);
                          END;
                      END;
                    TempPurchLine."Inv. Discount Amount" :=
                      TempPurchLine."Inv. Discount Amount" - PurchLine2."Inv. Discount Amount";
                    END;
                    IF GLSetup."Payment Discount Type" =
                       GLSetup."Payment Discount Type"::"Calc. Pmt. Disc. on Lines"
                    THEN BEGIN
                      GLSetup.TESTFIELD("Discount Calculation");
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.":
                          BEGIN
                            TempPurchLine."Pmt. Disc. Rcd. Amount" :=
                              TempPurchLine."Pmt. Disc. Rcd. Amount" +
                              (PurchLine2."Line Amount" + PurchLine2."Line Discount Amount") *
                              PurchHeader."Payment Discount %" / 100;
                            PurchLine2."Pmt. Disc. Rcd. Amount" := ROUND(TempPurchLine."Pmt. Disc. Rcd. Amount",0.01);
                          END;
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempPurchLine."Pmt. Disc. Rcd. Amount" :=
                              TempPurchLine."Pmt. Disc. Rcd. Amount" +
                              (PurchLine2."Line Amount" - PurchLine2."Inv. Discount Amount") *
                              PurchHeader."Payment Discount %" / 100;
                            PurchLine2."Pmt. Disc. Rcd. Amount" := ROUND(TempPurchLine."Pmt. Disc. Rcd. Amount",0.01);
                          END;
                      END;
                      TempPurchLine."Pmt. Disc. Rcd. Amount" :=
                        TempPurchLine."Pmt. Disc. Rcd. Amount" - PurchLine2."Pmt. Disc. Rcd. Amount";
                    END;
                    // End of the lines.
    
                    IF (PurchLine2.Type <> PurchLine2.Type::"Charge (Item)") AND
    ...
    
    
  3. เปลี่ยนรหัสในฟังก์ชัน CalculateInvoiceDiscount ใน Service-Calc รหัสส่วนลด (5950) ดังต่อไปนี้:
    รหัสที่มีอยู่ 1

    ...
            SalesSetup@1005 : Record 311;
            ServiceChargeLineNo@1004 : Integer;
            GLAcc@1100000 : Record 15;
          BEGIN
            ServSetup.GET;
            WITH ServiceLine DO BEGIN
    ...
    
    

    รหัสทดแทน 1

    ...
            SalesSetup@1005 : Record 311;
            ServiceChargeLineNo@1004 : Integer;
            GLAcc@1100000 : Record 15;
    
            // Add the following line.
            TempServiceLine@1100001 : TEMPORARY Record 5902;
            // End of the line.
    
          BEGIN
            ServSetup.GET;
            WITH ServiceLine DO BEGIN
    ...
    
    

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

    ...
                  IF (ServiceLine2.Quantity <> 0) AND NOT InvAllow THEN BEGIN
                    ServiceLine2."Pmt. Disc. Given Amount" := 0;
                    ServiceLine2.VALIDATE("Inv. Discount Amount");
    
                    // Delete the following lines.
                    IF ServiceLine2."Allow Invoice Disc." THEN
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::" ",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                        ServiceLine2."Inv. Discount Amount" :=
                          ROUND(ServiceLine2."Line Amount" * CustInvDisc."Discount %" / 100,0.000001);
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.":
                          ServiceLine2."Inv. Discount Amount" :=
                            ROUND(
                              (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount" ) *
                              CustInvDisc."Discount %" / 100,0.000001);
                            END;
                        IF GLSetup."Payment Discount Type" =
                           GLSetup."Payment Discount Type"::"Calc. Pmt. Disc. on Lines"
                        THEN BEGIN
                          GLSetup.TESTFIELD("Discount Calculation");
                          CASE GLSetup."Discount Calculation" OF
                            GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                            GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.":
                              ServiceLine2."Pmt. Disc. Given Amount" :=
                                ROUND(
                                  (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount")
                                  * ServHeader."Payment Discount %" / 100,0.01);
                            GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.",
                            GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                              ServiceLine2."Pmt. Disc. Given Amount" :=
                                ROUND(
                                  (ServiceLine2."Line Amount" - ServiceLine2."Inv. Discount Amount") *
                                  ServHeader."Payment Discount %" / 100,0.01);
                          END;
                        END;
                    // End of the lines.
    
                    ServiceLine2.VALIDATE("Inv. Discount Amount");
                    ServiceLine2.MODIFY;
    ...
    
    

    รหัสทดแทน 2

    ...
                  IF (ServiceLine2.Quantity <> 0) AND NOT InvAllow THEN BEGIN
                    ServiceLine2."Pmt. Disc. Given Amount" := 0;
                    ServiceLine2.VALIDATE("Inv. Discount Amount");
    
                    // Add the following lines.
                    IF ServiceLine2."Allow Invoice Disc." THEN BEGIN
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::" ",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempServiceLine."Inv. Discount Amount" :=
                              TempServiceLine."Inv. Discount Amount" +
                              ServiceLine2."Line Amount" * CustInvDisc."Discount %" / 100;
                            ServiceLine2."Inv. Discount Amount" :=
                              ROUND(TempServiceLine."Inv. Discount Amount",0.000001);
                          END;
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempServiceLine."Inv. Discount Amount" :=
                              TempServiceLine."Inv. Discount Amount" +
                              (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount") *
                              CustInvDisc."Discount %" / 100;
                            ServiceLine2."Inv. Discount Amount" := ROUND(TempServiceLine."Inv. Discount Amount",0.000001);
                          END;
                      END;
                      TempServiceLine."Inv. Discount Amount" :=
                        TempServiceLine."Inv. Discount Amount" - ServiceLine2."Inv. Discount Amount";
                    END;
                    IF GLSetup."Payment Discount Type" =
                       GLSetup."Payment Discount Type"::"Calc. Pmt. Disc. on Lines"
                    THEN BEGIN
                      GLSetup.TESTFIELD("Discount Calculation");
                      CASE GLSetup."Discount Calculation" OF
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. + Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. + Payment Disc.":
                          BEGIN
                            TempServiceLine."Pmt. Disc. Given Amount" :=
                              TempServiceLine."Pmt. Disc. Given Amount" +
                              (ServiceLine2."Line Amount" + ServiceLine2."Line Discount Amount") *
                              ServHeader."Payment Discount %" / 100;
                            ServiceLine2."Pmt. Disc. Given Amount" := ROUND(TempServiceLine."Pmt. Disc. Given Amount",0.01);
                          END;
                        GLSetup."Discount Calculation"::"Line Disc. + Inv. Disc. * Payment Disc.",
                        GLSetup."Discount Calculation"::"Line Disc. * Inv. Disc. * Payment Disc.":
                          BEGIN
                            TempServiceLine."Pmt. Disc. Given Amount" :=
                              TempServiceLine."Pmt. Disc. Given Amount" +
                              (ServiceLine2."Line Amount" - ServiceLine2."Inv. Discount Amount") *
                              ServHeader."Payment Discount %" / 100;
                            ServiceLine2."Pmt. Disc. Given Amount" := ROUND(TempServiceLine."Pmt. Disc. Given Amount",0.01);
                          END;
                      END;
                      TempServiceLine."Pmt. Disc. Given Amount" :=
                        TempServiceLine."Pmt. Disc. Given Amount" - ServiceLine2."Pmt. Disc. Given Amount";
                    END;
                    // End of the lines.
    
                    ServiceLine2.VALIDATE("Inv. Discount Amount");
                    ServiceLine2.MODIFY;
    ...
    
    

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

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

ลบข้อมูลออก

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

สถานะ

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

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