taxtank-core 0.33.53 → 0.33.55
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 +4 -3
- package/esm2022/src/lib/services/http/home-office/home-office-log.service.mjs +15 -7
- package/fesm2022/taxtank-core.mjs +15 -6
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/services/http/home-office/home-office-log.service.d.ts +5 -1
@@ -9,10 +9,11 @@ export class SoleInvoiceCollection extends Collection {
|
|
9
9
|
getPaid(transactions) {
|
10
10
|
const amountPerInvoice = transactions.getAmountPerInvoice();
|
11
11
|
return this.filter(invoice => invoice.grossPrice > 0
|
12
|
-
&& round(amountPerInvoice.get(invoice.id), 2) >= invoice.grossPrice);
|
12
|
+
&& round(amountPerInvoice.get(invoice.id), 2) >= invoice.grossPrice.toFixed(2));
|
13
13
|
}
|
14
14
|
getUnpaid(transactions) {
|
15
|
-
|
15
|
+
const amountPerInvoice = transactions.getAmountPerInvoice();
|
16
|
+
return this.getOpen().filter(invoice => round(amountPerInvoice.get(invoice.id), 2) < invoice.grossPrice.toFixed(2));
|
16
17
|
}
|
17
18
|
getOpen() {
|
18
19
|
return this.filter((invoice) => invoice.isOpen());
|
@@ -36,4 +37,4 @@ export class SoleInvoiceCollection extends Collection {
|
|
36
37
|
return flatten(this.map(invoice => invoice.allocate(bankTransaction, amount)));
|
37
38
|
}
|
38
39
|
}
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29sZS1pbnZvaWNlLmNvbGxlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvY29sbGVjdGlvbnMvc29sZS9zb2xlLWludm9pY2UuY29sbGVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIj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gICk7XG4gICAgaW52b2ljZXNCeVN0YXRlLmFkZChcbiAgICAgIFNvbGVJbnZvaWNlU3RhdHVzZXNFbnVtLk9QRU4sXG4gICAgICBpbnZvaWNlc0J5U3RhdGUuZ2V0KFNvbGVJbnZvaWNlU3RhdHVzZXNFbnVtLk9QRU4pLnJlbW92ZShpbnZvaWNlc0J5U3RhdGUuZ2V0KFNvbGVJbnZvaWNlU3RhdGVFbnVtLkZVTExZX1BBSUQpLnRvQXJyYXkoKSlcbiAgICApO1xuICAgIGludm9pY2VzQnlTdGF0ZS5hZGQoU29sZUludm9pY2VTdGF0ZUVudW0uT1ZFUkRVRSwgdW5wYWlkSW52b2ljZXMuZ2V0T3ZlcmR1ZSgpKTtcblxuICAgIHJldHVybiBpbnZvaWNlc0J5U3RhdGVcbiAgfVxuXG4gIGdldFVucGFpZEFtb3VudCh0cmFuc2FjdGlvbnM6IFRyYW5zYWN0aW9uQ29sbGVjdGlvbik6IG51bWJlciB7XG4gICAgcmV0dXJuIHRoaXMuc3VtQnkoJ2dyb3NzUHJpY2UnKSAtIHRyYW5zYWN0aW9ucy5nZXRCeUludm9pY2VzKHRoaXMpLnN1bUJ5KCdncm9zc0Ftb3VudCcpO1xuICB9XG5cbiAgYWxsb2NhdGUoYmFua1RyYW5zYWN0aW9uOiBCYW5rVHJhbnNhY3Rpb24sIGFtb3VudD86IG51bWJlcik6IFRyYW5zYWN0aW9uW10ge1xuICAgIHJldHVybiBmbGF0dGVuKHRoaXMubWFwKGludm9pY2UgPT4gaW52b2ljZS5hbGxvY2F0ZShiYW5rVHJhbnNhY3Rpb24sIGFtb3VudCkpKTtcbiAgfVxufVxuIl19
|
@@ -1,17 +1,22 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
1
|
+
import { Inject, Injectable } from '@angular/core';
|
2
2
|
import { RestService } from '../rest';
|
3
3
|
import { Collection } from '../../../collections';
|
4
|
-
import { HomeOfficeLog } from '../../../models';
|
4
|
+
import { HomeOfficeClaim, HomeOfficeLog } from '../../../models';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export class HomeOfficeLogService extends RestService {
|
7
|
-
constructor() {
|
8
|
-
super(
|
7
|
+
constructor(environment) {
|
8
|
+
super(environment);
|
9
|
+
this.environment = environment;
|
9
10
|
this.endpointUri = 'home-office-logs';
|
10
11
|
this.modelClass = HomeOfficeLog;
|
11
12
|
this.collectionClass = (Collection);
|
12
13
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
14
|
+
this.listenEvents();
|
13
15
|
}
|
14
|
-
|
16
|
+
listenEvents() {
|
17
|
+
this.listenCSE(HomeOfficeClaim, this.refreshCache, ['post']);
|
18
|
+
}
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeLogService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
15
20
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeLogService, providedIn: 'root' }); }
|
16
21
|
}
|
17
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeLogService, decorators: [{
|
@@ -19,5 +24,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
19
24
|
args: [{
|
20
25
|
providedIn: 'root'
|
21
26
|
}]
|
22
|
-
}]
|
23
|
-
|
27
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
28
|
+
type: Inject,
|
29
|
+
args: ['environment']
|
30
|
+
}] }] });
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9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gnLCAnZGVsZXRlQmF0Y2gnXTtcblxuICBjb25zdHJ1Y3RvcihASW5qZWN0KCdlbnZpcm9ubWVudCcpIHByb3RlY3RlZCBlbnZpcm9ubWVudDogYW55KSB7XG4gICAgc3VwZXIoZW52aXJvbm1lbnQpO1xuICAgIHRoaXMubGlzdGVuRXZlbnRzKCk7XG4gIH1cblxuICBsaXN0ZW5FdmVudHMoKTogdm9pZCB7XG4gICAgdGhpcy5saXN0ZW5DU0UoSG9tZU9mZmljZUNsYWltLCB0aGlzLnJlZnJlc2hDYWNoZSwgWydwb3N0J10pO1xuICB9XG59XG4iXX0=
|
@@ -8312,10 +8312,11 @@ class SoleInvoiceCollection extends Collection {
|
|
8312
8312
|
getPaid(transactions) {
|
8313
8313
|
const amountPerInvoice = transactions.getAmountPerInvoice();
|
8314
8314
|
return this.filter(invoice => invoice.grossPrice > 0
|
8315
|
-
&& round(amountPerInvoice.get(invoice.id), 2) >= invoice.grossPrice);
|
8315
|
+
&& round(amountPerInvoice.get(invoice.id), 2) >= invoice.grossPrice.toFixed(2));
|
8316
8316
|
}
|
8317
8317
|
getUnpaid(transactions) {
|
8318
|
-
|
8318
|
+
const amountPerInvoice = transactions.getAmountPerInvoice();
|
8319
|
+
return this.getOpen().filter(invoice => round(amountPerInvoice.get(invoice.id), 2) < invoice.grossPrice.toFixed(2));
|
8319
8320
|
}
|
8320
8321
|
getOpen() {
|
8321
8322
|
return this.filter((invoice) => invoice.isOpen());
|
@@ -16454,14 +16455,19 @@ var HomeOfficeClaimMessagesEnum;
|
|
16454
16455
|
})(HomeOfficeClaimMessagesEnum || (HomeOfficeClaimMessagesEnum = {}));
|
16455
16456
|
|
16456
16457
|
class HomeOfficeLogService extends RestService$1 {
|
16457
|
-
constructor() {
|
16458
|
-
super(
|
16458
|
+
constructor(environment) {
|
16459
|
+
super(environment);
|
16460
|
+
this.environment = environment;
|
16459
16461
|
this.endpointUri = 'home-office-logs';
|
16460
16462
|
this.modelClass = HomeOfficeLog;
|
16461
16463
|
this.collectionClass = (Collection);
|
16462
16464
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
16465
|
+
this.listenEvents();
|
16463
16466
|
}
|
16464
|
-
|
16467
|
+
listenEvents() {
|
16468
|
+
this.listenCSE(HomeOfficeClaim, this.refreshCache, ['post']);
|
16469
|
+
}
|
16470
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeLogService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
16465
16471
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeLogService, providedIn: 'root' }); }
|
16466
16472
|
}
|
16467
16473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeLogService, decorators: [{
|
@@ -16469,7 +16475,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
16469
16475
|
args: [{
|
16470
16476
|
providedIn: 'root'
|
16471
16477
|
}]
|
16472
|
-
}]
|
16478
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
16479
|
+
type: Inject,
|
16480
|
+
args: ['environment']
|
16481
|
+
}] }] });
|
16473
16482
|
|
16474
16483
|
var HomeOfficeLogMessagesEnum;
|
16475
16484
|
(function (HomeOfficeLogMessagesEnum) {
|