The requirements seem suspect to me, but here is my view on it (no "conditional logic" needed) and why it seems "suspicious", if I'm reading it correctly ..
Records should stay on the report If RecordStatus = 'Funded', has no PURCHASEDATE, and if the Record has expired (is in the past from currentdate).
RecordStatus = 'Funded'
AND PurchaseDate IS NULL
AND ExpiredDate < CURRENT_TIMESTAMP
Records should fall off report If the Record has expired AND if RecordStatus != 'Funded'.
NOT (HasExpired AND RecordStatus <> 'Funded')
Combined:
RecordStatus = 'Funded'
AND PurchaseDate IS NULL
AND ExpiredDate < CURRENT_TIMESTAMP
AND NOT (HasExpired AND RecordStatus <> 'Funded')
With De Morgan's transformation:
RecordStatus = 'Funded'
AND PurchaseDate IS NULL
AND ExpiredDate < CURRENT_TIMESTAMP
AND (NOT HasExpired OR RecordStatus = 'Funded')
Elimination of subsumed condition after distribution.
RecordStatus = 'Funded'
AND PurchaseDate IS NULL
AND ExpiredDate < CURRENT_TIMESTAMP
AND NOT HasExpired
However, assuming that HasExpired
is the same as ExpiredDate < CURRENT_TIMESTAMP
RecordStatus = 'Funded'
AND PurchaseDate IS NULL
AND ExpiredDate < CURRENT_TIMESTAMP
AND NOT ExpiredDate < CURRENT_TIMESTAMP
Which of course is never true and why I am suspect.