taxtank-core 0.27.0 → 0.27.3

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 (64) hide show
  1. package/bundles/taxtank-core.umd.js +598 -284
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/depreciation.collection.js +10 -9
  4. package/esm2015/lib/db/Enums/depreciation-calculation.enum.js +2 -2
  5. package/esm2015/lib/db/Enums/sole-depreciation-method.enum.js +6 -0
  6. package/esm2015/lib/db/Models/sole/sole-business-activity.js +4 -0
  7. package/esm2015/lib/db/Models/sole/sole-business.js +1 -1
  8. package/esm2015/lib/db/Models/sole/sole-depreciation-method.js +4 -0
  9. package/esm2015/lib/db/Models/sole/sole-details.js +1 -1
  10. package/esm2015/lib/forms/sole/index.js +2 -1
  11. package/esm2015/lib/forms/sole/sole-business.form.js +3 -3
  12. package/esm2015/lib/forms/sole/sole-depreciation-method.form.js +10 -0
  13. package/esm2015/lib/models/depreciation/depreciation-group.enum.js +2 -1
  14. package/esm2015/lib/models/depreciation/depreciation-groups.const.js +7 -2
  15. package/esm2015/lib/models/depreciation/depreciation.js +32 -25
  16. package/esm2015/lib/models/endpoint/endpoints.const.js +8 -4
  17. package/esm2015/lib/models/event/app-event-type.enum.js +47 -42
  18. package/esm2015/lib/models/report/depreciation/depreciation-report-item.js +2 -2
  19. package/esm2015/lib/models/report/my-tax/my-tax-deductions/my-tax-deductions.js +2 -2
  20. package/esm2015/lib/models/sole/index.js +3 -1
  21. package/esm2015/lib/models/sole/sole-business-activity.js +4 -0
  22. package/esm2015/lib/models/sole/sole-business.js +10 -2
  23. package/esm2015/lib/models/sole/sole-depreciation-method.js +8 -0
  24. package/esm2015/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.js +40 -0
  25. package/esm2015/lib/services/http/depreciation/depreciation.service.js +79 -22
  26. package/esm2015/lib/services/http/depreciation/index.js +4 -0
  27. package/esm2015/lib/services/http/property/property.service.js +8 -1
  28. package/esm2015/lib/services/http/receipt/receipt.service.js +76 -0
  29. package/esm2015/lib/services/http/sole/index.js +3 -1
  30. package/esm2015/lib/services/http/sole/sole-business-activity/sole-business-activity.service.js +21 -0
  31. package/esm2015/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.js +62 -0
  32. package/esm2015/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.js +20 -50
  33. package/esm2015/lib/services/http/transaction/transaction.service.js +12 -11
  34. package/esm2015/public-api.js +3 -3
  35. package/fesm2015/taxtank-core.js +502 -245
  36. package/fesm2015/taxtank-core.js.map +1 -1
  37. package/lib/collections/depreciation.collection.d.ts +2 -1
  38. package/lib/db/Enums/depreciation-calculation.enum.d.ts +2 -2
  39. package/lib/db/Enums/sole-depreciation-method.enum.d.ts +4 -0
  40. package/lib/db/Models/sole/sole-business-activity.d.ts +6 -0
  41. package/lib/db/Models/sole/sole-business.d.ts +2 -1
  42. package/lib/db/Models/sole/sole-depreciation-method.d.ts +10 -0
  43. package/lib/forms/sole/index.d.ts +1 -0
  44. package/lib/forms/sole/sole-business.form.d.ts +1 -1
  45. package/lib/forms/sole/sole-depreciation-method.form.d.ts +5 -0
  46. package/lib/models/depreciation/depreciation-group.enum.d.ts +2 -1
  47. package/lib/models/depreciation/depreciation.d.ts +9 -16
  48. package/lib/models/event/app-event-type.enum.d.ts +46 -41
  49. package/lib/models/sole/index.d.ts +2 -0
  50. package/lib/models/sole/sole-business-activity.d.ts +3 -0
  51. package/lib/models/sole/sole-business.d.ts +7 -1
  52. package/lib/models/sole/sole-depreciation-method.d.ts +4 -0
  53. package/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.d.ts +28 -0
  54. package/lib/services/http/depreciation/depreciation.service.d.ts +23 -7
  55. package/lib/services/http/depreciation/index.d.ts +3 -0
  56. package/lib/services/http/property/property.service.d.ts +1 -0
  57. package/lib/services/http/receipt/receipt.service.d.ts +62 -0
  58. package/lib/services/http/sole/index.d.ts +2 -0
  59. package/lib/services/http/sole/sole-business-activity/sole-business-activity.service.d.ts +11 -0
  60. package/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.d.ts +23 -0
  61. package/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.d.ts +21 -21
  62. package/lib/services/http/transaction/transaction.service.d.ts +1 -0
  63. package/package.json +1 -1
  64. package/public-api.d.ts +2 -2
@@ -211,47 +211,52 @@ var AppEventTypeEnum;
211
211
  AppEventTypeEnum[AppEventTypeEnum["CURRENT_USER_GET_FAILED"] = 11] = "CURRENT_USER_GET_FAILED";
212
212
  AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_DELETED"] = 12] = "DEPRECIATION_DELETED";
213
213
  AppEventTypeEnum[AppEventTypeEnum["DEPRECIATIONS_CREATED"] = 13] = "DEPRECIATIONS_CREATED";
