summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-09-02 07:53:12 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-09-02 07:53:12 +0000
commit967307c76c164b6a94ddfb4e907f43d0c54f2790 (patch)
treea6f8069cb141661f0f062628649f41f0f7f02dc4
parent461020919518ac0bde4024de482303734fd314dc (diff)
parentddaedc0eeaf53b47786a7747664fc99ae4dc1a7a (diff)
Merged in refund_system (pull request #400)
<hafid> fix refund validasi
-rw-r--r--indoteknik_custom/models/refund_sale_order.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py
index 737419e7..731d8e41 100644
--- a/indoteknik_custom/models/refund_sale_order.py
+++ b/indoteknik_custom/models/refund_sale_order.py
@@ -408,6 +408,8 @@ class RefundSaleOrder(models.Model):
else:
remaining = uang_masuk - amount_refund
+ if remaining < 0:
+ raise ValidationError("Semua dana sudah dikembalikan, tidak bisa mengajukan refund")
vals['remaining_refundable'] = remaining