Comparing version 1.0.2 to 1.0.3
@@ -11,3 +11,3 @@ // Generated by CoffeeScript 1.10.0 | ||
options.seq = { | ||
entry: 0 | ||
entry: 1 | ||
}; | ||
@@ -47,7 +47,7 @@ ref = options.ach.batches; | ||
if (options.set) { | ||
batch.num = batchFooter.num = batchIndex; | ||
batch.num = batchFooter.num = batchIndex + 1; | ||
} | ||
} | ||
footer.blockCount = 2 + (footer.batchCount * 2) + footer.entryAndAddendaCount; | ||
footer.blockCount = Number(("" + footer.blockCount).slice(-6)); | ||
footer.lineCount = 2 + (footer.batchCount * 2) + footer.entryAndAddendaCount; | ||
footer.blockCount = Number(("" + (Math.ceil(footer.lineCount / 10))).slice(-6)); | ||
footer.entryHash = Number(("" + footer.entryHash).slice(-10)); | ||
@@ -54,0 +54,0 @@ if (options.set) { |
@@ -31,3 +31,3 @@ // Generated by CoffeeScript 1.10.0 | ||
originatorStatusCode: '1', | ||
num: ach.batches.length, | ||
num: ach.batches.length + 1, | ||
entryClassCode: whichKind, | ||
@@ -44,3 +44,3 @@ companyName: this.data.from.name, | ||
originatingDFIIdentification: this.data["for"].dfi, | ||
num: ach.batches.length, | ||
num: ach.batches.length + 1, | ||
entryAndAddendaCount: 0, | ||
@@ -61,3 +61,4 @@ entryHash: 0, | ||
ach.file.footer.batchCount++; | ||
ach.file.footer.blockCount += 2; | ||
ach.file.footer.lineCount += 2; | ||
ach.file.footer.blockCount = Math.ceil(ach.file.footer.lineCount / 10); | ||
return next = { | ||
@@ -64,0 +65,0 @@ credit: credit, |
@@ -25,3 +25,3 @@ // Generated by CoffeeScript 1.10.0 | ||
} | ||
data.entryCount = 0; | ||
data.entryCount = 1; | ||
now = new Date; | ||
@@ -44,3 +44,4 @@ ach = { | ||
recordType: '9', | ||
blockCount: 2, | ||
lineCount: 2, | ||
blockCount: 1, | ||
batchCount: 0, | ||
@@ -47,0 +48,0 @@ entryAndAddendaCount: 0, |
@@ -35,3 +35,3 @@ // Generated by CoffeeScript 1.10.0 | ||
type: '05', | ||
num: 0, | ||
num: 1, | ||
entryNum: this.data.entryCount, | ||
@@ -77,8 +77,9 @@ info: entryData.addenda | ||
ach.file.footer.entryAndAddendaCount += 2; | ||
ach.file.footer.blockCount += 2; | ||
ach.file.footer.lineCount += 2; | ||
} else { | ||
batch.footer.entryAndAddendaCount += 1; | ||
ach.file.footer.entryAndAddendaCount += 1; | ||
ach.file.footer.blockCount += 1; | ||
ach.file.footer.lineCount += 1; | ||
} | ||
ach.file.footer.blockCount = Math.ceil(ach.file.footer.lineCount / 10); | ||
batch.entries.push(entry); | ||
@@ -85,0 +86,0 @@ ref = require('./batch-ccd-ppd'), ccd = ref.ccd, ppd = ref.ppd; |
@@ -38,6 +38,6 @@ // Generated by CoffeeScript 1.10.0 | ||
} else { | ||
data.entryCount = 0; | ||
data.entryCount = 1; | ||
} | ||
} else { | ||
data.entryCount = 0; | ||
data.entryCount = 1; | ||
} | ||
@@ -44,0 +44,0 @@ next = { |
@@ -94,3 +94,3 @@ // Generated by CoffeeScript 1.10.0 | ||
outputFields(ach.file.footer, formats.fileFooter, push); | ||
linesNeeded = 10 - (ach.file.footer.blockCount % 10); | ||
linesNeeded = 10 - (ach.file.footer.lineCount % 10); | ||
for (i = m = 1, ref3 = linesNeeded; 1 <= ref3 ? m <= ref3 : m >= ref3; i = 1 <= ref3 ? ++m : --m) { | ||
@@ -97,0 +97,0 @@ this.push(nines); |
@@ -40,2 +40,5 @@ // Generated by CoffeeScript 1.10.0 | ||
}; | ||
if (ach.batches == null) { | ||
ach.batches = []; | ||
} | ||
ach.batches.push(batch); | ||
@@ -48,2 +51,5 @@ extractFields(line, formats.batchHeader, batch); | ||
entry = {}; | ||
if (batch.entries == null) { | ||
batch.entries = []; | ||
} | ||
batch.entries.push(entry); | ||
@@ -50,0 +56,0 @@ extractFields(line, formats[batch.entryClassCode].entry, entry); |
{ | ||
"name": "@ach/ach", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "NACHA ACH EFT File Parser/Editor/Formatter for CCD+ / PPD+ / CTX+", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
56931
1627
0