Skip to content

Commit

Permalink
Merge pull request #283 from b123400/fix-278
Browse files Browse the repository at this point in the history
Add 137 document date to order response
  • Loading branch information
zdavatz authored Jul 14, 2024
2 parents d87ed16 + bc7b929 commit 1b84ff2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ public void write(OutputStream outputStream) throws Exception {
C507DateTimePeriod orderC507 = new C507DateTimePeriod();
// Reference date/time
// Date/time on which the reference was issued.
orderC507.setE2005DateTimePeriodQualifier("171");
orderC507.setE2005DateTimePeriodQualifier("171"); // Reference date = Bestelldatum #278
orderC507.setE2380DateTimePeriod(df.format(this.orderDate));
orderC507.setE2379DateTimePeriodFormatQualifier("102");
issueDate.setC507DateTimePeriod(orderC507);
dtms.add(issueDate);
}
if (this.orderDate != null) {
if (this.invoiceDate != null) {
DTMDateTimePeriod orderDate = new DTMDateTimePeriod();
segmentCount++;
C507DateTimePeriod orderC507 = new C507DateTimePeriod();
orderC507.setE2005DateTimePeriodQualifier("137"); // order date Belegdatum
orderC507.setE2380DateTimePeriod(df.format(this.orderDate));
orderC507.setE2005DateTimePeriodQualifier("137"); // Document date = Belegdatum #278
orderC507.setE2380DateTimePeriod(df.format(this.invoiceDate));
orderC507.setE2379DateTimePeriodFormatQualifier("102");
orderDate.setC507DateTimePeriod(orderC507);
dtms.add(orderDate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,23 @@ public void write(OutputStream outputStream) throws Exception {
DTMDateTimePeriod orderDate = new DTMDateTimePeriod();
segmentCount++;
C507DateTimePeriod orderC507 = new C507DateTimePeriod();
orderC507.setE2005DateTimePeriodQualifier("171"); // order date Belegdatum
orderC507.setE2005DateTimePeriodQualifier("171"); // Reference Date = Bestelldatum #278
orderC507.setE2380DateTimePeriod(df.format(this.orderDate));
orderC507.setE2379DateTimePeriodFormatQualifier("102");
orderDate.setC507DateTimePeriod(orderC507);
dtms.add(orderDate);
}
if (this.referenceDate != null) {
DateFormat df = new SimpleDateFormat("yyyyMMdd");
DTMDateTimePeriod orderDate = new DTMDateTimePeriod();
segmentCount++;
C507DateTimePeriod orderC507 = new C507DateTimePeriod();
orderC507.setE2005DateTimePeriodQualifier("137"); // Document date = Belegdatum
orderC507.setE2380DateTimePeriod(df.format(this.referenceDate));
orderC507.setE2379DateTimePeriodFormatQualifier("102");
orderDate.setC507DateTimePeriod(orderC507);
dtms.add(orderDate);
}
if (this.deliveryDate != null) {
DateFormat df = new SimpleDateFormat("yyyyMMdd");
DTMDateTimePeriod deliveryDate = new DTMDateTimePeriod();
Expand Down

0 comments on commit 1b84ff2

Please sign in to comment.