From 3abd0ca6790b9a278f9ddd52b063691b99d6916c Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 5 Oct 2022 11:27:01 +0700 Subject: Update sale_monitoring.py and sale_monitoring_detail.py --- indoteknik_custom/models/sale_monitoring.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indoteknik_custom/models/sale_monitoring.py') diff --git a/indoteknik_custom/models/sale_monitoring.py b/indoteknik_custom/models/sale_monitoring.py index 2ef23f39..a837a6bc 100755 --- a/indoteknik_custom/models/sale_monitoring.py +++ b/indoteknik_custom/models/sale_monitoring.py @@ -35,12 +35,12 @@ class SaleMonitoring(models.Model): SUM(smd.qty_so_delivered) AS qty_so_delivered, SUM(smd.qty_so_invoiced) AS qty_so_invoiced, CASE - WHEN SUM(qty_po) <> SUM(qty_so) AND SUM(qty_po) <= 0 THEN 'Belum PO sama sekali' - WHEN SUM(qty_po) <> SUM(qty_so) THEN 'Belum PO full' - WHEN SUM(qty_po_received) <> SUM(qty_po) AND SUM(qty_po_received) <= 0 THEN 'Belum Received sama sekali' - WHEN SUM(qty_po_received) <> SUM(qty_po) THEN 'Belum Received full' - WHEN SUM(qty_so_delivered) <> SUM(qty_so) AND SUM(qty_so_delivered) <= 0 THEN 'SIAP KIRIM' - WHEN SUM(qty_so_delivered) <> SUM(qty_so) THEN 'KIRIM SISANYA' + WHEN SUM(qty_po) < SUM(qty_so) AND SUM(qty_po) <= 0 THEN 'Belum PO sama sekali' + WHEN SUM(qty_po) < SUM(qty_so) THEN 'Belum PO full' + WHEN SUM(qty_po_received) < SUM(qty_so) AND SUM(qty_po_received) <= 0 THEN 'Belum Received sama sekali' + WHEN SUM(qty_po_received) < SUM(qty_so) THEN 'Belum Received full' + WHEN SUM(qty_to_delivered) = SUM(qty_so) THEN 'SIAP KIRIM' + WHEN SUM(qty_to_delivered) < SUM(qty_so) and SUM(qty_to_delivered) > 0 THEN 'KIRIM SISANYA' ELSE 'Belum Invoiced' END AS status, get_po_number(smd.sale_order_id) as po_number -- cgit v1.2.3