Wednesday, April 26, 2017

Electronic payment - NACHA file CCD addenda

My customer recently decided they wanted the ability to pay our vendors electronically.  Currently we use the Expense system and pay our employees via AP (Setting up employees as vendors).  We use EFT (Electronic funds transfer) to pay out those expenses.  However, we have been paying vendors via checks. We also needed to be able to pass along the Invoice numbers we were paying.

Our Employees get PPD NACHA files which are designed for personal accounts.  Our 'actual' vendors will get CCD NACHA files which are designed for company accounts.

To set this up, we need to go to Accounts payable -> Setup -> Payment -> Method of payment
Here are the settings I used which are based upon the employee 'EFT' we have setup for expenses.
Then, you need to setup the Payment specification.  This will then indicate that you want the CCD file and not the PPD. 'Payment specification' is located at the top of this form.
Here we have the correct 'Export format' selected.

We will start in the VendOutPaymRecord_NACHA_CCD class.  This is where all of our modifications will be made.  We will also look at the VendOutPaymRecord_NACHA class (the former's parent class) just for help to understand what we are doing.

First we will want to overrid the 'fillField10()' method in the 'CCD' class.
All the code will be the same except:


We changed the '0' that is in the parent class to '1' in the 'CCD' class.  This tells us that the 'Detail' record on our 'CCD' file will contain 1 'Addenda' record. We want our PPD file to remain as it always has with 0 addenda records.

Next we want to go to the 'output()' method on our 'CCD' class and this is where we will 'Fill' our addenda line.  After the 'file.writeExp(nacha_ccd_Recrod);' we can do:


Create the 'FillInvoiceAddenda()' method:
protected container FillInvoiceAddenda()
    container addenda;'7')
    #define.inv('INV ')

    str 80 invoiceAddenda = #seven + #inv + this.parmCustVendPaym().recieversInvoiceNumber();
    addenda = conIns(addenda, 1, invoiceAddenda);

    return addenda;

the 'parmCustVendPaym()' comes from parent classes (If you trace it back it is the CustVendOutPaymRecord class) and it contains pretty much all the information about the 'sender' and the 'reciever'.  Great place to look for additional information.

This is simply a container with 1 record in it.  We define the '7' because that is required for the NACHA file.  The 'INV' is simply extra and is supposed to indicate 'Invoices' to the vendor.  Remember, you only have 80 Characters.  In my case, we were going to show the Invoices on this addenda line.  That could get long depending on how many invoices and how long the invoices are.

Here is a sample of the NACHA CCD file detail and addenda line

43615200325442821342         0000215280V-001001       My Vendor          1GJ-041478000001
705INV123TEST, 123aTEST

***NOTE:  I haven't had a chance to test the addenda lines, however, I'm fairly certain that it will work.
***Update:  Looks like I may need to have '705' for the beginning of my addenda line.

The entire file has more than that, however, there was no need at this point to modify anything else.

That's it.  Incremental CIL and you can test this by 'Generating payments' in a Vendor 'Payment journal'.

No comments:

Post a Comment