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.
|
|
<?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="report_assets_common" name="oca_statements report assets" inherit_id="web.report_assets_common"> <xpath expr="." position="inside"> <link href="/customer_outstanding_statement/static/src/less/layout_statement.less" rel="stylesheet"/> </xpath> </template>
<template id="customer_outstanding_statement.statement_document"> <t t-call="web.external_layout"> <div class="page"> <div class="row"> <div name="statement_address" class="col-xs-5 col-xs-offset-7"> <address t-esc="o" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/> <div t-if="o.vat" class="mt16"><t t-esc="o.country_id.vat_label or 'TIN'"/>: <span t-field="o.vat"/> </div> </div> <h4 style="padding-left:15em;padding-top:2em"> Outstanding 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'"/> Outstanding Statement 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"> <thead> <tr> <th>Reference number</th> <th>Date</th> <th>Due Date</th> <th>Description</th> <th class="amount">Original Amount</th> <th class="amount">Open Amount</th> <th class="amount">Balance</th> </tr> </thead> <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> <span t-esc="line['date_maturity']"/> </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['open_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/> <td> Ending Balance </td> <td/> <td/> <td class="amount"> <span t-esc="Amount_Due[o.id][currency]" t-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 table-statement" t-if="Show_Buckets"> <thead> <tr> <th class="amount">Current Due</th> <th class="amount">1-30 Days</th> <th class="amount">30-60 Days</th> <th class="amount">60-90 Days</th> <th class="amount">90-120 Days</th> <th class="amount">+120 Days</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_outstanding_statement.statement_document" t-lang="o.lang"/> </t> </t> </t> </template>
<report id="action_print_customer_outstanding_statement" model="res.partner" report_type="qweb-pdf" menu="False" string="Outstanding Statement" name="customer_outstanding_statement.statement" file="customer_outstanding_statement.statement" /> </odoo>
|