You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
212 lines
15 KiB
212 lines
15 KiB
<?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). -->
|
|
<odoo>
|
|
<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 t-if="account_type == 'receivable'">
|
|
Customer 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>
|
|
<p t-if="account_type == 'payable'">
|
|
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" style="border: 1px solid black; border-collapse: collapse;">
|
|
<thead>
|
|
<tr>
|
|
<th style="border-right: 1px solid black;">Reference number</th>
|
|
<th class="text-center" style="border-right: 1px solid black;">Date</th>
|
|
<th style="border-right: 1px solid black;">Description</th>
|
|
<th class="text-right" style="border-right: 1px solid black;">Amount</th>
|
|
<th class="text-right" style="border-right: 1px solid black;">Balance</th>
|
|
</tr>
|
|
</thead>
|
|
<tr>
|
|
<td style="border-right: 1px solid black;"/>
|
|
<td style="border-right: 1px solid black;">
|
|
<span t-esc="Date_start[o.id]"/>
|
|
</td>
|
|
<td style="border-right: 1px solid black;">
|
|
Balance Forward
|
|
</td>
|
|
<td style="border-right: 1px solid black;"/>
|
|
<td class="text-right" t-if="currency in Balance_forward[o.id]" style="border-right: 1px solid black;">
|
|
<span t-esc="Balance_forward[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" t-if="currency not in Balance_forward[o.id]" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
</tr>
|
|
<tr t-foreach="Lines[o.id][currency]" t-as="line">
|
|
<t t-if="not line['blocked']">
|
|
<td style="border-right: 1px solid black;">
|
|
<span t-esc="line['move_id']"/>
|
|
</td>
|
|
<td style="border-right: 1px solid black;">
|
|
<span t-esc="line['date']"/>
|
|
</td>
|
|
<td style="border-right: 1px solid black;">
|
|
<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="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
</t>
|
|
<t t-if="line['blocked']">
|
|
<td style="border-right: 1px solid black; background-color: grey;">
|
|
<span t-esc="line['move_id']"/>
|
|
</td>
|
|
<td style="border-right: 1px solid black; background-color: grey;">
|
|
<span t-esc="line['date']"/>
|
|
</td>
|
|
<td style="border-right: 1px solid black; background-color: grey;">
|
|
<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="text-right" style="border-right: 1px solid black; background-color: grey;">
|
|
<span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black; background-color: grey;">
|
|
<span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
</t>
|
|
</tr>
|
|
<tr>
|
|
<td style="border-right: 1px solid black;"/>
|
|
<td style="border-right: 1px solid black;">
|
|
<span t-esc="Date_end[o.id]"/>
|
|
</td>
|
|
<td style="border-right: 1px solid black;">
|
|
Ending Balance
|
|
</td>
|
|
<td style="border-right: 1px solid black;"/>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Amount_Due[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
</tr>
|
|
</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" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center" style="border-right: 1px solid black;">Current Due</th>
|
|
<th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
|
|
<th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
|
|
<th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
|
|
<th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
|
|
<th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
|
|
<th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
|
|
</tr>
|
|
</thead>
|
|
<tr t-if="currency in Buckets[o.id]">
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['b_1_30']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['b_30_60']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['b_60_90']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['b_90_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['b_over_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="Buckets[o.id][currency]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
</tr>
|
|
<tr t-if="currency not in Buckets[o.id]">
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
<td class="text-right" style="border-right: 1px solid black;">
|
|
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
</td>
|
|
</tr>
|
|
</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="Statement Action to PDF"
|
|
name="customer_activity_statement.statement"
|
|
file="customer_activity_statement.statement"
|
|
/>
|
|
</odoo>
|