Question

I'm still in the planning on how to proceed phase with this, but at a customer site, they are moving to invoicing through axapta. now the axapta has been used for years, and the invoices they are generating for it is -only- using invoice lines.

While this is an acceptable solution, it is still preferred if there's some way to extend/program/customize Axapta as to be able to import textual lines that will be hooked on to an invoice that is being sent out.

I'm not really sure as to where to start attacking this problem, i've googled some, checked out some "axapta" sites, but most of what i see either deals with newer versions (this is version 3 sp4, which is about six-ish years old).

If it's possible to do, in general terms, what would the procedures be? Would it involve x++ code?

Thanks for any input!

Was it helpful?

Solution

Use document handling to attach a note to either the sales order header or the sales order lines. Set the Restriction field of the note to External. You can control printing of notes on invoices under Account receivable/Setup/Forms/Form setup, on the Invoice tab in the Note section.

To fully customize the look of an invoice, edit the report SalesInvoice.

OTHER TIPS

Follow Jay's advice and add the preformatted text to document handling.

Add the following method to the DocuRef table:

static void addNote(Common record, str notes)
{
    DocuRef docuRef;
    ;
    docuRef.clear();
    docuRef.TypeId       = CustFormletterDocument::find().DocuTypeInvoice;
    docuRef.Restriction  = DocuRestriction::External;
    docuRef.RefTableId   = record.TableId;
    docuRef.RefRecId     = record.RecId;
    docuRef.RefCompanyId = record.dataAreaId;
    docuRef.Notes        = notes;
    docuRef.insert();
}

In your import code somewhere after the insert of the sales table record:

DocuRef::addNotes(salesTable, preformattedtext);

You will have to change your customer form setup to allow to print notes on the invoice.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top