Last active
May 9, 2016 22:50
-
-
Save daviddahl/4529820c36bc98cf1227cdc425ebe1f1 to your computer and use it in GitHub Desktop.
sample calc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case | |
when {{action}} like 'T_%' | |
then 'Processing...' -- <-- 1st test | |
when {{listing_location_id}} <> '{{profile.default_participant.location.id}}' -- <-- 2nd test | |
then 'N/A' | |
when {{pre_delivery_verify}} = 'Confirm' and {{action}} <> 'Received' <-- 3rd test | |
then 'Assured' | |
when {{actor}} = 'Seller' <-- 4th test | |
then | |
case | |
when {{action}} in ('List','Modify','Reject','Cancel') | |
then 'For Sale' | |
when {{action}} in ('Retract','Remove') | |
then 'Removed' | |
when {{action}} in ('Counter') | |
then 'Counter-offer Sent' | |
when {{action}} in ('Confirm','Accept') | |
then 'Sold' | |
else 'Unknown Seller action' | |
end | |
when {{actor}} = 'Buyer' | |
then | |
case | |
when {{action}} in ('Accept') | |
then 'Needs Confirmation' | |
when {{action}} in ('Counter') | |
then 'Counter-offer Received' | |
when {{action}} in ('Confirm') | |
then 'Sold' | |
when {{action}} in ('Cancel') | |
then 'For Sale' | |
when {{action}} in ('Received') | |
then 'Delivered' | |
else 'Unknown Buyer action' | |
end | |
else 'Unknown actor' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment