summaryrefslogtreecommitdiff
path: root/om_hr_payroll/views/report_payslip_details_templates.xml
blob: 6bafa2d05f1072a4e3a9aaf8a44242be5c5f3503 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <template id="report_payslip_details">
        <t t-call="web.html_container">
            <t t-foreach="docs" t-as="o">
                <t t-call="web.external_layout">
                    <div class="page">
                        <h2>Pay Slip</h2>
                        <p t-field="o.name"/>

                        <table class="table table-sm table-bordered">
                            <tr>
                                <td>
                                    <strong>Name</strong>
                                </td>
                                <td>
                                    <span t-field="o.employee_id"/>
                                </td>
                                <td>
                                    <strong>Designation</strong>
                                </td>
                                <td>
                                    <span t-field="o.employee_id.job_id"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Address</strong>
                                </td>
                                <td colspan="3">
                                    <div t-field="o.employee_id.address_home_id"
                                         t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Email</strong>
                                </td>
                                <td>
                                    <span t-field="o.employee_id.work_email"/>
                                </td>
                                <td>
                                    <strong>Identification No</strong>
                                </td>
                                <td>
                                    <span t-field="o.employee_id.identification_id"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Reference</strong>
                                </td>
                                <td>
                                    <span t-field="o.number"/>
                                </td>
                                <td>
                                    <strong>Bank Account</strong>
                                </td>
                                <td>
                                    <span t-field="o.employee_id.bank_account_id"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <strong>Date From</strong>
                                </td>
                                <td>
                                    <span t-field="o.date_from"/>
                                </td>
                                <td>
                                    <strong>Date To</strong>
                                </td>
                                <td>
                                    <span t-field="o.date_to"/>
                                </td>
                            </tr>
                        </table>

                        <h3>Details by Salary Rule Category</h3>
                        <table class="table table-sm mb32">
                            <thead>
                                <tr>
                                    <th>Code</th>
                                    <th>Salary Rule Category</th>
                                    <th>Total</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr t-foreach="get_details_by_rule_category.get(o.id, [])" t-as="h">
                                    <td>
                                        <span t-esc="h['code']"/>
                                    </td>
                                    <td>
                                        <span t-esc="'..'*h['level']"/>
                                        <span t-esc="h['rule_category']"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="h['total']"
                                              t-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'/>
                                    </td>
                                </tr>
                            </tbody>
                        </table>

                        <h3>Payslip Lines by Contribution Register</h3>
                        <table class="table table-sm mt32">
                            <thead>
                                <tr>
                                    <th>Code</th>
                                    <th>Name</th>
                                    <th>Quantity/rate</th>
                                    <th>Amount</th>
                                    <th>Total</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr t-foreach="get_lines_by_contribution_register.get(o.id, [])" t-as="p">
                                    <td>
                                        <span t-esc="p.get('code', '')"/>
                                    </td>
                                    <td>
                                        <span t-esc="p.get('name', '')"/>
                                    </td>
                                    <td>
                                        <span t-esc="p.get('quantity', '')"/>
                                    </td>
                                    <td>
                                        <span t-esc="p.get('amount', 0)"/>
                                    </td>
                                    <td class="text-right">
                                        <span t-esc="p.get('total', 0)"
                                              t-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'/>
                                    </td>
                                </tr>
                            </tbody>
                        </table>

                        <p class="text-right">
                            <strong>Authorized signature</strong>
                        </p>
                    </div>
                </t>
            </t>
        </t>
    </template>

</odoo>