Limit due entry to amount remaining

fixes #1