xrechnung weiter, line fehlt noch
This commit is contained in:
parent
265e38c24f
commit
7e35688043
5 changed files with 121 additions and 26 deletions
|
@ -30,7 +30,26 @@
|
|||
</py:def>
|
||||
<py:def function="PartyLegalEntity(value, company_id=True)">
|
||||
<cbc:RegistrationName>${value.name}</cbc:RegistrationName>
|
||||
<cbc:CompanyID py:if test="company_id">${getattr(value.tax_identifier, 'code', None)}</cbc:CompanyID>
|
||||
<cbc:CompanyID py:if="company_id">${getattr(this.seller_trade_tax_identifier, 'code', None)}</cbc:CompanyID>
|
||||
</py:def>
|
||||
<py:def function="PayeeFinancialAccount(value)">
|
||||
<py:if test="len(value.bank_accounts)>0">
|
||||
<cbc:ID>${value.bank_accounts[0].numbers[0].number_compact}</cbc:ID>
|
||||
<cbc:Name>${value.name}</cbc:Name>
|
||||
</py:if>
|
||||
</py:def>
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
<cbc:ID>${this.tax_category_code(value)}</cbc:ID>
|
||||
<cbc:Percent>${this.tax_rate(value)}</cbc:Percent>
|
||||
<cac:TaxScheme>
|
||||
<cbc:ID>VAT</cbc:ID>
|
||||
</cac:TaxScheme>
|
||||
</cac:TaxCategory>
|
||||
</cac:TaxSubtotal>
|
||||
</py:def>
|
||||
|
||||
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.1</cbc:CustomizationID>
|
||||
|
@ -59,7 +78,7 @@
|
|||
${PartyTaxScheme(this.seller_trade_tax_identifier)}
|
||||
</cac:PartyTaxScheme>
|
||||
<cac:PartyLegalEntity>
|
||||
${PartyLegalEntity(this.invoice.company.party)}
|
||||
${PartyLegalEntity(this.seller_trade_party)}
|
||||
</cac:PartyLegalEntity>
|
||||
<cac:Contact>
|
||||
${Contact(this.seller_trade_party)}
|
||||
|
@ -89,14 +108,13 @@
|
|||
<cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
|
||||
<cbc:PaymentID>${this.payment_reference}</cbc:PaymentID>
|
||||
<cac:PayeeFinancialAccount>
|
||||
<cbc:ID>DE00 1234 5678 0000 1234 56</cbc:ID>
|
||||
<cbc:Name>${this.invoice.company.party.name}</cbc:Name>
|
||||
${PayeeFinancialAccount(this.seller_trade_party)}
|
||||
</cac:PayeeFinancialAccount>
|
||||
</cac:PaymentMeans>
|
||||
<cac:PaymentTerms py:if test="this.invoice.payment_term is not None">
|
||||
<cac:PaymentTerms py:if="this.invoice.payment_term is not None">
|
||||
<cbc:Note>${this.invoice.payment_term.rec_name}</cbc:Note>
|
||||
</cac:PaymentTerms>
|
||||
<cac:AllowanceCharge py:if test="False">
|
||||
<cac:AllowanceCharge py:if="False">
|
||||
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
||||
<cbc:AllowanceChargeReason>Neukundenrabatt</cbc:AllowanceChargeReason>
|
||||
<cbc:Amount currencyID="EUR">5.00</cbc:Amount>
|
||||
|
@ -109,27 +127,19 @@
|
|||
</cac:TaxCategory>
|
||||
</cac:AllowanceCharge>
|
||||
<cac:TaxTotal>
|
||||
<cbc:TaxAmount py:attrs={'currencyID': this.invoice.currency.code}>${this.invoice.total_amount}</cbc:TaxAmount>
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs={'currencyID': this.invoice.currency.code}>35.25</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs={'currencyID': this.invoice.currency.code}>6.70</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
<cbc:ID>S</cbc:ID>
|
||||
<cbc:Percent>19.00</cbc:Percent>
|
||||
<cac:TaxScheme>
|
||||
<cbc:ID>VAT</cbc:ID>
|
||||
</cac:TaxScheme>
|
||||
</cac:TaxCategory>
|
||||
</cac:TaxSubtotal>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.invoice.tax_amount}</cbc:TaxAmount>
|
||||
<py:for each="taxline in this.invoice.taxes">
|
||||
${TaxSubTotal(taxline)}
|
||||
</py:for>
|
||||
</cac:TaxTotal>
|
||||
<cac:LegalMonetaryTotal>
|
||||
<cbc:LineExtensionAmount py:attrs={'currencyID': this.invoice.currency.code}>40.25</cbc:LineExtensionAmount>
|
||||
<cbc:TaxExclusiveAmount py:attrs={'currencyID': this.invoice.currency.code}>35.25</cbc:TaxExclusiveAmount>
|
||||
<cbc:TaxInclusiveAmount py:attrs={'currencyID': this.invoice.currency.code}>41.95</cbc:TaxInclusiveAmount>
|
||||
<cbc:AllowanceTotalAmount py:attrs={'currencyID': this.invoice.currency.code}>5.00</cbc:AllowanceTotalAmount>
|
||||
<cbc:ChargeTotalAmount py:attrs={'currencyID': this.invoice.currency.code}>0.00</cbc:ChargeTotalAmount>
|
||||
<cbc:PrepaidAmount py:attrs={'currencyID': this.invoice.currency.code}>0.00</cbc:PrepaidAmount>
|
||||
<cbc:PayableAmount py:attrs={'currencyID': this.invoice.currency.code}>41.95</cbc:PayableAmount>
|
||||
<cbc:LineExtensionAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.invoice.untaxed_amount}</cbc:LineExtensionAmount>
|
||||
<cbc:TaxExclusiveAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.invoice.untaxed_amount}</cbc:TaxExclusiveAmount>
|
||||
<cbc:TaxInclusiveAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.invoice.total_amount}</cbc:TaxInclusiveAmount>
|
||||
<cbc:AllowanceTotalAmount py:if="False" py:attrs="{'currencyID': this.invoice.currency.code}">0.00</cbc:AllowanceTotalAmount>
|
||||
<cbc:ChargeTotalAmount py:attrs="{'currencyID': this.invoice.currency.code}">0.00</cbc:ChargeTotalAmount>
|
||||
<cbc:PrepaidAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.prepaid_amount(this.invoice)}</cbc:PrepaidAmount>
|
||||
<cbc:PayableAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.invoice.amount_to_pay}</cbc:PayableAmount>
|
||||
</cac:LegalMonetaryTotal>
|
||||
<cac:InvoiceLine>
|
||||
<cbc:ID>1</cbc:ID>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue