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
Addenda Record Indicator value is not “0” or “1”.
Addenda Record Indicator value is “0” but Addenda Record follows.
Addenda Record Indicator value is “1” but no Addenda Record follows.
Addenda Record Indicator on a CTX, ENR, IAT, or TRX Entry is “0” and Number of Addenda Records is not zero.
Addenda Record Indicator is “1” and Number of Addenda Records is (0).
The Addenda Record Indicator for Notifications of Change, refused Notifications of Change, Returns, dishonored
Returns, contested dishonored Returns, DNE, ENR, MTE, POS, SHR, TRX, and zero dollar Entries other than
Prenotifications is not equal to “1.” The Addenda Record Indicator for IAT Entries, including Prenotification Entries,
is not equal to “1.”
The following line in
EntryDetail.fs
sets the Addenda Record Indicator to the total amount of addenda belonging to that entry.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