Credit Note Report Customization

Hi All,

I have a requirement to customize the Credit Note Report which is generated from the Sales Order Details page(SalesTable Form) during posting of invoice.

Please guide me as to find the “Credit Note report” under the Reports node in AOT.

Thanks in advance.

The Credit Note Report and the Invoice are the same report, SalesInvoice. There are methods defining when certain fields are to be printed. At least in AX2009.

I want to display the report as credit note report when the net amount is 0.00(zero) and quantity is a negative quantity in the sales line for a particular salesorder.

By default the report is displayed as an invoice report.

Could you help me through this?

What do you want to change, the main header on the report that shows “Invoice” ?

This is simple, add a variable to the Fetch method to pick up your Amount and Quantity - do this in the while loop…

Add a macro and use your secondary header “Credit Note” to the macro.

Add a condition to the method which generates the Caption (header) - that if the Amount or Qty is negative then your Macro will be returned - remember to declare your macro in this method as well - You need to use a macro as it is against best practice to hard code values in MorphX but it does not flag up as best practice.

This will then return the macro value “Credit Note” if the values are, and if not that default will be run.