taxtank-core 0.33.47 → 0.33.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/esm2022/src/lib/collections/home-office/home-office-claim.collection.mjs +7 -0
  2. package/esm2022/src/lib/collections/home-office/index.mjs +2 -0
  3. package/esm2022/src/lib/collections/index.mjs +2 -1
  4. package/esm2022/src/lib/collections/vehicle/best-vehicle-logbook.collection.mjs +6 -2
  5. package/esm2022/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.mjs +10 -1
  6. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.mjs +6 -1
  7. package/esm2022/src/lib/db/Enums/chart-accounts/index.mjs +1 -2
  8. package/esm2022/src/lib/forms/abstract.form.mjs +3 -3
  9. package/esm2022/src/lib/forms/home-office/home-office-calculator.form.mjs +29 -0
  10. package/esm2022/src/lib/forms/home-office/home-office-claim.form.mjs +4 -8
  11. package/esm2022/src/lib/forms/home-office/home-office-log.form.mjs +2 -2
  12. package/esm2022/src/lib/forms/home-office/index.mjs +2 -1
  13. package/esm2022/src/lib/forms/transaction/work/work-expense.form.mjs +15 -2
  14. package/esm2022/src/lib/models/bank/bank-transaction-chart-data.mjs +2 -3
  15. package/esm2022/src/lib/models/chart-accounts/chart-accounts.mjs +21 -2
  16. package/esm2022/src/lib/models/dictionary/dictionary.mjs +3 -2
  17. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +5 -1
  18. package/esm2022/src/lib/models/home-office/home-office-claim.interface.mjs +1 -1
  19. package/esm2022/src/lib/models/home-office/home-office-claim.mjs +31 -11
  20. package/esm2022/src/lib/models/home-office/home-office-log.mjs +4 -3
  21. package/esm2022/src/lib/models/transaction/transaction.mjs +5 -2
  22. package/esm2022/src/lib/services/data.service.mjs +2 -2
  23. package/esm2022/src/lib/services/http/home-office/home-office-claim.service.mjs +4 -4
  24. package/esm2022/src/lib/services/http/home-office/home-office-log.service.mjs +3 -3
  25. package/esm2022/src/lib/services/http/rest/rest-old.service.mjs +8 -1
  26. package/esm2022/src/lib/services/http/rest/rest.service.mjs +24 -5
  27. package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +8 -2
  28. package/esm2022/src/lib/validators/current-fin-year.validator.mjs +3 -2
  29. package/fesm2022/taxtank-core.mjs +166 -47
  30. package/fesm2022/taxtank-core.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/src/lib/collections/home-office/home-office-claim.collection.d.ts +5 -0
  33. package/src/lib/collections/home-office/index.d.ts +1 -0
  34. package/src/lib/collections/index.d.ts +1 -0
  35. package/src/lib/collections/vehicle/best-vehicle-logbook.collection.d.ts +1 -0
  36. package/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.d.ts +10 -1
  37. package/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.d.ts +6 -1
  38. package/src/lib/db/Enums/chart-accounts/index.d.ts +0 -1
  39. package/src/lib/forms/abstract.form.d.ts +1 -1
  40. package/src/lib/forms/home-office/home-office-calculator.form.d.ts +8 -0
  41. package/src/lib/forms/home-office/home-office-log.form.d.ts +1 -1
  42. package/src/lib/forms/home-office/index.d.ts +1 -0
  43. package/src/lib/forms/transaction/work/work-expense.form.d.ts +4 -2
  44. package/src/lib/models/bank/bank-transaction-chart-data.d.ts +2 -2
  45. package/src/lib/models/chart-accounts/chart-accounts.d.ts +2 -0
  46. package/src/lib/models/dictionary/dictionary.d.ts +2 -2
  47. package/src/lib/models/home-office/home-office-claim.d.ts +9 -5
  48. package/src/lib/models/home-office/home-office-claim.interface.d.ts +7 -3
  49. package/src/lib/models/home-office/home-office-log.d.ts +3 -2
  50. package/src/lib/models/transaction/transaction.d.ts +2 -1
  51. package/src/lib/services/http/home-office/home-office-claim.service.d.ts +4 -4
  52. package/src/lib/services/http/home-office/home-office-log.service.d.ts +3 -3
  53. package/src/lib/services/http/rest/rest-old.service.d.ts +4 -0
  54. package/src/lib/services/http/rest/rest.service.d.ts +1 -0
  55. package/src/lib/services/http/transaction/transaction.service.d.ts +1 -0
  56. package/esm2022/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.mjs +0 -18
  57. package/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.d.ts +0 -16
