summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_monitoring.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-10-31 10:39:29 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-10-31 10:39:29 +0700
commit3cc65898e703c4857908b97bc5ab63c8452be684 (patch)
treeac0465f78da9c0efdd4f9acf72aec3d529f6db78 /indoteknik_custom/models/sale_monitoring.py
parent0831511787b1cd2171d6dd1dd6c2c9da46b64d2e (diff)
parentd426ff142df8b5778398e3b460ff03d02d9e368a (diff)
Merge branch 'production' into cr/auth
# Conflicts: # indoteknik_custom/__manifest__.py
Diffstat (limited to 'indoteknik_custom/models/sale_monitoring.py')
-rwxr-xr-xindoteknik_custom/models/sale_monitoring.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_monitoring.py b/indoteknik_custom/models/sale_monitoring.py
index cfbe6d78..107d5296 100755
--- a/indoteknik_custom/models/sale_monitoring.py
+++ b/indoteknik_custom/models/sale_monitoring.py
@@ -81,12 +81,12 @@ class SaleMonitoring(models.Model):
SUM(smd.qty_so_invoiced) AS qty_so_invoiced,
sum(smd.qty_reserved) as qty_reserved,
CASE
- when sum(qty_so_invoiced) = sum(qty_so) then 'Invoiced'
when sum(qty_so_delivered) = sum(qty_so) then 'Delivered'
when sum(qty_reserved) >= sum(qty_so) then 'Siap kirim'
when sum(qty_po) + sum(qty_reserved) - sum(qty_po_received) < sum(qty_so) then 'Belum/Kurang PO'
when sum(qty_po_received) = 0 then 'Belum terima'
when sum(qty_po_received) < sum(qty_po) then 'Terima sebagian'
+ when sum(qty_so_invoiced) = sum(qty_so) then 'Invoiced'
END AS status,
get_po_number(smd.sale_order_id) as po_number
FROM sale_monitoring_detail smd