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.
354 lines
19 KiB
354 lines
19 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="dynamic_financial_report.general_ledger">
|
|
<t t-call="web.html_container">
|
|
<t t-call="web.internal_layout">
|
|
<div class="page">
|
|
<div class="oe_structure"/>
|
|
<h3><span t-esc="res_company.name"/>: General ledger
|
|
</h3>
|
|
<div>
|
|
|
|
<span t-if="Filters.get('date_from')">
|
|
<strong> From:</strong>
|
|
<t t-esc="Filters['date_from']"/>
|
|
</span>
|
|
|
|
|
|
|
|
<span t-if="Filters.get('date_to')">
|
|
<strong>To:</strong>
|
|
<t t-esc="Filters['date_to']"/>
|
|
</span>
|
|
|
|
|
|
<div style="width:100%;">
|
|
<div style="text-align:centre;" class="row">
|
|
|
|
<div class="col-2">
|
|
<strong>Journals:</strong>
|
|
<t t-foreach="Filters['journals']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
<div class="col-2">
|
|
<strong>Analytic:</strong>
|
|
<t t-foreach="Filters['analytics']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
|
|
<div class="col-2">
|
|
<strong>Analytic Tag:</strong>
|
|
<t t-foreach="Filters['analytic_tags']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
<div class="col-2">
|
|
<strong>Accounts:</strong>
|
|
<t t-foreach="Filters['accounts']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
<div class="col-2">
|
|
<strong>Account Tags:</strong>
|
|
<t t-foreach="Filters['account_tags']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
|
|
<div class="col-2">
|
|
<strong>Entries:</strong>
|
|
<!-- <t t-foreach="Filters['journals']" t-as="ps">-->
|
|
<li>
|
|
<t t-esc="Filters['entries']"/>
|
|
</li>
|
|
<!-- </t>-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<br></br>
|
|
<table>
|
|
<thead>
|
|
<tr class="text-center">
|
|
<th style="text-align:left;">Date</th>
|
|
<th style="text-align:left;">Journal</th>
|
|
<th style="text-align:left;">Partner</th>
|
|
<th style="text-align:left;">Move</th>
|
|
<th style="text-align:left;">Reference</th>
|
|
<th style="text-align:right;padding-bottom:10px;">Debit</th>
|
|
<th style="text-align:right">Credit</th>
|
|
<th style="text-align:right">Balance</th>
|
|
</tr>
|
|
</thead>
|
|
<t t-foreach="account_data" t-as="line">
|
|
<t t-if="account_data[line]['count']">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5">
|
|
<span style="color: white;" t-esc="'..'"/>
|
|
<span t-esc="account_data[line]['name']"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="account_data[line]['debit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="account_data[line]['credit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="account_data[line]['balance']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
|
|
<t t-foreach="account_data[line]['lines']" t-as="sub_line">
|
|
<t t-if="sub_line['initial_bal']">
|
|
<tr>
|
|
<td colspan="5" class="text-right">
|
|
<span>Initial Balance</span>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="sub_line['debit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="sub_line['credit']"
|
|
t-options="{'widgetaccount_data': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="sub_line['balance']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
<t t-if="not sub_line['initial_bal'] and not sub_line['ending_bal']">
|
|
<tr>
|
|
<td>
|
|
<t t-esc="sub_line.get('ldate')" t-options='{"widget": "date"}'/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="sub_line.get('lcode')"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="sub_line.get('partner_name')"/>
|
|
</td>
|
|
<td>
|
|
<t t-esc="sub_line.get('move_name')"/>
|
|
</td>
|
|
<td style="width:30%;">
|
|
<t t-esc="sub_line.get('lname')"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<t t-esc="sub_line.get('debit')"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<t t-esc="sub_line.get('credit')"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<t t-esc="sub_line.get('balance')"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
<t t-if="sub_line['ending_bal']">
|
|
<tr>
|
|
<td colspan="5" class="text-right">
|
|
<span>Ending Balance</span>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="sub_line['debit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="sub_line['credit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="sub_line['balance']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</table>
|
|
</div>
|
|
<br></br>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<record id="action_print_general_ledger" model="ir.actions.report">
|
|
<field name="name">General Ledger</field>
|
|
<field name="model">dynamic.general.ledger</field>
|
|
<field name="report_type">qweb-pdf</field>
|
|
<field name="report_name">dynamic_financial_report.general_ledger</field>
|
|
<field name="report_file">dynamic_financial_report.general_ledger</field>
|
|
</record>
|
|
|
|
<template id="dynamic_financial_report.trial_balance">
|
|
<t t-call="web.html_container">
|
|
<t t-call="web.internal_layout">
|
|
<div class="page">
|
|
<div class="oe_structure"/>
|
|
<h3 style="text-align:centre;left:50%;"><span t-esc="res_company.name"/>: Trial Balance
|
|
</h3>
|
|
|
|
<span t-if="Filters.get('date_from')">
|
|
<strong> From:</strong>
|
|
<t t-esc="Filters['date_from']"/>
|
|
</span>
|
|
|
|
|
|
|
|
<span t-if="Filters.get('date_to')">
|
|
<strong>To:</strong>
|
|
<t t-esc="Filters['date_to']"/>
|
|
</span>
|
|
|
|
|
|
<div>
|
|
<div style="text-align:centre;left:50%;" class="row">
|
|
|
|
<div class="col-3">
|
|
<strong>Journals:</strong>
|
|
<t t-foreach="Filters['journals']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
<div class="col-3">
|
|
<strong>Analytic:</strong>
|
|
<t t-foreach="Filters['analytics']" t-as="ps">
|
|
<li>
|
|
<t t-esc="ps"/>
|
|
</li>
|
|
</t>
|
|
</div>
|
|
<div class="col-3">
|
|
<strong>Entries:</strong>
|
|
<!-- <t t-foreach="Filters['journals']" t-as="ps">-->
|
|
<li>
|
|
<t t-esc="Filters['entries']"/>
|
|
</li>
|
|
<!-- </t>-->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<br></br>
|
|
<table class="table table-sm table-reports">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:left;">Code</th>
|
|
<th colspan="5">Account</th>
|
|
<t t-if="Filters.get('date_from')">
|
|
<th class="amt">Initial Debit</th>
|
|
<th class="amt">Initial Credit</th>
|
|
|
|
</t>
|
|
<th class="text-right">Debit</th>
|
|
<th class="text-right">Credit</th>
|
|
<!-- <th class="text-right">Balance</th>-->
|
|
</tr>
|
|
</thead>
|
|
<t t-foreach="account_data" t-as="line">
|
|
<t t-if="account_data[line]['count']">
|
|
|
|
<tr>
|
|
|
|
<td style="text-align:left;">
|
|
<span style="color: white;" t-esc="'..'"/>
|
|
<span t-esc="account_data[line]['code']"/>
|
|
</td>
|
|
<td colspan="5">
|
|
<span style="color: white;" t-esc="'..'"/>
|
|
<span t-esc="account_data[line]['name']"/>
|
|
</td>
|
|
<t t-if="Filters.get('date_from')">
|
|
<t t-foreach="account_data[line]['lines']" t-as="iline">
|
|
<t t-if="(iline['initial_bal'] == true and iline['move_name'] == 'Initial Balance')">
|
|
<td class="amt">
|
|
<t t-raw="iline['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="amt">
|
|
<t t-raw="iline['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
|
|
</t>
|
|
|
|
</t>
|
|
|
|
|
|
</t>
|
|
|
|
|
|
|
|
<td class="text-right">
|
|
<span t-esc="account_data[line]['debit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="account_data[line]['credit']"
|
|
t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
|
|
</td>
|
|
<!-- <td class="text-right">-->
|
|
<!-- <span t-esc="account_data[line]['balance']"-->
|
|
<!-- t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>-->
|
|
<!-- </td>-->
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
<td colspan="6" style="border-bottom: 1px solid ;" class="amt"><strong>Total</strong></td>
|
|
<t t-if="Filters.get('date_from')">
|
|
<td class="amt" style="border-bottom: 1px solid ;"><strong></strong></td>
|
|
<td class="amt" style="border-bottom: 1px solid ;"><strong></strong></td>
|
|
</t>
|
|
|
|
<!-- <t t-if="(credit > 0 || debit > 0 )">-->
|
|
<td class="text-right" style="border-bottom: 1px solid ;"><strong><t t-esc="total['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></strong></td>
|
|
<td class="text-right" style="border-bottom: 1px solid;"><strong><t t-esc="total['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></strong></td>
|
|
<!-- </t>-->
|
|
|
|
</table>
|
|
</div>
|
|
<br></br>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
<record id="action_print_trial_balance" model="ir.actions.report">
|
|
<field name="name">Trial Balance</field>
|
|
<field name="model">dynamic.trial.balance</field>
|
|
<field name="report_type">qweb-pdf</field>
|
|
<field name="report_name">dynamic_financial_report.trial_balance</field>
|
|
<field name="report_file">dynamic_financial_report.trial_balance</field>
|
|
</record>
|
|
|
|
</odoo>
|
|
|