Microsoft Dynamics NAV 2009 R2의 동유럽 버전에서 판매 주문에 대한 부분 배송을 게시할 때 "주문에 선불 금액이 게시되지 않았습니다." 오류 메시지

적용 대상
Dynamics NAV 2009

이 문서는 EE(동유럽) 지역의 Microsoft Dynamics NAV에 적용됩니다.

증상

Microsoft Dynamics NAV 2009 R2의 동유럽 버전에서 판매 주문에 대한 부분 배송을 게시하면 다음과 같은 오류 메시지가 표시됩니다.

참고

주문 번호에는 게시되지 않은 선불 금액이 있습니다.

이 문제는 선불을 지정하고 판매 주문에 대해 처리할 때 발생합니다.

해결 방법

핫픽스 정보

이제 Microsoft에서 지원되는 핫픽스를 사용할 수 있습니다. 그러나 이 문서에 설명된 문제만 수정하기 위한 것입니다. 이 특정 문제가 발생하는 시스템에만 적용합니다. 이 핫픽스는 추가 테스트를 받을 수 있습니다. 따라서 이 문제의 심각한 영향을 받지 않는 경우 다음 Microsoft Dynamics NAV 서비스 팩 또는 이 핫픽스가 포함된 다음 Microsoft Dynamics NAV 버전을 기다리는 것이 좋습니다.

참고 특별한 경우 Microsoft Dynamics 및 관련 제품에 대한 기술 지원 전문가가 특정 업데이트가 문제를 resolve 판단하는 경우 지원 호출에 대해 일반적으로 발생하는 요금이 취소될 수 있습니다. 특정 업데이트가 필요하지 않은 추가 지원 질문과 문제에는 일반 지원 비용이 적용됩니다.

            
          

설치 정보

Microsoft는 명시적이거나 묵시적인 보증 없이 설명용으로만 프로그래밍 예제를 제공합니다. 여기에는 상품성 또는 특정 목적에의 적합성에 대한 묵시적 보증이 포함되지만 이에 국한되지 않습니다. 이 문서에서는 설명 중인 프로그래밍 언어와 프로시저를 만들고 디버깅하는 데 사용되는 도구에 대해 잘 알고 있다고 가정합니다. Microsoft 지원 엔지니어는 사용자에게 도움이 되도록 특정 프로시저에 대한 기능을 설명할 수 있지만 사용자의 특정 요구 사항에 맞도록 예제를 수정하여 추가 기능을 제공하거나 프로시저를 구성하지는 않습니다.

참고 이 핫픽스를 설치하기 전에 모든 Microsoft Navision 클라이언트 사용자가 시스템에서 로그오프되었는지 확인합니다. 여기에는 NAS(Microsoft Navision Application Services) 클라이언트 사용자가 포함됩니다. 이 핫픽스를 구현할 때 로그온한 유일한 클라이언트 사용자여야 합니다.

이 핫픽스를 구현하려면 개발자 라이선스가 있어야 합니다.

Windows 로그인 창 또는 데이터베이스 로그인 창의 사용자 계정에 "SUPER" 역할 ID가 할당되는 것이 좋습니다. 사용자 계정에 "SUPER" 역할 ID를 할당할 수 없는 경우 사용자 계정에 다음 권한이 있는지 확인해야 합니다.

  • 변경할 개체에 대한 수정 권한입니다.
  • 시스템 개체 ID 5210 개체 및 System Object ID 9015 개체에 대한 Execute 권한입니다.

                
참고 데이터 복구를 수행해야 하는 경우가 아니면 데이터 저장소에 대한 권한이 있을 필요가 없습니다.

코드 변경 내용

