taxtank-core 0.32.108 → 0.32.111

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.
Files changed (45) hide show
  1. package/esm2022/lib/collections/collection-dictionary.mjs +4 -1
  2. package/esm2022/lib/collections/property/property-valuation.collection.mjs +11 -1
  3. package/esm2022/lib/collections/report/property/property-report-item-depreciation.collection.mjs +2 -2
  4. package/esm2022/lib/collections/report/property/property-report-item-transaction.collection.mjs +2 -2
  5. package/esm2022/lib/collections/report/property/property-report-item.collection.mjs +1 -1
  6. package/esm2022/lib/forms/holding/holding-reinvest.form.mjs +24 -3
  7. package/esm2022/lib/forms/transaction/holding/holding-income.form.mjs +19 -9
  8. package/esm2022/lib/forms/transaction/work/work-transaction.form.mjs +2 -4
  9. package/esm2022/lib/models/property/property-equity-chart-data.mjs +11 -7
  10. package/esm2022/lib/models/report/property/property-report-item-transaction.mjs +1 -1
  11. package/esm2022/lib/services/http/bank/bank-connection/bank-connection-messages.enum.mjs +4 -4
  12. package/esm2022/lib/services/http/income-source/income-source.service.mjs +1 -2
  13. package/esm2022/lib/services/http/income-source/sole-forecast/sole-forecast.service.mjs +1 -3
  14. package/esm2022/lib/services/http/property/property-valuation/property-valuation.service.mjs +3 -3
  15. package/esm2022/lib/services/http/sole/bas-report/bas-report-messages.enum.mjs +8 -0
  16. package/esm2022/lib/services/http/sole/bas-report/index.mjs +3 -0
  17. package/esm2022/lib/services/http/sole/index.mjs +2 -2
  18. package/esm2022/lib/services/report/property/property-transaction-report.service.mjs +12 -3
  19. package/esm2022/lib/validators/fields-sum.validator.mjs +1 -1
  20. package/esm2022/lib/validators/greater-than.validator.mjs +1 -1
  21. package/esm2022/lib/validators/index.mjs +2 -1
  22. package/esm2022/lib/validators/match-sum.validator.mjs +16 -0
  23. package/fesm2022/taxtank-core.mjs +206 -163
  24. package/fesm2022/taxtank-core.mjs.map +1 -1
  25. package/lib/collections/collection-dictionary.d.ts +1 -0
  26. package/lib/collections/property/property-valuation.collection.d.ts +4 -0
  27. package/lib/collections/report/property/property-report-item-depreciation.collection.d.ts +2 -2
  28. package/lib/collections/report/property/property-report-item-transaction.collection.d.ts +3 -3
  29. package/lib/collections/report/property/property-report-item.collection.d.ts +1 -1
  30. package/lib/forms/holding/holding-reinvest.form.d.ts +7 -0
  31. package/lib/forms/transaction/holding/holding-income.form.d.ts +8 -1
  32. package/lib/forms/transaction/work/work-transaction.form.d.ts +1 -1
  33. package/lib/models/property/property-equity-chart-data.d.ts +7 -7
  34. package/lib/models/report/property/property-report-item-transaction.d.ts +3 -3
  35. package/lib/services/http/bank/bank-connection/bank-connection-messages.enum.d.ts +3 -3
  36. package/lib/services/http/property/property-valuation/property-valuation.service.d.ts +1 -2
  37. package/lib/services/http/sole/bas-report/bas-report-messages.enum.d.ts +6 -0
  38. package/lib/services/http/sole/bas-report/index.d.ts +2 -0
  39. package/lib/services/http/sole/index.d.ts +1 -1
  40. package/lib/services/report/property/property-transaction-report.service.d.ts +4 -3
  41. package/lib/validators/index.d.ts +1 -0
  42. package/lib/validators/match-sum.validator.d.ts +6 -0
  43. package/package.json +1 -1
  44. package/esm2022/lib/validators/transactions-meta-fields.validator.mjs +0 -33
  45. package/lib/validators/transactions-meta-fields.validator.d.ts +0 -5
