Domain error when posting a statement with cancelled invoices
Steps to reproduce:
1. Createa a supplier invoice and post it
2. Create an statement with a line to pay the supplier invoice
3. Cancel the invoice
4. Try to post the statement
A domain validation error is raised because the invoice is cancelled before posting.
I think the invoice should be cleared from statement line when cancelling.