Cinchoo/ChoETL.NACHA

Empty ACH file

Closed this issue · 3 comments

I'm running your test code but it produces an empty ach.txt file. What am I doing wrong?

        ChoNACHAConfiguration config = new ChoNACHAConfiguration();
        config.DestinationBankRoutingNumber = "123456789";
        config.DestinationBankName = "PNC Bank";
        config.OriginatingCompanyId = "123456789";
        config.OriginatingCompanyName = "Microsoft Inc.";
        config.ReferenceCode = "Internal Use Only.";
        //config.BlockCount = 10;
        using (var nachaWriter = new ChoNACHAWriter(@"C:\Temp\ACH.txt", config))
        {
            using (var bw1 = nachaWriter.CreateBatch(200))
            {
                using (var entry2 = bw1.CreateCreditEntryDetail(22, "123456789", "1313131313", 10M, null, "ID Name", "Desc Data"))
                {

                }
                using (var entry2 = bw1.CreateCreditEntryDetail(22, "123456789", "1313131313", 20M, null, "ID Name", "Desc Data"))
                {

                }

            }
            using (var bw2 = nachaWriter.CreateBatch(200))
            {
            }
        }

Found the issue in ChoETL library, fixed it. Please take the latest nuget package, try it again. Let me know. Thanks

Pls close it, if worked.