flectra/addons/account_discount/report/custom_invoice_report.xml

60 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<template id="custom_invoice_report_layout" inherit_id="account.report_invoice_document">
<xpath expr="//div/div[hasclass('clearfix')]" position="replace">
<div class="clearfix">
<div id="total" class="row">
<div class="col-xs-5 pull-right">
<table class="table table-condensed" style="min-width: 250px;max-width: 400px;">
<tr>
<td><strong>Gross Amount</strong></td>
<td class="text-right">
<span t-field="o.gross_amount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr>
<td><strong>Discount</strong></td>
<td class="text-right">
<span t-field="o.discount" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<tr class="border-black" style="border-bottom:1px solid #dddddd;">
<td><strong>Subtotal</strong></td>
<td class="text-right">
<span t-field="o.amount_untaxed" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
<t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
<tr style="border-bottom:1px solid #dddddd;">
<t t-if="len(o.tax_line_ids) == 1 and o.amount_untaxed == amount_by_group[2]">
<td><span t-esc="amount_by_group[0]"/></td>
<td class="text-right">
<span t-esc="amount_by_group[3]"/>
</td>
</t>
<t t-else="">
<td>
<span t-esc="amount_by_group[0]"/>
<span>&amp;nbsp;<span>on</span>
<t t-esc="amount_by_group[4]"/>
</span>
</td>
<td class="text-right">
<span t-esc="amount_by_group[3]" />
</td>
</t>
</tr>
</t>
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
</div>
</div>
</div>
</xpath>
</template>
</flectra>