Skip to content

Commit

Permalink
iatBatch update
Browse files Browse the repository at this point in the history
iatBatch update
  • Loading branch information
bkmoovio committed Oct 30, 2018
1 parent 83ead47 commit d19c6e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iatBatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ func (batch *IATBatch) Validate() error {
for _, entry := range batch.Entries {

switch entry.Category {

case CategoryForward:
if len(entry.Addendum) > 7 {
return &BatchError{BatchNumber: batch.Header.BatchNumber, FieldName: "Addendum", Msg: msgBatchIATAddendum}
Expand All @@ -538,6 +537,7 @@ func (batch *IATBatch) Validate() error {
return &BatchError{BatchNumber: batch.Header.BatchNumber, FieldName: "Addendum", Msg: msg}
}
case "98":
// Only one Addenda98 can be added in EntryDetail.AddIATAddenda
if batch.GetHeader().IATIndicator != "IATCOR" {
msg := fmt.Sprintf(msgBatchIATNOC, batch.GetHeader().IATIndicator, "IATCOR")
return &BatchError{BatchNumber: batch.Header.BatchNumber, FieldName: "IATIndicator", Msg: msg}
Expand Down

0 comments on commit d19c6e9

Please sign in to comment.