Refactor $database-> isAllInstallmentOnTime

Closes #158