summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-09-26 15:23:48 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-09-26 15:23:48 +0700
commit6582949e6e8f7017b8b44ed937d6042d8794fbc5 (patch)
tree929b2b435b34c4b5ce4be118f3db74dc85c3f984
parent31a22f2f26b29f91bd43ea48ce84e8dc9aaf3c12 (diff)
(andri) inv table jika data lebih dari 1
-rw-r--r--indoteknik_custom/report/report_tutup_tempo.xml51
1 files changed, 40 insertions, 11 deletions
diff --git a/indoteknik_custom/report/report_tutup_tempo.xml b/indoteknik_custom/report/report_tutup_tempo.xml
index 6c9cfc95..1aa1367d 100644
--- a/indoteknik_custom/report/report_tutup_tempo.xml
+++ b/indoteknik_custom/report/report_tutup_tempo.xml
@@ -72,18 +72,47 @@
</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-set="invoice_numbers_str" t-value="', '.join(doc.line_ids.filtered(lambda l: l.selected).mapped('invoice_number'))"/>
+ <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>
- <p><strong>Dengan Hormat,</strong></p>
- <p class="text-justify">
- Berdasarkan catatan kami, pembayaran atas invoice
- <strong><t t-esc="invoice_numbers_str"/></strong>
- yang jatuh tempo pada tanggal
- <strong><t t-esc="doc.due_date and doc.due_date.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>
-
<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.
@@ -109,7 +138,7 @@
</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;"/>
+ style="width:300px; height:auto; margin-left:-20px;"/>
</div>
<table style="margin-top:10px;">
<tr style="border-top:1px solid #000; font-weight: bold;">