ekonbenefits / NachaSharp

Nacha Format Reader/Writer for .NET
Apache License 2.0
10 stars 2 forks source link

Addenda Record Indicator should be either 0 or 1 #8

Closed abelbraaksma closed 2 years ago

abelbraaksma commented 2 years ago

The following line in EntryDetail.fs sets the Addenda Record Indicator to the total amount of addenda belonging to that entry.

this.AddendaRecordedIndicator <- this.Addenda |> Seq.length   // line 44

However, the official specification requires this field to be either 0 or 1, regardless of the amount of addenda. Furthermore, SEC defines the max allowed addenda, which is either 0, 1 or "0 or 1", 7-12 or 1-9999.

The rules for Addenda Record Indicator, copied from the official 2021 spec:

R25 Addenda Error