flectra/addons/account_discount/report/custom_invoice_report.xml
2018-01-17 12:10:36 +05:30

59 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 id="total" class="row pull-right">
<div>
<table class="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">
<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-set="tax_groups_length" t-value="len(o._get_tax_amount_by_group())"/>
<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[1]" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</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[2]" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</span>
</td>
<td class="text-right">
<span t-esc="amount_by_group[1]" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</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>
</xpath>
</template>
</flectra>