214
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 14] = "INCOME_SOURCES_CREATED";
215
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 15] = "INCOME_SOURCES_UPDATED";
216
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 16] = "INCOME_SOURCES_FORECASTS_CREATED";
217
- AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 17] = "INCOME_SOURCES_FORECASTS_UPDATED";
218
- AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 18] = "LOAN_UPDATED";
219
- AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 19] = "LOAN_PAYOUT_UPDATED";
220
- AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 20] = "MESSAGE_CREATED";
221
- AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 21] = "MESSAGE_FILE_CREATED";
222
- AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 22] = "MESSAGE_FILE_DELETED";
223
- AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 23] = "NOTIFICATION_ADDED";
224
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 24] = "PROPERTY_UPDATED_WITH_DOCUMENT";
225
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 25] = "PROPERTY_DOCUMENT_ADDED";
226
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 26] = "PROPERTY_MOVEMENT_CREATED";
227
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 27] = "PROPERTY_MOVEMENT_UPDATED";
228
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 28] = "PROPERTY_MOVEMENT_DELETED";
229
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 29] = "PROPERTY_SHARE_UPDATED";
230
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 30] = "PROPERTY_SALE_ADDED";
231
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 31] = "PROPERTY_SALE_DELETED";
232
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 32] = "PROPERTY_SUBSCRIPTION_ADDED";
233
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 33] = "PROPERTY_SUBSCRIPTION_DELETED";
234
- AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 34] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
235
- AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 35] = "SERVICE_SUBSCRIPTION_UPDATED";
236
- AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 36] = "TAX_REVIEW_UPDATED";
237
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 37] = "TRANSACTION_CREATED";
238
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 38] = "TRANSACTION_DELETED";
239
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 39] = "TRANSACTION_UPDATED";
240
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED_WITH_NEW_RECEIPT"] = 40] = "TRANSACTION_CREATED_WITH_NEW_RECEIPT";
241
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_NEW_RECEIPT"] = 41] = "TRANSACTION_UPDATED_WITH_NEW_RECEIPT";
242
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 42] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
243
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 43] = "TRANSACTION_RECEIPT_CREATED";
244
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 44] = "TRANSACTION_RECEIPT_DELETED";
245
- AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 45] = "TRANSACTIONS_CREATED";
246
- AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 46] = "USER_UPDATED";
247
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 47] = "VEHICLE_CLAIM_UPDATED";
248
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 48] = "VEHICLE_CLAIM_CREATED";
249
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 49] = "VEHICLE_CLAIM_DETAILS_UPDATED";
250
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 50] = "VEHICLE_CLAIM_DETAILS_CREATED";
251
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 51] = "VEHICLE_LOGBOOK_CREATED";
252
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 52] = "VEHICLE_LOGBOOK_UPDATED";
253
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 53] = "VEHICLE_LOGBOOK_DELETED";
254
- AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 54] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
214
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_RECEIPT"] = 14] = "DEPRECIATION_UPDATED_WITH_RECEIPT";
215
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT"] = 15] = "DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT";
216
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_CREATED"] = 16] = "DEPRECIATION_RECEIPT_CREATED";
217
+ AppEventTypeEnum[AppEventTypeEnum["DEPRECIATION_RECEIPT_DELETED"] = 17] = "DEPRECIATION_RECEIPT_DELETED";
218
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_CREATED"] = 18] = "INCOME_SOURCES_CREATED";
219
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_UPDATED"] = 19] = "INCOME_SOURCES_UPDATED";
220
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_CREATED"] = 20] = "INCOME_SOURCES_FORECASTS_CREATED";
221
+ AppEventTypeEnum[AppEventTypeEnum["INCOME_SOURCES_FORECASTS_UPDATED"] = 21] = "INCOME_SOURCES_FORECASTS_UPDATED";
222
+ AppEventTypeEnum[AppEventTypeEnum["LOAN_UPDATED"] = 22] = "LOAN_UPDATED";
223
+ AppEventTypeEnum[AppEventTypeEnum["LOAN_PAYOUT_UPDATED"] = 23] = "LOAN_PAYOUT_UPDATED";
224
+ AppEventTypeEnum[AppEventTypeEnum["MESSAGE_CREATED"] = 24] = "MESSAGE_CREATED";
225
+ AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 25] = "MESSAGE_FILE_CREATED";
226
+ AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 26] = "MESSAGE_FILE_DELETED";
227
+ AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 27] = "NOTIFICATION_ADDED";
228
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DEPRECIATION_CALCULATION_UPDATED"] = 28] = "PROPERTY_DEPRECIATION_CALCULATION_UPDATED";
229
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_UPDATED_WITH_DOCUMENT"] = 29] = "PROPERTY_UPDATED_WITH_DOCUMENT";
230
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_DOCUMENT_ADDED"] = 30] = "PROPERTY_DOCUMENT_ADDED";
231
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_CREATED"] = 31] = "PROPERTY_MOVEMENT_CREATED";
232
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_UPDATED"] = 32] = "PROPERTY_MOVEMENT_UPDATED";
233
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_MOVEMENT_DELETED"] = 33] = "PROPERTY_MOVEMENT_DELETED";
234
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SHARE_UPDATED"] = 34] = "PROPERTY_SHARE_UPDATED";
235
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_ADDED"] = 35] = "PROPERTY_SALE_ADDED";
236
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SALE_DELETED"] = 36] = "PROPERTY_SALE_DELETED";
237
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_ADDED"] = 37] = "PROPERTY_SUBSCRIPTION_ADDED";
238
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_SUBSCRIPTION_DELETED"] = 38] = "PROPERTY_SUBSCRIPTION_DELETED";
239
+ AppEventTypeEnum[AppEventTypeEnum["PROPERTY_VALUATION_DOCUMENT_CREATED"] = 39] = "PROPERTY_VALUATION_DOCUMENT_CREATED";
240
+ AppEventTypeEnum[AppEventTypeEnum["SERVICE_SUBSCRIPTION_UPDATED"] = 40] = "SERVICE_SUBSCRIPTION_UPDATED";
241
+ AppEventTypeEnum[AppEventTypeEnum["SOLE_DEPRECIATION_METHOD_UPDATED"] = 41] = "SOLE_DEPRECIATION_METHOD_UPDATED";
242
+ AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 42] = "TAX_REVIEW_UPDATED";
243
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 43] = "TRANSACTION_CREATED";
244
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 44] = "TRANSACTION_DELETED";
245
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 45] = "TRANSACTION_UPDATED";
246
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_RECEIPT"] = 46] = "TRANSACTION_UPDATED_WITH_RECEIPT";
247
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 47] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
248
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 48] = "TRANSACTION_RECEIPT_CREATED";
249
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 49] = "TRANSACTION_RECEIPT_DELETED";
250
+ AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 50] = "TRANSACTIONS_CREATED";
251
+ AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 51] = "USER_UPDATED";
252
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 52] = "VEHICLE_CLAIM_UPDATED";
253
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 53] = "VEHICLE_CLAIM_CREATED";
254
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 54] = "VEHICLE_CLAIM_DETAILS_UPDATED";
255
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 55] = "VEHICLE_CLAIM_DETAILS_CREATED";
256
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 56] = "VEHICLE_LOGBOOK_CREATED";
257
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 57] = "VEHICLE_LOGBOOK_UPDATED";
258
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 58] = "VEHICLE_LOGBOOK_DELETED";
259
+ AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 59] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
255
260
  })(AppEventTypeEnum || (AppEventTypeEnum = {}));
256
261
 
