taxtank-core 0.33.37 → 0.33.39
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/sole/sole-invoice.collection.mjs +3 -2
- package/esm2022/src/lib/db/Enums/sole/sole-invoice-state.enum.mjs +3 -2
- package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +4 -1
- package/esm2022/src/lib/services/report/property/property-transaction-report.service.mjs +2 -2
- package/fesm2022/taxtank-core.mjs +8 -3
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/db/Enums/sole/sole-invoice-state.enum.d.ts +2 -1
- package/src/lib/services/http/transaction/transaction.service.d.ts +1 -0
@@ -21,7 +21,8 @@ export class SoleInvoiceCollection extends Collection {
|
|
21
21
|
groupByState(transactions) {
|
22
22
|
const invoicesByState = this.groupBy('status');
|
23
23
|
const unpaidInvoices = this.getUnpaid(transactions);
|
24
|
-
invoicesByState.add(SoleInvoiceStateEnum.
|
24
|
+
invoicesByState.add(SoleInvoiceStateEnum.FULLY_PAID, this.getPaid(transactions));
|
25
|
+
invoicesByState.add(SoleInvoiceStateEnum.PAID, this.filterBy('id', transactions.filterByFinancialYear('date').map(transaction => transaction.invoiceId)));
|
25
26
|
invoicesByState.add(SoleInvoiceStatusesEnum.OPEN, invoicesByState.get(SoleInvoiceStatusesEnum.OPEN).remove(invoicesByState.get(SoleInvoiceStateEnum.PAID).toArray()));
|
26
27
|
invoicesByState.add(SoleInvoiceStateEnum.OVERDUE, unpaidInvoices.getOverdue());
|
27
28
|
return invoicesByState;
|
@@ -33,4 +34,4 @@ export class SoleInvoiceCollection extends Collection {
|
|
33
34
|
return flatten(this.map(invoice => invoice.allocate(bankTransaction, amount)));
|
34
35
|
}
|
35
36
|
}
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29sZS1pbnZvaWNlLmNvbGxlY3Rpb24uanMiLCJzb3VyY2VSb290Ijoi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m9pY2VzLmdldE92ZXJkdWUoKSk7XG5cbiAgICByZXR1cm4gaW52b2ljZXNCeVN0YXRlXG4gIH1cblxuICBnZXRVbnBhaWRBbW91bnQodHJhbnNhY3Rpb25zOiBUcmFuc2FjdGlvbkNvbGxlY3Rpb24pOiBudW1iZXIge1xuICAgIHJldHVybiB0aGlzLnN1bUJ5KCdncm9zc1ByaWNlJykgLSB0cmFuc2FjdGlvbnMuZ2V0QnlJbnZvaWNlcyh0aGlzKS5zdW1CeSgnZ3Jvc3NBbW91bnQnKTtcbiAgfVxuXG4gIGFsbG9jYXRlKGJhbmtUcmFuc2FjdGlvbjogQmFua1RyYW5zYWN0aW9uLCBhbW91bnQ/OiBudW1iZXIpOiBUcmFuc2FjdGlvbltdIHtcbiAgICByZXR1cm4gZmxhdHRlbih0aGlzLm1hcChpbnZvaWNlID0+IGludm9pY2UuYWxsb2NhdGUoYmFua1RyYW5zYWN0aW9uLCBhbW91bnQpKSk7XG4gIH1cbn1cbiJdfQ==
|
@@ -4,6 +4,7 @@ export var SoleInvoiceStateEnum;
|
|
4
4
|
SoleInvoiceStateEnum[SoleInvoiceStateEnum["DRAFT"] = 1] = "DRAFT";
|
5
5
|
SoleInvoiceStateEnum[SoleInvoiceStateEnum["OPEN"] = 2] = "OPEN";
|
6
6
|
SoleInvoiceStateEnum[SoleInvoiceStateEnum["PAID"] = 3] = "PAID";
|
7
|
-
SoleInvoiceStateEnum[SoleInvoiceStateEnum["
|
7
|
+
SoleInvoiceStateEnum[SoleInvoiceStateEnum["FULLY_PAID"] = 4] = "FULLY_PAID";
|
8
|
+
SoleInvoiceStateEnum[SoleInvoiceStateEnum["OVERDUE"] = 5] = "OVERDUE";
|
8
9
|
})(SoleInvoiceStateEnum || (SoleInvoiceStateEnum = {}));
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29sZS1pbnZvaWNlLXN0YXRlLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvc29sZS9zb2xlLWludm9pY2Utc3RhdGUuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxvQkFPWDtBQVBELFdBQVksb0JBQW9CO0lBQzlCLHVFQUFZLENBQUE7SUFDWixpRUFBUyxDQUFBO0lBQ1QsK0RBQVEsQ0FBQTtJQUNSLCtEQUFRLENBQUE7SUFDUiwyRUFBYyxDQUFBO0lBQ2QscUVBQVcsQ0FBQTtBQUNiLENBQUMsRUFQVyxvQkFBb0IsS0FBcEIsb0JBQW9CLFFBTy9CIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gU29sZUludm9pY2VTdGF0ZUVudW0ge1xuICBDQU5DRUxFRCA9IDAsXG4gIERSQUZUID0gMSxcbiAgT1BFTiA9IDIsXG4gIFBBSUQgPSAzLFxuICBGVUxMWV9QQUlEID0gNCxcbiAgT1ZFUkRVRSA9IDUsXG59XG4iXX0=
|
@@ -91,6 +91,9 @@ export class TransactionService extends RestService {
|
|
91
91
|
getPropertyHoldingCosts(propertyId) {
|
92
92
|
return super.fetch(`${this.environment.apiV2}/properties/${propertyId}/holding-costs`, false);
|
93
93
|
}
|
94
|
+
getWithoutTaxFreeProperty() {
|
95
|
+
return super.fetch(`${this.apiUrl}?excludeTaxFreePropertyCategories`, false);
|
96
|
+
}
|
94
97
|
/**
|
95
98
|
* get list of taxable transactions with tank type 'Work'
|
96
99
|
*/
|
@@ -265,4 +268,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
265
268
|
type: Inject,
|
266
269
|
args: ['environment']
|
267
270
|
}] }] });
|
268
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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* Get collection of property transactions
|
46
46
|
*/
|
47
47
|
getTransactions() {
|
48
|
-
return this.transactionService.
|
48
|
+
return this.transactionService.getWithoutTaxFreeProperty().pipe(map((transactions) => new TransactionCollection(transactions)
|
49
49
|
.getByChartAccountsCategories(CHART_ACCOUNTS_CATEGORIES.property)
|
50
50
|
.filter(transaction => transaction.claimPercent > 0)));
|
51
51
|
}
|
@@ -67,4 +67,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
67
67
|
providedIn: 'root'
|
68
68
|
}]
|
69
69
|
}], ctorParameters: () => [{ type: i1.PropertyService }, { type: i1.TransactionService }, { type: i1.DepreciationService }, { type: i1.ChartAccountsService }] });
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHktdHJhbnNhY3Rpb24tcmVwb3J0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvcmVwb3J0L3Byb3BlcnR5L3Byb3BlcnR5LXRyYW5zYWN0aW9uLXJlcG9ydC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0MsT0FBTyxFQUFjLGFBQWEsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUNqRCxPQUFPLEVBQUUseUJBQXlCLEVBQWUsTUFBTSxpQkFBaUIsQ0FBQztBQUN6RSxPQUFPLEVBS0wsNEJBQTRCLEVBQzVCLHdDQUF3QyxFQUN4Qyx1Q0FBdUMsRUFDdkMscUJBQXFCLEdBQ3RCLE1BQU0sc0JBQXNCLENBQUM7QUFDOUIsT0FBTyxFQUFFLEd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GdldERlcHJlY2lhdGlvbnMoKTogT2JzZXJ2YWJsZTxEZXByZWNpYXRpb25Db2xsZWN0aW9uPiB7XG4gICAgcmV0dXJuIHRoaXMuZGVwcmVjaWF0aW9uU2VydmljZS5nZXQoKS5waXBlKFxuICAgICAgbWFwKChkZXByZWNpYXRpb25zOiBEZXByZWNpYXRpb25Db2xsZWN0aW9uKSA9PiBkZXByZWNpYXRpb25zXG4gICAgICAgIC5nZXRCeUNoYXJ0QWNjb3VudHNDYXRlZ29yaWVzKENIQVJUX0FDQ09VTlRTX0NBVEVHT1JJRVMucHJvcGVydHkpXG4gICAgICAgIC8vIHdlIGRvbid0IG5lZWQgYm9ycm93aW5nIGV4cGVuc2VzIGZvciB0aGlzIHJlcG9ydFxuICAgICAgICAuZ2V0V2l0aG91dEJvcnJvd2luZ0V4cGVuc2VzKCkpXG4gICAgKVxuICB9XG59XG4iXX0=
|
@@ -1580,7 +1580,8 @@ var SoleInvoiceStateEnum;
|
|
1580
1580
|
SoleInvoiceStateEnum[SoleInvoiceStateEnum["DRAFT"] = 1] = "DRAFT";
|
1581
1581
|
SoleInvoiceStateEnum[SoleInvoiceStateEnum["OPEN"] = 2] = "OPEN";
|
1582
1582
|
SoleInvoiceStateEnum[SoleInvoiceStateEnum["PAID"] = 3] = "PAID";
|
1583
|
-
SoleInvoiceStateEnum[SoleInvoiceStateEnum["
|
1583
|
+
SoleInvoiceStateEnum[SoleInvoiceStateEnum["FULLY_PAID"] = 4] = "FULLY_PAID";
|
1584
|
+
SoleInvoiceStateEnum[SoleInvoiceStateEnum["OVERDUE"] = 5] = "OVERDUE";
|
1584
1585
|
})(SoleInvoiceStateEnum || (SoleInvoiceStateEnum = {}));
|
1585
1586
|
|
1586
1587
|
var SoleInvoiceStatusesEnum;
|
@@ -8449,7 +8450,8 @@ class SoleInvoiceCollection extends Collection {
|
|
8449
8450
|
groupByState(transactions) {
|
8450
8451
|
const invoicesByState = this.groupBy('status');
|
8451
8452
|
const unpaidInvoices = this.getUnpaid(transactions);
|
8452
|
-
invoicesByState.add(SoleInvoiceStateEnum.
|
8453
|
+
invoicesByState.add(SoleInvoiceStateEnum.FULLY_PAID, this.getPaid(transactions));
|
8454
|
+
invoicesByState.add(SoleInvoiceStateEnum.PAID, this.filterBy('id', transactions.filterByFinancialYear('date').map(transaction => transaction.invoiceId)));
|
8453
8455
|
invoicesByState.add(SoleInvoiceStatusesEnum.OPEN, invoicesByState.get(SoleInvoiceStatusesEnum.OPEN).remove(invoicesByState.get(SoleInvoiceStateEnum.PAID).toArray()));
|
8454
8456
|
invoicesByState.add(SoleInvoiceStateEnum.OVERDUE, unpaidInvoices.getOverdue());
|
8455
8457
|
return invoicesByState;
|
@@ -15300,6 +15302,9 @@ class TransactionService extends RestService {
|
|
15300
15302
|
getPropertyHoldingCosts(propertyId) {
|
15301
15303
|
return super.fetch(`${this.environment.apiV2}/properties/${propertyId}/holding-costs`, false);
|
15302
15304
|
}
|
15305
|
+
getWithoutTaxFreeProperty() {
|
15306
|
+
return super.fetch(`${this.apiUrl}?excludeTaxFreePropertyCategories`, false);
|
15307
|
+
}
|
15303
15308
|
/**
|
15304
15309
|
* get list of taxable transactions with tank type 'Work'
|
15305
15310
|
*/
|
@@ -19369,7 +19374,7 @@ class PropertyTransactionReportService {
|
|
19369
19374
|
* Get collection of property transactions
|
19370
19375
|
*/
|
19371
19376
|
getTransactions() {
|
19372
|
-
return this.transactionService.
|
19377
|
+
return this.transactionService.getWithoutTaxFreeProperty().pipe(map((transactions) => new TransactionCollection(transactions)
|
19373
19378
|
.getByChartAccountsCategories(CHART_ACCOUNTS_CATEGORIES.property)
|
19374
19379
|
.filter(transaction => transaction.claimPercent > 0)));
|
19375
19380
|
}
|