Thursday, 26 July 2012

AX 2012 Accounts Receivable Customer Detail andFree Text Invoice Data Model

Customer and Vendor Data Model AX 2012


 There are two main tables the DirPartyTable and the CustTable

DirPartyTable (Basic – Address Book)

The DirPartyTable has the following details
Field/EDT-  Party Name (DirPartyName)
Field/EDT  - Party Number (DirPartyNumber)

CustTable (Sales and Marketing)

The CustTable has two main fields relating to the DirPartTable.
Field/EDT-  CustAccount (AccountNum)
Field/EDT-  Party (DirPartyRefRecId )

DirPartyRefRecId – Has a table reference to the DirPartyTable.RecId




Each transaction (invoice, payment, and so on) is represented by one record in
the CustTrans table.

Recurring Free Text Invoices Data Model 

With recurring free text invoices we can create templates that are linked to one or more customers to be invoiced at set intervals. Then you can run a simple job to create the invoice, and another job to post the invoices. A new corrections feature and workflow for free text invoices is also introduced. Additionally, the free text invoice includes source document support and sub ledger journal distributions.

Each free text invoice template record is stored in the CustInvoiceTemplate table. The lines of the templates are stored in the CustInvoiceLineTemplate table. Each free text invoice template must be linked to one or more customers.

The CustRecurrenceInvoice table contains the information about the templates that are assigned to a customer. One template can be assigned to multiple customers, and each customer can have multiple templates assigned.

Run the Generate recurring invoices job to create the recurring free text invoices for each customer. When the job runs the

CustInvoiceTemplate table records are copied into the CustInvoiceTable as a standard free text invoice. The lines are copied from the CustInvoiceLineTemplate table to the CustInvoiceLine table.

Every time that the Generate recurring invoices job is run, a new record is inserted into the RecurrenceInvoice table.

The CustRecurrenceInvoiceGroup table contains information about each of the free
text invoices that are created from the batch.

When the recurring free text invoices are posted, the transactions are copied to the CustInvoiceJour and CustInvoiceTrans tables in the same manner that a regular free text invoice is processed.




CustPostInvoice Class



The CustPostInvoice class handles the posting of a single free text invoice specified by one record in the CustInvoiceTable and one or more records in the CustInvoiceLine.

The posting includes the generation of the following data.

Ledger transactions by using the LedgerVoucher class.
Customer transactions by using the CustVoucher class.
Tax transactions by using the CustInvoiceCalcTax class.
Invoice journal and lines (CustInvoiceJour and -Trans).
Printing of the invoice report by using the FormLetter frameworkclasses.

CustPostInvoiceJob


The CustPostInvoiceJob class handles the selection of which records in the CustInvoiceTable to post. It also handles the printing of the invoices if it is specified. The class extends from the RunBase-framework.

1 comment:

  1. I need a favour, please when creating a free text invoice, the description is usually typed on the lines, but on the GL, we can see the description there. It just shows '"freetext invoice". Please what code can I write to make the description reflect on the GL. Thanks!

    ReplyDelete