END;
IF xtra_ftx; ftx_vals.unshift(xtra_ftx); END;
+ notes = [];
+
# BT & ULS want FTX+LIN for every LI, even if empty
IF ((VENDOR_BT OR VENDOR_ULS) AND ftx_vals.size == 0);
- ftx_vals.unshift('');
- END;
+ notes.push('');
- # EDI FTX fields have a max length of 512
- notes = [];
- FOR note IN ftx_vals;
- sub_notes = note.chunk(512);
- FOR sub_note IN sub_notes;
- notes.push(helpers.escape_edi(sub_note));
+ ELSE;
+
+ # EDI FTX fields have a max length of 512
+ FOR note IN ftx_vals;
+ sub_notes = note.chunk(512);
+ FOR sub_note IN sub_notes;
+ notes.push(helpers.escape_edi(sub_note));
+ END;
END;
END;