ADV-Support
Batch changes for SEC Code = ADV
@@ -111,14 +111,12 @@ func (w *Writer) writeBatch(file *File) error {
w.lineNum++
}
}
-
- if batch.GetHeader().StandardEntryClassCode == "ADV" {
- if _, err := w.w.WriteString(batch.GetADVControl().String() + "\n"); err != nil {
+ if batch.GetHeader().StandardEntryClassCode != "ADV" {
+ if _, err := w.w.WriteString(batch.GetControl().String() + "\n"); err != nil {
return err
}
} else {
-
- if _, err := w.w.WriteString(batch.GetControl().String() + "\n"); err != nil {
+ if _, err := w.w.WriteString(batch.GetADVControl().String() + "\n"); err != nil {
return err
}
}
