Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project cleanup #27

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports.Entry = require('./lib/entry');
module.exports.Batch = require('./lib/batch');
module.exports.File = require('./lib/file');
module.exports.Utils = require('./lib/utils');
module.exports.Validate = require('./lib/validate');
module.exports.Entry = require('./lib/entry')
module.exports.Batch = require('./lib/batch')
module.exports.File = require('./lib/file')
module.exports.Utils = require('./lib/utils')
module.exports.Validate = require('./lib/validate')
186 changes: 94 additions & 92 deletions lib/batch/control.js
Original file line number Diff line number Diff line change
@@ -1,102 +1,104 @@
module.exports = {
recordTypeCode: {
name: 'Record Type Code',
width: 1,
position: 1,
required: true,
type: 'numeric',
value: '8'
},
module.exports = function () {
return {
recordTypeCode: {
name: 'Record Type Code',
width: 1,
position: 1,
required: true,
type: 'numeric',
value: '8'
},

serviceClassCode: {
name: 'Service Class Code',
width: 3,
position: 2,
required: true,
type: 'numeric',
value: ''
},
serviceClassCode: {
name: 'Service Class Code',
width: 3,
position: 2,
required: true,
type: 'numeric',
value: ''
},

addendaCount: {
name: 'Addenda Count',
width: 6,
position: 3,
required: true,
type: 'numeric',
value: 0
},
addendaCount: {
name: 'Addenda Count',
width: 6,
position: 3,
required: true,
type: 'numeric',
value: 0
},

entryHash: {
name: 'Entry Hash',
width: 10,
position: 4,
required: true,
type: 'numeric',
value: 0
},
entryHash: {
name: 'Entry Hash',
width: 10,
position: 4,
required: true,
type: 'numeric',
value: 0
},

totalDebit: {
name: 'Total Debit Entry Dollar Amount',
width: 12,
position: 5,
required: true,
type: 'numeric',
value: 0,
number: true
},
totalDebit: {
name: 'Total Debit Entry Dollar Amount',
width: 12,
position: 5,
required: true,
type: 'numeric',
value: 0,
number: true
},

totalCredit: {
name: 'Total Credit Entry Dollar Amount',
width: 12,
position: 6,
required: true,
type: 'numeric',
value: 0,
number: true
},
totalCredit: {
name: 'Total Credit Entry Dollar Amount',
width: 12,
position: 6,
required: true,
type: 'numeric',
value: 0,
number: true
},

companyIdentification: {
name: 'Company Identification',
width: 10,
position: 7,
required: true,
type: 'numeric'
},
companyIdentification: {
name: 'Company Identification',
width: 10,
position: 7,
required: true,
type: 'numeric'
},

messageAuthenticationCode: {
name: 'Message Authentication Code',
width: 19,
position: 8,
required: false,
type: 'alphanumeric',
blank: true,
value: ''
},
messageAuthenticationCode: {
name: 'Message Authentication Code',
width: 19,
position: 8,
required: false,
type: 'alphanumeric',
blank: true,
value: ''
},

reserved: {
name: 'Reserved',
width: 6,
position: 9,
required: false,
type: 'alphanumeric',
blank: true,
value: ''
},
reserved: {
name: 'Reserved',
width: 6,
position: 9,
required: false,
type: 'alphanumeric',
blank: true,
value: ''
},

originatingDFI: {
name: 'Originating DFI',
width: 8,
position: 10,
required: true,
type: 'numeric'
},
originatingDFI: {
name: 'Originating DFI',
width: 8,
position: 10,
required: true,
type: 'numeric'
},

batchNumber: {
name: 'Batch Number',
width: 7,
position: 11,
required: false,
type: 'numeric',
value: 8
}
};
batchNumber: {
name: 'Batch Number',
width: 7,
position: 11,
required: false,
type: 'numeric',
value: 8
}
}
}
Loading