summaryrefslogtreecommitdiff
path: root/addons/account/views/report_payment_receipt_templates.xml
blob: ef218e710dd55ec05f5e94fbba0a10761e7675d2 (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
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="report_payment_receipt_document">
        <t t-call="web.external_layout">
            <t t-set="o" t-value="o.with_context(lang=lang)"/>
            <div class="page">
                <h3><strong>Payment Receipt: <span t-field="o.name"/></strong></h3>
                <div class="row mt64">
                    <div class="col-6" t-if="o.date">
                        <strong>Payment Date: </strong> <span t-field="o.date"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-6" t-if="o.partner_type">
                        <t t-if="o.partner_type == 'customer'">
                            <strong>Customer: </strong>
                        </t>
                        <t t-if="o.partner_type == 'supplier'">
                            <strong>Vendor: </strong>
                        </t><span t-field="o.partner_id"/>
                    </div>
                    <div class="col-6" t-if="o.payment_method_id">
                        <strong>Payment Method: </strong><span t-field="o.payment_method_id.name"/>
                    </div>
                </div>
                <div class="row mb64">
                    <div class="col-6" t-if="o.amount">
                        <strong>Payment Amount: </strong><span t-field="o.amount" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/>
                     </div>
                    <div class="col-6" t-if="o.ref">
                        <strong>Memo: </strong><span t-field="o.ref"/>
                     </div>
                </div>
                <table class="table table-sm">
                    <thead>
                        <tr>
                            <th><span>Invoice Date</span></th>
                            <th><span>Invoice Number</span></th>
                            <th><span>Reference</span></th>
                            <th class="text-right"><span>Original Amount</span></th>
                            <th class="text-right"><span>Amount Paid</span></th>
                            <th class="text-right"><span>Balance</span></th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr t-foreach="o.move_id._get_reconciled_invoices_partials()" t-as="rec">
                            <t t-set="amount" t-value="rec[1]"/>
                            <t t-set="inv" t-value="rec[2].move_id"/>
                            <t t-if="inv.move_type != 'entry'">
                                <td><span t-field="inv.invoice_date"/></td>
                                <td><span t-field="inv.name"/></td>
                                <td><span t-field="inv.ref"/></td>
                                <td class="text-right"><span t-field="inv.amount_total"/></td>
                                <td class="text-right"><span t-esc="amount" t-options="{'widget': 'monetary', 'display_currency': o.currency_id}"/></td>
                                <td class="text-right"><span t-field="inv.amount_residual"/></td>
                            </t>
                        </tr>
                    </tbody>
                </table>
            </div>
        </t>
    </template>

    <template id="report_payment_receipt">
        <t t-call="web.html_container">
            <t t-foreach="docs" t-as="o">
                <t t-set="lang" t-value="o.partner_id.lang or o.company_id.partner_id.lang"/>
                <t t-call="account.report_payment_receipt_document" t-lang="lang"/>
            </t>
        </t>
    </template>
</odoo>