257
262
  class EventDispatcherService {
@@ -601,6 +606,8 @@ const ENDPOINTS = {
601
606
  DEPRECIATIONS_GET: new Endpoint('GET', '\\/depreciations'),
602
607
  DEPRECIATIONS_POST: new Endpoint('POST', '\\/depreciations'),
603
608
  DEPRECIATIONS_PUT: new Endpoint('PUT', '\\/depreciations\\/\\d+'),
609
+ DEPRECIATION_RECEIPTS_POST: new Endpoint('POST', '\\/depreciations\\/\\d+\\/receipts'),
610
+ DEPRECIATION_RECEIPTS_DELETE: new Endpoint('DELETE', '\\/depreciations\\/\\d+\\/receipts\\/\\d+'),
604
611
  EMPLOYEES_GET: new Endpoint('GET', '\\/employees'),
605
612
  EMPLOYEES_INVITES_GET: new Endpoint('GET', '\\/employees\\/\\invites'),
606
613
  EMPLOYEES_INVITES_DELETE: new Endpoint('DELETE', '\\/employees\\/\\invites\\/\\d+'),
@@ -675,11 +682,13 @@ const ENDPOINTS = {
675
682
  SUBSCRIPTION_ITEMS_PUT: new Endpoint('PUT', '\\/subscriptions\\/items'),
676
683
  SOLE_BUSINESSES_GET: new Endpoint('GET', '\\/sole-businesses'),
677
684
  SOLE_BUSINESSES_POST: new Endpoint('POST', '\\/sole-businesses'),
678
- SOLE_BUSINESSES_PUT: new Endpoint('PUT', '\\/sole-businesses\\d+'),
685
+ SOLE_BUSINESSES_PUT: new Endpoint('PUT', '\\/sole-businesses\\/\\d+'),
686
+ SOLE_DEPRECIATION_METHODS_GET: new Endpoint('GET', '\\/sole-depreciation-methods'),
687
+ SOLE_DEPRECIATION_METHODS_PUT: new Endpoint('PUT', '\\/sole-depreciation-methods\\/\\d+'),
679
688
  SOLE_INVOICE_TEMPLATES_GET: new Endpoint('GET', '\\/sole-invoice-templates'),
680
689
  SOLE_INVOICE_TEMPLATES_POST: new Endpoint('POST', '\\/sole-invoice-templates'),
681
- SOLE_INVOICE_TEMPLATES_PUT: new Endpoint('PUT', '\\/sole-invoice-templates\\d+'),
682
- SOLE_INVOICE_TEMPLATES_DELETE: new Endpoint('DELETE', '\\/sole-invoice-templates\\d+'),
690
+ SOLE_INVOICE_TEMPLATES_PUT: new Endpoint('PUT', '\\/sole-invoice-templates\\/\\d+'),
691
+ SOLE_INVOICE_TEMPLATES_DELETE: new Endpoint('DELETE', '\\/sole-invoice-templates\\/\\d+'),
683
692
  TAX_CALCULATION_POST: new Endpoint('POST', '\\/tax-calculation'),
684
693
  TAX_REVIEWS_GET: new Endpoint('GET', '\\/tax-reviews'),
685
694
  TAX_REVIEWS_DELETE: new Endpoint('DELETE', '\\/tax-reviews\\/\\d+'),
@@ -2447,6 +2456,65 @@ __decorate([
2447
2456
  Type(() => SoleInvoiceTemplate)
2448
2457
  ], SoleInvoice.prototype, "template", void 0);
2449
2458
 
2459
+ /**
2460
+ * Class contains traveled kilometers and work usage percent in 12 weeks date range
2461
+ * @TODO Vik: Best period: move this and related logic to backend
2462
+ */
2463
+ class LogbookPeriod {
2464
+ isEndOfYear() {
2465
+ return this.to === new FinancialYear().endDate;
2466
+ }
2467
+ getWorkUsageByClaim(claim) {
2468
+ const claimKilometers = this.logbooks.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
2469
+ return Math.round(this.workUsage * (claimKilometers / this.kilometers));
2470
+ }
2471
+ }
2472
+ __decorate([
2473
+ Type(() => Date)
2474
+ ], LogbookPeriod.prototype, "from", void 0);
2475
+ __decorate([
2476
+ Type(() => Date)
2477
+ ], LogbookPeriod.prototype, "to", void 0);
2478
+
2479
+ class Vehicle$1 extends AbstractModel {
2480
+ }
2481
+
2482
+ class VehicleLogbook$1 extends AbstractModel {
2483
+ }
2484
+
2485
+ class VehicleLogbook extends VehicleLogbook$1 {
2486
+ get kilometers() {
2487
+ return this.odometerEnd - this.odometerStart;
2488
+ }
2489
+ get tankType() {
2490
+ return this.isSoleTank() ? TankTypeEnum.SOLE : TankTypeEnum.WORK;
2491
+ }
2492
+ isWorkTank() {
2493
+ return !this.business;
2494
+ }
2495
+ isSoleTank() {
2496
+ return !!this.business;
2497
+ }
2498
+ }
2499
+ /**
2500
+ * 12 weeks in milliseconds
2501
+ * "To work out your business-use percentage, you need to keep a logbook and the odometer readings for the logbook period.
2502
+ * The logbook period is a minimum continuous period of 12 weeks." © Nicole Kelly
2503
+ */
2504
+ VehicleLogbook.periodDuration = 7257600000;
2505
+ __decorate([
2506
+ Type(() => Date)
2507
+ ], VehicleLogbook.prototype, "date", void 0);
2508
+ __decorate([
2509
+ Type(() => SoleBusiness)
2510
+ ], VehicleLogbook.prototype, "business", void 0);
2511
+
2512
+ class Vehicle extends Vehicle$1 {
2513
+ }
2514
+ __decorate([
2515
+ Type(() => VehicleLogbook)
2516
+ ], Vehicle.prototype, "logbook", void 0);
2517
+
2450
2518
  class VehicleClaim$1 extends AbstractModel {
2451
2519
  }
2452
2520
 
@@ -2605,9 +2673,9 @@ var DepreciationCalculationEnum;
2605
2673
  (function (DepreciationCalculationEnum) {
2606
2674
  DepreciationCalculationEnum[DepreciationCalculationEnum["PRIME_COST"] = 1] = "PRIME_COST";
2607
2675
  DepreciationCalculationEnum[DepreciationCalculationEnum["DIMINISHING"] = 2] = "DIMINISHING";
2608
- DepreciationCalculationEnum[DepreciationCalculationEnum["CAPITAL"] = 3] = "CAPITAL";
2609
2676
  DepreciationCalculationEnum[DepreciationCalculationEnum["LVP"] = 4] = "LVP";
2610
2677
  DepreciationCalculationEnum[DepreciationCalculationEnum["AMORTISATION"] = 5] = "AMORTISATION";
2678
+ DepreciationCalculationEnum[DepreciationCalculationEnum["SBP"] = 6] = "SBP";
2611
2679
  })(DepreciationCalculationEnum || (DepreciationCalculationEnum = {}));
2612
2680
 
2613
2681
  class DepreciationCapitalProject$1 extends AbstractModel {
@@ -3199,6 +3267,9 @@ __decorate([
3199
3267
  Type(() => Date)
3200
3268
  ], BankTransaction.prototype, "date", void 0);
3201
3269
 
3270
+ /**
3271
+ * @TODO Alex: clarify grouping rules and refactor
3272
+ */
3202
3273
  class Depreciation extends Depreciation$1 {
3203
3274
  constructor() {
3204
3275
  super(...arguments);
@@ -3209,6 +3280,7 @@ class Depreciation extends Depreciation$1 {
3209
3280
  */
3210
3281
  this.amount = 0;
3211
3282
  }
3283
+ // Type checking
3212
3284
  isCapital() {
3213
3285
  return this.type === DepreciationTypeEnum.CAPITAL_WORKS;
3214
3286
  }
@@ -3218,30 +3290,9 @@ class Depreciation extends Depreciation$1 {
3218
3290
  isAsset() {
3219
3291
  return this.type === DepreciationTypeEnum.PLANT_EQUIPMENT;
3220
3292
  }
3221
- /**
3222
- * check if depreciation should be displayed in written off category
3223
- * details in project documentation
3224
- * @TODO new FinancialYear(this.writeOffDate) === new FinancialYear()
3225
- */
3226
- isWrittenOff() {
3227
- return this.isAsset && this.writeOffDate && new FinancialYear(this.writeOffDate).year === this.financialYear;
3228
- }
3229
- /**
3230
- * Check if depreciation is Plant & Equipment
3231
- */
3232
- isPlantEquipment() {
3233
- return this.isAsset() && !this.isWrittenOff() && !this.isLowValuePool();
3234
- }
3235
- /**
3236
- * check if depreciation should be displayed in low value pool
3237
- * details in project documentation
3238
- * @TODO new FinancialYear(this.writeOffDate) === new FinancialYear()
3239
- */
3240
- isLowValuePool() {
3241
- return this.isAsset &&
3242
- this.calculation === DepreciationCalculationEnum.DIMINISHING &&
3243
- this.amount > Depreciation.WRITTEN_OFF_THRESHOLD &&
3244
- this.amount <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
3293
+ // Calculation checking
3294
+ isSBPCalculation() {
3295
+ return this.calculation === DepreciationCalculationEnum.SBP;
3245
3296
  }
3246
3297
  isPrimeCost() {
3247
3298
  return this.calculation === DepreciationCalculationEnum.PRIME_COST;
@@ -3249,6 +3300,30 @@ class Depreciation extends Depreciation$1 {
3249
3300
  isDiminishing() {
3250
3301
  return this.calculation === DepreciationCalculationEnum.DIMINISHING;
3251
3302
  }
3303
+ // Pool checking
3304
+ isPlantEquipmentPool() {
3305
+ return this.isAsset() && !this.isSBPCalculation() && !this.isWrittenOff() && !this.isLVP();
3306
+ }
3307
+ isLVP() {
3308
+ return this.isAsset()
3309
+ && !this.isSBPCalculation()
3310
+ && this.isDiminishing()
3311
+ && this.currentYearForecast.closeBalance > Depreciation.WRITTEN_OFF_THRESHOLD
3312
+ && this.currentYearForecast.closeBalance <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
3313
+ }
3314
+ isSBP() {
3315
+ return this.isAsset() && this.isSBPCalculation() && !this.isWrittenOff();
3316
+ }
3317
+ isWrittenOff() {
3318
+ return this.writeOffYear === new FinancialYear().year;
3319
+ }
3320
+ get writeOffYear() {
3321
+ var _a;
3322
+ if (!this.writeOffManualDate && !this.writeOffDate) {
3323
+ return null;
3324
+ }
3325
+ return (_a = new FinancialYear(this.writeOffManualDate || this.writeOffDate)) === null || _a === void 0 ? void 0 : _a.year;
3326
+ }
3252
3327
  /**
3253
3328
  * Check if depreciation chart accounts heading related to vehicles category
3254
3329
  */
@@ -3351,6 +3426,9 @@ __decorate([
3351
3426
  Type(() => BankTransaction)
3352
3427
  ], Depreciation.prototype, "bankTransaction", void 0);
3353
3428
 
3429
+ class SoleBusinessActivity$1 extends AbstractModel {
3430
+ }
3431
+
3354
3432
  class SoleBusiness extends SoleBusiness$1 {
3355
3433
  getPhotoPlaceholder() {
3356
3434
  return `${this.name[0]}${this.name[1]}`;
@@ -3359,6 +3437,10 @@ class SoleBusiness extends SoleBusiness$1 {
3359
3437
  return this.logo;
3360
3438
  }
3361
3439
  }
3440
+ /**
3441
+ * Maximum number of businesses that a person can have, according to the ATO
3442
+ */
3443
+ SoleBusiness.businessesLimit = 6;
3362
3444
  __decorate([
3363
3445
  Type(() => User)
3364
3446
  ], SoleBusiness.prototype, "user", void 0);
@@ -3383,6 +3465,27 @@ __decorate([
3383
3465
  __decorate([
3384
3466
  Type(() => Depreciation)
3385
3467
  ], SoleBusiness.prototype, "depreciations", void 0);
3468
+ __decorate([
3469
+ Type(() => SoleBusinessActivity$1)
3470
+ ], SoleBusiness.prototype, "activity", void 0);
3471
+
3472
+ class SoleBusinessActivity extends SoleBusinessActivity$1 {
3473
+ }
3474
+
3475
+ class SoleDepreciationMethod$1 extends AbstractModel {
3476
+ }
3477
+
3478
+ var SoleDepreciationMethodEnum;
3479
+ (function (SoleDepreciationMethodEnum) {
3480
+ SoleDepreciationMethodEnum[SoleDepreciationMethodEnum["SBP"] = 1] = "SBP";
3481
+ SoleDepreciationMethodEnum[SoleDepreciationMethodEnum["DEPRECIATION"] = 2] = "DEPRECIATION";
3482
+ })(SoleDepreciationMethodEnum || (SoleDepreciationMethodEnum = {}));
3483
+
3484
+ class SoleDepreciationMethod extends SoleDepreciationMethod$1 {
3485
+ isSBP() {
3486
+ return this.method === SoleDepreciationMethodEnum.SBP;
3487
+ }
3488
+ }
3386
3489
 
3387
3490
  class SoleDetails$1 extends AbstractModel {
3388
3491
  }
@@ -4652,65 +4755,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
4652
4755
  }]
4653
4756
  }] });
4654
4757
 
4655
- /**
4656
- * Class contains traveled kilometers and work usage percent in 12 weeks date range
4657
- * @TODO Vik: Best period: move this and related logic to backend
4658
- */
4659
- class LogbookPeriod {
4660
- isEndOfYear() {
4661
- return this.to === new FinancialYear().endDate;
4662
- }
4663
- getWorkUsageByClaim(claim) {
4664
- const claimKilometers = this.logbooks.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
4665
- return Math.round(this.workUsage * (claimKilometers / this.kilometers));
4666
- }
4667
- }
4668
- __decorate([
4669
- Type(() => Date)
4670
- ], LogbookPeriod.prototype, "from", void 0);
4671
- __decorate([
4672
- Type(() => Date)
4673
- ], LogbookPeriod.prototype, "to", void 0);
4674
-
4675
- class Vehicle$1 extends AbstractModel {
4676
- }
4677
-
4678
- class VehicleLogbook$1 extends AbstractModel {
4679
- }
4680
-
4681
- class VehicleLogbook extends VehicleLogbook$1 {
4682
- get kilometers() {
4683
- return this.odometerEnd - this.odometerStart;
4684
- }
4685
- get tankType() {
4686
- return this.isSoleTank() ? TankTypeEnum.SOLE : TankTypeEnum.WORK;
4687
- }
4688
- isWorkTank() {
4689
- return !this.business;
4690
- }
4691
- isSoleTank() {
4692
- return !!this.business;
4693
- }
4694
- }
4695
- /**
4696
- * 12 weeks in milliseconds
4697
- * "To work out your business-use percentage, you need to keep a logbook and the odometer readings for the logbook period.
4698
- * The logbook period is a minimum continuous period of 12 weeks." © Nicole Kelly
4699
- */
4700
- VehicleLogbook.periodDuration = 7257600000;
4701
- __decorate([
4702
- Type(() => Date)
4703
- ], VehicleLogbook.prototype, "date", void 0);
4704
- __decorate([
4705
- Type(() => SoleBusiness)
4706
- ], VehicleLogbook.prototype, "business", void 0);
4707
-
4708
- class Vehicle extends Vehicle$1 {
4709
- }
4710
- __decorate([
4711
- Type(() => VehicleLogbook)
4712
- ], Vehicle.prototype, "logbook", void 0);
4713
-
4714
4758
  class VehicleClaimCollection extends Collection {
4715
4759
  /**
4716
4760
  * Get remaining kilometers limit. Total limit ({@link VehicleClaim.totalKmsLimit}) - claimed kilometers from other vehicle claims
@@ -5297,19 +5341,22 @@ class DepreciationCollection extends Collection {
5297
5341
  return this.filter((depreciation) => depreciation.isAsset());
5298
5342
  }
5299
5343
  getPlantEquipment() {
5300
- return this.filter((depreciation) => depreciation.isPlantEquipment());
5344
+ return this.filter((depreciation) => depreciation.isPlantEquipmentPool());
5301
5345
  }
5302
5346
  getCapitalDepreciations() {
5303
5347
  return this.filter((depreciation) => depreciation.isCapital());
5304
5348
  }
5305
5349
  getBorrowingExpenseDepreciations() {
5306
- return new DepreciationCollection(this.items.filter((depreciation) => depreciation.isBorrowingExpense()));
5350
+ return this.filter((depreciation) => depreciation.isBorrowingExpense());
5307
5351
  }
5308
5352
  getWrittenOffDepreciations() {
5309
- return new DepreciationCollection(this.items.filter((depreciation) => depreciation.isWrittenOff()));
5353
+ return this.filter((depreciation) => depreciation.isWrittenOff());
5354
+ }
5355
+ getLVPDepreciations() {
5356
+ return this.filter((depreciation) => depreciation.isLVP());
5310
5357
  }
5311
- getLowValuePoolDepreciations() {
5312
- return new DepreciationCollection(this.items.filter((depreciation) => depreciation.isLowValuePool()));
5358
+ getSBPDepreciations() {
5359
+ return this.filter((depreciation) => depreciation.isSBP());
5313
5360
  }
5314
5361
  getCapitalProjects() {
5315
5362
  return uniqBy(compact(this.items.map((depreciation) => {
@@ -5320,9 +5367,7 @@ class DepreciationCollection extends Collection {
5320
5367
  * Get a new collection of depreciations related to vehicles
5321
5368
  */
5322
5369
  getVehicleDepreciations() {
5323
- return this.create(this.items.filter((depreciation) => {
5324
- return depreciation.isVehicleDepreciation();
5325
- }));
5370
+ return this.filter((depreciation) => depreciation.isVehicleDepreciation());
5326
5371
  }
5327
5372
  getByTankType(tankType) {
5328
5373
  return this.create(this.items.filter((depreciation) => {
@@ -5639,7 +5684,7 @@ class DepreciationReportItem extends Depreciation {
5639
5684
  }
5640
5685
  get categoryTitle() {
5641
5686
  switch (true) {
5642
- case this.isPlantEquipment():
5687
+ case this.isPlantEquipmentPool():
5643
5688
  return 'Plant & Equipment';
5644
5689
  case this.isWrittenOff():
5645
5690
  return 'Written Off Items';
@@ -7210,6 +7255,7 @@ var DepreciationGroupEnum;
7210
7255
  DepreciationGroupEnum[DepreciationGroupEnum["LOW_VALUE_POOL"] = 2] = "LOW_VALUE_POOL";
7211
7256
  DepreciationGroupEnum[DepreciationGroupEnum["WRITTEN_OFF_ITEMS"] = 3] = "WRITTEN_OFF_ITEMS";
7212
7257
  DepreciationGroupEnum[DepreciationGroupEnum["BORROWING_EXPENSES"] = 4] = "BORROWING_EXPENSES";
7258
+ DepreciationGroupEnum[DepreciationGroupEnum["SMALL_BUSINESS_POOL"] = 5] = "SMALL_BUSINESS_POOL";
7213
7259
  })(DepreciationGroupEnum || (DepreciationGroupEnum = {}));
7214
7260
 
7215
7261
  /**
@@ -7267,7 +7313,12 @@ const DEPRECIATION_GROUPS = {
7267
7313
  label: 'Written Off Items',
7268
7314
  description: 'Items below $300, replaced or obsolete are fully deductible',
7269
7315
  icon: 'cart'
7270
- }
7316
+ },
7317
+ [DepreciationGroupEnum.SMALL_BUSINESS_POOL]: {
7318
+ label: 'Small business pool',
7319
+ description: 'The small business pool allows business owners to claim depreciation on plant and equipment items at an accelerated rate.',
7320
+ icon: 'portfolio'
7321
+ },
7271
7322
  };
7272
7323
 
7273
7324
  class DepreciationReceipt$1 extends AbstractModel {
@@ -8016,7 +8067,7 @@ class MyTaxDeductions {
8016
8067
  DeductionSelfEducationTypeEnum.IMPROVE_SKILLS_FOR_CURRENT_EARNINGS_K : null;
8017
8068
  this.workRelatedSelfEducationTotalAmount = this.workRelatedSelfEducationExpenses.sumBy('claimAmount');
8018
8069
  this.lowValuePoolDeductionTotalAmount = this.depreciations.getByTankType(TankTypeEnum.WORK)
8019
- .getLowValuePoolDepreciations().sumBy('claimAmount');
8070
+ .getLVPDepreciations().sumBy('claimAmount');
8020
8071
  this.interestExpensesTotalAmount = this.transactions
8021
8072
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.interestExpenses)
8022
8073
  .sumBy('claimAmount');
@@ -8758,6 +8809,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
8758
8809
  }]
8759
8810
  }] });
8760
8811
 
8812
+ class SoleBusinessActivityService extends RestService {
8813
+ constructor() {
8814
+ super(...arguments);
8815
+ this.modelClass = SoleBusinessActivity;
8816
+ this.url = 'sole-business-activities';
8817
+ this.isHydra = true;
8818
+ }
8819
+ }
8820
+ SoleBusinessActivityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessActivityService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
8821
+ SoleBusinessActivityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessActivityService, providedIn: 'root' });
8822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessActivityService, decorators: [{
8823
+ type: Injectable,
8824
+ args: [{
8825
+ providedIn: 'root'
8826
+ }]
8827
+ }] });
8828
+
8761
8829
  class SoleContactService extends RestService {
8762
8830
  constructor() {
8763
8831
  super(...arguments);
@@ -8775,6 +8843,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
8775
8843
  }]
8776
8844
  }] });
8777
8845
 
8846
+ /**
8847
+ * @TODO Alex: extend rest service when refactored
8848
+ */
8849
+ class SoleDepreciationMethodService {
8850
+ constructor(http, environment, eventDispatcherService, toastService) {
8851
+ this.http = http;
8852
+ this.environment = environment;
8853
+ this.eventDispatcherService = eventDispatcherService;
8854
+ this.toastService = toastService;
8855
+ this.cacheSubject = new ReplaySubject(1);
8856
+ this.url = 'sole-depreciation-methods';
8857
+ }
8858
+ get() {
8859
+ if (!this.cache) {
8860
+ this.http.get(`${this.environment.apiV2}/${this.url}`)
8861
+ .pipe(map((response) => plainToClass(SoleDepreciationMethod, response['hydra:member'][0])))
8862
+ .subscribe((soleDepreciationMethod) => {
8863
+ this.cache = soleDepreciationMethod;
8864
+ this.cacheSubject.next(this.cache);
8865
+ return soleDepreciationMethod;
8866
+ });
8867
+ }
8868
+ return this.cacheSubject.asObservable();
8869
+ }
8870
+ update(soleDepreciationMethod) {
8871
+ return this.http.put(`${this.environment.apiV2}/${this.url}/${soleDepreciationMethod.id}`, soleDepreciationMethod)
8872
+ .pipe(map((soleDepreciationMethodBase) => {
8873
+ const method = plainToClass(SoleDepreciationMethod, soleDepreciationMethodBase);
8874
+ this.cache = method;
8875
+ this.cacheSubject.next(this.cache);
8876
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.SOLE_DEPRECIATION_METHOD_UPDATED, method));
8877
+ return this.cache;
8878
+ }), catchError((error) => {
8879
+ this.toastService.error(error.error['hydra:description']);
8880
+ return throwError$1(error);
8881
+ }));
8882
+ }
8883
+ }
8884
+ SoleDepreciationMethodService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleDepreciationMethodService, deps: [{ token: i1.HttpClient }, { token: 'environment' }, { token: EventDispatcherService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
8885
+ SoleDepreciationMethodService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleDepreciationMethodService, providedIn: 'root' });
8886
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleDepreciationMethodService, decorators: [{
8887
+ type: Injectable,
8888
+ args: [{
8889
+ providedIn: 'root'
8890
+ }]
8891
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
8892
+ type: Inject,
8893
+ args: ['environment']
8894
+ }] }, { type: EventDispatcherService }, { type: ToastService }]; } });
8895
+
8778
8896
  /**
8779
8897
  * @TODO TT-1777 Alex: extend from rest service when it refactored
8780
8898
  */
@@ -9386,6 +9504,13 @@ class PropertyService extends RestService {
9386
9504
  return updatedProperty;
9387
9505
  }));
9388
9506
  }
9507
+ updateDepreciationCalculation(property) {
9508
+ const propertyToUpdate = plainToClass(Property, { id: property.id, depreciationCalculation: property.depreciationCalculation });
9509
+ return this.update(propertyToUpdate).pipe(map((updatedProperty) => {
9510
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_DEPRECIATION_CALCULATION_UPDATED, updatedProperty));
9511
+ return updatedProperty;
9512
+ }));
9513
+ }
9389
9514
  getByCategoryId(id) {
9390
9515
  return this.get().pipe(map((properties) => {
9391
9516
  return properties.filter((property) => property.category.id === id);
@@ -9728,57 +9853,94 @@ function enumToList(data) {
9728
9853
  return list;
9729
9854
  }
9730
9855
 
9731
- class TransactionReceiptService {
9732
- constructor(http, eventDispatcherService, environment) {
9856
+ /**
9857
+ * Abstract service class to work with transactions-like receipt files (transactions, depreciations, e.t.c.)
9858
+ * @Todo TT-2191 refactor service when receipts API will be updated
9859
+ */
9860
+ class ReceiptService {
9861
+ constructor(http, eventDispatcherService, environment, toastService) {
9733
9862
  this.http = http;
9734
9863
  this.eventDispatcherService = eventDispatcherService;
9735
9864
  this.environment = environment;
9736
- this.url = 'receipts';
9737
- this.listenEvents();
9865
+ this.toastService = toastService;
9866
+ }
9867
+ listenEvents() {
9868
+ this.listenParentWithReceiptUpdated();
9869
+ this.listenParentWithoutReceiptUpdated();
9738
9870
  }
9739
9871
  /**
9740
- * Transaction instance is necessary to take the ID and the receipt file from it.
9872
+ * Entity is necessary to take the ID and the receipt file from it.
9741
9873
  */
9742
- add(transaction) {
9874
+ add(receiptEntity) {
9743
9875
  const formData = new FormData();
9744
- formData.append('file', transaction.file);
9745
- this.http.post(`${this.environment.apiV2}/transactions/${transaction.id}/${this.url}`, formData)
9746
- .subscribe((receiptResponse) => {
9747
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_RECEIPT_CREATED, plainToClass(TransactionReceipt, receiptResponse)));
9748
- });
9876
+ formData.append('file', receiptEntity.file);
9877
+ return this.http.post(`${this.environment.apiV2}/${this.entityType}/${receiptEntity.id}/receipts`, formData)
9878
+ .pipe(map((receipt) => {
9879
+ const uploadedReceipt = this.createModelInstance(receipt);
9880
+ this.eventDispatcherService.dispatch(new AppEvent(this.receiptCreatedEvent, uploadedReceipt));
9881
+ return uploadedReceipt;
9882
+ }));
9883
+ }
9884
+ delete(receiptEntity) {
9885
+ return this.http.delete(`${this.environment.apiV2}/${this.entityType}/${receiptEntity.id}/receipts/${receiptEntity.receipt.id}`)
9886
+ .pipe(map(() => {
9887
+ this.eventDispatcherService.dispatch(new AppEvent(this.receiptDeletedEvent, receiptEntity));
9888
+ }));
9749
9889
  }
9750
9890
  /**
9751
- * Transaction instance is necessary to take the ID and the receipt ID from it.
9891
+ * Parent entity was updated with attached receipt
9752
9892
  */
9753
- delete(transaction) {
9754
- this.http.delete(`${this.environment.apiV2}/transactions/${transaction.id}/${this.url}/${transaction.receipt.id}`)
9755
- .subscribe(() => {
9756
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED, transaction));
9757
- });
9758
- }
9759
- listenEvents() {
9760
- this.listenTransactionWithReceiptUpdated();
9761
- this.listenTransactionWithoutReceiptUpdated();
9762
- }
9763
- listenTransactionWithReceiptUpdated() {
9764
- this.eventDispatcherService.on([
9765
- AppEventTypeEnum.TRANSACTION_CREATED_WITH_NEW_RECEIPT,
9766
- AppEventTypeEnum.TRANSACTION_UPDATED_WITH_NEW_RECEIPT
9767
- ]).subscribe((transaction) => {
9768
- this.add(transaction);
9893
+ listenParentWithReceiptUpdated() {
9894
+ this.eventDispatcherService.on(this.entityUpdatedWithReceiptEvent)
9895
+ .subscribe((receiptEntity) => {
9896
+ this.add(receiptEntity).subscribe();
9769
9897
  });
9770
9898
  }
9771
9899
  /**
9772
- * Case when transaction was updated, but receipt was removed
9900
+ * Parent entity was updated, but receipt was removed
9773
9901
  */
9774
- listenTransactionWithoutReceiptUpdated() {
9775
- this.eventDispatcherService.on(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_DELETED_RECEIPT)
9776
- .subscribe((transaction) => {
9777
- this.delete(transaction);
9902
+ listenParentWithoutReceiptUpdated() {
9903
+ this.eventDispatcherService.on(this.entityUpdatedWithDeletedReceiptEvent)
9904
+ .subscribe((receiptEntity) => {
9905
+ this.delete(receiptEntity).subscribe();
9778
9906
  });
9779
9907
  }
9908
+ createModelInstance(data) {
9909
+ return plainToClass(this.modelClass, data);
9910
+ }
9911
+ }
9912
+ ReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
9913
+ ReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ReceiptService, providedIn: 'root' });
9914
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ReceiptService, decorators: [{
9915
+ type: Injectable,
9916
+ args: [{
9917
+ providedIn: 'root'
9918
+ }]
9919
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
9920
+ type: Inject,
9921
+ args: ['environment']
9922
+ }] }, { type: ToastService }]; } });
9923
+
9924
+ /**
9925
+ * @Todo TT-2191 refactor service when receipts API will be updated
9926
+ */
9927
+ class TransactionReceiptService extends ReceiptService {
9928
+ constructor(http, eventDispatcherService, environment, toastService) {
9929
+ super(http, eventDispatcherService, environment, toastService);
9930
+ this.http = http;
9931
+ this.eventDispatcherService = eventDispatcherService;
9932
+ this.environment = environment;
9933
+ this.toastService = toastService;
9934
+ this.modelClass = TransactionReceipt;
9935
+ this.entityType = AssetEntityTypeEnum.TRANSACTIONS;
9936
+ this.receiptCreatedEvent = AppEventTypeEnum.TRANSACTION_RECEIPT_CREATED;
9937
+ this.receiptDeletedEvent = AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED;
9938
+ this.entityUpdatedWithReceiptEvent = AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT;
9939
+ this.entityUpdatedWithDeletedReceiptEvent = AppEventTypeEnum.TRANSACTION_UPDATED_WITH_DELETED_RECEIPT;
9940
+ this.listenEvents();
9941
+ }
9780
9942
  }
9781
- TransactionReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
9943
+ TransactionReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
9782
9944
  TransactionReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, providedIn: 'root' });