@@ -4,8 +4,8 @@ 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, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
7
- import { map, mergeMap, filter, first as first$1, catchError, finalize, debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators';
8
- import { ReplaySubject, Subject, Observable, throwError, combineLatest, BehaviorSubject, forkJoin, of, from, merge as merge$1 } from 'rxjs';
7
+ import { map, mergeMap, filter, catchError, first as first$1, finalize, debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators';
8
+ import { ReplaySubject, Subject, Observable, of, throwError, combineLatest, BehaviorSubject, forkJoin, from, merge as merge$1 } from 'rxjs';
9
9
  import { plainToClass, Type, Transform, Exclude, Expose, classToPlain } from 'class-transformer';
10
10
  import { __decorate } from 'tslib';
11
11
  import get from 'lodash/get';
@@ -1032,6 +1032,11 @@ var ChartAccountsListEnum;
1032
1032
  ChartAccountsListEnum[ChartAccountsListEnum["PLATFORM_FEES"] = 857] = "PLATFORM_FEES";
1033
1033
  ChartAccountsListEnum[ChartAccountsListEnum["AUSTRALIAN_GOVERNMENT_SPECIAL_PAYMENTS"] = 871] = "AUSTRALIAN_GOVERNMENT_SPECIAL_PAYMENTS";
1034
1034
  ChartAccountsListEnum[ChartAccountsListEnum["FHSS"] = 872] = "FHSS";
1035
+ ChartAccountsListEnum[ChartAccountsListEnum["MOBILE_PHONE"] = 90] = "MOBILE_PHONE";
1036
+ ChartAccountsListEnum[ChartAccountsListEnum["INTERNET"] = 94] = "INTERNET";
1037
+ ChartAccountsListEnum[ChartAccountsListEnum["ELECTRICITY_AND_GAS"] = 234] = "ELECTRICITY_AND_GAS";
1038
+ ChartAccountsListEnum[ChartAccountsListEnum["TELEPHONE"] = 255] = "TELEPHONE";
1039
+ ChartAccountsListEnum[ChartAccountsListEnum["HOME_OFFICE_CLEANING"] = 11861] = "HOME_OFFICE_CLEANING";
1035
1040
  })(ChartAccountsListEnum || (ChartAccountsListEnum = {}));
1036
1041
 
1037
1042
  var BusinessChartAccountsEnum;
@@ -1071,6 +1076,15 @@ var BusinessChartAccountsEnum;
1071
1076
  BusinessChartAccountsEnum[BusinessChartAccountsEnum["PAYG_INSTALLMENTS"] = 878] = "PAYG_INSTALLMENTS";
1072
1077
  BusinessChartAccountsEnum[BusinessChartAccountsEnum["INTEREST_EARNED"] = 879] = "INTEREST_EARNED";
1073
1078
  BusinessChartAccountsEnum[BusinessChartAccountsEnum["HOME_OFFICE_HOURS"] = 888] = "HOME_OFFICE_HOURS";
1079
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["ELECTRICITY_AND_GAS"] = 892] = "ELECTRICITY_AND_GAS";
1080
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["HOME_OFFICE_CLEANING"] = 893] = "HOME_OFFICE_CLEANING";
1081
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["INTERNET"] = 705] = "INTERNET";
1082
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["TELEPHONE"] = 11860] = "TELEPHONE";
1083
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["MOBILE_PHONE"] = 719] = "MOBILE_PHONE";
1084
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["HOME_OFFICE_RENT"] = 889] = "HOME_OFFICE_RENT";
1085
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["HOME_OFFICE_LOAN"] = 890] = "HOME_OFFICE_LOAN";
1086
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["HOME_OFFICE_RATES"] = 891] = "HOME_OFFICE_RATES";
1087
+ BusinessChartAccountsEnum[BusinessChartAccountsEnum["HOME_OFFICE_OTHER"] = 894] = "HOME_OFFICE_OTHER";
1074
1088
  })(BusinessChartAccountsEnum || (BusinessChartAccountsEnum = {}));
1075
1089
 
1076
1090
  var ChartAccountsMetaFieldListEnum;
@@ -1208,24 +1222,6 @@ var ChartAccountsPropertyAdjustmentsListEnum;
1208
1222
  ChartAccountsPropertyAdjustmentsListEnum[ChartAccountsPropertyAdjustmentsListEnum["LANDLORD_REIMBURSEMENT"] = 908] = "LANDLORD_REIMBURSEMENT";
1209
1223
  })(ChartAccountsPropertyAdjustmentsListEnum || (ChartAccountsPropertyAdjustmentsListEnum = {}));
1210
1224
 
