summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <andrifebriyadiputra@gmail.com>2026-02-24 12:40:04 +0700
committerFIN-IT_AndriFP <andrifebriyadiputra@gmail.com>2026-02-24 12:40:04 +0700
commit1112947139e69732589352359105e7602d6539b2 (patch)
tree1216aace7dd09e9e5a01ed9d12dba540b94f5691
parentec8b27f8b71e8d6d2967016f2772a700acb8c423 (diff)
(andri) fix error singleton create bill po karena payment term dp 30 multi line
-rwxr-xr-xindoteknik_custom/models/purchase_order.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index b3ecca56..c3ab71aa 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -632,7 +632,8 @@ class PurchaseOrder(models.Model):
date_done = self.date_approve
- day_extension = int(self.payment_term_id.line_ids.days)
+ # day_extension = int(self.payment_term_id.line_ids.days)
+ day_extension = int(max(self.payment_term_id.line_ids.mapped('days')))
payment_schedule = date_done + timedelta(days=day_extension)
if payment_schedule.weekday() == 0: