Skip to content

Commit

Permalink
Npm Package Update - fix Added IAT Record Entry and Batch entry
Browse files Browse the repository at this point in the history
  • Loading branch information
pradeepvish1213 committed Oct 6, 2023
1 parent c157ee7 commit 044e608
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/batch-iat/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {
width: 10,
position: 8,
required: true,
type: 'numeric',
type: 'alphanumeric',
value: ''
},

Expand Down
3 changes: 0 additions & 3 deletions lib/batch-iat/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ function Batch(options) {
// Validate the routing number (ABA) before slicing
validate.validateRoutingNumber(utils.computeCheckDigit(options.originatingDFI));

if (options.companyName) {
this.header.companyName.value = options.companyName.slice(0, this.header.companyName.width);
}

if (options.companyEntryDescription) {
this.header.companyEntryDescription.value = options.companyEntryDescription.slice(0, this.header.companyEntryDescription.width);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sp-nacha",
"description": "NACHA file format is a set of instructions that, when uploaded into a bank portal, successfully initiates a batch of ACH payments. NACHA file format is the protocol for structuring those instructions in a way that successfully initiates the payments. NACHA is a highly customizable Node.js module exposing a high & low-level API for generating ACH files for use within the ACH network.",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"Seerportal Nacha",
"Dataseers Nacha",
Expand Down
26 changes: 13 additions & 13 deletions test/generateIatRecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ let chai = require('chai')
let queuedTransaction = [{
"id": 70,
"immediateDestination": "231380104",
"immediateOrigin": "121042882",
"immediateOrigin": "121042882",
"immediateDestinationName": "CITADEL FED C U",
"immediateOriginName": "WELLS FARGO BANK NA",
"referenceCode": " ",
"immediateOriginName": "WELLS FARGO BANK NA",
"referenceCode": " ",
"batchChildren": [{
"id": 70,
"serviceClassCode": "200",
"serviceClassCode": "200",
"iatIndicator": "Iat Indiacator p",
"foreignExchangeIndicator": "IN",
"foreignExchangeReferenceIndicator": "3",
"foreignExchangeReference": "pradeepvish1213",
"isoDestinationCountryCode": "US",
"originatorIdentification": "2345432443",
"standardEntryClassCode": "IAT",
"standardEntryClassCode": "IAT",
"companyEntryDescription": "SANdeepviS",
"isoOriginatingCurrencyCode": "IND",
"isoDestinationCurrencyCode": "CAD",
"effectiveEntryDate": Moment().toDate(),
"originatorStatusCode": "",
"originatingDFI": "121042882",
"originatingDFI": "121042882",
"entryChildren": [{
"id": 70,
"receivingDFI": "231380104",
Expand All @@ -53,37 +53,37 @@ let queuedTransaction = [{
"receivingDFI": "231380104",
"DFIAccount": "23456787654323",
"amount": "92345678",
"idNumber": null,
"individualName": "",
"discretionaryData": "",
"idNumber": null,
"individualName": "",
"discretionaryData": "",
"transactionCode": "21",
"transactionType": "Credit",
"traceNumber": '000000001234567',
"addendaRecords": [{
"id": 78,
"queued_transaction_id": 70,
"addenda_type_code": "10",
"addenda_type_code": "10",
"payment_related_information": "UAS123454323454323.008765432345670000000001The abbreviation INDN on a bank sta",
"created_at": "2023-10-05 20:35:59",
"modified_at": "2023-10-05 20:35:59"
}, {
"id": 78,
"queued_transaction_id": 70,
"addenda_type_code": "11",
"addenda_type_code": "11",
"payment_related_information": "UAS123454323454323.008765432345670000000001The abbreviation INDN on a bank sta",
"created_at": "2023-10-05 20:35:59",
"modified_at": "2023-10-05 20:35:59"
}, {
"id": 78,
"queued_transaction_id": 70,
"addenda_type_code": "12",
"addenda_type_code": "12",
"payment_related_information": "UAS123454323454323.008765432345670000000001The abbreviation INDN on a bank sta",
"created_at": "2023-10-05 20:35:59",
"modified_at": "2023-10-05 20:35:59"
}]
}]
}],
"recordCount": 1
"recordCount": 1
}]

describe('IAT Records', function () {
Expand Down

0 comments on commit 044e608

Please sign in to comment.