1211
- var HomeOfficeChartAccountsEnum;
1212
- (function (HomeOfficeChartAccountsEnum) {
1213
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["MOBILE_PHONE"] = 90] = "MOBILE_PHONE";
1214
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["INTERNET"] = 94] = "INTERNET";
1215
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["ELECTRICITY_AND_GAS"] = 234] = "ELECTRICITY_AND_GAS";
1216
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["TELEPHONE"] = 255] = "TELEPHONE";
1217
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["HOME_OFFICE_CLEANING"] = 11861] = "HOME_OFFICE_CLEANING";
1218
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["BUSINESS_ELECTRICITY_AND_GAS"] = 892] = "BUSINESS_ELECTRICITY_AND_GAS";
1219
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["BUSINESS_HOME_OFFICE_CLEANING"] = 893] = "BUSINESS_HOME_OFFICE_CLEANING";
1220
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["BUSINESS_INTERNET"] = 705] = "BUSINESS_INTERNET";
1221
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["BUSINESS_TELEPHONE"] = 11860] = "BUSINESS_TELEPHONE";
1222
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["BUSINESS_MOBILE_PHONE"] = 719] = "BUSINESS_MOBILE_PHONE";
1223
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["HOME_OFFICE_RENT"] = 889] = "HOME_OFFICE_RENT";
1224
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["HOME_OFFICE_LOAN"] = 890] = "HOME_OFFICE_LOAN";
1225
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["HOME_OFFICE_RATES"] = 891] = "HOME_OFFICE_RATES";
1226
- HomeOfficeChartAccountsEnum[HomeOfficeChartAccountsEnum["HOME_OFFICE_OTHER"] = 894] = "HOME_OFFICE_OTHER";
1227
- })(HomeOfficeChartAccountsEnum || (HomeOfficeChartAccountsEnum = {}));
1228
-
1229
1225
  var DocumentTypeEnum;
