Fix Ordering of purchases in bills

Purchases in bills are now sorted by date ASC by default.
Fix code formatting