Little refactoring. Implement disabling buttons when dialog is empty in Purchases.