1230
1226
  (function (DocumentTypeEnum) {
1231
1227
  DocumentTypeEnum[DocumentTypeEnum["INVOICE"] = 1] = "INVOICE";
@@ -3277,6 +3273,22 @@ class ChartAccounts extends ChartAccounts$1 {
3277
3273
  BusinessChartAccountsEnum.HOME_OFFICE_HOURS,
3278
3274
  BusinessChartAccountsEnum.KMS_TRAVELLED,
3279
3275
  ]; }
3276
+ static { this.homeOfficeList = [
3277
+ ChartAccountsListEnum.MOBILE_PHONE,
3278
+ ChartAccountsListEnum.INTERNET,
3279
+ ChartAccountsListEnum.ELECTRICITY_AND_GAS,
3280
+ ChartAccountsListEnum.TELEPHONE,
3281
+ ChartAccountsListEnum.HOME_OFFICE_CLEANING,
3282
+ BusinessChartAccountsEnum.ELECTRICITY_AND_GAS,
3283
+ BusinessChartAccountsEnum.HOME_OFFICE_CLEANING,
3284
+ BusinessChartAccountsEnum.INTERNET,
3285
+ BusinessChartAccountsEnum.TELEPHONE,
3286
+ BusinessChartAccountsEnum.MOBILE_PHONE,
3287
+ BusinessChartAccountsEnum.HOME_OFFICE_RENT,
3288
+ BusinessChartAccountsEnum.HOME_OFFICE_LOAN,
3289
+ BusinessChartAccountsEnum.HOME_OFFICE_RATES,
3290
+ BusinessChartAccountsEnum.HOME_OFFICE_OTHER,
3291
+ ]; }
3280
3292
  /**
3281
3293
  * Return name as string
3282
3294
  */
@@ -3481,6 +3493,9 @@ class ChartAccounts extends ChartAccounts$1 {
3481
3493
  isDividends() {
3482
3494
  return this.id === ChartAccountsListEnum.DIVIDENDS;
3483
3495
  }
3496
+ isHomeOfficeExpense() {
3497
+ return ChartAccounts.homeOfficeList.includes(this.id);
3498
+ }
3484
3499
  isHomeOfficeWorkHours() {
3485
3500
  return this.id === ChartAccountsListEnum.HOME_OFFICE_HOURS;
3486
3501
  }
@@ -6471,6 +6486,9 @@ __decorate([
6471
6486
  __decorate([
6472
6487
  Type(() => SoleInvoiceItem)
6473
6488
  ], Transaction.prototype, "invoiceItem", void 0);
6489
+ __decorate([
6490
+ Type(() => SoleBusiness)
6491
+ ], Transaction.prototype, "business", void 0);
6474
6492
  __decorate([
6475
6493
  Transform(({ value }) => +value)
6476
6494
  ], Transaction.prototype, "tax", void 0);
@@ -8713,9 +8731,10 @@ class BestVehicleLogbookCollection extends VehicleLogbookCollection {
8713
8731
  }
8714
8732
  /**
8715
8733
  * Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
8734
+ * and has at least one work/business trip
8716
8735
  */
8717
8736
  static isBestPeriodExist(logbooks) {
8718
- if (logbooks.length < 2) {
8737
+ if (logbooks.length < 2 || !logbooks.getClaimable().length) {
8719
8738
  return false;
8720
8739
  }
8721
8740
  if (!(logbooks instanceof VehicleLogbookCollection)) {
@@ -8726,6 +8745,9 @@ class BestVehicleLogbookCollection extends VehicleLogbookCollection {
8726
8745
  // get list of date ranges for each of passed logbook
8727
8746
  static getPeriods(logbooks) {
8728
8747
  const claimable = logbooks.getClaimable();
8748
+ if (!claimable.length) {
8749
+ return [];
8750
+ }
8729
8751
  // get a list of date ranges that could potentially be the best
8730
8752
  const periods = claimable
8731
8753
  // skip logbooks whose range ends after the last logbook
@@ -9549,6 +9571,12 @@ class ChartAccountsValueCollection extends Collection {
9549
9571
  }
9550
9572
  }
9551
9573
 
9574
+ class HomeOfficeClaimCollection extends Collection {
9575
+ findByBusiness(business) {
9576
+ return business ? this.findBy('business.id', business.id) : this.findBy('business', null);
9577
+ }
9578
+ }
9579
+
9552
9580
  // @TODO Alex move here all collections
9553
9581
 
9554
9582
  class Loan extends Loan$1 {
@@ -10218,7 +10246,7 @@ __decorate([
10218
10246
  * List of objects grouped by passed property
10219
10247
  */
10220
10248
  class Dictionary {
10221
- constructor(items, path = 'id') {
10249
+ constructor(items = [], path = 'id') {
10222
10250
  this.items = {};
10223
10251
  if (!items.length) {
10224
10252
  return;
@@ -10227,6 +10255,7 @@ class Dictionary {
10227
10255
  }
10228
10256
  add(key, value) {
10229
10257
  this.items[key] = value;
10258
+ return this;
10230
10259
  }
10231
10260
  get(key) {
10232
10261
  return this.items[key] !== undefined ? this.items[key] : null;
@@ -10700,15 +10729,35 @@ __decorate([
10700
10729
  ], TaxReturn.prototype, "taxReturnItems", void 0);
10701
10730
 
10702
10731
  class HomeOfficeClaim extends ObservableModel {
10732
+ constructor() {
10733
+ super(...arguments);
10734
+ this.electricityAndGas = 0;
10735
+ this.cleaning = 0;
10736
+ this.internet = 0;
10737
+ this.telephone = 0;
10738
+ this.mobile = 0;
10739
+ this.occupancyPercent = 0;
10740
+ this.dedicatedOffice = true;
10741
+ }
10703
10742
  static { this.className = 'HomeOfficeClaim'; }
10704
- getExpenses(transactions) {
10705
- return transactions.filter(transaction => {
10706
- let result = this.business ? transaction.business?.id === this.business.id : transaction.tankType === TankTypeEnum.WORK;
10707
- if (result) {
10708
- result = Object.values(HomeOfficeChartAccountsEnum).includes(transaction.chartAccounts.id);
10709
- }
10710
- return result;
10711
- }).claimAmount;
10743
+ getChartAccountsList() {
10744
+ return this.business ? BusinessChartAccountsEnum : ChartAccountsListEnum;
10745
+ }
10746
+ getChartAccountsClaims() {
10747
+ const claims = new Dictionary([]);
10748
+ const list = this.getChartAccountsList();
10749
+ claims.add(list.ELECTRICITY_AND_GAS, this.electricityAndGas)
10750
+ .add(list.HOME_OFFICE_CLEANING, this.cleaning)
10751
+ .add(list.INTERNET, this.internet)
10752
+ .add(list.TELEPHONE, this.telephone)
10753
+ .add(list.MOBILE_PHONE, this.mobile);
10754
+ if (this.method === HomeOfficeClaimMethodEnum.OCCUPANCY) {
10755
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_RENT, this.occupancyPercent);
10756
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_LOAN, this.occupancyPercent);
10757
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_RATES, this.occupancyPercent);
10758
+ claims.add(BusinessChartAccountsEnum.HOME_OFFICE_OTHER, this.occupancyPercent);
10759
+ }
10760
+ return claims;
10712
10761
  }
10713
10762
  }
10714
10763
  __decorate([
@@ -10718,7 +10767,8 @@ __decorate([
10718
10767
  Type(() => SoleBusiness)
10719
10768
  ], HomeOfficeClaim.prototype, "business", void 0);
10720
10769
 
10721
- class HomeOfficeLog extends AbstractModel {
10770
+ class HomeOfficeLog extends ObservableModel {
10771
+ static { this.className = 'HomeOfficeLog'; }
10722
10772
  }
10723
10773
  __decorate([
10724
10774
  Type(() => HomeOfficeClaim)
@@ -11044,7 +11094,7 @@ class DataService {
11044
11094
  * never return cache directly to prevent update
11045
11095
  */
11046
11096
  getCacheFirst() {
11047
- return clone(this.cache?.first);
11097
+ return this.getCache()?.first;
11048
11098
  }
11049
11099
  /**
11050
11100
  * @TODO vik any[] because of problems with base models extending abstractModel
@@ -11134,6 +11184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
11134
11184
  }] });
11135
11185
 
11136
11186
  /**
11187
+ * @TODO refactor to behavior subject?
11137
11188
  * Abstract base service that implements common services functionality
11138
11189
  * and describe abstract methods/properties that have to be implemented in child services
11139
11190
  * Model - entity service is working with
@@ -11185,7 +11236,7 @@ let RestService$1 = class RestService extends DataService {
11185
11236
  * perform a shallow copy of the emitted data to make it immutable
11186
11237
  */
11187
11238
  getCacheSubjectObservable() {
11188
- return this.cacheSubject.asObservable().pipe(map((cache) => clone(cache)));
11239
+ return this.cacheSubject.asObservable().pipe(map((cache) => cloneDeep$1(cache)));
11189
11240
  }
11190
11241
  /**
11191
11242
  * Get data from backend and fill the cache
@@ -11202,6 +11253,9 @@ let RestService$1 = class RestService extends DataService {
11202
11253
  .pipe(map((response) => Array.isArray(response) ? response : toArray(response)), map((response) => {
11203
11254
  this.setCache(response, true);
11204
11255
  return this.cache;
11256
+ }), catchError(() => {
11257
+ this.toastService.error('An error occurred while fetching data');
11258
+ return of(this.cache);
11205
11259
  }));
11206
11260
  }
11207
11261
  get(path = this.apiUrl) {
@@ -11238,6 +11292,9 @@ let RestService$1 = class RestService extends DataService {
11238
11292
  this.handleResponse([result], 'post');
11239
11293
  }
11240
11294
  return result;
11295
+ }), catchError(() => {
11296
+ this.toastService.error('An error occurred while posting data');
11297
+ return of(null);
11241
11298
  }));
11242
11299
  }
11243
11300
  /**
@@ -11252,6 +11309,9 @@ let RestService$1 = class RestService extends DataService {
11252
11309
  this.handleResponse(result, 'post');
11253
11310
  }
11254
11311
  return result;
11312
+ }), catchError(() => {
11313
+ this.toastService.error('An error occurred while posting data');
11314
+ return of([]);
11255
11315
  }));
11256
11316
  }
11257
11317
  /**
@@ -11266,6 +11326,9 @@ let RestService$1 = class RestService extends DataService {
11266
11326
  this.handleResponse([result], 'put');
11267
11327
  }
11268
11328
  return result;
11329
+ }), catchError(() => {
11330
+ this.toastService.error('An error occurred while put data');
11331
+ return of(null);
11269
11332
  }));
11270
11333
  }
11271
11334
  /**
@@ -11292,6 +11355,9 @@ let RestService$1 = class RestService extends DataService {
11292
11355
  if (!this.mercureTopic) {
11293
11356
  this.handleResponse([model], 'delete');
11294
11357
  }
11358
+ }), catchError(() => {
11359
+ this.toastService.error('An error occurred while deleting data');
11360
+ return of(null);
11295
11361
  }));
11296
11362
  }
11297
11363
  /**
@@ -11304,6 +11370,9 @@ let RestService$1 = class RestService extends DataService {
11304
11370
  if (!this.mercureTopic) {
11305
11371
  this.handleResponse(models, 'delete');
11306
11372
  }
11373
+ }), catchError(() => {
11374
+ this.toastService.error('An error occurred while deleting data');
11375
+ return of(null);
11307
11376
  }));
11308
11377
  }
11309
11378
  /**
@@ -13206,6 +13275,12 @@ class RestService {
13206
13275
  createModelInstance(model) {
13207
13276
  return plainToClass(this.modelClass, model);
13208
13277
  }
13278
+ /**
13279
+ * never return cache directly to prevent update
13280
+ */
13281
+ getCache() {
13282
+ return clone(this.cache);
13283
+ }
13209
13284
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RestService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
13210
13285
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RestService, providedIn: 'root' }); }
13211
13286
  }
@@ -15324,6 +15399,7 @@ class TransactionService extends RestService {
15324
15399
  this.listenDepreciationChange();
15325
15400
  this.listenVehicleClaimChanges();
15326
15401
  this.listenHomeOfficeClaim();
15402
+ this.listenHomeOfficeLog();
15327
15403
  this.listenPropertyForecastUpdate();
15328
15404
  this.listenNotifications();
15329
15405
  }
@@ -15513,6 +15589,11 @@ class TransactionService extends RestService {
15513
15589
  this.refreshCache();
15514
15590
  });
15515
15591
  }
15592
+ listenHomeOfficeLog() {
15593
+ this.eventDispatcherService.on2(...HomeOfficeLog.getEventNames('post', 'put', 'delete')).subscribe(() => {
15594
+ this.refreshCache();
15595
+ });
15596
+ }
15516
15597
  /**
15517
15598
  * property forecast includes claimPercent which affects property related expenses
15518
15599
  * @TODO Alex move to forecast api instead of property
@@ -16358,7 +16439,7 @@ class HomeOfficeClaimService extends RestService$1 {
16358
16439
  super(...arguments);
16359
16440
  this.endpointUri = 'home-office-claims';
16360
16441
  this.modelClass = HomeOfficeClaim;
16361
- this.collectionClass = (Collection);
16442
+ this.collectionClass = HomeOfficeClaimCollection;
16362
16443
  this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
16363
16444
  }
16364
16445
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeClaimService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -16383,7 +16464,7 @@ class HomeOfficeLogService extends RestService$1 {
16383
16464
  constructor() {
16384
16465
  super(...arguments);
16385
16466
  this.endpointUri = 'home-office-logs';
16386
- this.modelClass = HomeOfficeClaim;
16467
+ this.modelClass = HomeOfficeLog;
16387
16468
  this.collectionClass = (Collection);
16388
16469
  this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
16389
16470
  }
@@ -19946,6 +20027,10 @@ const ENDPOINTS = {
19946
20027
  HOME_OFFICE_CLAIM_GET: new Endpoint('GET', '\\/home-office-claims'),
19947
20028
  HOME_OFFICE_CLAIM_POST: new Endpoint('POST', '\\/home-office-claims'),
19948
20029
  HOME_OFFICE_CLAIM_PUT: new Endpoint('PUT', '\\/home-office-claims\\/\\d+'),
20030
+ HOME_OFFICE_LOG_GET: new Endpoint('GET', '\\/home-office-logs'),
20031
+ HOME_OFFICE_LOG_POST: new Endpoint('POST', '\\/home-office-logs'),
20032
+ HOME_OFFICE_LOG_PUT: new Endpoint('PUT', '\\/home-office-logs\\/\\d+'),
20033
+ HOME_OFFICE_LOG_DELETE: new Endpoint('DELETE', '\\/home-office-logs\\/\\d+'),
19949
20034
  VEHICLE_LOGBOOKS_GET: new Endpoint('GET', '\\/vehicles\\/logbooks'),
19950
20035
  VEHICLE_LOGBOOKS_POST: new Endpoint('POST', '\\/vehicles\\/logbooks'),
19951
20036
  VEHICLE_LOGBOOKS_PUT: new Endpoint('PUT', '\\/vehicles\\/logbooks\\/\\d+'),
@@ -20647,8 +20732,8 @@ class AbstractForm extends FormGroup {
20647
20732
  get currentValue() {
20648
20733
  return this.createModelInstance(Object.assign({}, this.model, this.getRawValue()));
20649
20734
  }
20650
- toggleEnabledState() {
20651
- this.enabled ? this.disable() : this.enable();
20735
+ toggleEnabledState(control) {
20736
+ control.enabled ? control.disable() : control.enable();
20652
20737
  }
20653
20738
  /**
20654
20739
  * Check validation and return a new instance of generic model.
@@ -21280,7 +21365,8 @@ function fieldsSumValidator(field, summary = 100, fieldAlias) {
21280
21365
  function currentFinYearValidator() {
21281
21366
  const currentFinYear = new FinancialYear();
21282
21367
  return (control) => {
21283
- if (!control.value || control.value >= currentFinYear.startDate && control.value <= currentFinYear.endDate) {
21368
+ const date = new Date(control.value);
21369
+ if (!control.value || date >= currentFinYear.startDate && date <= currentFinYear.endDate) {
21284
21370
  return null;
21285
21371
  }
21286
21372
  return { notCurrentFinYear: true };
@@ -24053,8 +24139,9 @@ class WorkIncomeForm extends WorkTransactionForm {
24053
24139
  }
24054
24140
 
24055
24141
  class WorkExpenseForm extends WorkTransactionForm {
24056
- constructor(transaction, registeredForGst, allocations, controls = {}) {
24142
+ constructor(transaction, registeredForGst, allocations, homeOfficeClaim, controls = {}) {
24057
24143
  super(transaction, registeredForGst, allocations, controls);
24144
+ this.homeOfficeClaim = homeOfficeClaim;
24058
24145
  // amount set automatically for chartAccounts with hours meta field
24059
24146
  if (transaction.getMetaFieldValue(ChartAccountsMetaFieldListEnum.HOURS)) {
24060
24147
  this.get('amount').disable();
@@ -24063,6 +24150,7 @@ class WorkExpenseForm extends WorkTransactionForm {
24063
24150
  }
24064
24151
  listenEvents() {
24065
24152
  this.watchChartAccountsMetaFields();
24153
+ this.watchChartAccounts();
24066
24154
  }
24067
24155
  watchChartAccountsMetaFields() {
24068
24156
  this.get('metaFields').valueChanges.subscribe((metaFields) => {
@@ -24080,6 +24168,17 @@ class WorkExpenseForm extends WorkTransactionForm {
24080
24168
  this.get('amountWithGST').setValue(amount);
24081
24169
  });
24082
24170
  }
24171
+ watchChartAccounts() {
24172
+ super.watchChartAccounts();
24173
+ this.get('chartAccounts').valueChanges.subscribe((chartAccounts) => {
24174
+ if (!chartAccounts.isHomeOfficeExpense() || !this.homeOfficeClaim) {
24175
+ return;
24176
+ }
24177
+ const claims = this.homeOfficeClaim.getChartAccountsClaims();
24178
+ this.get('claimPercent').patchValue(claims.get(chartAccounts.id));
24179
+ this.get('claimPercent').disable();
24180
+ });
24181
+ }
24083
24182
  }
24084
24183
 
24085
24184
  class HoldingIncomeForm extends WorkTransactionForm {
@@ -24502,13 +24601,12 @@ class HomeOfficeClaimForm extends AbstractForm {
24502
24601
  constructor(claim = plainToClass(HomeOfficeClaim, {})) {
24503
24602
  super({
24504
24603
  method: new FormControl(claim.method, Validators.required),
24505
- hours: new FormControl(claim.hours, [Validators.required, Validators.min(0), Validators.max(5000)]),
24506
24604
  electricityAndGas: new FormControl(claim.electricityAndGas, [Validators.required, Validators.min(0), Validators.max(100)]),
24507
24605
  cleaning: new FormControl(claim.cleaning, [Validators.required, Validators.min(0), Validators.max(100)]),
24508
24606
  internet: new FormControl(claim.internet, [Validators.required, Validators.min(0), Validators.max(100)]),
24509
24607
  telephone: new FormControl(claim.telephone, [Validators.required, Validators.min(0), Validators.max(100)]),
24510
24608
  mobile: new FormControl(claim.mobile, [Validators.required, Validators.min(0), Validators.max(100)]),
24511
- area: new FormControl(claim.area, [Validators.required, Validators.min(0), Validators.max(100)]),
24609
+ occupancyPercent: new FormControl(claim.occupancyPercent, [Validators.required, Validators.min(0), Validators.max(100)]),
24512
24610
  }, claim);
24513
24611
  this.listenEvents();
24514
24612
  this.switchMethod(claim.method);
@@ -24519,11 +24617,8 @@ class HomeOfficeClaimForm extends AbstractForm {
24519
24617
  });
24520
24618
  }
24521
24619
  switchMethod(method) {
24522
- this.disable({}, [...this.occupancyControls, this.controls.hours]);
24620
+ this.disable({}, this.occupancyControls);
24523
24621
  switch (method) {
24524
- case HomeOfficeClaimMethodEnum.FIXED:
24525
- this.controls.hours.enable();
24526
- break;
24527
24622
  case HomeOfficeClaimMethodEnum.ACTUAL:
24528
24623
  this.enable({}, this.actualControls);
24529
24624
  break;
@@ -24536,7 +24631,7 @@ class HomeOfficeClaimForm extends AbstractForm {
24536
24631
  return [this.controls.electricityAndGas, this.controls.cleaning, this.controls.internet, this.controls.telephone, this.controls.mobile];
24537
24632
  }
24538
24633
  get occupancyControls() {
24539
- return [...this.actualControls, this.controls.area];
24634
+ return [...this.actualControls, this.controls.occupancyPercent];
24540
24635
  }
24541
24636
  }
24542
24637
 
@@ -24550,6 +24645,30 @@ class HomeOfficeLogForm extends AbstractForm {
24550
24645
  }
24551
24646
  }
24552
24647
 
24648
+ class HomeOfficeCalculatorForm extends AbstractForm {
24649
+ constructor(claim = plainToClass(HomeOfficeClaim, {})) {
24650
+ super({
24651
+ homeArea: new FormControl(claim.homeArea, [Validators.required]),
24652
+ officeArea: new FormControl(claim.officeArea, [Validators.required]),
24653
+ dedicatedOffice: new FormControl(claim.dedicatedOffice, [Validators.required]),
24654
+ workUsage: new FormControl({ value: claim.workUsage, disabled: true }, [Validators.required])
24655
+ }, claim);
24656
+ this.listenEvents();
24657
+ }
24658
+ listenEvents() {
24659
+ this.get('dedicatedOffice').valueChanges.subscribe(() => {
24660
+ this.toggleEnabledState(this.get('workUsage'));
24661
+ });
24662
+ }
24663
+ submit() {
24664
+ let occupancyPercent = this.value.officeArea * 100 / this.value.homeArea;
24665
+ if (!this.value.dedicatedOffice) {
24666
+ occupancyPercent *= this.value.workUsage / 100;
24667
+ }
24668
+ return super.submit({ occupancyPercent: round(occupancyPercent, 2) });
24669
+ }
24670
+ }
24671
+
24553
24672
  var MessagesEnum;
24554
24673
  (function (MessagesEnum) {
24555
24674
  MessagesEnum["HOLDING_CREATED"] = "Holding created";
@@ -24575,5 +24694,5 @@ var MessagesEnum;
24575
24694
  * Generated bundle index. Do not edit.
24576
24695
  */
24577
24696
 
24578
- 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, 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, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportMessagesEnum, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BestVehicleLogbookCollection, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessChartAccountsEnum, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalLoss, CapitalLossForm, CapitalLossMessagesEnum, CapitalLossService, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsAdjustmentIncludedListEnum, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsForm, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMessagesEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsPropertyAdjustmentsListEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueCollection, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatFilterForm, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientCouponService, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteCollection, ClientInviteForm, ClientInviteMessages, ClientInvitePutForm, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementForm, ClientMovementMessagesEnum, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CollectionForm, CoreModule, CorelogicService, CorelogicSuggestion, Country, CurrentFirmBranchService, 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, EmployeeDetailsForm, EmployeeInvite, EmployeeInviteCollection, EmployeeInviteForm, EmployeeInviteRoleEnum, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmBranch, FirmBranchForm, FirmBranchMessagesEnum, FirmBranchService, FirmForm, FirmInviteForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GenderEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingImport, HoldingImportForm, HoldingImportMessagesEnum, HoldingImportService, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeListEnum, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, HomeOfficeChartAccountsEnum, HomeOfficeClaim, HomeOfficeClaimForm, HomeOfficeClaimMessagesEnum, HomeOfficeClaimMethodEnum, HomeOfficeClaimService, HomeOfficeLog, HomeOfficeLogForm, HomeOfficeLogMessagesEnum, HomeOfficeLogService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, InvoicePaymentForm, JsPdf, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanMessagesEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, 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, PdfService, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, PriorTransactionService, Property, PropertyAddForm, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementForm, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyForecastForm, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareForm, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationCollection, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, REPORTS, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestMessagesEnum, RestService$1 as RestService, SERVICE_PRODUCT_ROLES, SafeUrlPipe, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceListEnum, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossCollection, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStateEnum, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionCollection, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewFilterForm, TaxReviewFilterStatusEnum, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, TimezoneEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionBaseFilterForm, TransactionBaseForm, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionReportItem, TransactionReportItemCollection, TransactionService, TransactionSourceEnum, TransactionTypeEnum, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserCollection, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, 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, YoutubeService, alphaSpaceValidator, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, matchSumValidator, maxDateValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, toArray };
24697
+ 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, 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, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportMessagesEnum, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BestVehicleLogbookCollection, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessChartAccountsEnum, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalLoss, CapitalLossForm, CapitalLossMessagesEnum, CapitalLossService, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsAdjustmentIncludedListEnum, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsForm, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMessagesEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsPropertyAdjustmentsListEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueCollection, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatFilterForm, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientCouponService, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteCollection, ClientInviteForm, ClientInviteMessages, ClientInvitePutForm, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementForm, ClientMovementMessagesEnum, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CollectionForm, CoreModule, CorelogicService, CorelogicSuggestion, Country, CurrentFirmBranchService, 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, EmployeeDetailsForm, EmployeeInvite, EmployeeInviteCollection, EmployeeInviteForm, EmployeeInviteRoleEnum, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmBranch, FirmBranchForm, FirmBranchMessagesEnum, FirmBranchService, FirmForm, FirmInviteForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GenderEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingImport, HoldingImportForm, HoldingImportMessagesEnum, HoldingImportService, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeListEnum, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, HomeOfficeCalculatorForm, HomeOfficeClaim, HomeOfficeClaimCollection, HomeOfficeClaimForm, HomeOfficeClaimMessagesEnum, HomeOfficeClaimMethodEnum, HomeOfficeClaimService, HomeOfficeLog, HomeOfficeLogForm, HomeOfficeLogMessagesEnum, HomeOfficeLogService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, InvoicePaymentForm, JsPdf, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanMessagesEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, 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, PdfService, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, PriorTransactionService, Property, PropertyAddForm, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementForm, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyForecastForm, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareForm, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationCollection, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, REPORTS, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestMessagesEnum, RestService$1 as RestService, SERVICE_PRODUCT_ROLES, SafeUrlPipe, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceListEnum, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossCollection, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStateEnum, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionCollection, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewFilterForm, TaxReviewFilterStatusEnum, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, TimezoneEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionBaseFilterForm, TransactionBaseForm, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionReportItem, TransactionReportItemCollection, TransactionService, TransactionSourceEnum, TransactionTypeEnum, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserCollection, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, 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, YoutubeService, alphaSpaceValidator, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, matchSumValidator, maxDateValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, toArray };
24579
24698
  //# sourceMappingURL=taxtank-core.mjs.map