summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-02-11 09:03:25 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-02-11 09:03:25 +0700
commite7eadc269299d03f6eb0702459147a2900b982b4 (patch)
tree166c8db58e3879cb4c96cb7be824ecdb8cbc3318
parent84c259bb2c579a0ad1f1593d7d3d7bf57fb732f0 (diff)
<iman> update code blocking state
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 5c223beb..9631fe6e 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -952,7 +952,7 @@ class SaleOrder(models.Model):
remaining_credit_limit = block_stage - current_total - so_to_invoice
# Validasi limit
- if remaining_credit_limit <= 0:
+ if remaining_credit_limit <= 0 and block_stage > 0:
raise UserError(_("The credit limit for %s will exceed the Blocking Stage if the Sale Order is confirmed. The remaining credit limit is %s, from %s and the outstanding amount is %s.")
% (rec.partner_id.name, block_stage - current_total, block_stage, outstanding_amount))