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.

The Customer Bills List report and the Vendor Account Bills List report print a credit memos applied to invoice two times unexpectedly in the Italian version of Microsoft Dynamics NAV 2009 Service Pack 1


View products that this article applies to.

This article applies to Microsoft Dynamics NAV for the Italian (it) language locale.

↑ Back to the top


Symptoms

Assume that you use a credit memo applied invoice in the Italian version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1). When you run the Customer Bills List report (12117) and the Vendor Account Bills List report (12116), the reports print the credit memos applied to invoice two times unexpectedly.

↑ 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 Data Item Number 2 in the Vendor Account Bills List report (12116) as follows:
    Existing code
    ...
    END;

    OnAfterGetRecord=BEGIN

    // Delete the following lines.
    IF (("Document Type" = "Document Type"::Payment) OR ("Document Type" = "Document Type"::" "))
    AND (Open = FALSE) THEN
    // End of the lines.

    CurrReport.SKIP;

    CALCFIELDS("Amount (LCY)","Remaining Amt. (LCY)");
    ...
    Replacement code
    ...
    END;

    OnAfterGetRecord=BEGIN

    // Add the following lines.
    IF (("Document Type" = "Document Type"::Payment) OR
    ("Document Type" = "Document Type"::" ") OR
    ("Document Type" = "Document Type"::"Credit Memo")) AND
    NOT Open
    THEN
    // End of the lines.

    CurrReport.SKIP;

    CALCFIELDS("Amount (LCY)","Remaining Amt. (LCY)");
    ...
  2. Change the code of the Data Item Number 2 Sections in the Vendor Account Bills List report (12116) as follows:
    Existing code
    ...
    DataSetFieldName=VendLedgEntry1__External_Document_No___Control1130023 }
    { 1130024;TextBox ;1950 ;423 ;1350 ;423 ;SourceExpr="Document Type";
    DataSetFieldName=VendLedgEntry1__Document_Type__Control1130024 }
    }
    }
    { PROPERTIES
    ...
    Replacement code
    ...
    DataSetFieldName=VendLedgEntry1__External_Document_No___Control1130023 }
    { 1130024;TextBox ;1950 ;423 ;1350 ;423 ;SourceExpr="Document Type";
    DataSetFieldName=VendLedgEntry1__Document_Type__Control1130024 }

    // Add the following lines.
    { 1130082;TextBox ;27600;0 ;150 ;423 ;Visible=No;
    ForeColor=65535;
    SourceExpr=FORMAT("Document Type",0,2);
    DataSetFieldName=VendLedgEntry1_DocumentType }
    // End of the lines.

    }
    }
    { PROPERTIES
    ...
  3. Change the code of the Data Item Number 4 Sections in the Vendor Account Bills List report (12116) as follows:
    Existing code 1
    ...
    SectionWidth=27750;
    SectionHeight=846;
    OnPreSection=BEGIN

    // Delete the following lines.
    IF (VendLedgEntry1."Document Type" = VendLedgEntry1."Document Type"::Payment)
    OR (VendLedgEntry1."Document Type" = VendLedgEntry1."Document Type"::" ") THEN
    // End of the lines.

    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);
    ...
    Replacement code 1
    ...
    SectionWidth=27750;
    SectionHeight=846;
    OnPreSection=BEGIN

    // Add the following lines.
    IF (VendLedgEntry1."Document Type" = VendLedgEntry1."Document Type"::Payment) OR
    (VendLedgEntry1."Document Type" = VendLedgEntry1."Document Type"::"Credit Memo") OR
    (VendLedgEntry1."Document Type" = VendLedgEntry1."Document Type"::" ") OR
    ("Unapplied by Entry No." <> 0)
    THEN
    // End of the lines.

    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);
    ...
    Existing code 2
    ...
    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);

    // Delete the following lines.
    IF ("Unapplied by Entry No." <> 0) THEN
    CurrReport.SHOWOUTPUT(FALSE);
    // End of the lines.

    END;

    }
    ...
    Replacement code 2
    ...
    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);
    END;

    }
    ...
  4. Change the code of the Documentation in the Vendor Account Bills List report (12116) as follows:
    Existing code 1
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Delete the following line.
    <Hidden>=IIF((Fields!Detailed_Vendor_Ledg__Entry_Entry_No_.Value=0 or Fields!Detailed_Vendor_Ledg__Entry__Unapplied_by_Entry_No__.Value<>0),TRUE,FALSE)</Hidden>
    // End of the line.

    </Visibility>
    </TableRow>
    <TableRow>
    ...
    Replacement code 1
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Add the following lines.
    <Hidden>=IIF(Fields!Detailed_Vendor_Ledg__Entry_Entry_No_.Value=0 OR
    Fields!Detailed_Vendor_Ledg__Entry__Unapplied_by_Entry_No__.Value<>0 OR
    Fields!VendLedgEntry1_DocumentType.Value="1" OR
    Fields!VendLedgEntry1_DocumentType.Value="3" OR
    Fields!VendLedgEntry1_DocumentType.Value="0",
    TRUE,FALSE)</Hidden>
    // End of the lines.

    </Visibility>
    </TableRow>
    <TableRow>
    ...
    Existing code 2
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Delete the following lines.
    <Hidden>=IIF(Fields!VendLedgEntry1__Document_Type_.Value="Invoice" OR
    Fields!VendLedgEntry1__Document_Type_.Value="Finance Charge Memo" OR
    Fields!VendLedgEntry1__Document_Type_.Value="Reminder" OR
    Fields!VendLedgEntry1__Document_Type_.Value="Credit Memo",
    // End of the lines.

    FALSE,TRUE)</Hidden>
    </Visibility>
    </TableRow>
    ...
    Replacement code 2
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Add the following lines.
    <Hidden>=IIF(Fields!VendLedgEntry1_DocumentType.Value="2" OR
    Fields!VendLedgEntry1_DocumentType.Value="4" OR
    Fields!VendLedgEntry1_DocumentType.Value="5" OR
    Fields!VendLedgEntry1_DocumentType.Value="3",
    // End of the lines.

    FALSE,TRUE)</Hidden>
    </Visibility>
    </TableRow>
    ...
    Existing code 3
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Delete the following lines.
    <Hidden>=IIF(Fields!VendLedgEntry1__Document_Type_.Value<>"Invoice" AND
    Fields!VendLedgEntry1__Document_Type_.Value<>"Finance Charge Memo" AND
    Fields!VendLedgEntry1__Document_Type_.Value<>"Reminder" AND
    Fields!VendLedgEntry1__Document_Type_.Value<>"Credit Memo" AND
    // End of the lines.

    Fields!VendLedgEntry1__Remaining_Amt___LCY__.Value<>0,
    FALSE,TRUE)</Hidden>
    </Visibility>
    ...
    Replacement code 3
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Add the following lines.
    <Hidden>=IIF(Fields!VendLedgEntry1_DocumentType.Value<>"2" AND
    Fields!VendLedgEntry1_DocumentType.Value<>"4" AND
    Fields!VendLedgEntry1_DocumentType.Value<>"5" AND
    Fields!VendLedgEntry1_DocumentType.Value<>"3" AND
    // End of the lines.

    Fields!VendLedgEntry1__Remaining_Amt___LCY__.Value<>0,
    FALSE,TRUE)</Hidden>
    </Visibility>
    ...
    Existing code 4
    ...
    <Field Name="VendLedgEntry1__Amount__LCY___Control1130017Format">
    <DataField>VendLedgEntry1__Amount__LCY___Control1130017Format</DataField>
    </Field>
    <Field Name="Vendor_BalanceCaption">
    <DataField>Vendor_BalanceCaption</DataField>
    </Field>
    ...
    Replacement code 4
    ...
    <Field Name="VendLedgEntry1__Amount__LCY___Control1130017Format">
    <DataField>VendLedgEntry1__Amount__LCY___Control1130017Format</DataField>
    </Field>

    // Add the following lines.
    <Field Name="VendLedgEntry1_DocumentType">
    <DataField>VendLedgEntry1_DocumentType</DataField>
    </Field>
    // End of the lines.

    <Field Name="Vendor_BalanceCaption">
    <DataField>Vendor_BalanceCaption</DataField>
    </Field>
    ...
  5. Change the code of the Data Item Number 2 in the Customer Bills List report (12117) as follows:
    Existing code
    ...
    END;

    OnAfterGetRecord=BEGIN

    // Delete the following lines.
    IF (("Document Type" = "Document Type"::Payment) OR ("Document Type" = "Document Type"::" "))
    AND (Open = FALSE) THEN
    // End of the lines.

    CurrReport.SKIP;
    ...
    Replacement code
    ...
    END;

    OnAfterGetRecord=BEGIN

    // Add the following lines.
    IF (("Document Type" = "Document Type"::Payment) OR
    ("Document Type" = "Document Type"::" ") OR
    ("Document Type" = "Document Type"::"Credit Memo")) AND
    NOT Open
    THEN
    // End of the lines.

    CurrReport.SKIP;

    CALCFIELDS("Amount (LCY)","Remaining Amt. (LCY)");
    ...
  6. Change the code of the Data Item Number 2 Sections in the Customer Bills List report (12117) as follows:
    Existing code
    ...
    ForeColor=65535;
    SourceExpr=CustLedgEntry1."Bank Receipt";
    DataSetFieldName=CustLedgEntry1_CustLedgEntry1__Bank_Receipt_ }
    }
    }
    { PROPERTIES
    ...
    Replacement code
    ...
    ForeColor=65535;
    SourceExpr=CustLedgEntry1."Bank Receipt";
    DataSetFieldName=CustLedgEntry1_CustLedgEntry1__Bank_Receipt_ }

    // Add the following lines.
    { 1130008;TextBox ;24150;423 ;150 ;423 ;Visible=No;
    ForeColor=65535;
    SourceExpr=FORMAT("Document Type",0,2);
    DataSetFieldName=CustLedgEntry1_DocumentType }
    // End of the lines.

    }
    }
    { PROPERTIES
    ...
  7. Change the code of the Data Item Number 4 Sections in the Customer Bills List report (12117) as follows:
    Existing code 1
    ...
    SectionWidth=24450;
    SectionHeight=846;
    OnPreSection=BEGIN

    // Delete the following lines.
    IF (CustLedgEntry1."Document Type" = CustLedgEntry1."Document Type"::Payment)
    OR (CustLedgEntry1."Document Type" = CustLedgEntry1."Document Type"::" ") THEN
    // End of the lines.

    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);
    ...
    Replacement code 1
    ...
    SectionWidth=24450;
    SectionHeight=846;
    OnPreSection=BEGIN

    // Add the following lines.
    IF (CustLedgEntry1."Document Type" = CustLedgEntry1."Document Type"::Payment) OR
    (CustLedgEntry1."Document Type" = CustLedgEntry1."Document Type"::"Credit Memo") OR
    (CustLedgEntry1."Document Type" = CustLedgEntry1."Document Type"::" ") OR
    ("Unapplied by Entry No." <> 0)
    THEN
    // End of the lines.

    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);
    ...
    Existing code 2
    ...
    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);

    // Delete the following lines.
    IF ("Unapplied by Entry No." <> 0) THEN
    CurrReport.SHOWOUTPUT(FALSE);
    // End of the lines.

    END;

    }
    ...
    Replacement code 2
    ...
    CurrReport.SHOWOUTPUT(FALSE)
    ELSE
    CurrReport.SHOWOUTPUT(TRUE);
    END;

    }
    ...
  8. Change the code of the Documentation in the Customer Bills List report (12117) as follows:
    Existing code 1
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Delete the following line.
    <Hidden>=IIF(Fields!Detailed_Cust__Ledg__Entry_Entry_No_.Value=0,TRUE,FALSE)</Hidden>
    // End of the line.

    </Visibility>
    </TableRow>
    <TableRow>
    ...
    Replacement code 1
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Add the following lines.
    <Hidden>=IIF(Fields!Detailed_Cust__Ledg__Entry_Entry_No_.Value=0 OR
    Fields!CustLedgEntry1_DocumentType.Value="0" OR
    Fields!CustLedgEntry1_DocumentType.Value="1" OR
    Fields!CustLedgEntry1_DocumentType.Value="3",
    TRUE,FALSE)</Hidden>
    // End of the lines.

    </Visibility>
    </TableRow>
    <TableRow>
    ...
    Existing code 2
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Delete the following lines.
    <Hidden>=IIF(Fields!CustLedgEntry1__Document_Type_.Value="Invoice" OR
    Fields!CustLedgEntry1__Document_Type_.Value="Finance Charge Memo" OR
    Fields!CustLedgEntry1__Document_Type_.Value="Reminder" OR
    Fields!CustLedgEntry1__Document_Type_.Value="Credit Memo",
    // End of the lines.

    FALSE,TRUE)</Hidden>
    </Visibility>
    </TableRow>
    ...
    Replacement code 2
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Add the following lines.
    <Hidden>=IIF(Fields!CustLedgEntry1_DocumentType.Value="2" OR
    Fields!CustLedgEntry1_DocumentType.Value="4" OR
    Fields!CustLedgEntry1_DocumentType.Value="5" OR
    Fields!CustLedgEntry1_DocumentType.Value="3",
    // End of the lines.

    FALSE,TRUE)</Hidden>
    </Visibility>
    </TableRow>
    ...
    Existing code 3
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Delete the following lines.
    <Hidden>=IIF(Fields!CustLedgEntry1__Document_Type_.Value<>"Invoice" AND
    Fields!CustLedgEntry1__Document_Type_.Value<>"Finance Charge Memo" AND
    Fields!CustLedgEntry1__Document_Type_.Value<>"Reminder" AND
    Fields!CustLedgEntry1__Document_Type_.Value<>"Credit Memo" AND
    // End of the lines.

    Fields!CustLedgEntry1__Remaining_Amt___LCY__.Value<>0 AND
    Fields!CustLedgEntry1_CustLedgEntry1__Bank_Receipt_.Value=FALSE,
    FALSE,TRUE)</Hidden>
    ...
    Replacement code 3
    ...
    </TableCell>
    </TableCells>
    <Visibility>

    // Add the following lines.
    <Hidden>=IIF(Fields!CustLedgEntry1_DocumentType.Value<>"2" AND
    Fields!CustLedgEntry1_DocumentType.Value<>"4" AND
    Fields!CustLedgEntry1_DocumentType.Value<>"5" AND
    Fields!CustLedgEntry1_DocumentType.Value<>"3" AND
    // End of the lines.

    Fields!CustLedgEntry1__Remaining_Amt___LCY__.Value<>0 AND
    Fields!CustLedgEntry1_CustLedgEntry1__Bank_Receipt_.Value=FALSE,
    FALSE,TRUE)</Hidden>
    ...
    Existing code 4
    ...
    <Field Name="CustLedgEntry1_CustLedgEntry1__Bank_Receipt_">
    <DataField>CustLedgEntry1_CustLedgEntry1__Bank_Receipt_</DataField>
    </Field>
    <Field Name="Customer_BalanceCaption">
    <DataField>Customer_BalanceCaption</DataField>
    </Field>
    ..
    Replacement code 4
    ...
    <Field Name="CustLedgEntry1_CustLedgEntry1__Bank_Receipt_">
    <DataField>CustLedgEntry1_CustLedgEntry1__Bank_Receipt_</DataField>
    </Field>

    // Add the following lines.
    <Field Name="CustLedgEntry1_DocumentType">
    <DataField>CustLedgEntry1_DocumentType</DataField>
    </Field>
    // End of the lines.

    <Field Name="Customer_BalanceCaption">
    <DataField>Customer_BalanceCaption</DataField>
    </Field>
    ...

Prerequisites

You must have the Italian version of Microsoft Dynamics NAV 2009 Service Pack 1 installed to apply this hotfix.

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: kbqfe, kbnoloc, kbmbspartner, kbmbsmigrate, kbmbsquickpub, kbmbscodefix, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2496071
Revision : 2
Created on : 9/25/2018
Published on : 9/25/2018
Exists online : False
Views : 399