feat: add due bills reducer and selector.

This commit is contained in:
Ahmed Bouhuolia
2020-10-28 18:29:51 +02:00
parent bc9638c9a2
commit 8a20deacf3
6 changed files with 64 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ export default class Bill extends TenantModel {
* @return {number}
*/
get dueAmount() {
return this.amount - this.paymentAmount;
return Math.max(this.amount - this.paymentAmount, 0);
}
/**