diff options
| -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> |
