Support for IAT NOC
Return nil if entry.Category = NOC
@@ -370,7 +370,9 @@ func (batch *IATBatch) isAddendaSequence() error {
// Verify Addenda* entry detail sequence numbers are valid
entryTN := entry.TraceNumberField()[8:]
- if entry.Category != CategoryNOC {
+ if entry.Category == CategoryNOC {
+ return nil
+ }
if entry.Addenda10.EntryDetailSequenceNumberField() != entryTN {
msg := fmt.Sprintf(msgBatchAddendaTraceNumber, entry.Addenda10.EntryDetailSequenceNumberField(), entry.TraceNumberField()[8:])
return &BatchError{BatchNumber: batch.Header.BatchNumber, FieldName: "TraceNumber", Msg: msg}
@@ -399,7 +401,6 @@ func (batch *IATBatch) isAddendaSequence() error {
msg := fmt.Sprintf(msgBatchAddendaTraceNumber, entry.Addenda16.EntryDetailSequenceNumberField(), entry.TraceNumberField()[8:])
return &BatchError{BatchNumber: batch.Header.BatchNumber, FieldName: "TraceNumber", Msg: msg}
}
- }
// check if sequence is ascending for addendumer - Addenda17 and Addenda18
lastAddenda17Seq := -1
