67 lines
2.5 KiB
XML
67 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
this repository contains the full copyright notices and license terms. -->
|
|
<py:strip xmlns:py="http://genshi.edgewall.org/">
|
|
<py:def function="PartyIdentification(party, id=True)">
|
|
<!-- EPC limits to 70 instead of 140 -->
|
|
<Nm>${party.name[:70]}</Nm>
|
|
<py:with vars="address = party.address_get()">
|
|
<PstlAdr py:if="address">
|
|
${PostalAddress(address)}
|
|
</PstlAdr>
|
|
</py:with>
|
|
<Id py:if="id and party.sepa_creditor_identifier_used">
|
|
<PrvtId>
|
|
<Othr>
|
|
<Id>${party.sepa_creditor_identifier_used}</Id>
|
|
<SchmeNm>
|
|
<Prtry>SEPA</Prtry>
|
|
</SchmeNm>
|
|
<!-- Issr -->
|
|
</Othr>
|
|
</PrvtId>
|
|
</Id>
|
|
<!-- CtryOfRes -->
|
|
<!-- CtctDtls -->
|
|
</py:def>
|
|
<py:def function="PostalAddress(address)">
|
|
<!-- AdrTp -->
|
|
<!-- Dept -->
|
|
<!-- SubDept -->
|
|
<StrtNm py:if="address.street">${address.street[:70]}</StrtNm>
|
|
<!-- BldgNb -->
|
|
<PstCd py:if="address.zip">${address.zip[:16]}</PstCd>
|
|
<TwnNm py:if="address.city">${address.city[:35]}</TwnNm>
|
|
<CtrySubDvsn py:if="address.subdivision">${address.subdivision.rec_name[:35]}</CtrySubDvsn>
|
|
<Ctry py:if="address.country">${address.country.code}</Ctry>
|
|
<!-- AdrLine -->
|
|
</py:def>
|
|
<py:def function="Account(account_number, currency=True)">
|
|
<Id>
|
|
<!-- EPC only IBAN is allowed -->
|
|
<IBAN>${account_number.compact_iban}</IBAN>
|
|
</Id>
|
|
<!-- Tp -->
|
|
<Ccy py:if="currency and account_number.account.currency">${account_number.account.currency.code}</Ccy>
|
|
<!-- Nm -->
|
|
</py:def>
|
|
<py:def function="FinancialInstitution(bank, only_bic=False)">
|
|
<FinInstnId>
|
|
<BICFI py:if="bank.bic">${bank.bic}</BICFI>
|
|
<py:if test="not only_bic">
|
|
<!-- ClrSysMmbId -->
|
|
<Nm>${bank.party.name[:140]}</Nm>
|
|
<py:with vars="address = bank.party.address_get()">
|
|
<PstlAdr py:if="address">
|
|
${PostalAddress(address)}
|
|
</PstlAdr>
|
|
</py:with>
|
|
</py:if>
|
|
<Othr py:if="not bank.bic">
|
|
<Id>NOTPROVIDED</Id>
|
|
</Othr>
|
|
</FinInstnId>
|
|
<!-- BrnchId -->
|
|
</py:def>
|
|
</py:strip>
|