9783
9945
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionReceiptService, decorators: [{
9784
9946
  type: Injectable,
@@ -9788,7 +9950,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
9788
9950
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
9789
9951
  type: Inject,
9790
9952
  args: ['environment']
9791
- }] }]; } });
9953
+ }] }, { type: ToastService }]; } });
9792
9954
 
9793
9955
  /**
9794
9956
  * Service for transactions business logic
@@ -9905,10 +10067,10 @@ class TransactionService extends RestService {
9905
10067
  transactions.forEach((transaction, index) => {
9906
10068
  // @TODO backend: need to upload file in the same backend endpoint with transaction add/update
9907
10069
  // check if passed receipt and upload file
9908
- if (transaction.file && (transaction.file instanceof File)) {
10070
+ if (transaction.file) {
9909
10071
  transaction.id = response[index].id;
9910
10072
  addedTransactions[index].file = transaction.file;
9911
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_CREATED_WITH_NEW_RECEIPT, addedTransactions[index]));
10073
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT, addedTransactions[index]));
9912
10074
  }
9913
10075
  // @TODO Viktor: implement API for saving of nested transactions
9914
10076
  // add child transactions if exist
@@ -9941,9 +10103,9 @@ class TransactionService extends RestService {
9941
10103
  const updatedTransaction = plainToClass(Transaction, response);
9942
10104
  // @TODO need to upload file in the same backend endpoint with transaction add/update
9943
10105
  // check if passed new receipt and upload file
9944
- if (transaction.file && (transaction.file instanceof File)) {
10106
+ if (transaction.file) {
9945
10107
  updatedTransaction.file = transaction.file;
9946
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_NEW_RECEIPT, updatedTransaction));
10108
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.TRANSACTION_UPDATED_WITH_RECEIPT, updatedTransaction));
9947
10109
  // receipt file was removed from form - we should delete receipt from transaction
9948
10110
  }
9949
10111
  else if (!transaction.file && transaction.receipt) {
@@ -9967,8 +10129,7 @@ class TransactionService extends RestService {
9967
10129
  this.addBatch(childTransactionsToAdd).subscribe();
9968
10130
  }
9969
10131
  }
9970
- replace(this.cache, updatedTransaction);
9971
- this.updateCache();
10132
+ this.replaceInCache(updatedTransaction);
9972
10133
  return updatedTransaction;
9973
10134
  }));
9974
10135
  }
@@ -10082,16 +10243,14 @@ class TransactionService extends RestService {
10082
10243
  // we don't need to keep file after save
10083
10244
  transactionToUpdate.file = null;
10084
10245
  transactionToUpdate.receipt = transactionReceipt;
10085
- replace(this.cache, transactionToUpdate);
10086
- this.updateCache();
10246
+ this.replaceInCache(transactionToUpdate);
10087
10247
  });
10088
10248
  }
10089
10249
  listenReceiptDeleted() {
10090
10250
  this.eventDispatcherService.on(AppEventTypeEnum.TRANSACTION_RECEIPT_DELETED).subscribe((transaction) => {
10091
10251
  const transactionToUpdate = this.find(transaction.id);
10092
10252
  transactionToUpdate.receipt = null;
10093
- replace(this.cache, transactionToUpdate);
10094
- this.updateCache();
10253
+ this.replaceInCache(transactionToUpdate);
10095
10254
  });
10096
10255
  }
10097
10256
  listenVehicleClaimChanges() {
@@ -10104,6 +10263,10 @@ class TransactionService extends RestService {
10104
10263
  this.resetCache();
10105
10264
  });
10106
10265
  }
10266
+ replaceInCache(transactionToReplace) {
10267
+ replace(this.cache, transactionToReplace);
10268
+ this.updateCache();
10269
+ }
10107
10270
  }
10108
10271
  TransactionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: TransactionReceiptService }], target: i0.ɵɵFactoryTarget.Injectable });
10109
10272
  TransactionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TransactionService, providedIn: 'root' });
@@ -11193,62 +11356,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
11193
11356
  }] }]; } });
11194
11357
 
11195
11358
  /**
11196
- * Service for work with DepreciationCapitalProjects
11359
+ * @Todo TT-2191 refactor service when receipts API will be updated
11197
11360
  */
