update and delete functions for Purchase, anything deleted with a purchase attached to it will delete all purchases with it, also improved GUI reaction to deletion.