@@ -1848,6 +1848,9 @@ class CollectionDictionary {
1848
1848
  get keys() {
1849
1849
  return Object.keys(this.items);
1850
1850
  }
1851
+ get values() {
1852
+ return Object.values(this.items);
1853
+ }
1851
1854
  /**
1852
1855
  * push new elements in existing item
1853
1856
  */
@@ -2465,6 +2468,16 @@ class PropertyShareCollection extends Collection {
2465
2468
  }
2466
2469
 
2467
2470
  class PropertyValuationCollection extends Collection {
2471
+ /**
2472
+ * @TODO vik find by year when backend refactored (all years would exist)
2473
+ */
2474
+ getMarketValue(date) {
2475
+ let marketValue = 0;
2476
+ this.groupBy('property.id').values.forEach(collection => {
2477
+ marketValue += collection.filter(valuation => valuation.date < date).last.marketValue;
2478
+ });
2479
+ return marketValue;
2480
+ }
2468
2481
  }
2469
2482
 
2470
2483
  var TaxExemptionEnum;
@@ -6095,11 +6108,13 @@ const FORECAST_YEARS = 25;
6095
6108
  * Also on hover appear equity positions point
6096
6109
  */
6097
6110
  class PropertyEquityChartData {
6098
- constructor(properties, bankAccounts, loans, registerDate) {
6099
- this.registerDate = registerDate;
6111
+ constructor(properties, valuations, bankAccounts, loans, registerDate) {
6100
6112
  this.properties = properties;
6101
- this.bankAccounts = bankAccounts.getLoanAccounts();
6113
+ this.valuations = valuations;
6114
+ this.bankAccounts = bankAccounts;
6102
6115
  this.loans = loans;
6116
+ this.registerDate = registerDate;
6117
+ this.bankAccounts = bankAccounts.getLoanAccounts();
6103
6118
  this.currentYear = new FinancialYear(new Date()).year;
6104
6119
  this.initItems();
6105
6120
  this.buildHistoryItems();
@@ -6164,12 +6179,13 @@ class PropertyEquityChartData {
6164
6179
  });
6165
6180
  }
6166
6181
  /**
6182
+ * @TODO remove, there is no difference between actual and history calculations
6167
6183
  * set actual year's real data
6168
6184
  * @private
6169
6185
  */
6170
6186
  buildActualItem() {
6171
6187
  const item = this.list.find((i) => i.year === this.currentYear);
6172
- item.marketValue = this.properties.marketValue;
6188
+ item.marketValue = this.valuations.getMarketValue(new Date());
6173
6189
  item.loanBalance = this.properties.items.reduce((sum, property) => sum + Math.abs(this.bankAccounts.getPropertyBalanceAmount(property.id)), 0);
6174
6190
  }
6175
6191
  /**
@@ -6178,7 +6194,8 @@ class PropertyEquityChartData {
6178
6194
  buildForecastedItems() {
6179
6195
  // calculate future values for all properties separately
6180
6196
  this.properties.items.forEach((property) => {
6181
- let forecastedMarketValue = (property.growthPercent / 100) * property.marketValue + property.marketValue;
6197
+ const marketValue = this.valuations.filterBy('property.id', property.id).getMarketValue(new Date());
6198
+ let forecastedMarketValue = (property.growthPercent / 100) * marketValue + marketValue;
6182
6199
  // calculate future values for each future year for current handling property
6183
6200
  this.list
6184
6201
  .filter((item) => item.year > this.currentYear)
@@ -7342,112 +7359,6 @@ class DepreciationReportItemCollection extends DepreciationCollection {
7342
7359
  }
7343
7360
  }
7344
7361
 
7345
- /**
7346
- * Class with property transactions report entities
7347
- */
7348
- class PropertyReportItem extends AbstractModel {
7349
- constructor(property, chartAccounts) {
7350
- super();
7351
- this.chartAccounts = chartAccounts;
7352
- this.propertyId = property.id;
7353
- this.claimPercent = property.claimPercent;
7354
- this.sharePercent = property.sharePercent;
7355
- this.subCode = chartAccounts.taxReturnItem?.subCode;
7356
- this.description = chartAccounts.name;
7357
- }
7358
- get claimAmount() {
7359
- return round(this.amount * (this.claimPercent / 100), 2);
7360
- }
7361
- get shareClaimAmount() {
7362
- return this.claimAmount * (this.sharePercent / 100);
7363
- }
7364
- isIncome() {
7365
- return CHART_ACCOUNTS_CATEGORIES.income.includes(this.chartAccounts.category);
7366
- }
7367
- isExpense() {
7368
- return CHART_ACCOUNTS_CATEGORIES.expense.includes(this.chartAccounts.category);
7369
- }
7370
- }
7371
-
7372
- /**
7373
- * Const with labels based on depreciation type
7374
- */
7375
- const DEPRECIATION_TYPE_LABELS = {
7376
- 1: 'Plant & Equipment',
7377
- 2: 'Building & Improvements'
7378
- };
7379
- /**
7380
- * Class with depreciation-based property transactions report entities
7381
- */
7382
- class PropertyReportItemDepreciation extends PropertyReportItem {
7383
- constructor(depreciations, property, chartAccounts) {
7384
- super(property, chartAccounts);
7385
- this.amount = Math.abs(depreciations.getCurrentYearForecastAmount());
7386
- this.description = DEPRECIATION_TYPE_LABELS[depreciations.first.type];
7387
- }
7388
- }
7389
-
7390
- /**
7391
- * Base collection to work with property report items
7392
- */
7393
- class PropertyReportItemCollection extends Collection {
7394
- getIncomes() {
7395
- return this.create(this.items.filter((item) => item.isIncome()));
7396
- }
7397
- getExpenses() {
7398
- return this.create(this.items.filter((item) => item.isExpense()));
7399
- }
7400
- }
7401
-
7402
- /**
7403
- * Collection to work with depreciation-based property report items
7404
- */
7405
- class PropertyReportItemDepreciationCollection extends PropertyReportItemCollection {
7406
- constructor(depreciations, properties, chartAccounts) {
7407
- super();
7408
- this.setItems(depreciations, properties, chartAccounts);
7409
- }
7410
- setItems(depreciations, properties, chartAccounts) {
7411
- this.items = [];
7412
- properties.items.forEach((property) => {
7413
- const depreciationsByType = depreciations.filterBy('property.id', property.id).groupBy('type');
7414
- depreciationsByType.keys.map((type) => {
7415
- this.items.push(new PropertyReportItemDepreciation(depreciationsByType.get(type), property, chartAccounts.findBy('id', depreciationsByType.get(type).first.chartAccounts.id)));
7416
- });
7417
- });
7418
- }
7419
- }
7420
-
7421
- /**
7422
- * Class with transaction-based property transactions report entities
7423
- */
7424
- class PropertyReportItemTransaction extends PropertyReportItem {
7425
- constructor(transactions, property, chartAccounts) {
7426
- super(property, chartAccounts);
7427
- this.amount = Math.abs(transactions.sumBy('grossAmount'));
7428
- this.description = chartAccounts.name;
7429
- }
7430
- }
7431
-
7432
- /**
7433
- * Collection to work with transaction-based property report items
7434
- */
7435
- class PropertyReportItemTransactionCollection extends PropertyReportItemCollection {
7436
- constructor(transactions, properties, chartAccounts) {
7437
- super();
7438
- this.setItems(transactions, properties, chartAccounts);
7439
- }
7440
- setItems(transactions, properties, chartAccounts) {
7441
- this.items = [];
7442
- properties.items.forEach((property) => {
7443
- const transactionsDictionary = transactions.getByPropertiesIds([property.id]).groupBy('chartAccounts.id');
7444
- transactionsDictionary.keys.map((chartAccountId) => {
7445
- this.items.push(new PropertyReportItemTransaction(transactionsDictionary.get(chartAccountId), property, chartAccounts.findBy('id', +chartAccountId)));
7446
- });
7447
- });
7448
- }
7449
- }
7450
-
7451
7362
  /**
7452
7363
  * Enum with type of business for My Tax report
7453
7364
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form
@@ -8169,6 +8080,62 @@ const atoLinks = {
8169
8080
  * 'My Tax' report related data (classes, enums, const, e.t.c)
8170
8081
  */
8171
8082
 
8083
+ /**
8084
+ * Class with property transactions report entities
8085
+ */
8086
+ class PropertyReportItem extends AbstractModel {
8087
+ constructor(property, chartAccounts) {
8088
+ super();
8089
+ this.chartAccounts = chartAccounts;
8090
+ this.propertyId = property.id;
8091
+ this.claimPercent = property.claimPercent;
8092
+ this.sharePercent = property.sharePercent;
8093
+ this.subCode = chartAccounts.taxReturnItem?.subCode;
8094
+ this.description = chartAccounts.name;
8095
+ }
8096
+ get claimAmount() {
8097
+ return round(this.amount * (this.claimPercent / 100), 2);
8098
+ }
8099
+ get shareClaimAmount() {
8100
+ return this.claimAmount * (this.sharePercent / 100);
8101
+ }
8102
+ isIncome() {
8103
+ return CHART_ACCOUNTS_CATEGORIES.income.includes(this.chartAccounts.category);
8104
+ }
8105
+ isExpense() {
8106
+ return CHART_ACCOUNTS_CATEGORIES.expense.includes(this.chartAccounts.category);
8107
+ }
8108
+ }
8109
+
8110
+ /**
8111
+ * Const with labels based on depreciation type
8112
+ */
8113
+ const DEPRECIATION_TYPE_LABELS = {
8114
+ 1: 'Plant & Equipment',
8115
+ 2: 'Building & Improvements'
8116
+ };
8117
+ /**
8118
+ * Class with depreciation-based property transactions report entities
8119
+ */
8120
+ class PropertyReportItemDepreciation extends PropertyReportItem {
8121
+ constructor(depreciations, property, chartAccounts) {
8122
+ super(property, chartAccounts);
8123
+ this.amount = Math.abs(depreciations.getCurrentYearForecastAmount());
8124
+ this.description = DEPRECIATION_TYPE_LABELS[depreciations.first.type];
8125
+ }
8126
+ }
8127
+
8128
+ /**
8129
+ * Class with transaction-based property transactions report entities
8130
+ */
8131
+ class PropertyReportItemTransaction extends PropertyReportItem {
8132
+ constructor(transactions, property, chartAccounts) {
8133
+ super(property, chartAccounts);
8134
+ this.amount = Math.abs(transactions.sumBy('grossAmount'));
8135
+ this.description = chartAccounts.name;
8136
+ }
8137
+ }
8138
+
8172
8139
  /**
8173
8140
  * Class with business loss details
8174
8141
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4641357930/Rules+when+a+business+makes+a+loss+Tax+Summary
@@ -8199,6 +8166,56 @@ class VehicleExpense extends AbstractModel {
8199
8166
  }
8200
8167
  }
8201
8168
 
8169
+ /**
8170
+ * Base collection to work with property report items
8171
+ */
8172
+ class PropertyReportItemCollection extends Collection {
8173
+ getIncomes() {
8174
+ return this.create(this.items.filter((item) => item.isIncome()));
8175
+ }
8176
+ getExpenses() {
8177
+ return this.create(this.items.filter((item) => item.isExpense()));
8178
+ }
8179
+ }
8180
+
8181
+ /**
8182
+ * Collection to work with depreciation-based property report items
8183
+ */
8184
+ class PropertyReportItemDepreciationCollection extends PropertyReportItemCollection {
8185
+ constructor(depreciations, properties, chartAccounts) {
8186
+ super();
8187
+ this.setItems(depreciations, properties, chartAccounts);
8188
+ }
8189
+ setItems(depreciations, properties, chartAccounts) {
8190
+ this.items = [];
8191
+ properties.items.forEach((property) => {
8192
+ const depreciationsByType = depreciations.filterBy('property.id', property.id).groupBy('type');
8193
+ depreciationsByType.keys.map((type) => {
8194
+ this.items.push(new PropertyReportItemDepreciation(depreciationsByType.get(type), property, chartAccounts.findBy('id', depreciationsByType.get(type).first.chartAccounts.id)));
8195
+ });
8196
+ });
8197
+ }
8198
+ }
8199
+
8200
+ /**
8201
+ * Collection to work with transaction-based property report items
8202
+ */
8203
+ class PropertyReportItemTransactionCollection extends PropertyReportItemCollection {
8204
+ constructor(transactions, properties, chartAccounts) {
8205
+ super();
8206
+ this.setItems(transactions, properties, chartAccounts);
8207
+ }
8208
+ setItems(transactions, properties, chartAccounts) {
8209
+ this.items = [];
8210
+ properties.items.forEach((property) => {
8211
+ const transactionsDictionary = transactions.getByPropertiesIds([property.id]).groupBy('chartAccounts.id');
8212
+ transactionsDictionary.keys.map((chartAccountId) => {
8213
+ this.items.push(new PropertyReportItemTransaction(transactionsDictionary.get(chartAccountId), property, chartAccounts.findBy('id', +chartAccountId)));
8214
+ });
8215
+ });
8216
+ }
8217
+ }
8218
+
8202
8219
  class VehicleExpenseCollection extends Collection {
8203
8220
  constructor(transactions, depreciations) {
8204
8221
  super();
@@ -11412,7 +11429,7 @@ var BankConnectionMessagesEnum;
11412
11429
  BankConnectionMessagesEnum["DEACTIVATE"] = "Deactivate to stop receiving daily bank transactions";
11413
11430
  BankConnectionMessagesEnum["CONFIRM_DEACTIVATE"] = "We are unable to deliver daily bank transactions to deactivated banks";
11414
11431
  BankConnectionMessagesEnum["DEACTIVATED"] = "Your live bank feeds are deactivated";
11415
- BankConnectionMessagesEnum["RECONNECT"] = "Disconnected, There has been an issue with your bank connection. Please reconnect to continue receiving bank transactions";
11432
+ BankConnectionMessagesEnum["RECONNECT"] = "There has been an issue with your bank connection. Please reconnect to continue receiving bank transactions";
11416
11433
  BankConnectionMessagesEnum["INVALID"] = "There has been an issue with your bank connection. Please reconnect to continue receiving bank transactions";
11417
11434
  BankConnectionMessagesEnum["UPGRADE"] = "Upgrade needed from traditional feeds to an Open Banking connection to continue receiving bank transactions";
11418
11435
  BankConnectionMessagesEnum["CONFIRM_UPGRADE"] = "Upgrading to open banking improves stability and data integrity";
@@ -11427,8 +11444,8 @@ var BankConnectionMessagesEnum;
11427
11444
  BankConnectionMessagesEnum["ACCOUNTS_RETRIEVED"] = "Financial data received, you can add bank accounts now";
11428
11445
  BankConnectionMessagesEnum["JOB_ID_RECEIVED"] = "Receiving information from bank";
11429
11446
  BankConnectionMessagesEnum["TEMPORARY_UNAVAILABLE"] = "The bank is temporarily unavailable, please check back later";
11430
- BankConnectionMessagesEnum["EXPIRING"] = "Your annual consents to share the bank data with TaxTank will expire soon. To ensure uninterrupted access to your bank transactions and continue sharing data for another term, please extend the consent";
11431
- BankConnectionMessagesEnum["EXPIRED"] = "Your annual consents to share the bank data with TaxTank has expired. To ensure uninterrupted access to your bank transactions and continue sharing data for another term, please extend the consent";
11447
+ BankConnectionMessagesEnum["EXPIRING"] = "Access to receiving data from this bank expires soon. To ensure uninterrupted access to your bank transactions and continue sharing data for another term, please Reauthorise";
11448
+ BankConnectionMessagesEnum["EXPIRED"] = "Your bank has disconnected because your Access to receiving data from this bank has expired. Please Reauthorise to continue sharing";
11432
11449
  })(BankConnectionMessagesEnum || (BankConnectionMessagesEnum = {}));
11433
11450
 
11434
11451
  /**
@@ -13323,8 +13340,6 @@ class SoleForecastService extends RestService {
13323
13340
  this.eventDispatcherService.on(AppEventTypeEnum.INCOME_SOURCES_UPDATED)
13324
13341
  .subscribe((incomeSources) => {
13325
13342
  const soleForecasts = this.assignSoleForecasts(incomeSources);
13326
- // console.log(soleForecasts);
13327
- // console.log(incomeSources);
13328
13343
  if (soleForecasts.length) {
13329
13344
  const method = soleForecasts[0].id ? 'updateBatch' : 'addBatch';
13330
13345
  this[method](soleForecasts).subscribe((updatedSoleForecasts) => {
@@ -13411,7 +13426,6 @@ class IncomeSourceService extends RestService {
13411
13426
  * Update batch of income sources
13412
13427
  */
13413
13428
  updateBatch(incomeSources, queryParams = {}) {
13414
- // console.log(incomeSources);
13415
13429
  return this.http.put(`${this.environment.apiV2}/${this.url}`, incomeSources, queryParams)
13416
13430
  .pipe(map((updatedItems) => {
13417
13431
  const updatedInstances = updatedItems.map((item) => this.createModelInstance(item));
@@ -13878,7 +13892,7 @@ class PropertyValuationService extends RestService$1 {
13878
13892
  super(...arguments);
13879
13893
  this.endpointUri = 'property-valuations';
13880
13894
  this.modelClass = PropertyValuation;
13881
- this.collectionClass = (Collection);
13895
+ this.collectionClass = PropertyValuationCollection;
13882
13896
  this.disabledMethods = ['postBatch', 'putBatch'];
13883
13897
  }
13884
13898
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PropertyValuationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -14329,6 +14343,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
14329
14343
  }]
14330
14344
  }] });
