From 8d300a50d89afa39adc62a42b85b772f73e7f862 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 15 Jun 2018 16:19:43 -0400 Subject: [PATCH] 4-status-not-updating-to-recieved-unless-all-items-in-order-are-recieved Change to acq patron request status logic, which now looks like this: If a cancel_reason is set on the patron request, then status = "Canceled" If there is an associated hold request that has fulfillment_time set, then status = 'Fulfilled" If there is an associated lineitem has a state of "received", then status = "Received" If there is an associated purchase order with a state of "on-order" and an associated hold request, then status = "Ordered, Hold Placed" If there is an associated purchase order with a state of "on-order" but no associated hold request (created through the automated process), then status = "Ordered, Hold Not Placed" If there is an associated lineitem (selection list), then status = "Pending" If there is no associated lineitem, then status = "New" Any other condition, which should be impossible (I should never say that), will give a status of "Error" Signed-off-by: Jason Etheridge --- Open-ILS/examples/fm_IDL.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 8820cc7683..2f4d08b9d7 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -8182,9 +8182,9 @@ SELECT usr, SELECT r.*, CASE WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled - WHEN p.state = 'received' THEN 5 -- Received - WHEN p.id IS NOT NULL AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed - WHEN p.id IS NOT NULL AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed + WHEN l.state = 'received' THEN 5 -- Received + WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed + WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed WHEN l.id IS NOT NULL THEN 2 -- Pending WHEN l.id IS NULL THEN 1 -- New ELSE 0 -- Error -- 2.11.0