diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-05-02 09:45:45 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-05-02 09:45:45 +0700 |
| commit | b43a60cca3644d09506673349589c9f213831862 (patch) | |
| tree | 90ec9f0f25268d5469c9638abaed1fede0a63edc | |
| parent | 3285da702db176851e78db9d8afe7af866c31b94 (diff) | |
add status validation in procurement monitoring detail
| -rw-r--r-- | indoteknik_custom/models/procurement_monitoring_detail.py | 3 |
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 ( |
