odoo/addons/account/project/views/report_analyticcostledger.xml

90 lines
4.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_analyticcostledger">
<t t-call="report.html_container">
<t t-call="report.internal_layout">
<div class="page">
<h2>Cost Ledger</h2>
<div class="row mt32 mb32">
<div class="col-xs-3">
<strong>Period From:</strong>
<p t-esc="formatLang(date1, date=True)"/>
</div>
<div class="col-xs-3">
<strong>Period To:</strong>
<p t-esc="formatLang(date2, date=True)"/>
</div>
<div class="col-xs-3">
<strong>Printing Date:</strong>
<p t-esc="formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time=True)" />
</div>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Date/Code</th>
<th>J.C. /Move</th>
<th>Name</th>
<th>Debit</th>
<th>Credit</th>
<th>Balance</th>
</tr>
</thead>
<tbody>
<tr style="font-weight: bold;">
<td>Total:</td>
<td></td>
<td></td>
<td><span t-esc="formatLang(sum_debit(docs, date1, date2))"/></td>
<td><span t-esc="formatLang(sum_credit(docs,date1,date2))"/></td>
<td>
<span t-esc="formatLang(sum_debit(docs, date1, date2) - sum_credit(docs, date1, date2), currency_obj=res_company.currency_id)"/>
</td>
</tr>
<t t-foreach="docs" t-as="account">
<tr style="font-weight: bold;">
<td><span t-esc="account.code"/></td>
<td></td>
<td><span t-esc="account.complete_name"/></td>
<td><span t-esc="formatLang(sum_debit([account], date1, date2))"/></td>
<td><span t-esc="formatLang(sum_credit([account], date1, date2))"/></td>
<td><span t-esc="formatLang(sum_debit([account], date1, date2) - sum_credit([account], date1, date2), currency_obj=res_company.currency_id)"/></td>
</tr>
<t t-foreach="lines_g(account, date1, date2)" t-as="move_g">
<tr>
<td><span t-esc="move_g['code']"/></td>
<td></td>
<td><span t-esc="move_g['name']"/></td>
<td><span t-esc="move_g['debit']"/></td>
<td><span t-esc="move_g['credit']"/></td>
<td>
<span t-esc="formatLang(move_g['balance'], currency_obj=res_company.currency_id)"/>
</td>
</tr>
<tr t-foreach="lines_a(move_g, account, date1, date2)" t-as="move_a">
<td>
<t t-esc="formatLang(move_a['date'], date=True)"></t>
</td>
<td><span t-esc="move_a['cj']"/></td>
<td><span t-esc="move_a['name']"/></td>
<td><span t-esc="move_a['debit']"/></td>
<td><span t-esc="move_a['credit']"/></td>
<td>
<span t-esc="formatLang(move_a['balance'], currency_obj=res_company.currency_id)"/>
</td>
</tr>
</t>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</data>
</openerp>