11198
- class DepreciationCapitalProjectService {
11199
- constructor(http, environment) {
11361
+ class DepreciationReceiptService extends ReceiptService {
11362
+ constructor(http, eventDispatcherService, environment, toastService) {
11363
+ super(http, eventDispatcherService, environment, toastService);
11200
11364
  this.http = http;
11365
+ this.eventDispatcherService = eventDispatcherService;
11201
11366
  this.environment = environment;
11202
- this.cacheSubject = new ReplaySubject(1);
11203
- }
11204
- get(propertyId) {
11205
- this.cacheSubject.next([]);
11206
- this.http.get(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`)
11207
- .subscribe((capitalProjectsBase) => {
11208
- this.cache = capitalProjectsBase.map((capitalProjectBase) => {
11209
- return plainToClass(DepreciationCapitalProject, capitalProjectBase);
11210
- });
11211
- this.cacheSubject.next(this.cache);
11212
- });
11213
- return this.cacheSubject.asObservable();
11214
- }
11215
- add(capitalProject, propertyId) {
11216
- return this.http.post(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`, capitalProject)
11217
- .pipe(map((capitalProjectBase) => {
11218
- this.cache.push(plainToClass(DepreciationCapitalProject, capitalProjectBase));
11219
- this.cacheSubject.next(this.cache);
11220
- }));
11221
- }
11222
- update(capitalProject, propertyId) {
11223
- return this.http.put(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`, capitalProject)
11224
- .pipe(map((capitalProjectBase) => {
11225
- replace(this.cache, plainToClass(DepreciationCapitalProject, capitalProjectBase));
11226
- this.cacheSubject.next(this.cache);
11227
- }));
11228
- }
11229
- delete(capitalProject, propertyId) {
11230
- return this.http.delete(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`)
11231
- .pipe(map(() => {
11232
- this.cache = this.cache.filter((item) => capitalProject.id !== item.id);
11233
- this.cacheSubject.next(this.cache);
11234
- }));
11367
+ this.toastService = toastService;
11368
+ this.modelClass = DepreciationReceipt;
11369
+ this.entityType = AssetEntityTypeEnum.DEPRECIATIONS;
11370
+ this.receiptCreatedEvent = AppEventTypeEnum.DEPRECIATION_RECEIPT_CREATED;
11371
+ this.receiptDeletedEvent = AppEventTypeEnum.DEPRECIATION_RECEIPT_DELETED;
11372
+ this.entityUpdatedWithDeletedReceiptEvent = AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT;
11373
+ this.entityUpdatedWithReceiptEvent = AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT;
11374
+ this.listenEvents();
11235
11375
  }
11236
11376
  }
11237
- DepreciationCapitalProjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
11238
- DepreciationCapitalProjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, providedIn: 'root' });
11239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, decorators: [{
11377
+ DepreciationReceiptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationReceiptService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Injectable });
11378
+ DepreciationReceiptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationReceiptService, providedIn: 'root' });
11379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationReceiptService, decorators: [{
11240
11380
  type: Injectable,
11241
11381
  args: [{
11242
11382
  providedIn: 'root'
11243
11383
  }]
11244
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
11384
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
11245
11385
  type: Inject,
11246
11386
  args: ['environment']
11247
- }] }]; } });
11387
+ }] }, { type: ToastService }]; } });
11248
11388
 