14331
14345
 
14346
+ var BasReportMessagesEnum;
14347
+ (function (BasReportMessagesEnum) {
14348
+ BasReportMessagesEnum["CREATED"] = "Your bas report has been saved";
14349
+ BasReportMessagesEnum["UPDATED"] = "Your bas report has been updated";
14350
+ BasReportMessagesEnum["DELETED"] = "Your bas report has been deleted";
14351
+ BasReportMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this BAS report?";
14352
+ })(BasReportMessagesEnum || (BasReportMessagesEnum = {}));
14353
+
14332
14354
  class BasReportService extends RestService {
14333
14355
  constructor() {
14334
14356
  super(...arguments);
@@ -19273,13 +19295,22 @@ class PropertyTransactionReportService {
19273
19295
  this.getTransactions(),
19274
19296
  this.getDepreciations(),
19275
19297
  this.chartAccountsService.get()
19276
- ]).pipe(map(([properties, transactions, depreciations, chartAccounts]) => this.create(transactions, depreciations, properties, chartAccounts).groupBy('propertyId')));
19298
+ ]).pipe(map(([properties, transactions, depreciations, chartAccounts]) => {
19299
+ this.properties = properties;
19300
+ this.transactions = transactions;
19301
+ this.depreciations = depreciations;
19302
+ this.chartAccounts = chartAccounts;
19303
+ return this.create(transactions, depreciations, properties, chartAccounts);
19304
+ }));
19305
+ }
19306
+ filter(filterForm) {
19307
+ return this.create(filterForm.filter(this.transactions), filterForm.filter(this.depreciations), this.properties, this.chartAccounts);
19277
19308
  }
