Fixed issue with deleting non-complete purchases and having earnings affected. Closes #816