taxtank-core 0.33.25 → 0.33.27
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/report/income-expense/transaction-report-item.collection.mjs +19 -2
- package/esm2022/src/lib/models/event/app-event-type.enum.mjs +21 -22
- package/esm2022/src/lib/models/report/income-expense/transaction-report-item.mjs +2 -2
- package/esm2022/src/lib/models/transaction/transaction.mjs +3 -3
- package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +3 -12
- package/fesm2022/taxtank-core.mjs +41 -35
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/models/event/app-event-type.enum.d.ts +20 -21
- package/src/lib/services/http/transaction/transaction.service.d.ts +1 -6
package/esm2022/src/lib/collections/report/income-expense/transaction-report-item.collection.mjs
CHANGED
@@ -1,13 +1,30 @@
|
|
1
1
|
import { Collection } from '../../collection';
|
2
2
|
import { TransactionReportItem } from '../../../models/report';
|
3
|
+
import { ChartAccountsCategoryEnum } from '../../../db/Enums';
|
3
4
|
export class TransactionReportItemCollection extends Collection {
|
4
5
|
static fromTransactions(transactions, priorTransactions) {
|
5
6
|
const transactionsByChartAccounts = transactions.groupBy('chartAccounts.id');
|
6
7
|
const priorTransactionsByChartAccounts = priorTransactions.groupBy('chartAccounts.id');
|
7
|
-
|
8
|
+
const items = new TransactionReportItemCollection([...new Set([...transactionsByChartAccounts.keys, ...priorTransactionsByChartAccounts.keys])].map(chartAccountsId => new TransactionReportItem(transactionsByChartAccounts.get(chartAccountsId), priorTransactionsByChartAccounts.get(chartAccountsId))));
|
9
|
+
const categoriesOrder = [
|
10
|
+
ChartAccountsCategoryEnum.PROPERTY_INCOME,
|
11
|
+
ChartAccountsCategoryEnum.WORK_INCOME,
|
12
|
+
ChartAccountsCategoryEnum.SOLE_INCOME,
|
13
|
+
ChartAccountsCategoryEnum.HOLDING_INCOME,
|
14
|
+
ChartAccountsCategoryEnum.OTHER_INCOME,
|
15
|
+
ChartAccountsCategoryEnum.PERSONAL_INCOME,
|
16
|
+
ChartAccountsCategoryEnum.PROPERTY_EXPENSE,
|
17
|
+
ChartAccountsCategoryEnum.WORK_EXPENSE,
|
18
|
+
ChartAccountsCategoryEnum.SOLE_EXPENSE,
|
19
|
+
ChartAccountsCategoryEnum.HOLDING_EXPENSE,
|
20
|
+
ChartAccountsCategoryEnum.OTHER_EXPENSE,
|
21
|
+
ChartAccountsCategoryEnum.PERSONAL_EXPENSE,
|
22
|
+
];
|
23
|
+
items.sort((a, b) => categoriesOrder.indexOf(a.category) - categoriesOrder.indexOf(b.category));
|
24
|
+
return items;
|
8
25
|
}
|
9
26
|
sumBy(path, abs = false) {
|
10
27
|
return super.sumBy(path, abs);
|
11
28
|
}
|
12
29
|
}
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tcmVwb3J0LWl0ZW0uY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9jb2xsZWN0aW9ucy9yZXBvcnQvaW5jb21lLWV4cGVuc2UvdHJhbnNhY3Rpb24tcmVwb3J0LWl0ZW0uY29sbGVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDOUMsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFFL0QsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFOUQsTUFBTSxPQUFPLCtCQUFnQyxTQUFRLFVBQWlDO0lBQ3BGLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxZQUFtQyxFQUFFLGlCQUF3QztRQUNuRyxNQUFNLD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0NhdGVnb3J5RW51bS5TT0xFX0VYUEVOU0UsXG4gICAgICBDaGFydEFjY291bnRzQ2F0ZWdvcnlFbnVtLkhPTERJTkdfRVhQRU5TRSxcbiAgICAgIENoYXJ0QWNjb3VudHNDYXRlZ29yeUVudW0uT1RIRVJfRVhQRU5TRSxcbiAgICAgIENoYXJ0QWNjb3VudHNDYXRlZ29yeUVudW0uUEVSU09OQUxfRVhQRU5TRSxcbiAgICBdO1xuXG4gICAgaXRlbXMuc29ydCgoYSwgYikgPT4gY2F0ZWdvcmllc09yZGVyLmluZGV4T2YoYS5jYXRlZ29yeSkgLSBjYXRlZ29yaWVzT3JkZXIuaW5kZXhPZihiLmNhdGVnb3J5KSk7XG5cbiAgICByZXR1cm4gaXRlbXM7XG4gIH1cblxuICBzdW1CeShwYXRoOiBzdHJpbmcsIGFicyA9IGZhbHNlKTogbnVtYmVyIHtcbiAgICByZXR1cm4gc3VwZXIuc3VtQnkocGF0aCwgYWJzKTtcbiAgfVxufVxuIl19
|
@@ -36,26 +36,25 @@ export var AppEventTypeEnum;
|
|
36
36
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 30] = "PROPERTY_MOVEMENT_CREATED";
|
37
37
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 31] = "PROPERTY_MOVEMENT_UPDATED";
|
38
38
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 32] = "PROPERTY_MOVEMENT_DELETED";
|
39
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
40
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
41
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
42
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
43
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
44
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
45
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
46
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
47
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
48
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
49
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
50
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
51
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
52
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
53
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
54
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
55
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
56
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
57
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
58
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
59
|
-
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 53] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
39
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 33] = "PROPERTY_SALE_ADDED";
|
40
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 34] = "PROPERTY_SALE_DELETED";
|
41
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 35] = "PROPERTY_SUBSCRIPTION_ADDED";
|
42
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 36] = "PROPERTY_SUBSCRIPTION_DELETED";
|
43
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 37] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
|
44
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DEPRECIATION_METHOD_UPDATED"] = 38] = "SOLE_DEPRECIATION_METHOD_UPDATED";
|
45
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_INVOICE_PUBLISHED"] = 39] = "SOLE_INVOICE_PUBLISHED";
|
46
|
+
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 40] = "TAX_REVIEW_UPDATED";
|
47
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_CREATED"] = 41] = "TRANSACTION_ALLOCATION_CREATED";
|
48
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_DELETED"] = 42] = "TRANSACTION_ALLOCATION_DELETED";
|
49
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 43] = "TRANSACTION_CREATED";
|
50
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 44] = "TRANSACTION_DELETED";
|
51
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 45] = "TRANSACTION_UPDATED";
|
52
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 46] = "TRANSACTIONS_CREATED";
|
53
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 47] = "VEHICLE_CLAIM_DETAILS_UPDATED";
|
54
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 48] = "VEHICLE_CLAIM_DETAILS_CREATED";
|
55
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 49] = "VEHICLE_LOGBOOK_CREATED";
|
56
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 50] = "VEHICLE_LOGBOOK_UPDATED";
|
57
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 51] = "VEHICLE_LOGBOOK_DELETED";
|
58
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 52] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|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V9ERUxFVEVELFxuICBQUk9QRVJUWV9TVUJTQ1JJUFRJT05fQURERUQsXG4gIFBST1BFUlRZX1NVQlNDUklQVElPTl9ERUxFVEVELFxuICBQUk9QRVJUWV9WQUxVQVRJT05fRE9DVU1FTlRfQ1JFQVRFRCxcbiAgU09MRV9ERVBSRUNJQVRJT05fTUVUSE9EX1VQREFURUQsXG4gIFNPTEVfSU5WT0lDRV9QVUJMSVNIRUQsXG4gIFRBWF9SRVZJRVdfVVBEQVRFRCxcbiAgVFJBTlNBQ1RJT05fQUxMT0NBVElPTl9DUkVBVEVELFxuICBUUkFOU0FDVElPTl9BTExPQ0FUSU9OX0RFTEVURUQsXG4gIFRSQU5TQUNUSU9OX0NSRUFURUQsXG4gIFRSQU5TQUNUSU9OX0RFTEVURUQsXG4gIFRSQU5TQUNUSU9OX1VQREFURUQsXG4gIFRSQU5TQUNUSU9OU19DUkVBVEVELFxuICBWRUhJQ0xFX0NMQUlNX0RFVEFJTFNfVVBEQVRFRCxcbiAgVkVISUNMRV9DTEFJTV9ERVRBSUxTX0NSRUFURUQsXG4gIFZFSElDTEVfTE9HQk9PS19DUkVBVEVELFxuICBWRUhJQ0xFX0xPR0JPT0tfVVBEQVRFRCxcbiAgVkVISUNMRV9MT0dCT09LX0RFTEVURUQsXG4gIFZFSElDTEVfTE9HQk9PS19CRVNUX1BFUklPRF9VUERBVEVEXG59XG4iXX0=
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FinancialYear } from '../../financial-year';
|
2
2
|
export class TransactionReportItem {
|
3
3
|
constructor(transactions, priorTransactions) {
|
4
|
-
const firstTransaction = transactions.first;
|
4
|
+
const firstTransaction = transactions.first ?? priorTransactions.first;
|
5
5
|
this.category = firstTransaction.chartAccounts.category;
|
6
6
|
this.name = firstTransaction.chartAccounts.name;
|
7
7
|
new FinancialYear().getPastMonths().forEach(month => {
|
@@ -13,4 +13,4 @@ export class TransactionReportItem {
|
|
13
13
|
this.priorClaimAmount = priorTransactions.sumBy('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gICAgdGhpcy5jYXRlZ29yeSA9IGZpcnN0VHJhbnNhY3Rpb24uY2hhcnRBY2NvdW50cy5jYXRlZ29yeTtcbiAgICB0aGlzLm5hbWUgPSBmaXJzdFRyYW5zYWN0aW9uLmNoYXJ0QWNjb3VudHMubmFtZTtcbiAgICBuZXcgRmluYW5jaWFsWWVhcigpLmdldFBhc3RNb250aHMoKS5mb3JFYWNoKG1vbnRoID0+IHtcbiAgICAgIHRoaXNbbW9udGhdID0gdHJhbnNhY3Rpb25zLmdldEJ5TW9udGgobW9udGgpLnN1bUJ5KCdncm9zc0Ftb3VudFdpdGhvdXRHc3QnKTtcbiAgICB9KTtcbiAgICB0aGlzLmFtb3VudCA9IHRyYW5zYWN0aW9ucy5zdW1CeSgnZ3Jvc3NBbW91bnRXaXRob3V0R3N0Jyk7XG4gICAgdGhpcy5jbGFpbUFtb3VudCA9IHRyYW5zYWN0aW9ucy5zdW1CeSgnZ3Jvc3NDbGFpbUFtb3VudFdpdGhvdXRHc3QnKTtcbiAgICB0aGlzLnByaW9yQW1vdW50ID0gcHJpb3JUcmFuc2FjdGlvbnMuc3VtQnkoJ2dyb3NzQW1vdW50V2l0aG91dEdzdCcpO1xuICAgIHRoaXMucHJpb3JDbGFpbUFtb3VudCA9IHByaW9yVHJhbnNhY3Rpb25zLnN1bUJ5KCdncm9zc0NsYWltQW1vdW50V2l0aG91dEdzdCcpO1xuICB9XG59XG4iXX0=
|
@@ -96,10 +96,10 @@ export class Transaction extends TransactionBase {
|
|
96
96
|
return this.operation === TransactionOperationEnum.FIND_AND_MATCH;
|
97
97
|
}
|
98
98
|
get debit() {
|
99
|
-
return this.isDebit() ? Math.abs(this.
|
99
|
+
return this.isDebit() ? Math.abs(this.grossAmountWithoutGst) : 0;
|
100
100
|
}
|
101
101
|
get credit() {
|
102
|
-
return this.isCredit() ? Math.abs(this.
|
102
|
+
return this.isCredit() ? Math.abs(this.grossAmountWithoutGst) : 0;
|
103
103
|
}
|
104
104
|
/**
|
105
105
|
* Get value of transaction meta field
|
@@ -234,4 +234,4 @@ __decorate([
|
|
234
234
|
__decorate([
|
235
235
|
Transform(({ value }) => +value)
|
236
236
|
], Transaction.prototype, "tax", void 0);
|
237
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvbW9kZWxzL3RyYW5zYWN0aW9uL3RyYW5zYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsV0FBVyxJQUFJLGVBQWUsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBQ3pGLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQzNFLE9BQU8sRUFDTCxxQkFBcUIsRUFDckIscUJBQXFCLEVBQ3JCLDhCQUE4QixFQUFFLGtDQUFrQyxHQUNuRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3hCLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDJDQUEyQyxDQUFDO0FBQ3JGLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHVDQUF1QyxDQUFDO0FBQzdFLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBQzNGLE9BQU8sRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ2xFLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDdkMsT0FBTyxFQUFFLHlCQUF5QixFQUFFLGFBQWEsRUFBRSxNQUF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jdGlvbi5idXNpbmVzcztcbiAgfVxufVxuIl19
|
@@ -3,7 +3,7 @@ import { map } from 'rxjs/operators';
|
|
3
3
|
import { replace, sort } from '../../../functions/array';
|
4
4
|
import { TransactionOperationEnum } from '../../../db/Enums/transaction-operation.enum';
|
5
5
|
import { RestService } from '../rest/rest-old.service';
|
6
|
-
import { AppEvent, AppEventTypeEnum, Depreciation,
|
6
|
+
import { AppEvent, AppEventTypeEnum, Depreciation, PropertyShare, Transaction, VehicleClaim } from '../../../models';
|
7
7
|
import _ from 'lodash';
|
8
8
|
import { classToPlain } from 'class-transformer';
|
9
9
|
import { UserEventTypeTypeEnum } from '../../../db/Enums/user-event-type-type.enum';
|
@@ -29,8 +29,8 @@ export class TransactionService extends RestService {
|
|
29
29
|
* Listen events from Event Dispatcher services
|
30
30
|
*/
|
31
31
|
listenEvents() {
|
32
|
+
this.eventDispatcherService.on2(PropertyShare.getEventName('put')).subscribe(() => this.refreshCache());
|
32
33
|
this.listenDepreciationChange();
|
33
|
-
this.listenPropertyShareUpdate();
|
34
34
|
this.listenVehicleClaimChanges();
|
35
35
|
this.listenPropertyForecastUpdate();
|
36
36
|
this.listenNotifications();
|
@@ -51,9 +51,6 @@ export class TransactionService extends RestService {
|
|
51
51
|
return transactions;
|
52
52
|
}));
|
53
53
|
}
|
54
|
-
getByYear(year = new FinancialYear()) {
|
55
|
-
return this.get().pipe(map(transactions => transactions.filter(transaction => transaction.date > year.startDate && transaction.date < year.endDate)));
|
56
|
-
}
|
57
54
|
/**
|
58
55
|
* Add single new transaction
|
59
56
|
* @param model New Transaction instance for saving
|
@@ -213,12 +210,6 @@ export class TransactionService extends RestService {
|
|
213
210
|
this.refreshCache();
|
214
211
|
});
|
215
212
|
}
|
216
|
-
/**
|
217
|
-
* Listen to EventDispatcherService event related to Property Share changing
|
218
|
-
*/
|
219
|
-
listenPropertyShareUpdate() {
|
220
|
-
this.eventDispatcherService.on(AppEventTypeEnum.PROPERTY_SHARE_UPDATED).subscribe(() => this.refreshCache());
|
221
|
-
}
|
222
213
|
listenVehicleClaimChanges() {
|
223
214
|
this.eventDispatcherService.on2(...VehicleClaim.getEventNames('post', 'put')).subscribe(() => this.refreshCache());
|
224
215
|
this.eventDispatcherService.on([
|
@@ -267,4 +258,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
267
258
|
type: Inject,
|
268
259
|
args: ['environment']
|
269
260
|
}] }] });
|
270
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3RyYW5zYWN0aW9uL3RyYW5zYWN0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBR2pFLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUNyQyxPQUFPLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ3pELE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBQ3hGLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUN2RCxPQUFPLEVBQ0wsUUFBUSxFQUNSLGdCQUFnQixFQUNoQixZQUFZLEVBQ1osYUFBYSxFQUViLFdBQVcsRUFDWCxZQUFZLEVBQ2IsTUFBTSxpQkFBaUIsQ0FBQztBQUN6QixPQUFPLENBQUMsTUFBTSxRQUFRLENBQUM7QUFJdkIsT0FBTyx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hdGlvbi5pc1JlYWQgJiYgZXZlbnRzLmluY2x1ZGVzKG5vdGlmaWNhdGlvbi5ldmVudFR5cGUpKSB7XG4gICAgICAgIC8vIEBUT0RPIFRULTM4MjYgbW92ZSB0byB1bmlmaWVkIG1lcmN1cmUgZXZlbnRcbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XG4gICAgICAgICAgdGhpcy5yZWZyZXNoQ2FjaGUoKTtcbiAgICAgICAgfSwgMzAwMClcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuIl19
|
@@ -6472,10 +6472,10 @@ class Transaction extends Transaction$1 {
|
|
6472
6472
|
return this.operation === TransactionOperationEnum.FIND_AND_MATCH;
|
6473
6473
|
}
|
6474
6474
|
get debit() {
|
6475
|
-
return this.isDebit() ? Math.abs(this.
|
6475
|
+
return this.isDebit() ? Math.abs(this.grossAmountWithoutGst) : 0;
|
6476
6476
|
}
|
6477
6477
|
get credit() {
|
6478
|
-
return this.isCredit() ? Math.abs(this.
|
6478
|
+
return this.isCredit() ? Math.abs(this.grossAmountWithoutGst) : 0;
|
6479
6479
|
}
|
6480
6480
|
/**
|
6481
6481
|
* Get value of transaction meta field
|
@@ -8266,7 +8266,7 @@ const REPORTS = {
|
|
8266
8266
|
|
8267
8267
|
class TransactionReportItem {
|
8268
8268
|
constructor(transactions, priorTransactions) {
|
8269
|
-
const firstTransaction = transactions.first;
|
8269
|
+
const firstTransaction = transactions.first ?? priorTransactions.first;
|
8270
8270
|
this.category = firstTransaction.chartAccounts.category;
|
8271
8271
|
this.name = firstTransaction.chartAccounts.name;
|
8272
8272
|
new FinancialYear().getPastMonths().forEach(month => {
|
@@ -8348,7 +8348,23 @@ class TransactionReportItemCollection extends Collection {
|
|
8348
8348
|
static fromTransactions(transactions, priorTransactions) {
|
8349
8349
|
const transactionsByChartAccounts = transactions.groupBy('chartAccounts.id');
|
8350
8350
|
const priorTransactionsByChartAccounts = priorTransactions.groupBy('chartAccounts.id');
|
8351
|
-
|
8351
|
+
const items = new TransactionReportItemCollection([...new Set([...transactionsByChartAccounts.keys, ...priorTransactionsByChartAccounts.keys])].map(chartAccountsId => new TransactionReportItem(transactionsByChartAccounts.get(chartAccountsId), priorTransactionsByChartAccounts.get(chartAccountsId))));
|
8352
|
+
const categoriesOrder = [
|
8353
|
+
ChartAccountsCategoryEnum.PROPERTY_INCOME,
|
8354
|
+
ChartAccountsCategoryEnum.WORK_INCOME,
|
8355
|
+
ChartAccountsCategoryEnum.SOLE_INCOME,
|
8356
|
+
ChartAccountsCategoryEnum.HOLDING_INCOME,
|
8357
|
+
ChartAccountsCategoryEnum.OTHER_INCOME,
|
8358
|
+
ChartAccountsCategoryEnum.PERSONAL_INCOME,
|
8359
|
+
ChartAccountsCategoryEnum.PROPERTY_EXPENSE,
|
8360
|
+
ChartAccountsCategoryEnum.WORK_EXPENSE,
|
8361
|
+
ChartAccountsCategoryEnum.SOLE_EXPENSE,
|
8362
|
+
ChartAccountsCategoryEnum.HOLDING_EXPENSE,
|
8363
|
+
ChartAccountsCategoryEnum.OTHER_EXPENSE,
|
8364
|
+
ChartAccountsCategoryEnum.PERSONAL_EXPENSE,
|
8365
|
+
];
|
8366
|
+
items.sort((a, b) => categoriesOrder.indexOf(a.category) - categoriesOrder.indexOf(b.category));
|
8367
|
+
return items;
|
8352
8368
|
}
|
8353
8369
|
sumBy(path, abs = false) {
|
8354
8370
|
return super.sumBy(path, abs);
|
@@ -10393,27 +10409,26 @@ var AppEventTypeEnum;
|
|
10393
10409
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 30] = "PROPERTY_MOVEMENT_CREATED";
|
10394
10410
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 31] = "PROPERTY_MOVEMENT_UPDATED";
|
10395
10411
|
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 32] = "PROPERTY_MOVEMENT_DELETED";
|
10396
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10397
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10398
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10399
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10400
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10401
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10402
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10403
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10404
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10405
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10406
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10407
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10408
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10409
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10410
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10411
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10412
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10413
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10414
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10415
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
10416
|
-
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 53] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
10412
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 33] = "PROPERTY_SALE_ADDED";
|
10413
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 34] = "PROPERTY_SALE_DELETED";
|
10414
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 35] = "PROPERTY_SUBSCRIPTION_ADDED";
|
10415
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 36] = "PROPERTY_SUBSCRIPTION_DELETED";
|
10416
|
+
AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 37] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
|
10417
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_DEPRECIATION_METHOD_UPDATED"] = 38] = "SOLE_DEPRECIATION_METHOD_UPDATED";
|
10418
|
+
AppEventTypeEnum[AppEventTypeEnum["SOLE_INVOICE_PUBLISHED"] = 39] = "SOLE_INVOICE_PUBLISHED";
|
10419
|
+
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 40] = "TAX_REVIEW_UPDATED";
|
10420
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_CREATED"] = 41] = "TRANSACTION_ALLOCATION_CREATED";
|
10421
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_DELETED"] = 42] = "TRANSACTION_ALLOCATION_DELETED";
|
10422
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 43] = "TRANSACTION_CREATED";
|
10423
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 44] = "TRANSACTION_DELETED";
|
10424
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 45] = "TRANSACTION_UPDATED";
|
10425
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 46] = "TRANSACTIONS_CREATED";
|
10426
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 47] = "VEHICLE_CLAIM_DETAILS_UPDATED";
|
10427
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 48] = "VEHICLE_CLAIM_DETAILS_CREATED";
|
10428
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 49] = "VEHICLE_LOGBOOK_CREATED";
|
10429
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 50] = "VEHICLE_LOGBOOK_UPDATED";
|
10430
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 51] = "VEHICLE_LOGBOOK_DELETED";
|
10431
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 52] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
10417
10432
|
})(AppEventTypeEnum || (AppEventTypeEnum = {}));
|
10418
10433
|
|
10419
10434
|
/**
|
@@ -15190,8 +15205,8 @@ class TransactionService extends RestService {
|
|
15190
15205
|
* Listen events from Event Dispatcher services
|
15191
15206
|
*/
|
15192
15207
|
listenEvents() {
|
15208
|
+
this.eventDispatcherService.on2(PropertyShare.getEventName('put')).subscribe(() => this.refreshCache());
|
15193
15209
|
this.listenDepreciationChange();
|
15194
|
-
this.listenPropertyShareUpdate();
|
15195
15210
|
this.listenVehicleClaimChanges();
|
15196
15211
|
this.listenPropertyForecastUpdate();
|
15197
15212
|
this.listenNotifications();
|
@@ -15212,9 +15227,6 @@ class TransactionService extends RestService {
|
|
15212
15227
|
return transactions;
|
15213
15228
|
}));
|
15214
15229
|
}
|
15215
|
-
getByYear(year = new FinancialYear()) {
|
15216
|
-
return this.get().pipe(map(transactions => transactions.filter(transaction => transaction.date > year.startDate && transaction.date < year.endDate)));
|
15217
|
-
}
|
15218
15230
|
/**
|
15219
15231
|
* Add single new transaction
|
15220
15232
|
* @param model New Transaction instance for saving
|
@@ -15374,12 +15386,6 @@ class TransactionService extends RestService {
|
|
15374
15386
|
this.refreshCache();
|
15375
15387
|
});
|
15376
15388
|
}
|
15377
|
-
/**
|
15378
|
-
* Listen to EventDispatcherService event related to Property Share changing
|
15379
|
-
*/
|
15380
|
-
listenPropertyShareUpdate() {
|
15381
|
-
this.eventDispatcherService.on(AppEventTypeEnum.PROPERTY_SHARE_UPDATED).subscribe(() => this.refreshCache());
|
15382
|
-
}
|
15383
15389
|
listenVehicleClaimChanges() {
|
15384
15390
|
this.eventDispatcherService.on2(...VehicleClaim.getEventNames('post', 'put')).subscribe(() => this.refreshCache());
|
15385
15391
|
this.eventDispatcherService.on([
|