19278
19309
  create(transactions, depreciations, properties, chartAccounts) {
19279
19310
  return new PropertyReportItemCollection([
19280
19311
  ...new PropertyReportItemTransactionCollection(transactions, properties, chartAccounts).items,
19281
19312
  ...new PropertyReportItemDepreciationCollection(depreciations, properties, chartAccounts).items,
19282
- ]);
19313
+ ]).sortBy('subCode', 'asc').groupBy('propertyId');
19283
19314
  }
19284
19315
  /**
19285
19316
  * Get collection of property transactions
@@ -21255,6 +21286,22 @@ function alphaSpaceValidator() {
21255
21286
  };
21256
21287
  }
21257
21288
 
21289
+ /**
21290
+ * @param controlsFn function to get controls from target parent
21291
+ * it's easier to pass controls instead of function, but it won't work with dynamic fields
21292
+ */
21293
+ function matchSumValidator(controlsFn) {
21294
+ return (targetControl) => {
21295
+ const controls = controlsFn.bind(targetControl.parent)();
21296
+ if (controls.find(control => control.value === null)) {
21297
+ return null;
21298
+ }
21299
+ const sum = controls.reduce((acc, control) => acc + control.value, 0);
21300
+ const targetValue = targetControl.value;
21301
+ return sum === targetValue ? null : { matchSum: true };
21302
+ };
21303
+ }
21304
+
21258
21305
  class FirmForm extends AbstractForm {
21259
21306
  constructor(firm) {
21260
21307
  super({
@@ -23804,38 +23851,6 @@ class SoleIncomeForm extends SoleTransactionForm {
23804
23851
  }
23805
23852
  }
23806
23853
 
23807
- /**
23808
- * Validator that check fields for transaction meta
23809
- */
23810
- function transactionsMetaFieldsValidator() {
23811
- return (formGroup) => {
23812
- const chartAccounts = formGroup.get('chartAccounts').value;
23813
- if (!chartAccounts) {
23814
- return null;
23815
- }
23816
- const metaFields = chartAccounts.metaFields;
23817
- if (chartAccounts.isDividends()) {
23818
- return checkDividends(metaFields, formGroup);
23819
- }
23820
- return null;
23821
- };
23822
- }
23823
- /**
23824
- * the sum of the fields "Franked" and "Unfranked" must equal transactions amount
23825
- */
23826
- function checkDividends(metaFields, formGroup) {
23827
- const frankedAndUnfrankedIds = [ChartAccountsMetaFieldListEnum.FRANKED, ChartAccountsMetaFieldListEnum.UNFRANKED];
23828
- const amount = Math.abs(formGroup.get('amount').value);
23829
- const frankedAndUnfrankedControls = formGroup.get('metaFields').controls
23830
- .filter((control) => frankedAndUnfrankedIds.includes(control.get('chartAccountsMetaField').value.id));
23831
- // no need to validate when one or both fields are empty
23832
- if (frankedAndUnfrankedControls.find((group) => group.get('value').value === null)) {
23833
- return null;
23834
- }
23835
- const frankedAndUnfrankedAmount = frankedAndUnfrankedControls.reduce((sum, group) => sum + (+group.get('value').value), 0);
23836
- return amount === frankedAndUnfrankedAmount ? null : { wrongAmountsSum: 'The total Franked and Unfranked amounts must equal the Total Payment received.' };
23837
- }
23838
-
23839
23854
  class WorkTransactionForm extends TransactionForm {
23840
23855
  constructor(transaction, registeredForGst, allocations, controls = {}) {
23841
23856
  super(transaction, registeredForGst, allocations, Object.assign(controls, {
@@ -23845,7 +23860,6 @@ class WorkTransactionForm extends TransactionForm {
23845
23860
  chartAccountsMetaField: new FormControl(transactionMetaField.chartAccountsMetaField)
23846
23861
  })))
23847
23862
  }));
23848
- this.setValidators(transactionsMetaFieldsValidator());
23849
23863
  this.listenEvents();
23850
23864
  }
23851
23865
  listenEvents() {
@@ -23853,7 +23867,7 @@ class WorkTransactionForm extends TransactionForm {
23853
23867
  }
23854
23868
  watchChartAccounts() {
23855
23869
  super.watchChartAccounts();
23856
- this.get('chartAccounts').valueChanges.subscribe((chartAccounts) => {
23870
+ this.get('chartAccounts').valueChanges.subscribe(() => {
23857
23871
  this.buildMetaFieldsForm();
23858
23872
  });
23859
23873
  }
@@ -23992,6 +24006,8 @@ class HoldingIncomeForm extends WorkTransactionForm {
23992
24006
  tax: new UntypedFormControl(transaction.tax, Validators.required),
23993
24007
  incomeSource: new UntypedFormControl(transaction.incomeSource, [Validators.required, autocompleteValidator()]),
23994
24008
  });
24009
+ // transactionAmount=frankedAmount + unfrankedAmount
24010
+ this.get('amount').setValidators(conditionalValidator(() => this.get('chartAccounts').value && this.get('chartAccounts').value.isDividends(), matchSumValidator(this.getAmountComponents)));
23995
24011
  // forbid to edit some fields for allocated transaction
23996
24012
  if (allocations.length) {
23997
24013
  this.get('chartAccounts').disable();
@@ -24002,14 +24018,26 @@ class HoldingIncomeForm extends WorkTransactionForm {
24002
24018
  this.get('amount').disable();
24003
24019
  }
24004
24020
  }
24021
+ /**
24022
+ * metafields components of transactionAmount
24023
+ */
24024
+ getAmountComponents() {
24025
+ return this.metaFields.controls.filter((formGroup) => [ChartAccountsMetaFieldListEnum.FRANKED, ChartAccountsMetaFieldListEnum.UNFRANKED].includes(formGroup.get('chartAccountsMetaField').value.id)).map(formGroup => formGroup.get('value'));
24026
+ }
24005
24027
  listenEvents() {
24006
24028
  this.listenChartAccountsChanges();
24007
24029
  }
24030
+ get metaFields() {
24031
+ return this.get('metaFields');
24032
+ }
24033
+ get frankingCredit() {
24034
+ return this.metaFields.controls.find((group) => group.get('chartAccountsMetaField').value.isFrankingCredit())?.get('value');
24035
+ }
24008
24036
  /**
24009
24037
  * @TODO Alex/Vik: probably we need some database changes related to metafields.
24010
24038
  * Now we have the following custom metafields behaviour:
24011
24039
  * - % of share field should be 100 by default (now handled by WorkTransactionForm)
24012
- * - Franked and Unfranked sum should be equal to transaction amount (now handled by transactionsMetaFieldsValidator())
24040
+ * - Franked and Unfranked sum should be equal to transaction amount
24013
24041
  * - Franked field has custom message (mat-hint) (now handled by HoldingIncomeFormComponent)
24014
24042
  * - some metafields required, but some not (now handled by HoldingIncomeForm)
24015
24043
  */
@@ -24018,12 +24046,7 @@ class HoldingIncomeForm extends WorkTransactionForm {
24018
24046
  if (!chartAccounts.isDividends()) {
24019
24047
  return;
24020
24048
  }
24021
- this.get('metaFields').controls.forEach((metaFieldGroup) => {
24022
- if (metaFieldGroup.get('chartAccountsMetaField').value.isFrankingCredit()) {
24023
- return;
24024
- }
24025
- metaFieldGroup.get('value').setValidators(Validators.required);
24026
- });
24049
+ this.frankingCredit.setValidators(Validators.required);
24027
24050
  });
24028
24051
  }
24029
24052
  }
@@ -24182,22 +24205,33 @@ class HoldingForm extends AbstractForm {
24182
24205
  }
24183
24206
  }
24184
24207
 
24208
+ /**
24209
+ * @TODO vik TT-4048
24210
+ */
24185
24211
  class HoldingReinvestForm extends AbstractForm {
24186
24212
  constructor(reinvest) {
24187
24213
  super({
24214
+ // the difference between dividends amount and given shares (shares=dividendsAmount/sharePrice)
24215
+ cashVariance: new FormControl({ value: 0, disabled: true }, Validators.required),
24188
24216
  transaction: new HoldingIncomeForm(reinvest.transaction, null, []),
24189
24217
  holding: new HoldingForm(reinvest.holding)
24190
24218
  }, reinvest);
24191
24219
  this.reinvest = reinvest;
24220
+ this.listenEvents();
24192
24221
  // emit values to trigger changes and create chart accounts metafields
24193
24222
  this.get('transaction').emitValues();
24194
24223
  // disable amount field because we calculate the value automatically and this field is visible as disabled
24195
24224
  this.get(['transaction', 'amount']).disable();
24196
- this.listenEvents();
24225
+ // franked/unfranked fields are required
24226
+ this.transactionForm.getAmountComponents().forEach(control => {
24227
+ control.addValidators(Validators.required);
24228
+ control.setValue(null);
24229
+ });
24197
24230
  }
24198
24231
  listenEvents() {
24199
24232
  this.listenHoldingChanges();
24200
24233
  this.listenDateChanges();
24234
+ this.listenAmountChanges();
24201
24235
  }
24202
24236
  get transactionForm() {
24203
24237
  return this.get('transaction');
@@ -24205,6 +24239,15 @@ class HoldingReinvestForm extends AbstractForm {
24205
24239
  get holdingForm() {
24206
24240
  return this.get('holding');
24207
24241
  }
24242
+ /**
24243
+ * calculated automatically as cashVariance=transactionAmount-frankedAmount-unfrankedAmount
24244
+ */
24245
+ listenAmountChanges() {
24246
+ this.transactionForm.valueChanges.subscribe(() => {
24247
+ const sum = this.transactionForm.getAmountComponents().reduce((acc, control) => acc + control.value, 0);
24248
+ this.get('cashVariance').setValue(this.get(['transaction', 'amount']).value - sum);
24249
+ });
24250
+ }
24208
24251
  /**
24209
24252
  * Set transaction amount based on holding quantity and price
24210
24253
  */
@@ -24377,5 +24420,5 @@ var MessagesEnum;
24377
24420
  * Generated bundle index. Do not edit.
24378
24421
  */
24379
24422
 
24380
- 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, 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, ChartAccountsAdjustmentIncludedListEnum, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsForm, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsInvoiceEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMessagesEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsPropertyAdjustmentsListEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsUnallocatableListEnum, ChartAccountsValue, 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, 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, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, InvoicePaymentForm, 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, PdfService, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, 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, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, 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, 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, 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, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseFilterForm, TransactionBaseForm, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, 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, 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, YoutubeService, alphaSpaceValidator, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, toArray };
24423
+ 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, 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, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsAdjustmentIncludedListEnum, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsForm, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsInvoiceEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMessagesEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsPropertyAdjustmentsListEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsUnallocatableListEnum, ChartAccountsValue, 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, 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, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, InvoicePaymentForm, 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, PdfService, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, 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, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, 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, 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, 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, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseFilterForm, TransactionBaseForm, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, 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, 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, YoutubeService, alphaSpaceValidator, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, matchSumValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, toArray };
24381
24424
  //# sourceMappingURL=taxtank-core.mjs.map