diff options
| author | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2026-01-30 18:19:30 +0700 |
|---|---|---|
| committer | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2026-01-30 18:19:30 +0700 |
| commit | 48e48a61a6fc0addcc1e0c3590ca8582abe66a6a (patch) | |
| tree | c943c26348d7478819032a156e2e2eb7849a4f54 /indoteknik_custom/models/refund_sale_order.py | |
| parent | 4ac8b06616a0dce80029e1063078b31b6100084e (diff) | |
<hafid> refund kebutuhan BA dan cahsback
Diffstat (limited to 'indoteknik_custom/models/refund_sale_order.py')
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index c3b7a356..7a219130 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -456,11 +456,7 @@ class RefundSaleOrder(models.Model): raise UserError("❌ Refund multi SO hanya bisa 1 kali.") vals['remaining_refundable'] = 0.0 elif so_ids and len(so_ids) == 1 and refund_type != 'salah_transfer': - remaining = 0.0 - if refund_type == 'berita_acara': - vals['remaining_refundable'] = vals['uang_masuk'] - amount_refund - else: - vals['remaining_refundable'] = remaining + remaining = vals['uang_masuk'] - amount_refund if remaining < 0: raise ValidationError("❌ Tidak ada sisa transaksi untuk di-refund di SO ini. Semua dana sudah dikembalikan.") vals['remaining_refundable'] = remaining |
