summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models')
-rw-r--r--indoteknik_custom/models/down_payment.py8
1 files changed, 6 insertions, 2 deletions
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: