Fixed bug where the amount remaining on an advance wasn't properly calculated. We were accidentally adding the total rawamount.
Merge branch 'jt6' into dev
Merge branch 'dev'