Cinchoo / ChoETL.NACHA

A NACHA library for .NET / c#
MIT License
37 stars 32 forks source link

Leading Zeros are removed from ReceivingDFIID #37

Open Andrew82871 opened 3 years ago

Andrew82871 commented 3 years ago

When a NACHA file is read using "ChoNACHAReader", the record of type "ChoETL.NACHA.ChoNACHAEntryDetailRecord" and field ReceivingDFIID is removing any leading zeros from the number.

The following code should show you what I am talking about with any file that has a routing number with a leading zero in the Entry Detail record.

using (ChoNACHAReader fr = new ChoNACHAReader(fileName)) { foreach (var r in fr) { if (r.ToString() == "ChoETL.NACHA.ChoNACHAEntryDetailRecord") { ChoNACHAEntryDetailRecord detail = (ChoNACHAEntryDetailRecord)r; Console.WriteLine(detail.ReceivingDFIID.ToString()); } } }

Cinchoo commented 3 years ago

ReceivingDFIID is ulong. NOT text.