taxtank-core 0.33.31 → 0.33.32
Sign up to get free protection for your applications and to get access to all the features.
@@ -45,7 +45,7 @@ export class BankAccountCollection extends Collection {
|
|
45
45
|
return this.filter(bankAccount => ![...TYPE_LOAN, BankAccountTypeEnum.CREDIT_CARD].includes(bankAccount.type));
|
46
46
|
}
|
47
47
|
get loans() {
|
48
|
-
return new LoanCollection(this.
|
48
|
+
return new LoanCollection(this.filter(bankAccount => !!bankAccount.loan).map((bankAccount) => bankAccount.loan));
|
49
49
|
}
|
50
50
|
getOpeningBalance() {
|
51
51
|
return this.items.reduce((sum, bankAccount) => sum + bankAccount.getOpeningBalance(), 0);
|
@@ -114,4 +114,4 @@ export class BankAccountCollection extends Collection {
|
|
114
114
|
return this.getActive().getLoanAccounts().getByPropertiesIds(ids);
|
115
115
|
}
|
116
116
|
}
|
117
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay1hY2NvdW50LmNvbGxlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvY29sbGVjdGlvbnMvYmFuay1hY2NvdW50LmNvbGxlY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUMxQyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFbEQsT0FBTyxFQUE4QyxTQUFTLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDbEYsT0FBTyxPQUFPLE1BQU0sZ0JBQWdCLENBQUM7QUFDckMsT0FBTyxNQUFNLE1BQU0sZUFBZSxDQUFDO0FBQ25DLE9BQU8sSUFBSSxNQUFNLGFBQWEsQ0FBQztBQUMvQixPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSx5QkFBeUIsQ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ChiYW5rQWNjb3VudDogQmFua0FjY291bnQpID0+IGJhbmtBY2NvdW50LmlzT3duZXIoK2xvY2FsU3RvcmFnZS5nZXRJdGVtKCd1c2VySWQnKSkpO1xuICB9XG5cbiAgZ2V0QWN0aXZlTG9hbkFjY291bnRzQnlQcm9wZXJ0aWVzKGlkczogbnVtYmVyW10pOiBCYW5rQWNjb3VudENvbGxlY3Rpb24ge1xuICAgIHJldHVybiB0aGlzLmdldEFjdGl2ZSgpLmdldExvYW5BY2NvdW50cygpLmdldEJ5UHJvcGVydGllc0lkcyhpZHMpO1xuICB9XG59XG4iXX0=
|
@@ -9014,7 +9014,7 @@ class BankAccountCollection extends Collection {
|
|
9014
9014
|
return this.filter(bankAccount => ![...TYPE_LOAN, BankAccountTypeEnum.CREDIT_CARD].includes(bankAccount.type));
|
9015
9015
|
}
|
9016
9016
|
get loans() {
|
9017
|
-
return new LoanCollection(this.
|
9017
|
+
return new LoanCollection(this.filter(bankAccount => !!bankAccount.loan).map((bankAccount) => bankAccount.loan));
|
9018
9018
|
}
|
9019
9019
|
getOpeningBalance() {
|
9020
9020
|
return this.items.reduce((sum, bankAccount) => sum + bankAccount.getOpeningBalance(), 0);
|