summaryrefslogtreecommitdiff
path: root/indoteknik_custom/report/report_tutup_tempo.xml
blob: 1aa1367d9e2871d9c266377be9c9ea1491c2a589 (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
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <record id="action_report_surat_tutup_tempo" model="ir.actions.report">
            <field name="name">Surat Penutupan Tempo</field>
            <field name="model">surat.piutang</field>
            <field name="report_type">qweb-pdf</field>
            <field name="report_name">indoteknik_custom.report_surat_tutup_tempo</field>
            <field name="report_file">indoteknik_custom.report_surat_tutup_tempo</field>
            <field name="print_report_name">'%s - %s' % (object.perihal_label or '', object.partner_id.name or '')</field>
            <!-- <field name="binding_model_id" ref="model_surat_piutang"/>
            <field name="binding_type">report</field> -->
        </record>

        <template id="external_layout_surat_tutup_tempo">
            <t t-call="web.html_container">
                <div class="header">
                    <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2498521"
                        style="width:100%; display: block;"/>
                </div>
                <div class="article" style="margin: 0 1.5cm 0 1.5cm; ">
                    <t t-raw="0"/>
                </div>
                <div class="footer">
                    <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2859765"
                        style="width:100%; display: block;"/>
                </div>
            </t>
        </template>

        <template id="report_surat_tutup_tempo">
            <t t-call="web.html_container">
                <t t-foreach="docs" t-as="doc">
                    <t t-call="indoteknik_custom.report_surat_tutup_tempo_document"
                       t-lang="doc.partner_id.lang"/>
                </t>
            </t>
        </template>

        <template id="report_surat_tutup_tempo_document">
            <t t-call="indoteknik_custom.external_layout_surat_tutup_tempo">
                <t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)"/>
                <div class="page">

                    <div class="row mb3">
                        <div class="col-6">
                            Ref. No: <t t-esc="doc.name or '-'"/>
                        </div>
                        <div class="col-6 text-right">
                            Jakarta, <t t-esc="doc.send_date and doc.send_date.strftime('%d %B %Y') or '-'"/>
                        </div>
                    </div>
                    <br/>
                    <div class="mb3" style="max-width:500px; word-wrap:break-word; white-space:normal;">
                        <strong>Kepada Yth.</strong><br/>
                        <strong><t t-esc="doc.partner_id.name or '-'"/></strong><br/>
                        <span style="display:inline-block; max-width:400px; word-wrap:break-word; white-space:normal;">
                            <t t-esc="doc.partner_id.street or ''"/>
                        </span><br/>
                        <u>Republik Indonesia</u>
                    </div>
                    <br/>
                    <table style="margin-left:2cm;">
                        <tr style="font-weight: bold;">
                            <td style="padding-right:10px;">U.P.</td>
                            <td style="white-space: nowrap;">: <t t-esc="doc.tujuan_nama or '-'"/></td>
                        </tr>
                        <tr style="font-weight: bold;">
                            <td style="padding-right:10px;">Perihal</td>
                            <td>: <u><t t-esc="doc.perihal_label or '-'"/></u></td>
                        </tr>
                    </table>
                    <br/>
                    <p><strong>Dengan Hormat,</strong></p>
                    <t t-set="selected_lines" t-value="doc.line_ids.filtered(lambda l: l.selected)"/>
                    <t t-set="line_count" t-value="len(selected_lines)"/>
                    <t t-if="line_count == 1">
                        <t t-set="line" t-value="selected_lines[0]"/>
                        <p class="text-justify">
                            Berdasarkan catatan kami, pembayaran atas invoice 
                            <strong><t t-esc="line.invoice_number"/></strong> 
                            yang jatuh tempo pada tanggal 
                            <strong><t t-esc="line.invoice_date_due and line.invoice_date_due.strftime('%d %B %Y')"/></strong> 
                            telah melewati batas waktu 30 (tiga puluh) hari. Sehubungan dengan hal tersebut, bersama ini kami sampaikan kebijakan perusahaan sebagai berikut:
                        </p>
                    </t>

                    <t t-else="">
                        <p class="text-justify">
                            Berdasarkan catatan kami, pembayaran atas beberapa invoice yang telah melewati batas waktu 30 (tiga puluh) hari adalah sebagai berikut:
                        </p>
                        
                        <table class="table table-sm" style="font-size:13px; border:1px solid #000; margin-top:16px; margin-bottom:16px;">
                            <thead style="background:#f5f5f5;">
                                <tr>
                                    <th style="border:1px solid #000; padding:4px; font-weight: bold;">Invoice</th>
                                    <th style="border:1px solid #000; padding:4px; font-weight: bold;">Due Date</th>
                                    <th style="border:1px solid #000; padding:4px; font-weight: bold;" class="text-center">Day to Due</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr t-foreach="selected_lines" t-as="line">
                                    <td style="border:1px solid #000; padding:4px;"><t t-esc="line.invoice_number"/></td>
                                    <td style="border:1px solid #000; padding:4px;"><t t-esc="line.invoice_date_due and line.invoice_date_due.strftime('%d-%m-%Y')"/></td>
                                    <td style="border:1px solid #000; padding:4px;" class="text-center"><t t-esc="line.new_invoice_day_to_due"/></td>
                                </tr>
                            </tbody>
                        </table>

                        <p class="text-justify">
                            Sehubungan dengan hal tersebut, bersama ini kami sampaikan kebijakan perusahaan sebagai berikut:
                        </p>
                    </t>

                    <ol style="padding-left: 1.5em; margin-bottom: 1em;">
                        <li class="text-justify" style="margin-bottom: 0.5em;">
                            Secara sistem, akun akan otomatis terkunci (locked) apabila pembayaran telah melewati 30 (tiga puluh) hari dari tanggal jatuh tempo.
                        </li>
                        <li class="text-justify" style="margin-bottom: 0.5em;">
                            Payment term yang semula Tempo akan otomatis berubah menjadi <strong>Cash Before Delivery (CBD)</strong>.
                        </li>
                        <li class="text-justify">
                            Apabila Bapak/Ibu telah melakukan konfirmasi pembayaran atau memberikan informasi lanjutan terkait pelunasan, maka payment term dapat dibukakan kembali menjadi Tempo berdasarkan pengajuan dari tim Sales kami.
                        </li>
                    </ol>
                    
                    <p class="text-justify">
                        Kebijakan ini kami terapkan untuk menjaga kelancaran proses transaksi serta memastikan hubungan kerja sama dapat terus berjalan dengan baik.
                    </p>
                    
                    <p class="text-justify">
                        Atas perhatian dan kerja samanya kami ucapkan terima kasih.
                    </p>
                    <div class="mt32" style="page-break-inside: avoid;">
                        <p>Hormat kami,<br/>
                            <strong>PT. Indoteknik Dotcom Gemilang</strong>
                        </p>
                        <div style="height:120px; position: relative;">
                            <img src="https://erp.indoteknik.com/api/image/ir.attachment/datas/2869838"
                                 style="width:300px; height:auto; margin-left:-20px;"/>
                        </div>
                        <table style="margin-top:10px;">
                            <tr style="border-top:1px solid #000; font-weight: bold;">
                                <td style="padding-right:50px; white-space: nowrap;">Nama</td>
                                <td>: Stephan Christianus</td>
                            </tr>
                            <tr style="font-weight: bold;">
                                <td style="padding-right:50px; white-space: nowrap;">Jabatan</td>
                                <td>: FAT Manager</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </t>
        </template>
    </data>
</odoo>