Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"There is no Sales Invoice Line within the filter. Filters: Document No.: [Document_Number]" error message when you reject a posted bill group in the Portuguese version of Microsoft Dynamics NAV


View products that this article applies to.

This article applies to Microsoft Dynamics NAV for the Portuguese (pt) language locale.

↑ Back to the top


Symptoms

When you reject a posted bill group in the Portuguese version of Microsoft Dynamics NAV, you receive the following error message:
There is no Sales Invoice Line within the filter. Filters: Document No.: Document_Number.
This problem occurs if the following conditions are true:
  • The Unrealized VAT check box is selected in the General Ledger Setup dialog box.
  • The posted bill group contains a bill that was created manually.
  • The bill is related with an invoice that was posted from a journal.
This problem occurs in the following products:
  • The Portuguese version of Microsoft Dynamics NAV 2009 R2
  • The Portuguese version of Microsoft Dynamics NAV 2009 Service Pack 1
  • The Portuguese version of Microsoft Dynamics NAV 5.0 Service Pack 1

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV 2009 service pack or the next Microsoft Dynamics NAV version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

↑ Back to the top




Installation information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.

To implement this hotfix, you must have a developer license.

We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:
  • The Modify permission for the object that you will be changing.
  • The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.


Note You do not have to have rights to the data stores unless you have to perform data repair.

