Move the finish contract after the creation of new contract
We found a bug when we try to change the contract holder with a date before today. The process ends the existent contract and when try to generate a new contract with the active lines of the existent contract, it hasn't a contract lines active now because the previous task change the end date of these contract lines to a date before today.
Moving the code to finish the contract after the creation of the new contract fix this bug.
Edited by Administrator