diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-11-14 14:01:33 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-11-14 14:01:33 +0700 |
| commit | 83ceea85773615bf3f031554fa2ef9a2bc7c7760 (patch) | |
| tree | 98dc184413b7db9ea8d66ef5805355ad1c03d606 | |
| parent | ae89c43f6efa66ac7e332e62ce6cc6817f75c16d (diff) | |
(andri) fix printout penutupan tempo
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/report/report_tutup_tempo.xml | 69 |
2 files changed, 63 insertions, 11 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 12e8ecba..5e38b544 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -32,7 +32,6 @@ class AccountMove(models.Model): new_due_date = fields.Date(string='New Due') counter = fields.Integer(string="Counter", default=0) cost_centre_id = fields.Many2one('cost.centre', string='Cost Centre') - analytic_account_ids = fields.Many2many('account.analytic.account', string='Analytic Account') due_line = fields.One2many('due.extension.line', 'invoice_id', compute='_compute_due_line', string='Due Extension Lines') no_faktur_pajak = fields.Char(string='No Faktur Pajak') date_completed = fields.Datetime(string='Date Completed') @@ -127,8 +126,8 @@ class AccountMove(models.Model): amount = item.get('amount', 0.0) date = item.get('date') or item.get('payment_date') or '' formatted_amount = formatLang(self.env, amount, currency_obj=rec.currency_id) - lines.append(f"<i>Paid on {date}</i> - {formatted_amount}") - summary = "\n".join(lines) if lines else (data.get('title', '') or "") + lines.append(f"<li><i>Paid on {date}</i> - {formatted_amount}</li>") + summary = f"<ul>{''.join(lines)}</ul>" if lines else (data.get('title', '') or "") except Exception: summary = "" rec.payment_info = summary diff --git a/indoteknik_custom/report/report_tutup_tempo.xml b/indoteknik_custom/report/report_tutup_tempo.xml index 1aa1367d..5fa5552f 100644 --- a/indoteknik_custom/report/report_tutup_tempo.xml +++ b/indoteknik_custom/report/report_tutup_tempo.xml @@ -91,19 +91,72 @@ 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;"> + <table class="table table-sm o_main_table" + style="font-size:13px; border:1px solid #000; border-collapse: collapse; width:100%; table-layout: fixed;"> + <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> + <th style="border:1px solid #000; padding:4px; width:5%; font-weight: bold;" class="text-center">No.</th> + <th style="border:1px solid #000; padding:4px; width:16%; font-weight: bold;">Invoice Number</th> + <th style="border:1px solid #000; padding:4px; width:10%; font-weight: bold;">Invoice Date</th> + <th style="border:1px solid #000; padding:4px; width:10%; font-weight: bold;">Due Date</th> + <th style="border:1px solid #000; padding:4px; width:6%; font-weight: bold;" class="text-center">Day to Due</th> + <th style="border:1px solid #000; padding:4px; width:16%; font-weight: bold;">Reference</th> + <th style="border:1px solid #000; padding:4px; width:17%; font-weight: bold;" class="text-right">Amount Due</th> + <th style="border:1px solid #000; padding:4px; width:11%; font-weight: bold;">Payment Terms</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 t-foreach="doc.line_ids.filtered(lambda l: l.selected)" t-as="line"> + + <!-- Nomor Urut --> + <td style="border:1px solid #000; padding:4px; text-align:center;"> + <t t-esc="line.sort or '-'"/> + </td> + + <!-- Invoice Number --> + <td style="border:1px solid #000; padding:4px; word-wrap: break-word;"> + <t t-esc="line.invoice_number or '-'"/> + </td> + + <!-- Invoice Date --> + <td style="border:1px solid #000; padding:4px;"> + <t t-esc="line.invoice_date and line.invoice_date.strftime('%d-%m-%Y') or '-'"/> + </td> + + <!-- Due Date --> + <td style="border:1px solid #000; padding:4px;"> + <t t-esc="line.invoice_date_due and line.invoice_date_due.strftime('%d-%m-%Y') or '-'"/> + </td> + + <!-- Day to Due --> + <td style="border:1px solid #000; padding:4px; text-align:center;"> + <t t-esc="line.new_invoice_day_to_due or '-'"/> + </td> + + <!-- Reference --> + <td style="border:1px solid #000; padding:4px; word-wrap: break-word;"> + <t t-esc="line.ref or '-'"/> + </td> + + <!-- Amount Due --> + <td style="border:1px solid #000; padding:4px; text-align:right;"> + Rp. <t t-esc="'{:,.0f}'.format(line.amount_residual).replace(',', '.')"/> + </td> + + <!-- Payment Terms --> + <td style="border:1px solid #000; padding:4px; word-wrap: break-word;"> + <t t-esc="line.payment_term_id.name or '-'"/> + </td> + </tr> + <tr> + <td colspan="5" class="text-left" style="border:1px solid #000; padding:4px; word-wrap: break-word; white-space: normal; font-weight: bold;"> + GRAND TOTAL INVOICE YANG BELUM DIBAYAR DAN TELAH JATUH TEMPO + </td> + <td colspan="3" class="text-right" style="border:1px solid #000; padding:4px; word-wrap: break-word; white-space: normal; font-weight: bold;"> + Rp. <t t-esc="'{:,.0f}'.format(doc.grand_total).replace(',', '.')"/> + (<t t-esc="doc.grand_total_text or '-'"/>) + </td> </tr> </tbody> </table> |
