Cinchoo / ChoETL.NACHA

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

Missing record code on rows #18

Closed cjindustries closed 6 years ago

cjindustries commented 6 years ago

Hi,

After the last update (to CHOETL?) the ACH files are now coming out without the record type code at the start of each row.

This code:

ChoNACHAConfiguration config = new ChoNACHAConfiguration(); config.DestinationBankRoutingNumber = "123456789"; config.OriginatingCompanyId = "123456789"; config.DestinationBankName = "PNC Bank"; config.OriginatingCompanyName = "Microsoft Inc."; config.ReferenceCode = "Internal Use Only."; config.BlockingFactor = 10; using (var nachaWriter = new ChoNACHAWriter("C:\\Temp\\Test1_ACH.txt", config)) { using (var bw1 = nachaWriter.CreateBatch(200)) { using (var entry1 = bw1.CreateDebitEntryDetail(20, "123456789", "1313131313", 22.505M, "ID Number", "ID Name", "Desc Data")) { entry1.CreateAddendaRecord("Monthly bill"); } using (var entry2 = bw1.CreateCreditEntryDetail(20, "123456789", "1313131313", 22.505M, "ID Number", "ID Name", "Desc Data")) { } } using (var bw2 = nachaWriter.CreateBatch(200)) { } }

Creates this output:

001123456789 123456789 0101010000A000101PNC Bank Microsoft Inc. Internal 0200Microsoft Inc. 123456789 PPD 1123456784758536 0201234567891313131313 0000002251ID Number ID Name De1123456780000001 005Monthly bill 00010000001 0201234567891313131313 0000002251ID Number ID Name De0123456780000002 02000000030024691356000000002251000000002251123456789 123456784758536 0200Microsoft Inc. 123456789 PPD 1123456784442501 02000000000000000000000000000000000000000000123456789 123456784442501 0000002000001000000030024691356000000002251000000002251 0999999999999999999999999999999999999999900999999999900999999999999999999999999999999999999999

Will downgrade in the meantime.

By the way, this is an excellent library, thanks for sharing.

Cheers, Chris.

cjindustries commented 6 years ago

After downgrading to CHOTL 1.0.6.5 and CHOETL.NACHA 1.0.1.1 the record codes are back. However, my trailer row of all 9's is the same as the above (some 0's in there too).

Cinchoo commented 6 years ago

Corrected, applied the fix to NACHA lib. Please take the latest source / nuget package. Let me know.

cjindustries commented 6 years ago

Yes, that's fixed. Thank you. I'll close this issue. The trailer row still contains 0's however, shall I raise that as a separate issue?

Cinchoo commented 6 years ago

pls raise separate ticket.