diff options
| author | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-09 09:40:01 +0700 |
|---|---|---|
| committer | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-09 09:40:01 +0700 |
| commit | 6f7fd357434cf8372eeb1495612b74a9e16d22e0 (patch) | |
| tree | 6b6ea9b029725dfeefcda64ae71bbda6b6fd272b | |
| parent | 404f4da511b131c4b7714d00e65a856db6d08591 (diff) | |
(andri) fix
| -rw-r--r-- | indoteknik_custom/models/letter_receivable.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/letter_receivable.py b/indoteknik_custom/models/letter_receivable.py index caf62a64..8722ab8d 100644 --- a/indoteknik_custom/models/letter_receivable.py +++ b/indoteknik_custom/models/letter_receivable.py @@ -135,7 +135,7 @@ class SuratPiutang(models.Model): raise UserError(_("Email tujuan harus diisi.")) template = self.env.ref('indoteknik_custom.letter_receivable_mail_template') - today = fields.Date.today() + # today = fields.Date.today() month_map = { 1: "Januari", 2: "Februari", 3: "Maret", 4: "April", @@ -156,7 +156,7 @@ class SuratPiutang(models.Model): invoice_table_rows = "" grand_total = 0 for line in selected_lines: - days_to_due = (line.invoice_date_due - today).days if line.invoice_date_due else 0 + # days_to_due = (line.invoice_date_due - today).days if line.invoice_date_due else 0 grand_total += line.amount_residual invoice_table_rows += f""" <tr> @@ -164,7 +164,7 @@ class SuratPiutang(models.Model): <td>{self.partner_id.name or '-'}</td> <td>{fields.Date.to_string(line.invoice_date) or '-'}</td> <td>{fields.Date.to_string(line.invoice_date_due) or '-'}</td> - <td>{days_to_due}</td> + <td>{line.new_invoice_day_to_due}</td> <td>{line.ref or '-'}</td> <td>{formatLang(self.env, line.amount_residual, currency_obj=line.currency_id)}</td> <td>{line.payment_term_id.name or '-'}</td> |
