summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-09-02 14:46:57 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-09-02 14:46:57 +0700
commitddaedc0eeaf53b47786a7747664fc99ae4dc1a7a (patch)
treed9445376ad2415a28231e882a2afdab5a653aa1a
parent5b601ca1ff1a669b934b69b8f531573866a13ed0 (diff)
<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