rm param 'LINES', add '<ReferenceBuyerOrder />'

This commit is contained in:
Jeremiah Blunser
2024-01-17 13:08:46 +01:00
parent 17d20e860a
commit 04387729bf
2 changed files with 204 additions and 195 deletions
@@ -5,25 +5,25 @@
<DocumentId>0180001585_00000000001000003539</DocumentId>
<DeliveryNote>0180001585</DeliveryNote>
<DocumentType>XMLDESADV</DocumentType>
<DocumentSubType>DESADV_GI</DocumentSubType>
<DocumentSubType>DESADV_IBT</DocumentSubType>
<DocumentDate>2024-01-09T00:00:00.0000000+01:00</DocumentDate>
<DeliveryDate>2024-01-10T11:00:00.0000000+01:00</DeliveryDate>
<ReferenceSupplierOrder />
<ReferenceBuyerOrder />
<ReferenceDocument />
<AllocationReference />
<SenderGLN />
<ReceipientGLN />
<SupplierGLN />
<BuyerGLN />
<DeliveryPartyGLN />
<UltimateConsignyGLN />
<ReturnGLN />
<SendFromGLN />
<SendToGLN />
<DeliveryCurrency />
<ReferenceSupplierOrder/>
<ReferenceBuyerOrder/>
<ReferenceDocument/>
<AllocationReference/>
<SenderGLN/>
<ReceipientGLN/>
<SupplierGLN/>
<BuyerGLN/>
<DeliveryPartyGLN/>
<UltimateConsignyGLN/>
<ReturnGLN/>
<SendFromGLN/>
<SendToGLN/>
<DeliveryCurrency/>
</XMLDESADVHEADER>
<XMLDESADV />
<XMLDESADV/>
<XMLPACKAGEGROUP>
<NumberOfPackages>1</NumberOfPackages>
<PackageCode>33E</PackageCode>
@@ -37,18 +37,18 @@
<GTIN>2050000024177</GTIN>
<DeliveredQuantity>1.000</DeliveredQuantity>
<QuantityQualifier>12</QuantityQualifier>
<DeliveryPrice />
<DeliveryPrice/>
<ReferenceSupplierOrder>5400000531</ReferenceSupplierOrder>
<ReferenceBuyerOrder />
<ReferenceBuyerOrder/>
</XMLITEMS>
<XMLITEMS>
<PositionNumber>000020</PositionNumber>
<GTIN>2050000024184</GTIN>
<DeliveredQuantity>1.000</DeliveredQuantity>
<QuantityQualifier>12</QuantityQualifier>
<DeliveryPrice />
<DeliveryPrice/>
<ReferenceSupplierOrder>5400000531</ReferenceSupplierOrder>
<ReferenceBuyerOrder />
<ReferenceBuyerOrder/>
</XMLITEMS>
</XMLSSCCGROUP>
</XMLDESADV>
+45 -36
View File
@@ -10,11 +10,11 @@
<xsl:strip-space elements="*" />
<xsl:template match="/">
<Message>
<xsl:apply-templates/>
<xsl:apply-templates />
</Message>
</xsl:template>
<xsl:template match="/ZFSHDLV/IDOC">
<xsl:template match="/ZFSHDLV/IDOC">
<xsl:if test="./E1EDL20/E1EDL37">
<xsl:call-template name="HandlingUnit" />
</xsl:if>
@@ -22,20 +22,24 @@
<xsl:call-template name="WithOutHandlingUnits" />
</xsl:if>
</xsl:template>
<xsl:template name="Message">
<xsl:param name="CASE"/>
<xsl:param name="ID"/>
<xsl:param name="SSCCID"/>
<xsl:param name="LINES" />
<xsl:param name="CASE" />
<xsl:param name="ID" />
<xsl:param name="SSCCID" />
<xsl:param name="POSITIONS" />
<!-- START: local variable declaration -->
<!-- START: local variable declaration -->
<xsl:variable name="PackageCode">
<xsl:copy>33E</xsl:copy>
<xsl:copy>
33E
</xsl:copy>
</xsl:variable>
<xsl:variable name="PackageType">
<xsl:copy>BJ</xsl:copy>
<xsl:copy>
BJ
</xsl:copy>
</xsl:variable>
<!-- END: local variable declaration -->
<!-- END: local variable declaration -->
<XMLDESADV>
<XMLDESADVHEADER>
<DocumentId>
@@ -47,14 +51,16 @@
<DocumentType>
<xsl:call-template name="DocumentType">
<xsl:with-param name="DocumentType">
<xsl:copy>DEV-8311</xsl:copy>
<xsl:copy>
DEV-8311
</xsl:copy>
</xsl:with-param>
</xsl:call-template>
</DocumentType>
<DocumentSubType>
<xsl:call-template name="DocumentSubType">
<xsl:with-param name="LFART">
<xsl:value-of select="../E1EDL21/LFART"/>
<xsl:value-of select="../E1EDL21/LFART" />
</xsl:with-param>
</xsl:call-template>
</DocumentSubType>
@@ -110,10 +116,14 @@
<XMLPACKAGEGROUP>
<NumberOfPackages>
<xsl:choose>
<xsl:when test="format-number(/ZFSHDLV/IDOC/E1EDL20/ANZPK,'#') > 0 ">
<xsl:value-of select="format-number(/ZFSHDLV/IDOC/E1EDL20/ANZPK,'#')" />
<xsl:when
test="format-number(/ZFSHDLV/IDOC/E1EDL20/ANZPK,'#') > 0 ">
<xsl:value-of
select="format-number(/ZFSHDLV/IDOC/E1EDL20/ANZPK,'#')" />
</xsl:when>
<xsl:otherwise><xsl:copy-of select="1"/></xsl:otherwise>
<xsl:otherwise>
<xsl:copy-of select="1" />
</xsl:otherwise>
</xsl:choose>
</NumberOfPackages>
@@ -122,14 +132,16 @@
</PackageCode>
</XMLPACKAGEGROUP>
<XMLSSCCGROUP>
<SSCC><xsl:value-of select="$SSCCID" /></SSCC>
<SSCC>
<xsl:value-of select="$SSCCID" />
</SSCC>
<PackageCode>
<xsl:value-of select="$PackageCode" />
</PackageCode>
<PackageType>
<xsl:value-of select="$PackageType" />
</PackageType>
<xsl:copy-of select="$POSITIONS"/>
<xsl:copy-of select="$POSITIONS" />
</XMLSSCCGROUP>
</XMLDESADV>
</xsl:template>
@@ -142,38 +154,33 @@
<xsl:value-of select="./POSNR" />
</PositionNumber>
<GTIN>
<xsl:value-of
select="./EAN11" />
<xsl:value-of select="./EAN11" />
</GTIN>
<DeliveredQuantity>
<xsl:value-of
select="./LGMNG" />
<xsl:value-of select="./LGMNG" />
</DeliveredQuantity>
<QuantityQualifier>
<xsl:call-template name="QuantityQualifier">
<xsl:with-param name="UoM">
<xsl:value-of
select="./MEINS" />
<xsl:value-of select="./MEINS" />
</xsl:with-param>
</xsl:call-template>
</QuantityQualifier>
<DeliveryPrice></DeliveryPrice>
<ReferenceSupplierOrder>
<xsl:value-of
select="./VGBEL" />
<xsl:value-of select="./VGBEL" />
</ReferenceSupplierOrder>
<ReferenceBuyerOrder />
</XMLITEMS>
</xsl:for-each>
</xsl:variable>
<xsl:call-template name="Message" >
<xsl:with-param name="CASE" select="'NoHandlingUnit'"/>
<xsl:with-param name="ID" select="./E1EDL20/VBELN"/>
<xsl:call-template name="Message">
<xsl:with-param name="CASE" select="'NoHandlingUnit'" />
<xsl:with-param name="ID" select="./E1EDL20/VBELN" />
<xsl:with-param name="SSCCID" select="./E1EDL20/VBELN" />
<xsl:with-param name="POSITIONS" select="$POSITIONS"/>
<xsl:with-param name="POSITIONS" select="$POSITIONS" />
</xsl:call-template>
</xsl:template>
<xsl:template name="HandlingUnit">
@@ -219,11 +226,13 @@
</XMLITEMS>
</xsl:for-each>
</xsl:variable>
<xsl:call-template name="Message" >
<xsl:with-param name="CASE" select="'HandlingUnit'"/>
<xsl:with-param name="ID" select="concat(../VBELN,'_',./EXIDV)"/>
<xsl:with-param name="SSCCID" select="format-number(./EXIDV,'#')" />
<xsl:with-param name="POSITIONS" select="$POSITIONS"/>
<xsl:call-template name="Message">
<xsl:with-param name="CASE" select="'HandlingUnit'" />
<xsl:with-param name="ID"
select="concat(../VBELN,'_',./EXIDV)" />
<xsl:with-param name="SSCCID"
select="format-number(./EXIDV,'#')" />
<xsl:with-param name="POSITIONS" select="$POSITIONS" />
</xsl:call-template>
</xsl:for-each>
</xsl:template>