참고 프로덕션 컴퓨터에 수정 사항을 적용하기 전에 제어된 환경에서 항상 코드 수정을 테스트합니다.
이 문제를 해결하려면 다음과 같이 하십시오.

  1. 다음과 같이 승인 관리 codeunit(439)의 TestSalesPrepayment 함수에서 코드를 변경합니다.
    기존 코드

    ...
    SalesLines.SETRANGE("Document Type",SalesHeader."Document Type");
    SalesLines.SETRANGE("Document No.",SalesHeader."No.");
    SalesLines.SETFILTER("Prepmt. Line Amount",'<>%1',0);
    ...
    

    대체 코드

    ...
    // Add the following lines.
    IF SalesHeader."Prepayment Type" = SalesHeader."Prepayment Type"::Advance THEN
    EXIT(FALSE);
    // End of the lines. 
    
    SalesLines.SETRANGE("Document Type",SalesHeader."Document Type");
    SalesLines.SETRANGE("Document No.",SalesHeader."No.");
    SalesLines.SETFILTER("Prepmt. Line Amount",'<>%1',0);
    ...
    
  2. 다음과 같이 승인 관리 codeunit(439)의 TestPurchasePrepayment 함수에서 코드를 변경합니다.
    기존 코드

    ...
    PurchaseLines.SETRANGE("Document Type",PurchaseHeader."Document Type");
    PurchaseLines.SETRANGE("Document No.",PurchaseHeader."No.");
    PurchaseLines.SETFILTER("Prepmt. Line Amount",'<>%1',0);
    ...
    

    대체 코드

    ...
    // Add the following lines.
    IF PurchaseHeader."Prepayment Type" = PurchaseHeader."Prepayment Type"::Advance THEN
    EXIT(FALSE);
    // End of the lines. 
    
    PurchaseLines.SETRANGE("Document Type",PurchaseHeader."Document Type");
    PurchaseLines.SETRANGE("Document No.",PurchaseHeader."No.");
    PurchaseLines.SETFILTER("Prepmt. Line Amount",'<>%1',0);
    ...
    
  3. 다음과 같이 "Sales-Post" codeunit(80)의 OnRun 트리거에서 코드를 변경합니다.
    기존 코드

    ...
    Window.UPDATE(2,LineCount); 
    IF Invoice AND (NOT GLSetup."Allow VAT Date Change in Lines") THEN
    SalesLine."VAT Date" := "VAT Date"; 
    IF SalesLine.Type = SalesLine.Type::"Charge (Item)" THEN BEGIN
    SalesLine.TESTFIELD(Amount);
    SalesLine.TESTFIELD("Job No.",'');
    SalesLine.TESTFIELD("Job Contract Entry No.",0);
    END;
    ...
    

    대체 코드

    ...
    Window.UPDATE(2,LineCount); 
    IF Invoice AND (NOT GLSetup."Allow VAT Date Change in Lines") THEN
    SalesLine."VAT Date" := "VAT Date"; 
    
    // Add the following lines. 
    IF Invoice THEN
    TestPrepmtAmount;
    // End of the lines. 
    
    IF SalesLine.Type = SalesLine.Type::"Charge (Item)" THEN BEGIN
    SalesLine.TESTFIELD(Amount);
    SalesLine.TESTFIELD("Job No.",'');
    SalesLine.TESTFIELD("Job Contract Entry No.",0);
    END;
    ...
    
  4. 다음과 같이 "Sales-Post" codeunit(80)에서 새 TestPrepmtAmount 함수를 만듭니다.

    PROCEDURE TestPrepmtAmount@1470003();
    VAR
    AllowedQtyToShip@1470000 : Decimal;
    BEGIN
    WITH SalesLine DO BEGIN
    IF ("Prepmt. Line Amount" = 0) OR (Quantity = 0) THEN
    EXIT;
    
    AllowedQtyToShip :=
    ROUND(
    ("Line Amount" - "Prepmt. Line Amount" + "Prepmt. Amt. Inv.") /
    "Line Amount" * Quantity - "Quantity Invoiced",0.00001);
    IF "Qty. to Ship" > AllowedQtyToShip THEN
    FIELDERROR("Qty. to Ship",STRSUBSTNO(Text047,AllowedQtyToShip));
    END;
    END;
    
  5. "Purch.-Post" codeunit(90)의 TestPrepmtAmount 함수에서 다음 지역 변수를 삭제합니다.

    • RemainingAmount
    • RemainingQty
  6. "Purch.-Post" codeunit(90)의 TestPrepmtAmount 함수에 새 지역 변수를 추가한 다음 다음과 같이 변수를 지정합니다.

    • 이름: AllowedQtyToReceive
    • DataType: Decimal
  7. 다음과 같이 "Purch.-Post" codeunit(90)의 TestPrepmtAmount 함수에서 코드를 변경합니다.
    기존 코드

    ...
    WITH PurchLine DO BEGIN
    
    // Delete the following lines. 
    IF "Prepmt. Line Amount" = 0 THEN
    EXIT;
    IF NOT PurchHeader.Receive AND ("Qty. to Invoice" = Quantity - "Quantity Invoiced") THEN BEGIN
    IF "Qty. Rcd. Not Invoiced" + "Quantity Received" = Quantity THEN
    RemainingAmount := 0
    ELSE BEGIN
    RemainingQty := "Qty. to Receive";
    RemainingAmount :=
    ROUND(RemainingQty * "Direct Unit Cost" * (1 - "Line Discount %" / 100),Currency."Amount Rounding Precision");
    END;
    END ELSE BEGIN
    IF "Qty. to Invoice" + "Quantity Invoiced" = Quantity THEN
    RemainingAmount := 0
    ELSE BEGIN
    RemainingQty := Quantity - "Qty. to Invoice" - "Quantity Invoiced";
    RemainingAmount :=
    ROUND(RemainingQty * "Direct Unit Cost" * (1 - "Line Discount %" / 100),Currency."Amount Rounding Precision");
    END;
    END;
    IF RemainingAmount < "Prepmt. Line Amount" - "Prepmt Amt to Deduct" - "Prepmt Amt Deducted" THEN
    FIELDERROR("Prepmt. Line Amount",STRSUBSTNO(Text049,"Qty. to Invoice"));
    // End of the lines. 
    
    END;
    ...
    

    대체 코드

    ...
    WITH PurchLine DO BEGIN
    
    // Add the following lines. 
    IF ("Prepmt. Line Amount" = 0) OR (Quantity = 0) THEN
    EXIT;
    
    AllowedQtyToReceive :=
    ROUND(
    ("Line Amount" - "Prepmt. Line Amount" + "Prepmt. Amt. Inv.") /
    "Line Amount" * Quantity - "Quantity Invoiced",0.00001);
    IF "Qty. to Receive" > AllowedQtyToReceive THEN
    FIELDERROR("Qty. to Receive",STRSUBSTNO(Text047,AllowedQtyToReceive));
    // End of the lines. 
    
    END;
    ...
    
  8. 다음과 같이 Prepmt Amt의 코드를 Sales Line 테이블(37)의 Deduct-OnValidate 트리거로 변경합니다.
    기존 코드

    ...
    IF "Qty. to Invoice" = Quantity - "Quantity Invoiced" THEN
    TESTFIELD("Prepmt Amt to Deduct","Prepmt. Amt. Inv." - "Prepmt Amt Deducted");
    ...
    

    대체 코드

    ...
    IF "Qty. to Invoice" = Quantity - "Quantity Invoiced" THEN
    TESTFIELD("Prepmt Amt to Deduct","Prepmt. Amt. Inv." - "Prepmt Amt Deducted");
    
    // Add the following lines. 
    GetSalesHeader;
    IF SalesHeader."Prepayment Type" = SalesHeader."Prepayment Type"::Advance THEN BEGIN
    VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group");
    IF VATPostingSetup."Adv. Invoice Correction Type" <> 0 THEN
    VATPostingSetup.TESTFIELD("Adv. Invoice Correction Type",VATPostingSetup."Adv. Invoice Correction Type"::Percentage);
    END;
    // End of the lines. 
    ...
    
  9. Sales Line 테이블(37)의 CalcPrepaymentToDeduct 함수에서 다음 지역 변수를 삭제합니다.

    • PrepmtPct
    • AbsoluteAdvCorrection
  10. 다음과 같이 Sales Line 테이블(37)의 CalcPrepaymentToDeduct 함수에서 코드를 변경합니다.
    기존 코드

    ...
    IF SalesHeader."Prepayment Type" = SalesHeader."Prepayment Type"::Advance THEN BEGIN
    VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group");
    
    // Delete the following lines. 
    AbsoluteAdvCorrection :=
    VATPostingSetup."Adv. Invoice Correction Type" = VATPostingSetup."Adv. Invoice Correction Type"::Absolute;
    IF AbsoluteAdvCorrection THEN BEGIN
    PrepmtPct := "Prepayment %";
    "Prepayment %" := 100;
    END;
    END;
    IF SalesHeader."Prices Including VAT" THEN
    "Prepmt Amt to Deduct" :=
    ROUND(
    ROUND(
    ROUND(
    ROUND("Unit Price" * "Qty. to Invoice",Currency."Amount Rounding Precision") *
    (1 - ("Line Discount %" / 100)),Currency."Amount Rounding Precision") *
    ("Prepayment %" / 100) / (1 + ("VAT %" / 100)),Currency."Amount Rounding Precision") *
    (1 + ("VAT %" / 100)),Currency."Amount Rounding Precision")
    ELSE
    "Prepmt Amt to Deduct" :=
    ROUND(
    ROUND(
    ROUND("Unit Price" * "Qty. to Invoice",Currency."Amount Rounding Precision") *
    (1 - ("Line Discount %" / 100)),Currency."Amount Rounding Precision") *
    "Prepayment %" / 100 ,Currency."Amount Rounding Precision");
    IF AbsoluteAdvCorrection THEN BEGIN
    "Prepayment %" := PrepmtPct;
    IF "Prepmt Amt to Deduct" > ("Prepmt. Amt. Inv." - "Prepmt Amt Deducted") THEN
    "Prepmt Amt to Deduct" := "Prepmt. Amt. Inv." - "Prepmt Amt Deducted";
    END;
    // End of the lines.
    
    END ELSE
    "Prepmt Amt to Deduct" := 0
    ...
    

    대체 코드

    ... 
    IF SalesHeader."Prepayment Type" = SalesHeader."Prepayment Type"::Advance THEN BEGIN
    VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group");
    
    // Add the following lines. 
    CASE VATPostingSetup."Adv. Invoice Correction Type" OF
    VATPostingSetup."Adv. Invoice Correction Type"::Percentage:
    "Prepmt Amt to Deduct" :=
    ROUND("Qty. to Invoice" / (Quantity - "Quantity Invoiced") *
    ("Prepmt. Amt. Inv." - "Prepmt Amt Deducted"),Currency."Amount Rounding Precision");
    VATPostingSetup."Adv. Invoice Correction Type"::Absolute:
    BEGIN
    "Prepmt Amt to Deduct" := PrepmtAmtToDeduct(SalesHeader."Prices Including VAT",100);
    IF "Prepmt Amt to Deduct" > ("Prepmt. Amt. Inv." - "Prepmt Amt Deducted") THEN
    "Prepmt Amt to Deduct" := "Prepmt. Amt. Inv." - "Prepmt Amt Deducted";
    END;
    VATPostingSetup."Adv. Invoice Correction Type"::"Fully Invoiced":
    IF "Qty. to Invoice" = Quantity - "Quantity Invoiced" THEN
    "Prepmt Amt to Deduct" := "Prepmt. Amt. Inv." - "Prepmt Amt Deducted"
    ELSE
    "Prepmt Amt to Deduct" := 0;
    END;
    END ELSE 
    "Prepmt Amt to Deduct" := PrepmtAmtToDeduct(SalesHeader."Prices Including VAT","Prepayment %");
    // End of the lines. 
    
    END ELSE
    "Prepmt Amt to Deduct" := 0
    ...
    
  11. 다음과 같이 Sales Line 테이블(37)에서 새 PrepmtAmtToDeduct 함수를 만듭니다.

    PROCEDURE PrepmtAmtToDeduct@1470002(PricesIncludingVAT@1470000 : Boolean;PrepaymentPct@1470001 : Decimal) : Decimal;
    VAR
    VATPct@1470002 : Decimal;
    BEGIN
    IF PricesIncludingVAT THEN
    VATPct := "VAT %"
    ELSE
    VATPct := 0;
    EXIT(
    ROUND(
    ROUND(
    ROUND(
    ROUND("Unit Price" * "Qty. to Invoice",Currency."Amount Rounding Precision") *
    (1 - ("Line Discount %" / 100)),Currency."Amount Rounding Precision") *
    (PrepaymentPct / 100) / (1 + (VATPct / 100)),Currency."Amount Rounding Precision") *
    (1 + (VATPct / 100)),Currency."Amount Rounding Precision"));
    END;
    
  12. 다음과 같이 Prepmt Amt의 코드를 Purchase Line 테이블(39)에서 공제 - OnValidate 트리거로 변경합니다.
    기존 코드

    ...
    IF "Qty. to Invoice" = Quantity - "Quantity Invoiced" THEN
    TESTFIELD("Prepmt Amt to Deduct","Prepmt. Amt. Inv." - "Prepmt Amt Deducted");
    ...
    

    대체 코드

    ...
    IF "Qty. to Invoice" = Quantity - "Quantity Invoiced" THEN
    TESTFIELD("Prepmt Amt to Deduct","Prepmt. Amt. Inv." - "Prepmt Amt Deducted");
    
    // Add the following lines.
    GetPurchHeader;
    IF PurchHeader."Prepayment Type" = PurchHeader."Prepayment Type"::Advance THEN BEGIN
    VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group");
    IF VATPostingSetup."Adv. Invoice Correction Type" <> 0 THEN
    VATPostingSetup.TESTFIELD("Adv. Invoice Correction Type",VATPostingSetup."Adv. Invoice Correction Type"::Percentage);
    END;
    // End of the lines. 
    ...
    
  13. 구매 라인 테이블(39)의 CalcPrepaymentToDeduct 함수에서 다음 지역 변수를 삭제합니다.

    • PrepmtPct
    • AbsoluteAdvCorrection
  14. 다음과 같이 구매 라인 테이블(39)의 CalcPrepaymentToDeduct 함수에서 코드를 변경합니다.
    기존 코드

    ...
    IF PurchHeader."Prepayment Type" = PurchHeader."Prepayment Type"::Advance THEN BEGIN
    VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group");
    
    // Delete the following lines. 
    AbsoluteAdvCorrection :=
    VATPostingSetup."Adv. Invoice Correction Type" = VATPostingSetup."Adv. Invoice Correction Type"::Absolute;
    IF AbsoluteAdvCorrection THEN BEGIN
    PrepmtPct := "Prepayment %";
    "Prepayment %" := 100;
    END;
    END;
    IF PurchHeader."Prices Including VAT" THEN
    "Prepmt Amt to Deduct" :=
    ROUND(
    ROUND(
    ROUND(
    ROUND("Direct Unit Cost" * "Qty. to Invoice",Currency."Amount Rounding Precision") *
    (1 - ("Line Discount %" / 100)),Currency."Amount Rounding Precision") *
    ("Prepayment %" / 100) / (1 + ("VAT %" / 100)),Currency."Amount Rounding Precision") *
    (1 + ("VAT %" / 100)),Currency."Amount Rounding Precision")
    ELSE
    "Prepmt Amt to Deduct" :=
    ROUND(
    ROUND(
    ROUND("Direct Unit Cost" * "Qty. to Invoice",Currency."Amount Rounding Precision") *
    (1 - ("Line Discount %" / 100)),Currency."Amount Rounding Precision") *
    "Prepayment %" / 100,Currency."Amount Rounding Precision");
    IF AbsoluteAdvCorrection THEN BEGIN
    "Prepayment %" := PrepmtPct;
    IF "Prepmt Amt to Deduct" > ("Prepmt. Amt. Inv." - "Prepmt Amt Deducted") THEN
    "Prepmt Amt to Deduct" := "Prepmt. Amt. Inv." - "Prepmt Amt Deducted";
    END;
    // End of the lines.
    
    END ELSE
    "Prepmt Amt to Deduct" := 0
    ...
    

    대체 코드

    ...
    IF PurchHeader."Prepayment Type" = PurchHeader."Prepayment Type"::Advance THEN BEGIN
    VATPostingSetup.GET("VAT Bus. Posting Group","VAT Prod. Posting Group");
    
    // Add the following lines. 
    CASE VATPostingSetup."Adv. Invoice Correction Type" OF
    VATPostingSetup."Adv. Invoice Correction Type"::Percentage:
    "Prepmt Amt to Deduct" :=
    ROUND("Qty. to Invoice" / (Quantity - "Quantity Invoiced") *
    ("Prepmt. Amt. Inv." - "Prepmt Amt Deducted"),Currency."Amount Rounding Precision");
    VATPostingSetup."Adv. Invoice Correction Type"::Absolute:
    BEGIN
    "Prepmt Amt to Deduct" := PrepmtAmtToDeduct(PurchHeader."Prices Including VAT",100);
    IF "Prepmt Amt to Deduct" > ("Prepmt. Amt. Inv." - "Prepmt Amt Deducted") THEN
    "Prepmt Amt to Deduct" := "Prepmt. Amt. Inv." - "Prepmt Amt Deducted";
    END;
    VATPostingSetup."Adv. Invoice Correction Type"::"Fully Invoiced":
    IF "Qty. to Invoice" = Quantity - "Quantity Invoiced" THEN
    "Prepmt Amt to Deduct" := "Prepmt. Amt. Inv." - "Prepmt Amt Deducted"
    ELSE
    "Prepmt Amt to Deduct" := 0;
    END;
    END ELSE
    "Prepmt Amt to Deduct" := PrepmtAmtToDeduct(PurchHeader."Prices Including VAT","Prepayment %");
    // End of the lines. 
    
    END ELSE
    "Prepmt Amt to Deduct" := 0
    ...
    
  15. 다음과 같이 구매 라인 테이블(39)에서 새 PrepmtAmtToDeduct 함수를 만듭니다.

    PROCEDURE PrepmtAmtToDeduct@1470002(PricesIncludingVAT@1470000 : Boolean;PrepaymentPct@1470001 : Decimal) : Decimal;
    VAR
    VATPct@1470002 : Decimal;
    BEGIN
    IF PricesIncludingVAT THEN
    VATPct := "VAT %"
    ELSE
    VATPct := 0;
    EXIT(
    ROUND(
    ROUND(
    ROUND(
    ROUND("Direct Unit Cost" * "Qty. to Invoice",Currency."Amount Rounding Precision") *
    (1 - ("Line Discount %" / 100)),Currency."Amount Rounding Precision") *
    (PrepaymentPct / 100) / (1 + (VATPct / 100)),Currency."Amount Rounding Precision") *
    (1 + (VATPct / 100)),Currency."Amount Rounding Precision"));
    END;
    

필수 구성 요소

이 핫픽스를 적용하려면 동유럽 버전의 Microsoft Dynamics NAV 2009 R2가 설치되어 있어야 합니다.

제거 정보

이 핫픽스는 제거할 수 없습니다.

상태

Microsoft에서 이는 "적용 대상" 섹션에 나열된 Microsoft 제품에서의 문제임을 확인했습니다.

참고 이 문서는 Microsoft 지원 부서에서 직접 작성한 "빠른 게시" 문서입니다. 여기에 포함된 정보는 새로운 문제에 대한 응답으로 있는 그대로 제공됩니다. 문서를 제공하는 속도로 인해 문서에 오자가 있을 수 있으며 사전 통지 없이 언제든지 수정될 수 있습니다. 다른 고려 사항은 사용 약관을 참조하십시오.