summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/procurement_monitoring_detail.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/procurement_monitoring_detail.py b/indoteknik_custom/models/procurement_monitoring_detail.py
index e9da8147..6031e04a 100644
--- a/indoteknik_custom/models/procurement_monitoring_detail.py
+++ b/indoteknik_custom/models/procurement_monitoring_detail.py
@@ -43,7 +43,8 @@ class SaleMonitoringDetail(models.Model):
SELECT
*,
a.qty_so-a.qty_reserved as qty_suggest,
- case when a.qty_so-a.qty_reserved > 0 then 'harus beli'
+ case when a.qty_po >= a.qty_so then 'cukup'
+ when a.qty_so-a.qty_reserved > 0 then 'harus beli'
else 'cukup' end as status
FROM
(