From 698e075cf3874d4eaf5ac3f44f4a5b1b1832b93c Mon Sep 17 00:00:00 2001 From: "Indoteknik ." Date: Sat, 19 Jul 2025 15:11:31 +0700 Subject: (andri) add widget for remaining & due date, add validasi confirm payment --- indoteknik_custom/models/down_payment.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models') diff --git a/indoteknik_custom/models/down_payment.py b/indoteknik_custom/models/down_payment.py index 920b1b5b..df6c0eba 100644 --- a/indoteknik_custom/models/down_payment.py +++ b/indoteknik_custom/models/down_payment.py @@ -143,8 +143,12 @@ class DownPayment(models.Model): def action_confirm_payment(self): - # Logic untuk konfirmasi pembayaran - return + for rec in self: + if not rec.attachment_file_image and not rec.attachment_file_pdf: + raise UserError('Tidak bisa konfirmasi pembayaran karena belum ada bukti attachment (PDF/Image).') + + rec.status_pay_down_payment = 'payment' + def action_approval_check(self): for record in self: -- cgit v1.2.3