Closed sunnygill-stash closed 3 months ago
Can you reproduce this on the latest release? It sounds very familiar to https://github.com/moov-io/ach/issues/1215
I am able to reproduce the error with the latest version. It seems like the existing code will work if the Company Entry Description is PRENOTE. I spoke with our banking personnel and was told that will not always be the case.
If you change the test linked below so that the Company Entry Description is not PRENOTE then it will fail
Yea, I can reproduce the issue and it puts us in a bit of a tough spot. Returns are supposed to "Return only the exact dollar amount of the original entry." That means typical transactional returns are invalid when their amount is zero. All returns have the same TransactionCodes so we lose all information that the entry is a prenote.
I don't think it's safe to allow every return to have zero'd amounts because that's wrong. Do you know of a better solution?
Setting AllowInvalidAmounts
lets this specific case pass validation. See https://github.com/moov-io/ach/pull/1333
Yea, I can reproduce the issue and it puts us in a bit of a tough spot. Returns are supposed to "Return only the exact dollar amount of the original entry." That means typical transactional returns are invalid when their amount is zero. All returns have the same TransactionCodes so we lose all information that the entry is a prenote.
I don't think it's safe to allow every return to have zero'd amounts because that's wrong. Do you know of a better solution?
I don't believe that there is anyway to identify a transaction as a prenote when it is a return entry. I don't know how you can do this without allowing all returns to have $0 amounts. I am trying to talk our banking personnel to let us set the CompanyEntryDescription to "PRENOTE" so we can avoid this issue.
Did you hear back about being able to use PRENOTE?
Any update @sunnygill-stash ?
We just ran into the same problem recently. Exactly as the OP says, there's no way how to tell a prenote return from a regular return, so I think the ValidAmountForCodes
method should just ignore returns.
The specification also doesn't mention the need to set the company entry description to PRENOTE
anywhere, as far as I can see. We can do that as a workaround, but I think the batch is valid even without that.
Okay we can ignore returns when AllowInvalidAmounts is set.
What SEC code are you using for prenotes? I think allow zero amount returns is SEC code specific.
It just happened with a PPD
but as far as I understand it a prenote can have any SEC code, it's just the transaction code that's different.
From the NACHA spec:
Generally speaking, the format of a prenotification entry is the same as a live dollar entry. However, the dollar amount of a prenotification entry is zero and a unique transaction code is use to indicate a prenotification entry.
... Prenotification entries may be intermingled within a batch of credit and/or debit live dollar entries. The Transaction Codes for prenotification entries are:
23 Prenotification for DDA credit. 28 Prenotification for DDA debit. 33 Prenotification for Savings credit. 38 Prenotification for Savings debit. 43 Prenotification for General Ledger credit. 48 Prenotification for General Ledger debit. 53 Prenotification for Loan Account credit.
I've created https://github.com/moov-io/ach/pull/1421 - could you look over it and double check I'm not missing anything?
I think it's looking good, thanks!
ACH Version
v1.31.1
What were you trying to do?
We were attempting to generate a return entry for a prenote for that we received. We received a validation error out of moov because the amount was $0. It appears as though moov is only allowing entries with prenote transaction codes (23, 28, 33, 38, 43, 48, 53) to have $0 amounts. When a prenote is returned it is required to have a transaction code for returns or NOCs (21, 26, 31, 36, 41, 46, 51).
What did you expect to see?
We expected moov to accept entries that have return transaction codes to have $0 amounts.
this batch type requires that the amount is non-zero
What did you see?
We received an error that prevented file generation.
How can we reproduce the problem?
Create an entry with a return transaction code and a $0 amount.