11249
11389
  class DepreciationService extends RestService {
11250
- constructor() {
11251
- super(...arguments);
11390
+ constructor(http, eventDispatcherService, environment, toastService, depreciationReceiptService) {
11391
+ super(http, eventDispatcherService, environment, toastService);
11392
+ this.http = http;
11393
+ this.eventDispatcherService = eventDispatcherService;
11394
+ this.environment = environment;
11395
+ this.toastService = toastService;
11396
+ this.depreciationReceiptService = depreciationReceiptService;
11252
11397
  this.modelClass = Depreciation;
11253
11398
  this.url = 'depreciations';
11254
11399
  }
@@ -11269,17 +11414,45 @@ class DepreciationService extends RestService {
11269
11414
  */
11270
11415
  addBatch(depreciations) {
11271
11416
  return super.addBatch(depreciations).pipe(map((newDepreciations) => {
11417
+ depreciations.forEach((depreciation, index) => {
11418
+ // @TODO backend: need to upload file in the same backend endpoint with depreciation add/update
11419
+ // check if passed receipt and upload file
11420
+ if (depreciation.file && (depreciation.file instanceof File)) {
11421
+ depreciation.id = newDepreciations[index].id;
11422
+ newDepreciations[index].file = depreciation.file;
11423
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT, newDepreciations[index]));
11424
+ }
11425
+ });
11272
11426
  this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATIONS_CREATED, newDepreciations));
11273
11427
  return newDepreciations;
11274
11428
  }));
