Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/MODEXPW-452_ISSN' into MODEXPW-4…
Browse files Browse the repository at this point in the history
…52_ISSN
  • Loading branch information
DmytroBykov1 committed Jan 10, 2024
2 parents 37d2f70 + 1f404f5 commit e10a592
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void convertPOtoEdifact(EDIStreamWriter writer, CompositePurchaseOrder co
int messageSegmentCount = 0;

messageSegmentCount++;
writePOHeader(ediFileConfig.getFileId(), writer);
writePOHeader(compPO, writer);

String rushOrderQualifier = compPO.getCompositePoLines().stream().filter(line -> line.getRush() != null).anyMatch(CompositePoLine::getRush) ? RUSH_ORDER : NOT_RUSH_ORDER;
messageSegmentCount++;
Expand Down Expand Up @@ -78,9 +78,9 @@ public void convertPOtoEdifact(EDIStreamWriter writer, CompositePurchaseOrder co
}

// Order header = Start of order; EDIFACT message type - There would be a new UNH for each FOLIO PO in the file
private void writePOHeader(String fileId, EDIStreamWriter writer) throws EDIStreamException {
private void writePOHeader(CompositePurchaseOrder compPO, EDIStreamWriter writer) throws EDIStreamException {
writer.writeStartSegment("UNH")
.writeElement(fileId)
.writeElement(compPO.getPoNumber())
.writeStartElement()
.writeComponent("ORDERS")
.writeComponent("D")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
UNA:+.? '
UNB+UNOC:3+901494200:014+0142948:31B+ddmmyy:hhmm+{fileId}'
UNH+{fileId}+ORDERS:D:96A:UN:EAN008'
UNH+10000+ORDERS:D:96A:UN:EAN008'
BGM+220+10000+9'
DTM+137::102'
NAD+BY+901494200::014'
Expand All @@ -23,7 +23,7 @@ UNS+S'
CNT+1:1'
CNT+2:1'
UNT+23+10000'
UNH+{fileId}+ORDERS:D:96A:UN:EAN008'
UNH+10001+ORDERS:D:96A:UN:EAN008'
BGM+224+10001+9'
DTM+137::102'
NAD+BY+901494200::014'
Expand Down Expand Up @@ -79,7 +79,7 @@ UNS+S'
CNT+1:4'
CNT+2:2'
UNT+56+10001'
UNH+{fileId}+ORDERS:D:96A:UN:EAN008'
UNH+10002+ORDERS:D:96A:UN:EAN008'
BGM+220+10002+9'
DTM+137::102'
NAD+BY+901494200::014'
Expand All @@ -94,7 +94,7 @@ UNS+S'
CNT+1:0'
CNT+2:1'
UNT+15+10002'
UNH+{fileId}+ORDERS:D:96A:UN:EAN008'
UNH+10003+ORDERS:D:96A:UN:EAN008'
BGM+220+10003+9'
DTM+137::102'
NAD+BY+901494200::014'
Expand All @@ -109,7 +109,7 @@ UNS+S'
CNT+1:0'
CNT+2:1'
UNT+15+10003'
UNH+{fileId}+ORDERS:D:96A:UN:EAN008'
UNH+10004+ORDERS:D:96A:UN:EAN008'
BGM+220+10004+9'
DTM+137::102'
NAD+BY+901494200::014'
Expand Down

0 comments on commit e10a592

Please sign in to comment.