Cinchoo / ChoETL.NACHA

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

Incompatible model for CCD and CTX entry details & amount parse error #23

Closed lalberto-tis closed 5 years ago

lalberto-tis commented 5 years ago

I downloaded the latest nuget version (ChoETL.NACHA = 1.0.1.5) and using ChoETL (1.1.0.1).

According to NACHA specs: CCD --> Field # 8 Receiving Company Name has a length of 22 (position 55 to 76) image

CTX --> Starting from field # 8 NumberOfAddendaRecords: length 4 from 55 to 58 ReceivingCompanyName/IDNumber: length 16 from 59-74 Reserved: length 2 from 75 to 76 image

3 fields of CTX are combined into 1 field (total length = 22).

There should be a CTXEntryDetailRecord just to get the right value for ReceivingCompanyName. The generic NachaEntryDetailRecord is fine for TEL, CCD, PPD and WEB.

Also, the amount seems to be that is not parsed correctly, the specs says that it has 2 decimal places, the last 2 of the right, so, if the string value is 123468, the decimal should be 1234.68.

Running the ACH test file provided with the solution: This is the row: 6261211403993300911569 0000002536GKGQT9VK NAME TWO 1121140390280738

The amount converted is: -- ChoETL.NACHA.ChoNACHAEntryDetailRecord State -- RecordTypeCode: EntryDetail TransactionCode: 26 ReceivingDFIID: 12114039 CheckDigit: 9 DFIAccountNumber: 3300911569 -->>Amount: 2536 <<--- It should be 25.36 IndividualIDNumber: GKGQT9VK IndividualName: NAME TWO DiscretionaryData: AddendaRecordIndicator: True TraceNumber: 121140390280738

Cinchoo commented 5 years ago

Applied fix, take the latest and give it try.

junyr2 commented 5 years ago

Amount Fixed on version 1.0.1.7 Ready