Tuesday, 31 July 2012

AX 2012 Customer Payments/Payments Data Model


Payments Data Model

Tables

All Journal Tables

LedgerJournalName contains different journal names, based on how they are setup in the General Ledger module. Each journal name is related to one specific type of journal. One of the journal types is customer payments.

LedgerJournalTable contains records that are headers for individual journals. A new record is created in this table every time that the user creates a new journal in the form that displays the list of journals.

LedgerJournalTrans contains individual journal lines. Each payment can have
related fees.


Fee Tables

The fees are stored in the CustVendPaymJournalFee table. Each payment fee can generate a new record in LedgerJournalTrans that will contain the fee. To post payment fees, this design uses the usual ledger journal posting. Fee transactions cannot be viewed or edited in LedgerJournalTrans, because this is replicated from the information in CustVendPaymJournalFee.

Settlement
When a payment is entered in the journal, the desired transaction settlement can be specified when it is posted. The settlement is stored in the SpecTrans table, and will be reflected in the CustSettlement table when the journal is posted. Each record in SpecTrans defines a settlement between a line in the payment journal and an open transaction part in CustTransOpen. SpecTrans can contain information other than settlements from the customer payment journal. The same table is used for other settlement specifications in the Customer and Vendor modules.

The CustVendPaymProposalLine table contains the payments that are proposed by the payment proposal creation and edit processes. The payment proposals are removed from this table at the end of the process, and inserted into the LedgerJournalTrans table.

Classes


CustInPaym Class

The CustInPaym class forms a framework for the import of payments from customers. The file is typically received from the company bank. The function involves reading the file and creating a new journal that contains the payments. The information in the received file will usually contain a reference to the invoice covered by the payment, and the import should make a settlement against the open invoices while generating the payment journal.When a payment method is set up, it can be related to an import file format. This function will display all classes extending from CustInPaym.

CustOutPaym and VendOutPaym Classes

The CustOutPaym and VendOutPaym classes form a framework for exporting payment information to a file. This file is typically sent to the company bank for processing. CustOutPaym is used to generate a file of payments to be collected from the customers. This typically requires a form of agreement with the customer and the banks involved. VendOutPaym is used to generate a file of payments to be sent to the vendors.

CustOutPaymRecord and VendOutPaymRecord

The files generated can contain different types of records to handle several ways of processing the payment. The individual types of records in the file are implemented by creating a class extending from
CustOutPaymRecord/VendOutPaymRecord. If multiple record types will be implemented, they should be implemented as extensions from one root class extending from CustOutPaymRecord/VendOutPaymRecord.
This root class is associated to the class extending from CustOutPaym/VendOutPaym by overriding the method custVendOutPaymRecordRootClassId.

You can make a duplication of these classes, when you implement a new specific
format.

CustPaym and VendPaym

The details of a payment can be retrieved from many tables in the Vendor module. The VendPaym class contains a payment’s consolidated information. All information is available by calling corresponding methods. The methods can be grouped into three categories.

The first group of methods describes payment senders (the company exporting payments). All these methods have the prefix “senders.”

The second group of methods describes payment receivers. All these methods have the prefix “receivers.”

The last group of methods describes payments. All these methods have the prefix “paym.”



CustVendCreatePaymJournal Class

The CustVendCreatePaymJournal class is used to generate journals with payments or journals handling bills of exchange and promissory notes. The class searches for open invoices that will be paid by using a cash discount and due date criteria. The data fetched is controlled by a query on the CustTransOpen/VendTransOpen table and the payments generated are saved in a ledger journal (LedgerJournalTrans). The generated journal can be exported to a file by using the Cust-/VendOutPaym
classes described earlier.

CustVendSettle Class

The CustVendSettle class handles the update of a settlement between an invoice and a payment. The processing is complex because the settlement can include some of the following tasks.

Read open transaction editing information in SpecTrans table
Calculation and posting of cash discount
Reversal of posted tax on cash discount
Calculation and posting of conditional tax
Calculation and posting of exchange rate adjustment
Handling of over/underpayment
Update information in CustSettlement/VendSettlement
Centralized Customer /Vendor payments




Customer Payment Data Model


VendPaymFormat contains payment formats that are selected by using the Setup
button on the File formats tab page (in the form used for setting up payment
methods).

VendPaymModeTable contains defined payment methods. These include related
file formats that are represented by an ID of the class implementing the format.
Each payment method can be related to other information.

VendPaymMethodVal contains validation rules for the payment method. It
determines which information should be specified to process the payment.

VendPaymModeSpec contains specifications of different record formats in the
file that is used for requesting payments (Export format).

VendPaymModeFee specifies fees related to the payment method. The different
kinds of fees that include the setup of ledger postings are set up in the table

VendPaymFee. VendPaymModeFeeInterval specifies fee amounts as a function
of the number of days between a remittance and a bill of exchange’s due date.
Similar tables that begin or end with Cust are used for customer payment set up.

The following tables are shared between Accounts receivable and Accounts
payable.

PaymSched and PaymSchedLine: These tables are used to store the
payment schedules. Payment schedules can be linked to terms of
payments, customers, or vendors.

PaymDay and PaymDayLine: These tables are used to store
payment days. Payment days can be linked to terms of payment,
customers, or vendors.

PaymTerm: This table stores each of the terms of payment. Terms
of payment can be linked to customers or vendors.

CashDisc: This table is used to store the definition of cash discount
terms. Cash discounts can be linked to customers or vendors.



No comments:

Post a Comment