Cinchoo / ChoETL.NACHA

A NACHA library for .NET / c#
MIT License
38 stars 31 forks source link

Does the code support CTX entry detail record #49

Closed siva-saripilli closed 5 months ago

siva-saripilli commented 2 years ago

Hi there

The CTX entry detail record has additional fields like Number of Addenda Records and Reserved fields in there. I see that the ChoNACHAEntryDetailRecord has a single implementation. How are these additional fields handled?

And thanks for the amazing work on this package!

Cheers

Cinchoo commented 2 years ago

Number of Addenda Records handled by creating and adding addenda records (example below)

            using (var nachaWriter = new ChoNACHAWriter(@"C:\Projects\GitHub\ChoETL.NACHA\ChoETL.NACHATest\bin\Debug\NACHA_TEST.txt", config))
            {
                nachaWriter.Configuration.ErrorMode = ChoETL.ChoErrorMode.ThrowAndStop;

                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");
                    }
            }

Reserved fields?? not sure about it. Pls be more specific with sample.