Update to totaling logic

Added update total even when deposit or cleared are changed and
refactored the calculation for the amount change function.
(calculateAmountChange in ledger view)