UNPKG

@midlandsbank/node-nacha

Version:

NACHA ACH EFT File Parser/Formatter for CCD+ / PPD+ / CTX+

32 lines (29 loc) 691 B
// Generated by CoffeeScript 1.11.1 var validate; validate = require('../validate'); module.exports = function(index) { var batch, credit, debit, module, next, ref; batch = this.object.batches[index]; if (batch == null) { return; } module = (function() { switch (batch.entryClassCode) { case 'CCD': case 'PPD': case 'WEB': return './entry-ccd-ppd-web'; case 'CTX': return './entry-ctx'; } })(); ref = require(module), credit = ref.credit, debit = ref.debit; next = { credit: credit, debit: debit, data: this.data, object: this.object, validate: validate.bind(this, this.object) }; return next; };