Closed rayjlinden closed 1 year ago
Do you have the 2019 NACHA rules? This copy I'm reading from is a bit old (2013), but they state:
Looking at that description "81967038518 "
makes sense to left justify and pad with spaces, but that's only on a receiver's account number.
In the event of a DFI's account number it looks like we should return "81967038518"
(and handle placing -
's in where
's are within the account number).
If you're comparing against non-MICR account numbers I can see where having to trim the returned number is an extra step.
All we specify on DFIAccountNumberField()
is:
// DFIAccountNumberField gets the DFIAccountNumber with space padding
This doesn't really help as we don't perform ` (space) for
-` substitution in that method either.
We could add a helper ach.MICRNumber(string) string
which would convert "1234 5678"
into "1234-5678 "
(padded to 17 characters).
cc @wadearnold I'm a bit confused what to do here
Thoughts @wadearnold ?
What were you trying to do?
View the field entry.DFIAccountNumber after parsing an ACH file.
What did you expect to see?
The string value to have white space trimmed.
What did you see?
The string value had white space padded to the right of the account number.
How can we reproduce the problem?
Parse and ACH file and print the value of the DFIAccountNumber field.