summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 96f791c5..44b3cb76 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -99,6 +99,8 @@ class AccountMove(models.Model):
reminder_sent_date = fields.Date(string="Tanggal Reminder Terkirim")
+ payment_difficulty = fields.Selection(string="Payment Difficulty", related='partner_id.payment_difficulty', readonly=True)
+
customer_promise_date = fields.Date(
string="Janji Bayar",
help="Tanggal janji bayar dari customer setelah reminder dikirim.",
@@ -333,12 +335,14 @@ class AccountMove(models.Model):
currency = invs[0].currency_id if invs else partner.company_id.currency_id
tempo_link = 'https://indoteknik.com/my/tempo'
# tempo_link = 'http://localhost:2100/my/tempo'
+ # payment_term = partner.previous_payment_term_id if partner.is_cbd_locked else partner.property_payment_term_id
+ payment_term = invs[0].invoice_payment_term_id
limit_info_html = f"""
<p><b>Informasi Tambahan:</b></p>
<ul style="font-size:12px; color:#333; line-height:1.4; margin:0; padding-left:0; list-style-position:inside;">
<li>Kredit Limit Anda: {formatLang(self.env, blocking_limit, currency_obj=currency)}</li>
- <li>Status Detail Tempo: {partner.property_payment_term_id.name or 'Review'}</li>
+ <li>Status Detail Tempo: {payment_term.name or ''}</li>
<li style="color:{'red' if (blocking_limit - outstanding_amount) < 0 else 'green'};">
Sisa Kredit Limit: {formatLang(self.env, blocking_limit - outstanding_amount, currency_obj=currency)}
</li>