Unreleased all encumbrances when order is reopen for transition from Closed to Open
Given user has permission to reopen order
When Order transitions to open
Then encumbrance logic is run to make sure Funds have enough money in them to make necessary encumbrance
AND ONLY For encumbrances released by Close order action the status is set back to "Unreleased" - see note below for suggested approach
NOTE: We should be able to check the transaction for an invoice line IDs. If one or more invoice lines has "Release encumbrance" = true then DO NOT "Unrelease" the encumbrance when order is reopened.
Given user closed an order with initial encumbrance of $100, expended amount $85, amount $15 and a status of released
When user transitions order from closed to Open
Then system checks Funds for $15 amount and encumbrance now shows initial encumbrance of $100, expended amount $85, amount $15 and status of unreleased
Example update: because of
MODFISTO-233, unreleasing the expended encumbrance will not work at this point, so this story's scope is reduced to orders without any expended amount. See MODFISTO-240 for a resolution.