Files
tryton/template/base.xml
T
Cédric Krier be37e9d647 Don't set id for Cdtr in pain.008
Some banks don't accept ID in Cdtr tag of pain.008, so we add an option to
PartyIdentification to display or not the id.
And as the field is not required by the rule book on this tag, we can just not
set it there because it will be anyway on CdtrSchemId tag.

issue4135
review10501003
2014-09-13 15:18:35 +02:00

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="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}</PstCd>
<TwnNm py:if="address.city">${address.city}</TwnNm>
<CtrySubDvsn py:if="address.subdivision">${address.subdivision.rec_name}</CtrySubDvsn>
<Ctry py:if="address.country">${address.country.code}</Ctry>
<!-- AdrLine -->
</py:def>
<py:def function="Account(account_number)">
<Id>
<!-- EPC only IBAN is allowed -->
<IBAN>${account_number.compact_iban}</IBAN>
</Id>
<!-- Tp -->
<Ccy py:if="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>