Showing posts with label Electronic Payment. Show all posts
Showing posts with label Electronic Payment. Show all posts

Wednesday, August 17, 2011

Setup Electronic Format Payment (EFT) in AX 2009

A few days ago I created a new post on how to create a new Electroni Payment Format (EFT) in X++. The post can be seen here: http://axwonders.blogspot.com/2011/08/create-electronic-payment-format-ax.html


In this post I will show how to setup the EFT based on the class I created before in AX 2009.


1 - Open Accounts Payable | Setup | Payment | Methods of Payments and create a new record as follows:


NOTE: I will be using a Payment Method called EFT Mexico for this example, but you can name this anything in the Interface method in the class you will create to customize an Electronic Payment.

In the link above look at the class named KUMVendOutPaym_SA and look for a method named PaymInterfaceName. You will see the following code:

public PaymInterfaceName interfaceName()
{
    ;
    return 'EFT Mexico';
}





Monday, August 1, 2011

Create Electronic Payment Format - AX 2009

Electronic payments are being used heavily today. It is importnat to understand how these work and how to implement them as they save lots of time and even more paperwork. In addition, AX 2009 provides some out-of-the-box payment templates, but they are not very felxible and very often we need to create our own.

Now the good thing about creating our own is that we can inherit from two base classes. (1) VendOutPaym and (2) VendOutPaymRecord.

VendOutPaym is ussually used to create the header and closing records of a payment file. On the other hand, VendOutPaymRecord is used to create the the lines records of the payment file. So, if we have a payment journal (AP > Journals > Payments> Payment Journal) with 10 lines, we should see only one header line, (in my case) only one Bank line (after header), 10 line records (Payment journal lines) and one closing line with totals, got the idea?

So, we would have to create two classes. One to write the header and closing records and one to write the journal lines, ok?

Here is the first class to write header and closing records. Because in my file the empey spaces needed to be filled with only 0's, I created a method that's called getProcessedStr that takes a string and an integer. The string is the actual value that will be written into the file but needs extra 0's. The int is the total lenght of this record in the text file.