-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add BatchENR #349
Add BatchENR #349
Conversation
// for a depository financial institution. | ||
// | ||
// Allowed TransactionCode values: 22 Demand Credit, 27 Demand Debit, 32 Savings Credit, 37 Savings Debit | ||
type BatchENR struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each Addenda05.PaymentRelatedInformation
contains the following data. Should we write a parser and validator for this BatchENR
type? I started one with EnrolleeClassificationCode
below.
// PaymentRelatedInformation (*) (\ ends)
// Example: 22*12200004*3*123987654321*777777777*DOE*JOHN*0\
//
// transaction code
// RDFI Identification Number (ABA)
// Check Digit
// DFI Account Number
// Individual Identification: SSN
// Individual Name
// Representive Payee Indicator / Enrollee Classification Code: Gov Benefits: 0 (no), otherwise 1 (yes - initiated by someone other than named beneficiary)
// - A: enrollee is consumer, B enrollee is a company
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. CCD+ and CTX have something similar that is not currently implemented. I left it off because the data CAN be formatted but it doesn't have to be formatted in that way for commercial payments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a struct and parse method for this.
return bh.alphaField("", 6) // YYMMDD | ||
} else { | ||
return bh.formatSimpleDate(bh.EffectiveEntryDate) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit hackey, but I didn't think of a better way to ensure the files are written properly in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see that as a hack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems weird that the writer code has to be aware of specifics for ENR, but it's not a big deal.
I've added |
msg := fmt.Sprintf(msgBatchAmountZero, entry.Amount, "ENR") | ||
return &BatchError{BatchNumber: batch.Header.BatchNumber, FieldName: "Amount", Msg: msg} | ||
} | ||
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Fixes: moov-io#343
Fixes: #343