Effectively, looking at actlabcost & actlabhrs is equivalent to checking that the labtrans is approved and non-zero. This is because only when the labor transaction is approved are the values incremented on the WO. IE if you have 1 labor transaction on a WO with 10 hours at a cost of 1000 and have not approved it, the actlabcost & actlabhrs are equal to 0. Once you approve it is when those are increased.
The Maximo logic only looks at the total on the WO today, it doesn't look at the transaction tables themselves. I assume this was done to avoid opening or iterating through sets to make it more performant.
------------------------------
Steven Shull
------------------------------
Original Message:
Sent: Mon December 13, 2021 09:21 PM
From: User1971
Subject: WO status - Only show INVALID [CLOSE] if CANCEL is unavailable
Got it. My mistake.
The reason why I'm wondering if genapprservreceipt (aka "Approved?") should be in the condition too is:
It looks like it's possible to cancel WOs where the actuals have non-zero hours, but the actuals are unapproved (genapprservreceipt=0).
Does that match your experience?
I suppose, normally, "Automatically Approve Inside Labor Transactions?" would be enabled, so all saved labor actuals would be automatically approved. So it wouldn't normally be necessary to query for genapprservreceipt. But in my case, that option is disabled, so we have unapproved labor actuals to contend with.
Updated condition:
(status in ('WAPPR', 'WSCH', 'WPCOND', 'WMATL', 'APPR', 'INPRG') and genapprservreceipt=1 and actlabhrs<>0 and actlabcost<>0)
or status in ('COMP','CLOSE')


#AssetandFacilitiesManagement
#Maximo