mirror of
https://gitlab.com/flectra-community/account-financial-reporting.git
synced 2024-12-25 21:41:45 +00:00
172 lines
9.6 KiB
XML
172 lines
9.6 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<!-- Copyright 2018 Eficent Business and IT Consulting Services S.L.
|
||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||
|
<flectra>
|
||
|
<template id="report_assets_common" name="oca_statements report assets" inherit_id="web.report_assets_common">
|
||
|
<xpath expr="." position="inside">
|
||
|
<link href="/customer_activity_statement/static/src/less/layout_statement.less" rel="stylesheet"/>
|
||
|
</xpath>
|
||
|
</template>
|
||
|
|
||
|
<template id="customer_activity_statement.statement_document">
|
||
|
<t t-call="web.external_layout">
|
||
|
<div class="page">
|
||
|
<div class="row">
|
||
|
<div class="col-xs-5 col-xs-offset-7">
|
||
|
<span t-field="o.name"/><br/>
|
||
|
<span t-raw="o.contact_address.replace('\n\n', '\n').replace('\n', '<br>')"/>
|
||
|
<span t-field="o.vat"/>
|
||
|
</div>
|
||
|
<h4 style="padding-left:15em;padding-top:2em">
|
||
|
Activity Statement
|
||
|
</h4>
|
||
|
<p>
|
||
|
Date: <span t-esc="Date[o.id]" /><br/><!--Today-->
|
||
|
<t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
|
||
|
</p>
|
||
|
|
||
|
<t t-if="Lines[o.id]">
|
||
|
<br/>
|
||
|
<t t-foreach="Lines[o.id]" t-as="currency">
|
||
|
<br t-if="not currency_first" />
|
||
|
<p >
|
||
|
<span t-esc="'Customer' if account_type == 'receivable' else 'Supplier'"/> Activity Statement between <span t-esc="Date_start[o.id]" /> and <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
|
||
|
</p>
|
||
|
<table class="table table-condensed table-statement" >
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th >Reference number</th>
|
||
|
<th >Date</th>
|
||
|
<th >Description</th>
|
||
|
<th class="amount" >Amount</th>
|
||
|
<th class="amount" >Balance</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td />
|
||
|
<td >
|
||
|
<span t-esc="Date_start[o.id]"/>
|
||
|
</td>
|
||
|
<td >
|
||
|
Balance Forward
|
||
|
</td>
|
||
|
<td />
|
||
|
<td class="amount" >
|
||
|
<span t-esc="Balance_forward[o.id].get(currency, 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
<tr t-foreach="Lines[o.id][currency]" t-as="line" t-att-class="'statement-blocked' if line['blocked'] else ''">
|
||
|
|
||
|
<td >
|
||
|
<span t-esc="line['move_id']"/>
|
||
|
</td>
|
||
|
<td >
|
||
|
<span t-esc="line['date']"/>
|
||
|
</td>
|
||
|
<td >
|
||
|
<t t-if="line['name'] != '/'">
|
||
|
<t t-if="not line['ref']"><span t-esc="line['name']"/></t>
|
||
|
<t t-if="line['ref'] and line['name']">
|
||
|
<t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
|
||
|
<t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
|
||
|
</t>
|
||
|
</t>
|
||
|
<t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td />
|
||
|
<td >
|
||
|
<span t-esc="Date_end[o.id]"/>
|
||
|
</td>
|
||
|
<td >
|
||
|
Ending Balance
|
||
|
</td>
|
||
|
<td />
|
||
|
<td class="amount" >
|
||
|
<span t-esc="Amount_Due[o.id][currency]" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<p>
|
||
|
Aging Report at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
|
||
|
</p>
|
||
|
<table class="table table-condensed table-statement" t-if="Show_Buckets" >
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="amount" >Current Due</th>
|
||
|
<th class="amount" >1-30 Days Due</th>
|
||
|
<th class="amount" >30-60 Days Due</th>
|
||
|
<th class="amount" >60-90 Days Due</th>
|
||
|
<th class="amount" >90-120 Days Due</th>
|
||
|
<th class="amount" >+120 Days Due</th>
|
||
|
<th class="amount" >Balance Due</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<t t-set="buckets" t-value="Buckets[o.id].get(currency, {})" />
|
||
|
<tbody >
|
||
|
<tr >
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('current', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('b_1_30', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('b_30_60', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('b_60_90', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('b_90_120', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('b_over_120', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
<td class="amount" >
|
||
|
<span t-esc="buckets.get('balance', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</t>
|
||
|
</t>
|
||
|
<p t-if="not Lines[o.id]">
|
||
|
<strong>The partner doesn't have due entries.</strong>
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</t>
|
||
|
</template>
|
||
|
|
||
|
<template id="statement">
|
||
|
<t t-call="web.html_container">
|
||
|
<t t-foreach="docs" t-as="o">
|
||
|
<t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
|
||
|
<t t-call="customer_activity_statement.statement_document" t-lang="o.lang"/>
|
||
|
</t>
|
||
|
</t>
|
||
|
</t>
|
||
|
</template>
|
||
|
|
||
|
<report id="action_print_customer_activity_statement"
|
||
|
model="res.partner"
|
||
|
report_type="qweb-pdf"
|
||
|
menu="False"
|
||
|
string="Activity Statement"
|
||
|
name="customer_activity_statement.statement"
|
||
|
file="customer_activity_statement.statement"
|
||
|
/>
|
||
|
</flectra>
|