Code changes

Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
  1. Change the code of the Fields in the Cartera Doc. table (31000002) as follows:
    Existing code
    ...
    CalcFormula=Exist("Vendor Ledger Entry" WHERE (On Hold=FILTER(<>''),
    Entry No.=FIELD(Entry No.)));
    CaptionML=ENU=On Hold }
    { 50 ; ;Elect. Pmts Exported;Boolean ;CaptionML=ENU=Elect. Pmts Exported }
    { 51 ; ;Export File Name ;Text30 ;CaptionML=ENU=Export File Name }
    }
    ...
    Replacement code
    ...
    CalcFormula=Exist("Vendor Ledger Entry" WHERE (On Hold=FILTER(<>''),
    Entry No.=FIELD(Entry No.)));
    CaptionML=ENU=On Hold }

    // Add the following line.
    { 49 ; ;From Journal ;Boolean }

    { 50 ; ;Elect. Pmts Exported;Boolean ;CaptionML=ENU=Elect. Pmts Exported }
    { 51 ; ;Export File Name ;Text30 ;CaptionML=ENU=Export File Name }
    }
    ...
  2. Change the code of the Fields in the Posted Cartera Doc. table (31000003) as follows:
    Existing code
    ...
    OptionCaptionML=ENU=" ,Unrisked,Risked";
    OptionString=[ ,Unrisked,Risked];
    Editable=No }

    // Delete the following line.
    }

    KEYS
    {
    { ;Type,Entry No. ;Clustered=Yes }
    ...
    Replacement code
    ...
    OptionCaptionML=ENU=" ,Unrisked,Risked";
    OptionString=[ ,Unrisked,Risked];
    Editable=No }

    // Add the following lines.
    { 49 ; ;From Journal ;Boolean }
    }
    // End of the lines.

    KEYS
    {
    { ;Type,Entry No. ;Clustered=Yes }
    ...
  3. Change the code of the Fields in the Closed Cartera Doc. table (31000004) as follows:
    Existing code
    ...
    OptionCaptionML=ENU=" ,Unrisked,Risked";
    OptionString=[ ,Unrisked,Risked];
    Editable=No }

    // Delete the following line.
    }

    KEYS
    {
    { ;Type,Entry No. ;Clustered=Yes }
    ...
    Replacement code
    ...
    OptionCaptionML=ENU=" ,Unrisked,Risked";
    OptionString=[ ,Unrisked,Risked];
    Editable=No }

    // Add the following lines.
    { 49 ; ;From Journal ;Boolean }
    }
    // End of the lines.

    KEYS
    {
    { ;Type,Entry No. ;Clustered=Yes }
    ...
  4. Change the code of the Data Item Number 1 in the Settle Docs. in Posted PO report (31000082) as follows:
    Existing code 1
    ...
    END;
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedDoc."Document Type" = PostedDoc."Document Type"::Invoice THEN
    ExistInvoice := TRUE;
    ...
    Replacement code 1
    ...
    END;
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedDoc."Document Type" = PostedDoc."Document Type"::Invoice THEN
    ExistInvoice := TRUE;
    ...
    Existing code 2
    ...
    VendLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Delete the following line.
    ExistsNoRealVAT := CarteraManagement.FindVendVATSetup(VATPostingSetup,VendLedgEntry);

    END;

    VALIDATE("Account No.",VendLedgEntry."Vendor No.");
    ...
    Replacement code 2
    ...
    VendLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistsNoRealVAT := CarteraManagement.FindVendVATSetup(VATPostingSetup,VendLedgEntry,FromJnl);
    // End of the lines.

    END;

    VALIDATE("Account No.",VendLedgEntry."Vendor No.");
    ...
    Existing code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    NoRealVATBuffer);

    TempCurrCode := "Currency Code";
    "Currency Code" := '';
    ...
    Replacement code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Add the following lines.
    NoRealVATBuffer,
    FromJnl);
    // End of the lines.

    TempCurrCode := "Currency Code";
    "Currency Code" := '';
    ...
  5. Change the code of the Data Item Number 1 in the Partial Settl.- Receivable report (31000084) as follows:
    Existing code 1
    ...
    Text1110000);
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedBillGr."No." = '' THEN BEGIN
    PostedBillGr.GET(PostedDoc."Bill Gr./Pmt. Order No.");
    ...
    Replacement code 1
    ...
    Text1110000);
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedBillGr."No." = '' THEN BEGIN
    PostedBillGr.GET(PostedDoc."Bill Gr./Pmt. Order No.");
    ...
    Existing code 2
    ...
    CustLedgEntry.GET(PostedDoc."Entry No.");

    IF (GLSetup."Unrealized VAT") AND (PostedDoc."Document Type" = PostedDoc."Document Type"::Bill) THEN BEGIN

    // Delete the following line.
    ExistsNoRealVAT := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry);

    END;

    VALIDATE("Account No.",CustLedgEntry."Customer No.");
    ...
    Replacement code 2
    ...
    CustLedgEntry.GET(PostedDoc."Entry No.");

    IF (GLSetup."Unrealized VAT") AND (PostedDoc."Document Type" = PostedDoc."Document Type"::Bill) THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistsNoRealVAT := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry,FromJnl);
    // End of the lines.

    END;

    VALIDATE("Account No.",CustLedgEntry."Customer No.");
    ...
    Existing code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    NoRealVATBuffer);

    IF NoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
    Replacement code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Add the following lines.
    NoRealVATBuffer,
    FromJnl);
    // End of the lines.

    IF NoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
  6. Change the code of the Data Item Number 1 in the Partial Settl. – Payable report (31000085) as follows:
    Existing code 1
    ...
    Text1110000);
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedPmtOrd."No." = '' THEN BEGIN
    PostedPmtOrd.GET(PostedDoc."Bill Gr./Pmt. Order No.");
    ...
    Replacement code 1
    ...
    Text1110000);
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedPmtOrd."No." = '' THEN BEGIN
    PostedPmtOrd.GET(PostedDoc."Bill Gr./Pmt. Order No.");
    ...
    Existing code 2
    ...
    VendLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Delete the following line.
    ExistsNoRealVAT := CarteraManagement.FindVendVATSetup(VATPostingSetup,VendLedgEntry);

    END;

    VALIDATE("Account No.",VendLedgEntry."Vendor No.");
    ...
    Replacement code 2
    ...
    VendLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistsNoRealVAT := CarteraManagement.FindVendVATSetup(VATPostingSetup,VendLedgEntry,FromJnl);
    // End of the lines.

    END;

    VALIDATE("Account No.",VendLedgEntry."Vendor No.");
    ...
    Existing code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    NoRealVATBuffer);


    IF NoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
    Replacement code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Add the following lines.
    NoRealVATBuffer,
    FromJnl);
    // End of the lines.

    IF NoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
  7. Change the code of the Data Item Number 2 in the Batch Settl. Posted Bill Grs. report (31000086) as follows:
    Existing code 1
    ...
    ExistVATEntry := FALSE;
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    BankAcc.GET(PostedBillGr."Bank Account No.");
    Delay := BankAcc."Delay for Notices";
    ...
    Replacement code 1
    ...
    ExistVATEntry := FALSE;
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    BankAcc.GET(PostedBillGr."Bank Account No.");
    Delay := BankAcc."Delay for Notices";
    ...
    Existing code 2
    ...
    STRSUBSTNO(Text1110004,PostedDoc."Document No.",PostedDoc."No."),
    1,MAXSTRLEN(Description));
    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Delete the following line.
    ExistVATEntry := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry);

    END;
    END ELSE
    Description := COPYSTR(
    ...
    Replacement code 2
    ...
    STRSUBSTNO(Text1110004,PostedDoc."Document No.",PostedDoc."No."),
    1,MAXSTRLEN(Description));
    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistVATEntry := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry,FromJnl);
    // End of the lines.

    END;
    END ELSE
    Description := COPYSTR(
    ...
    Existing code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    TempNoRealVATBuffer);

    IF TempNoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
    Replacement code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following lines.
    TempNoRealVATBuffer,
    FromJnl);
    // End of the lines.

    IF TempNoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
  8. Change the code of the Data Item Number 2 in the Batch Settl. Posted POs report (31000087) as follows:
    Existing code 1
    ...
    LastVATEntryNo := 0;
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedDoc."Document Type" = PostedDoc."Document Type"::Invoice THEN
    ExistInvoice := TRUE;
    ...
    Replacement code 1
    ...
    LastVATEntryNo := 0;
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");
    IF PostedDoc."Document Type" = PostedDoc."Document Type"::Invoice THEN
    ExistInvoice := TRUE;
    ...
    Existing code 2
    ...
    VendLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Delete the following line.
    ExistsNoRealVAT := CarteraManagement.FindVendVATSetup(VATPostingSetup,VendLedgEntry);

    END;

    VALIDATE("Account No.",VendLedgEntry."Vendor No.");
    ...
    Replacement code 2
    ...
    VendLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistsNoRealVAT := CarteraManagement.FindVendVATSetup(VATPostingSetup,VendLedgEntry,FromJnl);
    // End of the lines.

    END;

    VALIDATE("Account No.",VendLedgEntry."Vendor No.");
    ...
    Existing code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    TempNoRealVATBuffer);

    IF TempNoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
    Replacement code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Add the following lines.
    TempNoRealVATBuffer,
    FromJnl);
    // End of the lines.

    IF TempNoRealVATBuffer.FIND('-') THEN BEGIN
    REPEAT
    ...
  9. Change the code of the Data Item Number 1 in the Reject Docs. report (31000097) as follows:
    Existing code 1
    ...
    ExistVATEntry := FALSE;
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("Bill No.");
    DocCount := DocCount + 1;
    Window.UPDATE(1,DocCount);
    ...
    Replacement code 1
    ...
    ExistVATEntry := FALSE;
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc("Bill No.");
    DocCount := DocCount + 1;
    Window.UPDATE(1,DocCount);
    ...
    Existing code 2
    ...
    DocCount := DocCount + 1;
    Window.UPDATE(1,DocCount);

    IF GLSetup."Unrealized VAT" AND
    (("Document Type" = "Document Type"::Bill) OR ("Document Type" = "Document Type"::Invoice)) THEN BEGIN

    ...
    Replacement code 2
    ...
    DocCount := DocCount + 1;
    Window.UPDATE(1,DocCount);

    // Add the following lines.
    IF ArePostedDocs THEN
    PostedDoc.GET(PostedDoc.Type::Receivable,"Entry No.");
    // End of the lines.

    IF GLSetup."Unrealized VAT" AND
    (("Document Type" = "Document Type"::Bill) OR ("Document Type" = "Document Type"::Invoice)) THEN BEGIN
    ...
    Existing code 3
    ...
    IF GLSetup."Unrealized VAT" AND
    (("Document Type" = "Document Type"::Bill) OR ("Document Type" = "Document Type"::Invoice)) THEN BEGIN

    // Delete the following line.
    ExistsNoRealVAT := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry);

    END;

    IF ArePostedDocs THEN BEGIN
    ...
    Replacement code 3
    ...
    IF GLSetup."Unrealized VAT" AND
    (("Document Type" = "Document Type"::Bill) OR ("Document Type" = "Document Type"::Invoice)) THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistsNoRealVAT := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry,FromJnl);
    // End of the lines.

    END;

    IF ArePostedDocs THEN BEGIN
    ...
    Existing code 4
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    NoRealVATBuffer);

    TempCurrCode := CustLedgEntry."Currency Code";
    CustLedgEntry."Currency Code" := '';
    ...
    Replacement code 4
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Add the following lines.
    NoRealVATBuffer,
    FromJnl);
    // End of the lines.

    TempCurrCode := CustLedgEntry."Currency Code";
    CustLedgEntry."Currency Code" := '';
    ...
  10. Change the code of the Data Item Number 1 in the Settle Docs. in Post. Bill Gr. report (31000098) as follows:
    Existing code 1
    ...
    Text1110000);
    END;

    // Delete the following line.
    OnAfterGetRecord=BEGIN

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");

    IF PostedBillGr."No." = '' THEN BEGIN
    ...
    Replacement code 1
    ...
    Text1110000);
    END;

    // Add the following lines.
    OnAfterGetRecord=VAR
    FromJnl@1110000 : Boolean;
    BEGIN
    // End of the lines.

    IsRedrawn := CarteraManagement.CheckFromRedrawnDoc(PostedDoc."No.");

    IF PostedBillGr."No." = '' THEN BEGIN
    ...
    Existing code 2
    ...
    CustLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" AND (PostedDoc."Document Type" = PostedDoc."Document Type"::Bill) THEN BEGIN

    // Delete the following line.
    ExistsNoRealVAT := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry);

    END;

    VALIDATE("Account No.",CustLedgEntry."Customer No.");
    ...
    Replacement code 2
    ...
    CustLedgEntry.GET(PostedDoc."Entry No.");

    IF GLSetup."Unrealized VAT" AND (PostedDoc."Document Type" = PostedDoc."Document Type"::Bill) THEN BEGIN

    // Add the following lines.
    FromJnl := FALSE;
    IF PostedDoc."From Journal" THEN
    FromJnl := TRUE;
    ExistsNoRealVAT := CarteraManagement.FindCustVATSetup(VATPostingSetup,CustLedgEntry,FromJnl);
    // End of the lines.

    END;

    VALIDATE("Account No.",CustLedgEntry."Customer No.");
    ...
    Existing code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Delete the following line.
    NoRealVATBuffer);

    TempCurrCode := PostedDoc."Currency Code";
    PostedDoc."Currency Code" := '';
    ...
    Replacement code 3
    ...
    ExistVATEntry,
    FirstVATEntryNo,
    LastVATEntryNo,

    // Add the following lines.
    NoRealVATBuffer,
    FromJnl);
    // End of the lines.

    TempCurrCode := PostedDoc."Currency Code";
    PostedDoc."Currency Code" := '';
    ...
  11. Change the code of the PostCust function in the Gen. Jnl.-Post Line codeunit (12) as follows:
    Existing code
    ...
    IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN
    IF "Document Type" = "Document Type"::Bill THEN BEGIN

    // Delete the following line.
    DocPost.CreateReceivableDoc(GenJnlLine,CVLedgEntryBuf);

    CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera;
    CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
    Replacement code
    ...
    IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN
    IF "Document Type" = "Document Type"::Bill THEN BEGIN

    // Add the following line.
    DocPost.CreateReceivableDoc(GenJnlLine,CVLedgEntryBuf,BillFromJournal);

    CustLedgEntry."Document Situation" := CustLedgEntry."Document Situation"::Cartera;
    CustLedgEntry."Document Status" := CustLedgEntry."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
  12. Change the code of the PostVend function in the Gen. Jnl.-Post Line codeunit (12) as follows:
    Existing code
    ...
    IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN
    IF "Document Type" = "Document Type"::Bill THEN BEGIN

    // Delete the following line.
    DocPost.CreatePayableDoc(GenJnlLine,CVLedgEntryBuf);

    VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera;
    VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
    Replacement code
    ...
    IF AppManagement.AccessToCartera AND NOT GenJnlLine.Prepayment THEN BEGIN
    IF "Document Type" = "Document Type"::Bill THEN BEGIN

    // Add the following line.
    DocPost.CreatePayableDoc(GenJnlLine,CVLedgEntryBuf,BillFromJournal);

    VendLedgEntry."Document Situation" := VendLedgEntry."Document Situation"::Cartera;
    VendLedgEntry."Document Status" := VendLedgEntry."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
  13. Change the code of the SendDocToCartera function in the Gen. Jnl.-Post Line codeunit (12) as follows:
    Existing code 1
    ...
    DocType::Purchase:
    BEGIN
    //TransferVendLedgEntry(CVLedgEntryBuf4,VendLedgEntry4,TRUE);

    // Delete the following line.
    DocPost.CreatePayableDoc(GenJnlLine3,CVLedgEntryBuf4);

    VendLedgEntry4."Document Situation" := VendLedgEntry4."Document Situation"::Cartera;
    VendLedgEntry4."Document Status" := VendLedgEntry4."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
    Replacement code 1
    ...
    DocType::Purchase:
    BEGIN
    //TransferVendLedgEntry(CVLedgEntryBuf4,VendLedgEntry4,TRUE);

    // Add the following line.
    DocPost.CreatePayableDoc(GenJnlLine3,CVLedgEntryBuf4,BillFromJournal);

    VendLedgEntry4."Document Situation" := VendLedgEntry4."Document Situation"::Cartera;
    VendLedgEntry4."Document Status" := VendLedgEntry4."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
    Existing code 2
    ...
    DocType::Sale:
    BEGIN
    //TransferCustLedgEntry(CVLedgEntryBuf4,CustLedgEntry4,TRUE);

    // Delete the following line.
    DocPost.CreateReceivableDoc(GenJnlLine3,CVLedgEntryBuf4);

    CustLedgEntry4."Document Situation" := CustLedgEntry4."Document Situation"::Cartera;
    CustLedgEntry4."Document Status" := CustLedgEntry4."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
    Replacement code 2
    ...
    DocType::Sale:
    BEGIN
    //TransferCustLedgEntry(CVLedgEntryBuf4,CustLedgEntry4,TRUE);

    // Add the following line.
    DocPost.CreateReceivableDoc(GenJnlLine3,CVLedgEntryBuf4,BillFromJournal);

    CustLedgEntry4."Document Situation" := CustLedgEntry4."Document Situation"::Cartera;
    CustLedgEntry4."Document Status" := CustLedgEntry4."Document Status"::Open;
    CarteraDimMgt.MoveJnlLineDimToDocCarteraDim(
    ...
  14. Change the code of the CustUnrealizedVAT2 function in the CarteraManagement codeunit (31000000) as follows:
    Existing code 1
    ...
    END;
    END;

    // Delete the following line.
    PROCEDURE CustUnrealizedVAT2@21(CustLedgEntry2@1110000 : Record 21;AmountLCY@1110001 : Decimal;GenJnlLine@1110002 : Record 81;VAR ExistVATEntry@1110003 : Boolean;VAR FirstVATEntry@1110004 : Integer;VAR LastVATEntry@1110005 : Integer;VAR NoRealVATBuffer@1110008 : Record 31000012);

    VAR
    CustLedgEntry3@1110006 : Record 21;
    SettledAmt@1110007 : Decimal;
    ...
    Replacement code 1
    ...
    END;
    END;

    // Add the following line.
    PROCEDURE CustUnrealizedVAT2@21(CustLedgEntry2@1110000 : Record 21;AmountLCY@1110001 : Decimal;GenJnlLine@1110002 : Record 81;VAR ExistVATEntry@1110003 : Boolean;VAR FirstVATEntry@1110004 : Integer;VAR LastVATEntry@1110005 : Integer;VAR NoRealVATBuffer@1110008 : Record 31000012;FromJnl@1110009 : Boolean);

    VAR
    CustLedgEntry3@1110006 : Record 21;
    SettledAmt@1110007 : Decimal;
    ...
    Existing code 2
    ...
    CustLedgEntry3@1110006 : Record 21;
    SettledAmt@1110007 : Decimal;
    BEGIN

    // Delete the following line.
    IF FindCustVATSetup(VATPostingSetup,CustLedgEntry2) THEN BEGIN

    CustLedgEntry3.SETCURRENTKEY(CustLedgEntry3."Document No.");
    CustLedgEntry3.SETRANGE(CustLedgEntry3."Document Type",CustLedgEntry3."Document Type"::Invoice);
    CustLedgEntry3.SETRANGE(CustLedgEntry3."Document No.",CustLedgEntry2."Document No.");
    ...
    Replacement code 2
    ...
    CustLedgEntry3@1110006 : Record 21;
    SettledAmt@1110007 : Decimal;
    BEGIN

    // Add the following line.
    IF FindCustVATSetup(VATPostingSetup,CustLedgEntry2,FromJnl) THEN BEGIN

    CustLedgEntry3.SETCURRENTKEY(CustLedgEntry3."Document No.");
    CustLedgEntry3.SETRANGE(CustLedgEntry3."Document Type",CustLedgEntry3."Document Type"::Invoice);
    CustLedgEntry3.SETRANGE(CustLedgEntry3."Document No.",CustLedgEntry2."Document No.");
    ...
  15. Change the code of the FindCustVATSetup function in the CarteraManagement codeunit (31000000) as follows:
    Existing code 1
    ...
    END;
    END;

    // Delete the following line.
    PROCEDURE FindCustVATSetup@1110001(VAR VATSetup@1110000 : Record 325;CustLedgEntry4@1110011 : Record 21) : Boolean;

    VAR
    SalesLine2@1110010 : Record 113;
    ExistsVATNoReal@1110004 : Boolean;
    ...
    Replacement code 1
    ...
    END;
    END;

    // Add the following line.
    PROCEDURE FindCustVATSetup@1110001(VAR VATSetup@1110000 : Record 325;CustLedgEntry4@1110011 : Record 21;IsFromJournal@1110002 : Boolean) : Boolean;

    VAR
    SalesLine2@1110010 : Record 113;
    ExistsVATNoReal@1110004 : Boolean;
    ...
    Existing code 2
    ...
    SalesLine2@1110010 : Record 113;
    ExistsVATNoReal@1110004 : Boolean;
    ServiceLine2@1110001 : Record 5993;

    // Delete the following lines.
    BEGIN
    SalesLine2.SETRANGE("Document No.",CustLedgEntry4."Document No.");
    IF SalesLine2.FIND('-') THEN
    REPEAT
    CheckPctUnrealVATType(VATSetup, SalesLine2."VAT Bus. Posting Group",SalesLine2."VAT Prod. Posting Group",ExistsVATNoReal);
    UNTIL SalesLine2.NEXT = 0
    ELSE BEGIN
    ServiceLine2.SETRANGE("Document No.",CustLedgEntry4."Document No.");
    ServiceLine2.FIND('-');
    REPEAT
    CheckPctUnrealVATType(VATSetup, ServiceLine2."VAT Bus. Posting Group",ServiceLine2."VAT Prod. Posting Group",ExistsVATNoReal);
    UNTIL ServiceLine2.NEXT = 0;
    // End of the lines.

    END;
    EXIT(ExistsVATNoReal);
    END;
    ...
    Replacement code 2
    ...
    SalesLine2@1110010 : Record 113;
    ExistsVATNoReal@1110004 : Boolean;
    ServiceLine2@1110001 : Record 5993;

    // Add the following lines.
    GLEntry@1110003 : Record 17;
    BEGIN
    IF IsFromJournal THEN BEGIN
    GLEntry.SETCURRENTKEY("Document No.","Posting Date");
    GLEntry.SETRANGE("Document No.",CustLedgEntry4."Document No.");
    IF GLEntry.FINDFIRST THEN
    CheckPctUnrealVATType(VATSetup,GLEntry."VAT Bus. Posting Group",GLEntry."VAT Prod. Posting Group",ExistsVATNoReal);
    END ELSE BEGIN
    SalesLine2.SETRANGE("Document No.",CustLedgEntry4."Document No.");
    IF SalesLine2.FINDSET THEN
    REPEAT
    CheckPctUnrealVATType(VATSetup,SalesLine2."VAT Bus. Posting Group",SalesLine2."VAT Prod. Posting Group",ExistsVATNoReal);
    UNTIL SalesLine2.NEXT = 0
    ELSE BEGIN
    ServiceLine2.SETRANGE("Document No.",CustLedgEntry4."Document No.");
    IF ServiceLine2.FINDSET THEN
    REPEAT
    CheckPctUnrealVATType(
    VATSetup,
    ServiceLine2."VAT Bus. Posting Group",
    ServiceLine2."VAT Prod. Posting Group",
    ExistsVATNoReal);
    UNTIL ServiceLine2.NEXT = 0;
    END;
    // End of the lines.

    END;
    EXIT(ExistsVATNoReal);
    END;
    ...
  16. Change the code of the VendUnrealizedVAT2 function in the CarteraManagement codeunit (31000000) as follows:
    Existing code 1
    ...
    EXIT(ExistsVATNoReal);
    END;

    // Delete the following line.
    PROCEDURE VendUnrealizedVAT2@27(VendLedgEntry2@1110000 : Record 25;AmountLCY@1110001 : Decimal;GenJnlLine@1110002 : Record 81;VAR ExistVATEntry@1110003 : Boolean;VAR FirstVATEntry@1110004 : Integer;VAR LastVATEntry@1110005 : Integer;VAR NoRealVATBuffer@1110008 : Record 31000012);

    VAR
    VendLedgEntry3@1110006 : Record 25;
    SettledAmt@1110007 : Decimal;
    ...
    Replacement code 1
    ...
    EXIT(ExistsVATNoReal);
    END;


    // Add the following line.
    PROCEDURE VendUnrealizedVAT2@27(VendLedgEntry2@1110000 : Record 25;AmountLCY@1110001 : Decimal;GenJnlLine@1110002 : Record 81;VAR ExistVATEntry@1110003 : Boolean;VAR FirstVATEntry@1110004 : Integer;VAR LastVATEntry@1110005 : Integer;VAR NoRealVATBuffer@1110008 : Record 31000012;FromJnl@1110009 : Boolean);

    VAR
    VendLedgEntry3@1110006 : Record 25;
    SettledAmt@1110007 : Decimal;
    ...
    Existing code 2
    ...
    VendLedgEntry3@1110006 : Record 25;
    SettledAmt@1110007 : Decimal;
    BEGIN

    // Delete the following line.
    IF FindVendVATSetup(VATPostingSetup,VendLedgEntry2) THEN BEGIN

    VendLedgEntry3.SETCURRENTKEY(VendLedgEntry3."Document No.");
    VendLedgEntry3.SETRANGE(VendLedgEntry3."Document Type",VendLedgEntry3."Document Type"::Invoice);
    VendLedgEntry3.SETRANGE(VendLedgEntry3."Document No.",VendLedgEntry2."Document No.");
    ...
    Replacement code 2
    ...
    VendLedgEntry3@1110006 : Record 25;
    SettledAmt@1110007 : Decimal;
    BEGIN

    // Add the following line.
    IF FindVendVATSetup(VATPostingSetup,VendLedgEntry2,FromJnl) THEN BEGIN

    VendLedgEntry3.SETCURRENTKEY(VendLedgEntry3."Document No.");
    VendLedgEntry3.SETRANGE(VendLedgEntry3."Document Type",VendLedgEntry3."Document Type"::Invoice);
    VendLedgEntry3.SETRANGE(VendLedgEntry3."Document No.",VendLedgEntry2."Document No.");
    ...
  17. Change the code of the FindVendVATSetup function in the CarteraManagement codeunit (31000000) as follows:
    Existing code 1
    ...
    END;
    END;

    // Delete the following line.
    PROCEDURE FindVendVATSetup@1110000(VAR VATSetup@1110000 : Record 325;VendLedgEntry4@1110001 : Record 25) : Boolean;

    VAR
    PurchLine2@1110010 : Record 123;
    ExistsVATNoReal@1110006 : Boolean;
    ...
    Replacement code 1
    ...
    END;
    END;

    // Add the following line.
    PROCEDURE FindVendVATSetup@1110000(VAR VATSetup@1110000 : Record 325;VendLedgEntry4@1110001 : Record 25;IsFromJournal@1110002 : Boolean) : Boolean;

    VAR
    PurchLine2@1110010 : Record 123;
    ExistsVATNoReal@1110006 : Boolean;
    ...
    Existing code 2
    ...
    VAR
    PurchLine2@1110010 : Record 123;
    ExistsVATNoReal@1110006 : Boolean;

    // Delete the following lines.
    BEGIN
    PurchLine2.SETRANGE("Document No.",VendLedgEntry4."Document No.");
    PurchLine2.FIND('-');
    REPEAT
    CheckPctUnrealVATType(VATSetup, PurchLine2."VAT Bus. Posting Group",PurchLine2."VAT Prod. Posting Group",ExistsVATNoReal);
    UNTIL PurchLine2.NEXT = 0;
    // End of the lines.

    EXIT(ExistsVATNoReal);
    END;
    ...
    Replacement code 2
    ...
    VAR
    PurchLine2@1110010 : Record 123;
    ExistsVATNoReal@1110006 : Boolean;

    // Add the following lines.
    GLEntry@1110003 : Record 17;
    BEGIN
    IF IsFromJournal THEN BEGIN
    GLEntry.SETCURRENTKEY("Document No.","Posting Date");
    GLEntry.SETRANGE("Document No.",VendLedgEntry4."Document No.");
    IF GLEntry.FINDFIRST THEN
    CheckPctUnrealVATType(VATSetup,GLEntry."VAT Bus. Posting Group",GLEntry."VAT Prod. Posting Group",ExistsVATNoReal);
    END ELSE BEGIN
    PurchLine2.SETRANGE("Document No.",VendLedgEntry4."Document No.");
    IF PurchLine2.FINDSET THEN
    REPEAT
    CheckPctUnrealVATType(VATSetup,PurchLine2."VAT Bus. Posting Group",PurchLine2."VAT Prod. Posting Group",ExistsVATNoReal);
    UNTIL PurchLine2.NEXT = 0;
    END;
    // End of the lines.

    EXIT(ExistsVATNoReal);
    END;

    ...
  18. Change the code of the CreateReceivableDoc function in the Document-Post codeunit (31000006) as follows:
    Existing code 1
    ...
    END;
    END;

    // Delete the following line.
    PROCEDURE CreateReceivableDoc@28(GenJnlLine@1110000 : Record 81;VAR CVLedgEntryBuf@1110001 : Record 382);

    VAR
    Doc@1110002 : Record 31000002;
    CompanyInfo@1110003 : Record 79;
    ...
    Replacement code 1
    ...
    END;
    END;

    // Add the following line.
    PROCEDURE CreateReceivableDoc@28(GenJnlLine@1110000 : Record 81;VAR CVLedgEntryBuf@1110001 : Record 382;IsFromJournal@1110006 : Boolean);

    VAR
    Doc@1110002 : Record 31000002;
    CompanyInfo@1110003 : Record 79;
    ...
    Existing code 2
    ...
    "Document No.","Bill No.");
    END;

    Doc.INSERT;
    CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera;
    CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open;
    ...
    Replacement code 2
    ...
    "Document No.","Bill No.");
    END;

    // Add the following lines.
    IF IsFromJournal THEN
    Doc."From Journal" := TRUE;
    // End of the lines.

    Doc.INSERT;
    CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera;
    CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open;
    ...
  19. Change the code of the CreatePayableDoc function in the Document-Post codeunit (31000006) as follows:
    Existing code 1
    ...
    CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open;
    END;

    // Delete the following line.
    PROCEDURE CreatePayableDoc@13(GenJnlLine@1110000 : Record 81;VAR CVLedgEntryBuf@1110001 : Record 382);

    VAR
    Doc@1110002 : Record 31000002;
    OldVendLedgEntry@1110003 : Record 25;
    ...
    Replacement code 1
    ...
    CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open;
    END;

    // Add the following line.
    PROCEDURE CreatePayableDoc@13(GenJnlLine@1110000 : Record 81;VAR CVLedgEntryBuf@1110001 : Record 382;IsFromJournal@1110006 : Boolean);

    VAR
    Doc@1110002 : Record 31000002;
    OldVendLedgEntry@1110003 : Record 25;
    ...
    Existing code 2
    ...
    "Document No.","Bill No.");
    END;

    Doc.INSERT;
    CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera;
    CVLedgEntryBuf."Document Status" := CVLedgEntryBuf."Document Status"::Open;
    ...
    Replacement code 2
    ...
    "Document No.","Bill No.");
    END;

    // Add the following lines.
    IF IsFromJournal THEN
    Doc."From Journal" := TRUE;
    // End of the lines.

    Doc.INSERT;
    CVLedgEntryBuf."Document Situation" := CVLedgEntryBuf."Document Situation"::Cartera;
    CVLedgEntryBuf."Document Status" := CVLedgEntryBuf
    ...

Prerequisites

You must have one of the following products installed to apply this hotfix:
  • The Portuguese version of Microsoft Dynamics NAV 2009 R2
  • The Portuguese version of Microsoft Dynamics NAV 2009 Service Pack 1
  • The Portuguese version of Microsoft Dynamics NAV 5.0 Service Pack 1

Removal information

You cannot remove this hotfix.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

↑ Back to the top


Keywords: kberrmsg, kbsurveynew, kbnoloc, kbmbsquickpub, kbqfe, kbmbsmigrate, kbmbspartner, kb, kbmbscodefix

↑ Back to the top

Article Info
Article ID : 2620808
Revision : 1
Created on : 1/7/2017
Published on : 10/8/2011
Exists online : False
Views : 232