Fixed bug in paying all debt controller
Controller now sorts scans so that unpaid scans come first