diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-10-30 11:38:13 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-10-30 11:38:13 +0700 |
| commit | d426ff142df8b5778398e3b460ff03d02d9e368a (patch) | |
| tree | 7785b74347068cce576692e3ea85ead97dc389ab | |
| parent | 9530cc0c2ba6a15300799cf7e14b6dc1b04daa37 (diff) | |
move status invoiced to bottom in sale monitoring header only
| -rwxr-xr-x | indoteknik_custom/models/sale_monitoring.py | 2 |
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 |
