taxtank-core 0.31.59 → 0.31.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/collections/vehicle/best-vehicle-logbook.collection.mjs +92 -0
- package/esm2020/lib/collections/vehicle/index.mjs +2 -1
- package/esm2020/lib/collections/vehicle/vehicle-logbook.collection.mjs +15 -58
- package/esm2020/lib/models/vehicle/index.mjs +1 -2
- package/esm2020/lib/models/vehicle/vehicle-logbook.mjs +1 -28
- package/esm2020/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.mjs +4 -9
- package/esm2020/lib/services/http/transaction/transaction.service.mjs +1 -1
- package/esm2020/lib/services/http/vehicle/vehicle-claim-details.service.mjs +1 -18
- package/esm2020/lib/services/http/vehicle/vehicle-claim.service.mjs +3 -19
- package/esm2020/lib/services/index.mjs +1 -2
- package/esm2020/lib/validators/current-fin-year.validator.mjs +2 -2
- package/fesm2015/taxtank-core.mjs +131 -219
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +131 -219
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/vehicle/best-vehicle-logbook.collection.d.ts +49 -0
- package/lib/collections/vehicle/index.d.ts +1 -0
- package/lib/collections/vehicle/vehicle-logbook.collection.d.ts +7 -13
- package/lib/models/vehicle/index.d.ts +0 -1
- package/lib/models/vehicle/vehicle-logbook.d.ts +0 -17
- package/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.d.ts +3 -5
- package/lib/services/http/vehicle/vehicle-claim-details.service.d.ts +1 -8
- package/lib/services/http/vehicle/vehicle-claim.service.d.ts +0 -5
- package/lib/services/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2020/lib/models/vehicle/logbook-period.mjs +0 -25
- package/esm2020/lib/services/vehicle/index.mjs +0 -2
- package/esm2020/lib/services/vehicle/logbook-best-period.service.mjs +0 -71
- package/lib/models/vehicle/logbook-period.d.ts +0 -16
- package/lib/services/vehicle/index.d.ts +0 -1
- package/lib/services/vehicle/logbook-best-period.service.d.ts +0 -28
|
@@ -17,7 +17,6 @@ export class VehicleClaimService extends RestService {
|
|
|
17
17
|
}
|
|
18
18
|
listenEvents() {
|
|
19
19
|
this.listenVehicleClaimDetailsChanges();
|
|
20
|
-
this.listenBestPeriodChanges();
|
|
21
20
|
}
|
|
22
21
|
add(model) {
|
|
23
22
|
return super.add(model).pipe(map((vehicleClaim) => {
|
|
@@ -41,26 +40,11 @@ export class VehicleClaimService extends RestService {
|
|
|
41
40
|
this.refreshCache();
|
|
42
41
|
});
|
|
43
42
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Best period changes affect to claims workUsage
|
|
46
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
47
|
-
*/
|
|
48
|
-
listenBestPeriodChanges() {
|
|
49
|
-
this.eventDispatcherService.on(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED)
|
|
50
|
-
.subscribe((bestPeriod) => {
|
|
51
|
-
// no need to update claims when best period become null
|
|
52
|
-
// (case when logbook removed and user don't have enough logbooks for claim period)
|
|
53
|
-
if (!bestPeriod) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
this.updateWorkUsage(bestPeriod);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
43
|
/**
|
|
60
44
|
* Update workUsage for all vehicle claims if logbook best period changed
|
|
61
45
|
* @TODO Vik: Best period move this and related logic to backend
|
|
62
46
|
*/
|
|
63
|
-
updateWorkUsage(
|
|
47
|
+
updateWorkUsage(bestLogbooks) {
|
|
64
48
|
// no need to update if cache not exist
|
|
65
49
|
if (!this.cache) {
|
|
66
50
|
return;
|
|
@@ -68,7 +52,7 @@ export class VehicleClaimService extends RestService {
|
|
|
68
52
|
// @TODO Vik (TT-2210): need batch endpoint for this update
|
|
69
53
|
// @TODO Alex (TT-2210): fix frontend when endpoint ready
|
|
70
54
|
const batch$ = this.cache.map((claim) => {
|
|
71
|
-
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage:
|
|
55
|
+
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage: bestLogbooks.getWorkUsageByClaim(claim) }));
|
|
72
56
|
return this.update(claimToUpdate);
|
|
73
57
|
});
|
|
74
58
|
combineLatest(batch$).subscribe();
|
|
@@ -82,4 +66,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
82
66
|
providedIn: 'root'
|
|
83
67
|
}]
|
|
84
68
|
}] });
|
|
85
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVoaWNsZS1jbGFpbS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvdmVoaWNsZS92ZWhpY2xlLWNsYWltLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQ3ZELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRW5ELE9BQU8sRUFBYyxhQUFhLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDakQsT0FBTyxFQUFFLEdBQUcsRUFBUSxNQUFNLGdCQUFnQixDQUFDO0FBQzNDLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMzQyxPQUFPLEVBQUUsWUFB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iAgICB9XG5cbiAgICAvLyBAVE9ETyBWaWsgKFRULTIyMTApOiBuZWVkIGJhdGNoIGVuZHBvaW50IGZvciB0aGlzIHVwZGF0ZVxuICAgIC8vIEBUT0RPIEFsZXggKFRULTIyMTApOiBmaXggZnJvbnRlbmQgd2hlbiBlbmRwb2ludCByZWFkeVxuICAgIGNvbnN0IGJhdGNoJDogT2JzZXJ2YWJsZTxWZWhpY2xlQ2xhaW0+W10gPSB0aGlzLmNhY2hlLm1hcCgoY2xhaW06IFZlaGljbGVDbGFpbSkgPT4ge1xuICAgICAgY29uc3QgY2xhaW1Ub1VwZGF0ZTogVmVoaWNsZUNsYWltID0gcGxhaW5Ub0NsYXNzKFxuICAgICAgICBWZWhpY2xlQ2xhaW0sXG4gICAgICAgIE9iamVjdC5hc3NpZ24oe30sIGNsYWltLCB7d29ya1VzYWdlOiBiZXN0TG9nYm9va3MuZ2V0V29ya1VzYWdlQnlDbGFpbShjbGFpbSl9KVxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKGNsYWltVG9VcGRhdGUpO1xuICAgIH0pXG5cbiAgICBjb21iaW5lTGF0ZXN0KGJhdGNoJCkuc3Vic2NyaWJlKCk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -17,6 +17,5 @@ export * from './report';
|
|
|
17
17
|
export * from './toast';
|
|
18
18
|
export * from './transaction';
|
|
19
19
|
export * from './user';
|
|
20
|
-
export * from './vehicle';
|
|
21
20
|
export * from './xlsx';
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxRQU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uL3BkZidcbmV4cG9ydCAqIGZyb20gJy4vcHJlbG9hZGVyJztcbmV4cG9ydCAqIGZyb20gJy4vcHJvcGVydHknO1xuXG5leHBvcnQgKiBmcm9tICcuL3JlcG9ydCc7XG5cbmV4cG9ydCAqIGZyb20gJy4vdG9hc3QnO1xuZXhwb3J0ICogZnJvbSAnLi90cmFuc2FjdGlvbic7XG5cbmV4cG9ydCAqIGZyb20gJy4vdXNlcic7XG5cbmV4cG9ydCAqIGZyb20gJy4veGxzeCc7XG4iXX0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FinancialYear } from '../models
|
|
1
|
+
import { FinancialYear } from '../models';
|
|
2
2
|
/**
|
|
3
3
|
* Validation function, that checks If provided date is within a current financial year
|
|
4
4
|
*/
|
|
@@ -11,4 +11,4 @@ export function currentFinYearValidator() {
|
|
|
11
11
|
return { notCurrentFinYear: true };
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVudC1maW4teWVhci52YWxpZGF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvdmFsaWRhdG9ycy9jdXJyZW50LWZpbi15ZWFyLnZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBRTFDOztHQUVHO0FBQ0gsTUFBTSxVQUFVLHVCQUF1QjtJQUNyQyxNQUFNLGNBQWMsR0FBa0IsSUFBSSxhQUFhLEVBQUUsQ0FBQztJQUUxRCxPQUFPLENBQUMsT0FBd0IsRUFBb0IsRUFBRTtRQUNwRCxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssSUFBSSxPQUFP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@@ import * as i1$1 from '@angular/common';
|
|
|
4
4
|
import { formatDate, CommonModule, CurrencyPipe, DatePipe } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpParams, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
7
|
-
import { map, mergeMap, filter, first as first$1, catchError,
|
|
7
|
+
import { map, mergeMap, filter, first as first$1, catchError, take, switchMap, finalize, debounceTime, distinctUntilChanged, delay } from 'rxjs/operators';
|
|
8
8
|
import { ReplaySubject, Subject, Observable, throwError, combineLatest, BehaviorSubject, forkJoin, of, from, merge as merge$1 } from 'rxjs';
|
|
9
9
|
import { plainToClass, Type, Transform, Exclude, Expose, classToPlain } from 'class-transformer';
|
|
10
10
|
import get from 'lodash/get';
|
|
@@ -37,9 +37,9 @@ import _ from 'lodash';
|
|
|
37
37
|
import { jsPDF } from 'jspdf';
|
|
38
38
|
import { applyPlugin } from 'jspdf-autotable';
|
|
39
39
|
import html2pdf from 'html2pdf.js';
|
|
40
|
-
import isEqual from 'lodash/isEqual';
|
|
41
40
|
import * as xlsx from 'xlsx';
|
|
42
41
|
import * as FileSaver from 'file-saver';
|
|
42
|
+
import isEqual from 'lodash/isEqual';
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* https://api-uat.corelogic.asia/property/au/v2/suggest.json
|
|
@@ -4946,27 +4946,6 @@ __decorate([
|
|
|
4946
4946
|
Type(() => BankAccount)
|
|
4947
4947
|
], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
|
|
4948
4948
|
|
|
4949
|
-
/**
|
|
4950
|
-
* Class contains traveled kilometers and work usage percent in 12 weeks date range
|
|
4951
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
4952
|
-
* @TODO Alex: check if we need this class when calculation refactored with backend
|
|
4953
|
-
*/
|
|
4954
|
-
class LogbookPeriod {
|
|
4955
|
-
isEndOfYear() {
|
|
4956
|
-
return this.to === new FinancialYear().endDate;
|
|
4957
|
-
}
|
|
4958
|
-
getWorkUsageByClaim(claim) {
|
|
4959
|
-
const claimKilometers = this.logbooks.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
|
|
4960
|
-
return round(this.workUsage * (claimKilometers / this.kilometers), 2);
|
|
4961
|
-
}
|
|
4962
|
-
}
|
|
4963
|
-
__decorate([
|
|
4964
|
-
Type(() => Date)
|
|
4965
|
-
], LogbookPeriod.prototype, "from", void 0);
|
|
4966
|
-
__decorate([
|
|
4967
|
-
Type(() => Date)
|
|
4968
|
-
], LogbookPeriod.prototype, "to", void 0);
|
|
4969
|
-
|
|
4970
4949
|
class VehicleLogbook extends VehicleLogbook$1 {
|
|
4971
4950
|
get kilometers() {
|
|
4972
4951
|
return this.odometerEnd - this.odometerStart;
|
|
@@ -4980,23 +4959,7 @@ class VehicleLogbook extends VehicleLogbook$1 {
|
|
|
4980
4959
|
isSoleTank() {
|
|
4981
4960
|
return !!this.business;
|
|
4982
4961
|
}
|
|
4983
|
-
/**
|
|
4984
|
-
* Get logbook period date range from logbook date and weeksInPeriod duration
|
|
4985
|
-
*/
|
|
4986
|
-
getPeriod() {
|
|
4987
|
-
/**
|
|
4988
|
-
* Hack: The library is using not by documentation, but works
|
|
4989
|
-
* moment-range is broken since we updated Typescript to v4 (https://github.com/rotaready/moment-range/issues/238)
|
|
4990
|
-
* extendMoment(Moment) cause error and broke the app
|
|
4991
|
-
*/
|
|
4992
|
-
return new DateRange([this.date, new Date(this.date.getTime() + VehicleLogbook.bestPeriodDuration)]);
|
|
4993
|
-
}
|
|
4994
4962
|
}
|
|
4995
|
-
/**
|
|
4996
|
-
* Logbook period duration in milliseconds.
|
|
4997
|
-
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
4998
|
-
*/
|
|
4999
|
-
VehicleLogbook.bestPeriodDuration = 12 * 7 * 24 * 3600 * 1000;
|
|
5000
4963
|
__decorate([
|
|
5001
4964
|
Type(() => Date)
|
|
5002
4965
|
], VehicleLogbook.prototype, "date", void 0);
|
|
@@ -8579,40 +8542,7 @@ class ReportItemCollection extends Collection {
|
|
|
8579
8542
|
}
|
|
8580
8543
|
}
|
|
8581
8544
|
|
|
8582
|
-
class VehicleClaimCollection extends Collection {
|
|
8583
|
-
/**
|
|
8584
|
-
* Get remaining kilometers limit. Total limit ({@link VehicleClaim.totalKmsLimit}) - claimed kilometers from other vehicle claims
|
|
8585
|
-
*/
|
|
8586
|
-
getKmsLimitForClaim(claim) {
|
|
8587
|
-
let collection = this;
|
|
8588
|
-
if (claim) {
|
|
8589
|
-
collection = collection.removeBy('id', claim.id);
|
|
8590
|
-
}
|
|
8591
|
-
return VehicleClaim.totalKmsLimit - collection.sumBy('kilometers');
|
|
8592
|
-
}
|
|
8593
|
-
/**
|
|
8594
|
-
* Get remaining work usage limit. Total limit ({@link VehicleClaim.totalWorkUsagePercent}) - claimed percent from other vehicle claims
|
|
8595
|
-
*/
|
|
8596
|
-
getWorkUsageLimitForClaim(claim) {
|
|
8597
|
-
let collection = this;
|
|
8598
|
-
if (claim) {
|
|
8599
|
-
collection = collection.removeBy('id', claim.id);
|
|
8600
|
-
}
|
|
8601
|
-
return VehicleClaim.totalWorkUsagePercent - collection.sumBy('workUsage');
|
|
8602
|
-
}
|
|
8603
|
-
}
|
|
8604
|
-
|
|
8605
8545
|
class VehicleLogbookCollection extends Collection {
|
|
8606
|
-
/**
|
|
8607
|
-
* Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
|
|
8608
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
8609
|
-
*/
|
|
8610
|
-
isBestPeriodExist() {
|
|
8611
|
-
if (this.items.length < 2) {
|
|
8612
|
-
return false;
|
|
8613
|
-
}
|
|
8614
|
-
return VehicleLogbook.bestPeriodDuration < (this.last.date.getTime() - this.first.date.getTime());
|
|
8615
|
-
}
|
|
8616
8546
|
/**
|
|
8617
8547
|
* Get collection of non-personal logbooks (work-related, sole-related).
|
|
8618
8548
|
* @TODO Vik: Best period: move this and related logic to backend
|
|
@@ -8620,49 +8550,6 @@ class VehicleLogbookCollection extends Collection {
|
|
|
8620
8550
|
getClaimableLogbooks() {
|
|
8621
8551
|
return this.filterBy('isPersonal', false);
|
|
8622
8552
|
}
|
|
8623
|
-
/**
|
|
8624
|
-
* Get Logbook Period with the biggest work usage percent
|
|
8625
|
-
* Best period duration is defined as VehicleLogbook.bestPeriodWeeks by the ATO
|
|
8626
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
8627
|
-
*/
|
|
8628
|
-
getBestPeriod() {
|
|
8629
|
-
if (!this.isBestPeriodExist()) {
|
|
8630
|
-
return null;
|
|
8631
|
-
}
|
|
8632
|
-
let bestPeriod;
|
|
8633
|
-
// get list of all logbooks available for best period calculation
|
|
8634
|
-
const claimableLogbooks = this.getClaimableLogbooks().toArray();
|
|
8635
|
-
for (let i = 0; i < claimableLogbooks.length; i++) {
|
|
8636
|
-
// no sense to check next logbooks because we already get the end of the year
|
|
8637
|
-
if (bestPeriod && bestPeriod.isEndOfYear()) {
|
|
8638
|
-
break;
|
|
8639
|
-
}
|
|
8640
|
-
// get date range started from current handling logbook date
|
|
8641
|
-
const dateRange = claimableLogbooks[i].getPeriod();
|
|
8642
|
-
// get all logbooks included in current logbook period
|
|
8643
|
-
const logbooksInRange = this.filterByRange('date', dateRange.start, dateRange.end);
|
|
8644
|
-
const currentPeriod = plainToClass(LogbookPeriod, {
|
|
8645
|
-
from: dateRange.start,
|
|
8646
|
-
to: dateRange.end,
|
|
8647
|
-
kilometers: logbooksInRange.getClaimableLogbooks().kilometers,
|
|
8648
|
-
workUsage: logbooksInRange.getWorkUsage(),
|
|
8649
|
-
logbooks: logbooksInRange
|
|
8650
|
-
});
|
|
8651
|
-
// compare with previous best period and overwrite if needs
|
|
8652
|
-
if (!bestPeriod || currentPeriod.workUsage > bestPeriod.workUsage) {
|
|
8653
|
-
bestPeriod = currentPeriod;
|
|
8654
|
-
}
|
|
8655
|
-
else if (currentPeriod.workUsage === bestPeriod.workUsage) {
|
|
8656
|
-
// if work usage is the same then get period with the biggest work usage for work tank
|
|
8657
|
-
const oldWorkUsage = bestPeriod.logbooks.filterBy('tankType', TankTypeEnum.WORK).getWorkUsage();
|
|
8658
|
-
const currentWorkUsage = currentPeriod.logbooks.filterBy('tankType', TankTypeEnum.WORK).getWorkUsage();
|
|
8659
|
-
if (oldWorkUsage < currentWorkUsage) {
|
|
8660
|
-
bestPeriod = currentPeriod;
|
|
8661
|
-
}
|
|
8662
|
-
}
|
|
8663
|
-
}
|
|
8664
|
-
return bestPeriod;
|
|
8665
|
-
}
|
|
8666
8553
|
/**
|
|
8667
8554
|
* Calculate total kilometers traveled
|
|
8668
8555
|
*/
|
|
@@ -8673,8 +8560,13 @@ class VehicleLogbookCollection extends Collection {
|
|
|
8673
8560
|
* Calculate work usage (percent of business-related kilometers from total kilometers)
|
|
8674
8561
|
* @TODO Alex: TT-2089 replace with getter
|
|
8675
8562
|
*/
|
|
8676
|
-
|
|
8677
|
-
|
|
8563
|
+
get workUsage() {
|
|
8564
|
+
if (!this.length) {
|
|
8565
|
+
return 0;
|
|
8566
|
+
}
|
|
8567
|
+
const workKilometers = this.items
|
|
8568
|
+
.filter((logbook) => !logbook.isPersonal)
|
|
8569
|
+
.reduce((sum, logbook) => sum + logbook.kilometers, 0);
|
|
8678
8570
|
return round(workKilometers / this.kilometers * 100, 2);
|
|
8679
8571
|
}
|
|
8680
8572
|
/**
|
|
@@ -8687,6 +8579,123 @@ class VehicleLogbookCollection extends Collection {
|
|
|
8687
8579
|
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
8688
8580
|
: this.filterBy('tankType', TankTypeEnum.WORK);
|
|
8689
8581
|
}
|
|
8582
|
+
/**
|
|
8583
|
+
* get collection of logbooks with the biggest work usage for {@link BestVehicleLogbookCollection.periodDuration}
|
|
8584
|
+
*/
|
|
8585
|
+
getBest() {
|
|
8586
|
+
return BestVehicleLogbookCollection.fromLogbooks(this);
|
|
8587
|
+
}
|
|
8588
|
+
}
|
|
8589
|
+
|
|
8590
|
+
/**
|
|
8591
|
+
* Special logbook collection that contains logbooks from date period with the highest work usage percent
|
|
8592
|
+
* Docs: https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
8593
|
+
*/
|
|
8594
|
+
class BestVehicleLogbookCollection extends VehicleLogbookCollection {
|
|
8595
|
+
/**
|
|
8596
|
+
* constructor is private because we want to prevent collection initialization via 'new' operator.
|
|
8597
|
+
* We should create instances only with fromLogbooks method
|
|
8598
|
+
*/
|
|
8599
|
+
constructor(logbooks) {
|
|
8600
|
+
super([]);
|
|
8601
|
+
if (!this.isBestPeriodExist(logbooks)) {
|
|
8602
|
+
return;
|
|
8603
|
+
}
|
|
8604
|
+
this.calculateBestPeriod(logbooks);
|
|
8605
|
+
}
|
|
8606
|
+
/**
|
|
8607
|
+
* Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
|
|
8608
|
+
*/
|
|
8609
|
+
isBestPeriodExist(logbooks = this) {
|
|
8610
|
+
if (logbooks.length < 2) {
|
|
8611
|
+
return false;
|
|
8612
|
+
}
|
|
8613
|
+
return BestVehicleLogbookCollection.periodDuration < (logbooks.last.date.getTime() - logbooks.first.date.getTime());
|
|
8614
|
+
}
|
|
8615
|
+
getWorkUsageByClaim(claim) {
|
|
8616
|
+
const claimKilometers = this.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
|
|
8617
|
+
return round(this.workUsage * (claimKilometers / this.kilometers), 2);
|
|
8618
|
+
}
|
|
8619
|
+
/**
|
|
8620
|
+
* Set Date Range with the biggest work usage percent
|
|
8621
|
+
* Range duration is defined as BestVehicleLogbookCollection.periodDuration by the ATO
|
|
8622
|
+
*
|
|
8623
|
+
* Algorithm:
|
|
8624
|
+
* Claimable logbooks or claimable trips - work/business logbook items.
|
|
8625
|
+
* We should work with dates from the first to the last trip (include personal trips).
|
|
8626
|
+
* Get date ranges starts on each claimable trip, all other ranges are definetily worst.
|
|
8627
|
+
* Also get extra date range which ends with the last claimable trip.
|
|
8628
|
+
* Get all trips included to each date range.
|
|
8629
|
+
* Find and return range with the biggest workUsage percent.
|
|
8630
|
+
*/
|
|
8631
|
+
calculateBestPeriod(logbooks) {
|
|
8632
|
+
// get a list of date ranges that could potentially be the best
|
|
8633
|
+
const periods = this.getPeriods(logbooks.getClaimableLogbooks());
|
|
8634
|
+
periods.forEach((period) => {
|
|
8635
|
+
const logbooksInPeriod = logbooks.filterByRange('date', period.start.toDate(), period.end.toDate());
|
|
8636
|
+
if (!this.period || (this.workUsage < logbooksInPeriod.workUsage)) {
|
|
8637
|
+
this.period = period;
|
|
8638
|
+
this.items = logbooksInPeriod.toArray();
|
|
8639
|
+
}
|
|
8640
|
+
});
|
|
8641
|
+
}
|
|
8642
|
+
// get list of date ranges for each of passed logbook
|
|
8643
|
+
getPeriods(logbooks) {
|
|
8644
|
+
// get a list of date ranges that could potentially be the best
|
|
8645
|
+
const periods = logbooks
|
|
8646
|
+
// skip logbooks whose range ends after the last logbook
|
|
8647
|
+
.filter((logbook) => this.getPeriodByLogbook(logbook).end.toDate() < logbooks.last.date)
|
|
8648
|
+
.map((logbook) => this.getPeriodByLogbook(logbook));
|
|
8649
|
+
// skip if the last logbook already included to the last existing date range
|
|
8650
|
+
if (last(periods).end.toDate() < logbooks.last.date) {
|
|
8651
|
+
// add extra date range for the last claimable logbook
|
|
8652
|
+
periods.push(this.getPeriodByLogbook(logbooks.last, true));
|
|
8653
|
+
}
|
|
8654
|
+
return periods;
|
|
8655
|
+
}
|
|
8656
|
+
/**
|
|
8657
|
+
* Get claimable date range for passed logbook
|
|
8658
|
+
* @param logbook logbook instance for range calculation
|
|
8659
|
+
* @param isBackward Flag false - range for logbook + duration; flag true - range for logbook - duration. Used for extra case, when we should add an extra date range for the last logbook
|
|
8660
|
+
*/
|
|
8661
|
+
getPeriodByLogbook(logbook, isBackward = false) {
|
|
8662
|
+
if (isBackward) {
|
|
8663
|
+
return new DateRange([new Date(logbook.date.getTime() - BestVehicleLogbookCollection.periodDuration), logbook.date]);
|
|
8664
|
+
}
|
|
8665
|
+
return new DateRange([logbook.date, new Date(logbook.date.getTime() + BestVehicleLogbookCollection.periodDuration)]);
|
|
8666
|
+
}
|
|
8667
|
+
static fromLogbooks(logbooks) {
|
|
8668
|
+
const collection = new BestVehicleLogbookCollection(logbooks);
|
|
8669
|
+
return collection.isBestPeriodExist(logbooks) ? collection : null;
|
|
8670
|
+
}
|
|
8671
|
+
}
|
|
8672
|
+
/**
|
|
8673
|
+
* Logbook claimable period duration in milliseconds.
|
|
8674
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
8675
|
+
*/
|
|
8676
|
+
BestVehicleLogbookCollection.periodDuration = 12 * 7 * 24 * 3600 * 1000;
|
|
8677
|
+
|
|
8678
|
+
class VehicleClaimCollection extends Collection {
|
|
8679
|
+
/**
|
|
8680
|
+
* Get remaining kilometers limit. Total limit ({@link VehicleClaim.totalKmsLimit}) - claimed kilometers from other vehicle claims
|
|
8681
|
+
*/
|
|
8682
|
+
getKmsLimitForClaim(claim) {
|
|
8683
|
+
let collection = this;
|
|
8684
|
+
if (claim) {
|
|
8685
|
+
collection = collection.removeBy('id', claim.id);
|
|
8686
|
+
}
|
|
8687
|
+
return VehicleClaim.totalKmsLimit - collection.sumBy('kilometers');
|
|
8688
|
+
}
|
|
8689
|
+
/**
|
|
8690
|
+
* Get remaining work usage limit. Total limit ({@link VehicleClaim.totalWorkUsagePercent}) - claimed percent from other vehicle claims
|
|
8691
|
+
*/
|
|
8692
|
+
getWorkUsageLimitForClaim(claim) {
|
|
8693
|
+
let collection = this;
|
|
8694
|
+
if (claim) {
|
|
8695
|
+
collection = collection.removeBy('id', claim.id);
|
|
8696
|
+
}
|
|
8697
|
+
return VehicleClaim.totalWorkUsagePercent - collection.sumBy('workUsage');
|
|
8698
|
+
}
|
|
8690
8699
|
}
|
|
8691
8700
|
|
|
8692
8701
|
class AllocationGroupCollection extends Collection {
|
|
@@ -14922,16 +14931,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
14922
14931
|
}]
|
|
14923
14932
|
}] });
|
|
14924
14933
|
|
|
14925
|
-
// @TODO Don't look at the commented code. Will be refactored/removed during TT-1503
|
|
14926
14934
|
/**
|
|
14927
|
-
*
|
|
14928
|
-
* @TODO alex refactor
|
|
14935
|
+
* @TODO move to new rest
|
|
14929
14936
|
*/
|
|
14930
14937
|
class TransactionAllocationService extends RestService {
|
|
14931
14938
|
constructor() {
|
|
14932
14939
|
super(...arguments);
|
|
14933
14940
|
// API URL param for transaction allocations
|
|
14934
|
-
this.url = '
|
|
14941
|
+
this.url = 'transaction-allocations';
|
|
14935
14942
|
this.modelClass = TransactionAllocation;
|
|
14936
14943
|
}
|
|
14937
14944
|
/**
|
|
@@ -15345,7 +15352,6 @@ class VehicleClaimService extends RestService {
|
|
|
15345
15352
|
}
|
|
15346
15353
|
listenEvents() {
|
|
15347
15354
|
this.listenVehicleClaimDetailsChanges();
|
|
15348
|
-
this.listenBestPeriodChanges();
|
|
15349
15355
|
}
|
|
15350
15356
|
add(model) {
|
|
15351
15357
|
return super.add(model).pipe(map((vehicleClaim) => {
|
|
@@ -15369,26 +15375,11 @@ class VehicleClaimService extends RestService {
|
|
|
15369
15375
|
this.refreshCache();
|
|
15370
15376
|
});
|
|
15371
15377
|
}
|
|
15372
|
-
/**
|
|
15373
|
-
* Best period changes affect to claims workUsage
|
|
15374
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
15375
|
-
*/
|
|
15376
|
-
listenBestPeriodChanges() {
|
|
15377
|
-
this.eventDispatcherService.on(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED)
|
|
15378
|
-
.subscribe((bestPeriod) => {
|
|
15379
|
-
// no need to update claims when best period become null
|
|
15380
|
-
// (case when logbook removed and user don't have enough logbooks for claim period)
|
|
15381
|
-
if (!bestPeriod) {
|
|
15382
|
-
return;
|
|
15383
|
-
}
|
|
15384
|
-
this.updateWorkUsage(bestPeriod);
|
|
15385
|
-
});
|
|
15386
|
-
}
|
|
15387
15378
|
/**
|
|
15388
15379
|
* Update workUsage for all vehicle claims if logbook best period changed
|
|
15389
15380
|
* @TODO Vik: Best period move this and related logic to backend
|
|
15390
15381
|
*/
|
|
15391
|
-
updateWorkUsage(
|
|
15382
|
+
updateWorkUsage(bestLogbooks) {
|
|
15392
15383
|
// no need to update if cache not exist
|
|
15393
15384
|
if (!this.cache) {
|
|
15394
15385
|
return;
|
|
@@ -15396,7 +15387,7 @@ class VehicleClaimService extends RestService {
|
|
|
15396
15387
|
// @TODO Vik (TT-2210): need batch endpoint for this update
|
|
15397
15388
|
// @TODO Alex (TT-2210): fix frontend when endpoint ready
|
|
15398
15389
|
const batch$ = this.cache.map((claim) => {
|
|
15399
|
-
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage:
|
|
15390
|
+
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage: bestLogbooks.getWorkUsageByClaim(claim) }));
|
|
15400
15391
|
return this.update(claimToUpdate);
|
|
15401
15392
|
});
|
|
15402
15393
|
combineLatest(batch$).subscribe();
|
|
@@ -15421,10 +15412,6 @@ class VehicleClaimDetailsService {
|
|
|
15421
15412
|
this.eventDispatcherService = eventDispatcherService;
|
|
15422
15413
|
this.cacheSubject = new ReplaySubject(1);
|
|
15423
15414
|
this.url = 'vehicle-claim-details';
|
|
15424
|
-
this.listenEvents();
|
|
15425
|
-
}
|
|
15426
|
-
listenEvents() {
|
|
15427
|
-
this.listenBestPeriodChanges();
|
|
15428
15415
|
}
|
|
15429
15416
|
get() {
|
|
15430
15417
|
if (!this.cache) {
|
|
@@ -15455,19 +15442,6 @@ class VehicleClaimDetailsService {
|
|
|
15455
15442
|
return details;
|
|
15456
15443
|
}));
|
|
15457
15444
|
}
|
|
15458
|
-
/**
|
|
15459
|
-
* Listen logbook best period updates
|
|
15460
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
15461
|
-
*/
|
|
15462
|
-
listenBestPeriodChanges() {
|
|
15463
|
-
this.eventDispatcherService.on(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED)
|
|
15464
|
-
.subscribe((bestPeriod) => {
|
|
15465
|
-
// Set details as manual if best period stop exist (removed logbook case)
|
|
15466
|
-
if (!bestPeriod) {
|
|
15467
|
-
this.updateToManual();
|
|
15468
|
-
}
|
|
15469
|
-
});
|
|
15470
|
-
}
|
|
15471
15445
|
/**
|
|
15472
15446
|
* Set vehicle claim details as manual
|
|
15473
15447
|
* @TODO Vik: Best period move this and related logic to backend
|
|
@@ -19302,68 +19276,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
19302
19276
|
}]
|
|
19303
19277
|
}] });
|
|
19304
19278
|
|
|
19305
|
-
/**
|
|
19306
|
-
* Service for logbook best period calculation
|
|
19307
|
-
* @TODO Vik: improve structure for such cases (TT-2043)
|
|
19308
|
-
* @TODO Vik: Best period move this and related logic to backend
|
|
19309
|
-
*/
|
|
19310
|
-
class LogbookBestPeriodService {
|
|
19311
|
-
constructor(vehicleClaimDetailsService, vehicleClaimService, vehicleLogbookService, eventDispatcherService) {
|
|
19312
|
-
this.vehicleClaimDetailsService = vehicleClaimDetailsService;
|
|
19313
|
-
this.vehicleClaimService = vehicleClaimService;
|
|
19314
|
-
this.vehicleLogbookService = vehicleLogbookService;
|
|
19315
|
-
this.eventDispatcherService = eventDispatcherService;
|
|
19316
|
-
this.cacheSubject = new ReplaySubject();
|
|
19317
|
-
this.listenEvents();
|
|
19318
|
-
}
|
|
19319
|
-
listenEvents() {
|
|
19320
|
-
this.listenCacheUpdates();
|
|
19321
|
-
}
|
|
19322
|
-
get() {
|
|
19323
|
-
if (!this.cache) {
|
|
19324
|
-
combineLatest([
|
|
19325
|
-
this.vehicleClaimDetailsService.get(),
|
|
19326
|
-
this.vehicleLogbookService.get()
|
|
19327
|
-
])
|
|
19328
|
-
.subscribe(([details, logbooks]) => {
|
|
19329
|
-
let period;
|
|
19330
|
-
// calculate current initial best period
|
|
19331
|
-
if ((details === null || details === void 0 ? void 0 : details.isManual) || !(details === null || details === void 0 ? void 0 : details.isLogbookMethod()) || !logbooks.isBestPeriodExist()) {
|
|
19332
|
-
period = null;
|
|
19333
|
-
}
|
|
19334
|
-
else {
|
|
19335
|
-
period = logbooks.getBestPeriod();
|
|
19336
|
-
}
|
|
19337
|
-
// update cache only when best period changed
|
|
19338
|
-
if (!isEqual(this.cache, period)) {
|
|
19339
|
-
this.cache = period;
|
|
19340
|
-
this.cacheSubject.next(this.cache);
|
|
19341
|
-
}
|
|
19342
|
-
});
|
|
19343
|
-
}
|
|
19344
|
-
return this.cacheSubject.asObservable();
|
|
19345
|
-
}
|
|
19346
|
-
/**
|
|
19347
|
-
* Dispatch event when logbook best period changed
|
|
19348
|
-
*/
|
|
19349
|
-
listenCacheUpdates() {
|
|
19350
|
-
// Skip initial calculation and fire event only when subject changed
|
|
19351
|
-
this.cacheSubject
|
|
19352
|
-
.pipe(skip(1))
|
|
19353
|
-
.subscribe((period) => {
|
|
19354
|
-
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED, period));
|
|
19355
|
-
});
|
|
19356
|
-
}
|
|
19357
|
-
}
|
|
19358
|
-
LogbookBestPeriodService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: LogbookBestPeriodService, deps: [{ token: VehicleClaimDetailsService }, { token: VehicleClaimService }, { token: VehicleLogbookService }, { token: EventDispatcherService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19359
|
-
LogbookBestPeriodService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: LogbookBestPeriodService, providedIn: 'root' });
|
|
19360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: LogbookBestPeriodService, decorators: [{
|
|
19361
|
-
type: Injectable,
|
|
19362
|
-
args: [{
|
|
19363
|
-
providedIn: 'root'
|
|
19364
|
-
}]
|
|
19365
|
-
}], ctorParameters: function () { return [{ type: VehicleClaimDetailsService }, { type: VehicleClaimService }, { type: VehicleLogbookService }, { type: EventDispatcherService }]; } });
|
|
19366
|
-
|
|
19367
19279
|
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
19368
19280
|
/**
|
|
19369
19281
|
* Service to work with XLSX (generate, download, e.t.c.)
|
|
@@ -23870,5 +23782,5 @@ var MessagesEnum;
|
|
|
23870
23782
|
* Generated bundle index. Do not edit.
|
|
23871
23783
|
*/
|
|
23872
23784
|
|
|
23873
|
-
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressForm, AddressService, AddressTypeEnum, AllocationGroup, AllocationGroupCollection, AllocationRule, AllocationRuleCollection, AllocationRuleConditionComparisonOperatorEnum, AllocationRuleConditionFieldEnum, AllocationRuleConditionOperatorEnum, AllocationRuleForm, AllocationRuleService, AllocationRuleTransaction, AllocationRuleTransactionMetaField, AllocationRuleTypeEnum, AlphabetColorsEnum, AnnualClientDetails, AnnualClientDetailsForm, AnnualClientDetailsService, AnnualFrequencyEnum, AppCurrencyPipe, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetSale, AssetSaleCollection, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionMessagesEnum, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankPopularEnum, BankProviderEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsInvoiceExpenseEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsSalaryIncludedListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteMessages, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationForm, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpRateEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderForm, DocumentFolderMessagesEnum, DocumentFolderService, DocumentForm, DocumentMessagesEnum, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, JsPdf, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, MixpanelService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessDetails, MyTaxBusinessDetailsForm, MyTaxBusinessIncome, MyTaxBusinessIncomeForm, MyTaxBusinessIncomeOrLossesForm, MyTaxBusinessLosses, MyTaxBusinessLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfFromTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestService$1 as RestService, RewardfulService, SERVICE_PRODUCT_ROLES, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessLossesCollection, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseForm, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookMessages, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleMessagesEnum, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, taxReviewFilterPredicate, toArray };
|
|
23785
|
+
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressForm, AddressService, AddressTypeEnum, AllocationGroup, AllocationGroupCollection, AllocationRule, AllocationRuleCollection, AllocationRuleConditionComparisonOperatorEnum, AllocationRuleConditionFieldEnum, AllocationRuleConditionOperatorEnum, AllocationRuleForm, AllocationRuleService, AllocationRuleTransaction, AllocationRuleTransactionMetaField, AllocationRuleTypeEnum, AlphabetColorsEnum, AnnualClientDetails, AnnualClientDetailsForm, AnnualClientDetailsService, AnnualFrequencyEnum, AppCurrencyPipe, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetSale, AssetSaleCollection, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionMessagesEnum, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankPopularEnum, BankProviderEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BestVehicleLogbookCollection, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsInvoiceExpenseEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsSalaryIncludedListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteMessages, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationForm, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpRateEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderForm, DocumentFolderMessagesEnum, DocumentFolderService, DocumentForm, DocumentMessagesEnum, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, JsPdf, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, MixpanelService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessDetails, MyTaxBusinessDetailsForm, MyTaxBusinessIncome, MyTaxBusinessIncomeForm, MyTaxBusinessIncomeOrLossesForm, MyTaxBusinessLosses, MyTaxBusinessLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfFromTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestService$1 as RestService, RewardfulService, SERVICE_PRODUCT_ROLES, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessLossesCollection, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseForm, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookMessages, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleMessagesEnum, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, taxReviewFilterPredicate, toArray };
|
|
23874
23786
|
//# sourceMappingURL=taxtank-core.mjs.map
|