Database Update

added DB function to compete for the remaining days. Added new field in
Transactions