<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_crossoveredbudget">
    <t t-call="report.html_container">
        <t t-foreach="docs" t-as="o">
            <t t-call="report.internal_layout">
                <div class="page">
                    <h2>Budget</h2>

                    <div class="row mt32">
                        <div class="col-xs-3">
                            <strong>Analysis from:</strong>
                            <p><span t-esc="formatLang(data['form']['date_from'], date=True)"/> to
                            <span t-esc="formatLang(data['form']['date_to'], date=True)"/></p>
                        </div>
                        <div class="col-xs-3">
                            <strong>Budget:</strong>
                            <p t-esc="o.name"/>
                        </div>
                        <div class="col-xs-3">
                            <strong>Currency:</strong>
                            <p t-esc="res_company.currency_id.name"/>
                        </div>
                    </div>

                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <th>Description</th>
                                <th class="text-right">Theoretical Amt</th>
                                <th class="text-right">Planned Amt</th>
                                <th class="text-right">Practical Amt</th>
                                <th class="text-center">Perc(%)</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr t-foreach="funct(o, data['form'])" t-as="line">
                                <td>
                                    <span style="color: white;" t-esc="'... '*(line['status'] - 1)"/>
                                    <span t-esc="line['name']"/>
                                </td>
                                <td class="text-right">
                                    <span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/>
                                </td>
                                <td class="text-right">
                                    <span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/>
                                </td>
                                <td class="text-right">
                                    <span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/>
                                </td>
                                <td class="text-center">
                                    <span t-esc="formatLang(line['perc'],digits=2)"/> %
                                </td>
                            </tr>
                            <tr t-foreach="funct_total(data['form'])" t-as="tot">
                                <td>
                                  <strong>Total:</strong>
                                </td>
                                <td class="text-right">
                                    <strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/>
                                </td>
                                <td class="text-right">
                                    <strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/>
                                </td>
                                <td class="text-right">
                                    <strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/>
                                </td>
                                <td class="text-center">
                                    <strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </t>
        </t>
    </t>
</template>
</data>
</openerp>