11275
11429
  }
11430
+ update(depreciation) {
11431
+ return super.update(depreciation).pipe(map((updatedDepreciation) => {
11432
+ // @TODO need to upload file in the same backend endpoint with depreciation add/update
11433
+ // check if passed new receipt and upload file
11434
+ if (depreciation.file && (depreciation.file instanceof File)) {
11435
+ updatedDepreciation.file = depreciation.file;
11436
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_RECEIPT, updatedDepreciation));
11437
+ // receipt file was removed from form - we should delete receipt from transaction
11438
+ }
11439
+ else if (!depreciation.file && depreciation.receipt) {
11440
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.DEPRECIATION_UPDATED_WITH_DELETED_RECEIPT, updatedDepreciation));
11441
+ }
11442
+ return updatedDepreciation;
11443
+ }));
11444
+ }
11276
11445
  /**
11277
11446
  * Listen to Depreciations events
11278
11447
  */
11279
11448
  listenEvents() {
11280
11449
  this.listenToUpdatedLoan();
11450
+ this.listenReceiptAdded();
11451
+ this.listenReceiptDeleted();
11281
11452
  this.listenVehicleClaimChanges();
11282
11453
  this.listenToUpdatedBankAccount();
11454
+ this.listenSoleDepreciationMethodChanges();
11455
+ this.listenPropertyDepreciationCalculationChanges();
11283
11456
  }
11284
11457
  getOpenBalance(depreciation) {
11285
11458
  return this.http.post(`${this.environment.apiV2}/${this.url}/opening-balance?financialYear=${new FinancialYear().year}`, depreciation)
@@ -11287,21 +11460,20 @@ class DepreciationService extends RestService {
11287
11460
  return response || 0;
11288
11461
  }));
