summaryrefslogtreecommitdiff
path: root/account_reports_xlsx/views/partner_ledgerreport.xml
blob: c42418d26b0fc0a8e14186723bc526c102b55125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="account_reports_xlsx.report_partnerledger">
    <t t-call="web.html_container">
        <t t-set="data_report_margin_top" t-value="12"/>
        <t t-set="data_report_header_spacing" t-value="9"/>
        <t t-set="data_report_dpi" t-value="110"/>
        <t t-foreach="docs" t-as="o">
            <t t-call="web.internal_layout">
                <div class="page">
                    <h2>Partner Ledger</h2>

                    <div class="row">
                        <div class="col-xs-3">
                            <strong>Company:</strong>
                            <p t-esc="res_company.name"/>
                        </div>
                        <div class="col-xs-3">
                            <t t-if="data['form']['date_from']"><strong>Date from :</strong> <span t-esc="data['form']['date_from']"/><br/></t>
                            <t t-if="data['form']['date_to']"><strong>Date to :</strong> <span t-esc="data['form']['date_to']"/></t>
                        </div>
                        <div class="col-xs-3">
                            <strong>Target Moves:</strong>
                            <p t-if="data['form']['target_move'] == 'all'">All Entries</p>
                            <p t-if="data['form']['target_move'] == 'posted'">All Posted Entries</p>
                        </div>
                    </div>

                    <table class="table table-condensed">
                        <thead>
                            <tr>
                                <th>Date</th>
                                <th>JRNL</th>
                                <th>Account</th>
                                <th>Ref</th>
                                <th>Debit</th>
                                <th>Credit</th>
                                <th>Balance</th>
                                <th t-if="data['form']['amount_currency']">Currency</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="4">
                                        <strong t-esc="o.ref"/>
                                        - <strong t-esc="o.name"/>
                                </td>
                                <td class="text-right">
                                    <strong t-esc="sum_partner(data, o, 'debit')" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                                </td>
                                <td class="text-right">
                                    <strong t-esc="sum_partner(data, o, 'credit')" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                                </td>
                                <td class="text-right">
                                    <strong t-esc="sum_partner(data, o, 'debit - credit')" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                                </td>
                                <td class="text-right" t-if="data['form']['amount_currency']">
                                    <strong t-esc="sum_partner(data, o, 'amount_currency')" />
                                </td>
                            </tr>
                            <tr t-foreach="lines(data, o)" t-as="line">
                                <td>
                                    <span t-esc="line['date']"/>
                                </td>
                                <td>
                                    <span t-esc="line['code']"/>
                                </td>
                                <td>
                                    <span t-esc="line['a_code']"/>
                                </td>
                                <td>
                                    <span t-esc="line['displayed_name']"/>
                                </td>
                                <td class="text-right">
                                    <span t-esc="line['debit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                                </td>
                                <td class="text-right">
                                    <span t-esc="line['credit']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                                </td>
                                <td class="text-right">
                                    <span t-esc="line['progress']" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                                </td>
                                <td class="text-right" t-if="data['form']['amount_currency']">
                                    <t t-if="line['currency_id']">
                                      <span t-esc="line['amount_currency']" t-options="{'widget': 'monetary', 'display_currency': line['currency_id']}"/>
                                    </t>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </t>
        </t>
    </t>
</template>
</odoo>