forked from emaijala/MLInvoice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_finvoice_soap_envelope.xsl
More file actions
52 lines (49 loc) · 2.3 KB
/
create_finvoice_soap_envelope.xsl
File metadata and controls
52 lines (49 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="stylesheet"/>
<xsl:output method="xml" version="1.0" encoding="ISO-8859-15" indent="yes"/>
<xsl:template match="/invoicedata">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
<SOAP-ENV:Header>
<eb:MessageHeader xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" eb:version="2.0" SOAP-ENV:mustUnderstand="1">
<eb:From>
<eb:PartyId><xsl:value-of select="sender/org_unit_number"/></eb:PartyId>
<eb:Role>Sender</eb:Role>
</eb:From>
<xsl:if test="sender/payment_intermediator != ''">
<eb:From>
<eb:PartyId><xsl:value-of select="sender/payment_intermediator"/></eb:PartyId>
<eb:Role>Intermediator</eb:Role>
</eb:From>
</xsl:if>
<eb:To>
<eb:PartyId><xsl:value-of select="recipient/org_unit_number"/></eb:PartyId>
<eb:Role>Receiver</eb:Role>
</eb:To>
<xsl:if test="recipient/payment_intermediator != ''">
<eb:To>
<eb:PartyId><xsl:value-of select="recipient/payment_intermediator"/></eb:PartyId>
<eb:Role>Intermediator</eb:Role>
</eb:To>
</xsl:if>
<eb:CPAId>yoursandmycpa</eb:CPAId>
<eb:ConversationId><xsl:value-of select="sender/org_unit_number"/>-<xsl:value-of select="invoice/invoice_no"/></eb:ConversationId>
<eb:Service>Routing</eb:Service>
<eb:Action>ProcessInvoice</eb:Action>
<eb:MessageData>
<eb:MessageId><xsl:value-of select="invoice/invoice_no"/></eb:MessageId>
<eb:Timestamp><xsl:value-of select="settings/current_timestamp_utc"/></eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<eb:Manifest eb:id="Manifest" eb:version="2.0">
<eb:Reference eb:id="Finvoice">
<xsl:attribute name="xlink:href"><xsl:value-of select="invoice/invoice_no"/></xsl:attribute>
<eb:Schema eb:location="http://www.finvoice.info/finvoice.xsd" eb:version="2.0"/>
</eb:Reference>
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</xsl:template>
</xsl:stylesheet>