11289
11462
  }
11290
- /**
11291
- * Upload depreciation receipt
11292
- * @param depreciation for which will be uploaded receipt
11293
- */
11294
- uploadReceipt(depreciation) {
11295
- const formData = new FormData();
11296
- formData.append('file', depreciation.file);
11297
- depreciation.receipt = null;
11298
- this.http.post(`${this.environment.apiV2}/${this.url}/${depreciation.id}/receipts`, formData)
11299
- .subscribe((receiptResponse) => {
11463
+ listenReceiptAdded() {
11464
+ this.eventDispatcherService.on(AppEventTypeEnum.DEPRECIATION_RECEIPT_CREATED).subscribe((receipt) => {
11465
+ const depreciationToUpdate = this.find(receipt.depreciation.id);
11300
11466
  // we don't need to keep file after save
11301
- depreciation.file = null;
11302
- depreciation.receipt = plainToClass(DepreciationReceipt, receiptResponse);
11303
- replace(this.cache, depreciation);
11304
- this.cacheSubject.next(this.cache.slice());
11467
+ depreciationToUpdate.file = null;
11468
+ depreciationToUpdate.receipt = receipt;
11469
+ this.replaceInCache(depreciationToUpdate);
11470
+ });
11471
+ }
11472
+ listenReceiptDeleted() {
11473
+ this.eventDispatcherService.on(AppEventTypeEnum.DEPRECIATION_RECEIPT_DELETED).subscribe((depreciation) => {
11474
+ const depreciationToUpdate = this.find(depreciation.id);
11475
+ depreciationToUpdate.receipt = null;
11476
+ this.replaceInCache(depreciationToUpdate);
11305
11477
  });
11306
11478
  }
11307
11479
  /**
@@ -11335,15 +11507,92 @@ class DepreciationService extends RestService {
11335
11507
  this.resetCache();
11336
11508
  });
11337
11509
  }
11510
+ replaceInCache(depreciationToReplace) {
11511
+ replace(this.cache, depreciationToReplace);
11512
+ this.updateCache();
11513
+ }
11514
+ /**
11515
+ * @TODO Alex: create common method resetCacheOn(events: AppEventType[])
11516
+ */
11517
+ listenSoleDepreciationMethodChanges() {
11518
+ this.eventDispatcherService.on(AppEventTypeEnum.SOLE_DEPRECIATION_METHOD_UPDATED).subscribe(() => {
11519
+ this.resetCache();
11520
+ });
11521
+ }
11522
+ /**
11523
+ * @TODO Alex: create common method resetCacheOn(events: AppEventType[])
11524
+ */
11525
+ listenPropertyDepreciationCalculationChanges() {
11526
+ this.eventDispatcherService.on(AppEventTypeEnum.PROPERTY_DEPRECIATION_CALCULATION_UPDATED).subscribe(() => {
11527
+ this.resetCache();
11528
+ });
11529
+ }
11338
11530
  }
11339
- DepreciationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
11531
+ DepreciationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, deps: [{ token: i1.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: DepreciationReceiptService }], target: i0.ɵɵFactoryTarget.Injectable });
11340
11532
  DepreciationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, providedIn: 'root' });
11341
11533
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, decorators: [{
11342
11534
  type: Injectable,
11343
11535
  args: [{
11344
11536
  providedIn: 'root'
11345
11537
  }]
11346
- }] });
11538
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: EventDispatcherService }, { type: undefined, decorators: [{
11539
+ type: Inject,
11540
+ args: ['environment']
11541
+ }] }, { type: ToastService }, { type: DepreciationReceiptService }]; } });
11542
+
11543
+ /**
11544
+ * Service for work with DepreciationCapitalProjects
11545
+ */
11546
+ class DepreciationCapitalProjectService {
11547
+ constructor(http, environment) {
11548
+ this.http = http;
11549
+ this.environment = environment;
11550
+ this.cacheSubject = new ReplaySubject(1);
11551
+ }
11552
+ get(propertyId) {
11553
+ this.cacheSubject.next([]);
11554
+ this.http.get(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`)
11555
+ .subscribe((capitalProjectsBase) => {
11556
+ this.cache = capitalProjectsBase.map((capitalProjectBase) => {
11557
+ return plainToClass(DepreciationCapitalProject, capitalProjectBase);
11558
+ });
11559
+ this.cacheSubject.next(this.cache);
11560
+ });
11561
+ return this.cacheSubject.asObservable();
11562
+ }
11563
+ add(capitalProject, propertyId) {
11564
+ return this.http.post(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects`, capitalProject)
11565
+ .pipe(map((capitalProjectBase) => {
11566
+ this.cache.push(plainToClass(DepreciationCapitalProject, capitalProjectBase));
11567
+ this.cacheSubject.next(this.cache);
11568
+ }));
11569
+ }
11570
+ update(capitalProject, propertyId) {
11571
+ return this.http.put(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`, capitalProject)
11572
+ .pipe(map((capitalProjectBase) => {
11573
+ replace(this.cache, plainToClass(DepreciationCapitalProject, capitalProjectBase));
11574
+ this.cacheSubject.next(this.cache);
11575
+ }));
11576
+ }
11577
+ delete(capitalProject, propertyId) {
11578
+ return this.http.delete(`${this.environment.apiV2}/properties/${propertyId}/depreciation-capital-projects/${capitalProject.id}`)
11579
+ .pipe(map(() => {
11580
+ this.cache = this.cache.filter((item) => capitalProject.id !== item.id);
11581
+ this.cacheSubject.next(this.cache);
11582
+ }));
11583
+ }
11584
+ }
11585
+ DepreciationCapitalProjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
11586
+ DepreciationCapitalProjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, providedIn: 'root' });
11587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationCapitalProjectService, decorators: [{
11588
+ type: Injectable,
11589
+ args: [{
11590
+ providedIn: 'root'
11591
+ }]
11592
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
11593
+ type: Inject,
11594
+ args: ['environment']
11595
+ }] }]; } });
11347
11596
 
11348
11597
  /**
11349
11598
  * Service to handle document-folders and depending documents logic
@@ -13862,7 +14111,7 @@ class SoleBusinessForm extends AbstractForm {
13862
14111
  constructor(business = plainToClass(SoleBusiness, {})) {
13863
14112
  super({
13864
14113
  name: new FormControl(business.name, Validators.required),
13865
- code: new FormControl(business.code, Validators.required),
14114
+ activity: new FormControl(business.activity, Validators.required),
13866
14115
  description: new FormControl(business.description),
13867
14116
  website: new FormControl(business.website)
13868
14117
  }, business);
@@ -13945,6 +14194,14 @@ class SoleContactForm extends AbstractForm {
13945
14194
  }
13946
14195
  }
13947
14196
 
14197
+ class SoleDepreciationMethodForm extends AbstractForm {
14198
+ constructor(soleDepreciationMethod) {
14199
+ super({
14200
+ method: new FormControl(soleDepreciationMethod.method)
14201
+ }, soleDepreciationMethod);
14202
+ }
14203
+ }
14204
+
13948
14205
  class SoleDetailsForm extends AbstractForm {
13949
14206
  constructor(soleDetails) {
13950
14207
  super({
@@ -14722,5 +14979,5 @@ VehicleLogbookForm.maxDescriptionLength = 60;
14722
14979
  * Generated bundle index. Do not edit.
14723
14980
  */
14724
14981
 
14725
- export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, 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, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceItem, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
14982
+ export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqConfig, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, KompassifyService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessOrLosses, MyTaxBusinessOrLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEmployeeShareSchemes, MyTaxEmployeeShareSchemesForm, 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, PdfOrientationEnum, PdfSettings, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductIdEnum, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceItem, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
14726
14983
  //# sourceMappingURL=taxtank-core.js.map