taxtank-core 0.27.2 → 0.27.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taxtank-core.umd.js +441 -199
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/chart-accounts.collection.js +3 -3
- package/esm2015/lib/collections/depreciation.collection.js +10 -9
- package/esm2015/lib/collections/transaction/transaction.collection.js +5 -2
- package/esm2015/lib/collections/vehicle/vehicle-claim.collection.js +2 -4
- package/esm2015/lib/collections/vehicle/vehicle-logbook.collection.js +15 -30
- package/esm2015/lib/db/Enums/depreciation-calculation.enum.js +2 -1
- package/esm2015/lib/db/Enums/sole-depreciation-method.enum.js +6 -0
- package/esm2015/lib/db/Models/sole/sole-business-activity.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-business.js +1 -1
- package/esm2015/lib/db/Models/sole/sole-depreciation-method.js +4 -0
- package/esm2015/lib/db/Models/sole/sole-details.js +1 -1
- package/esm2015/lib/db/Models/user/user.js +1 -1
- package/esm2015/lib/forms/abstract.form.js +11 -5
- package/esm2015/lib/forms/bank/bank-account/bank-account-allocation.form.js +6 -3
- package/esm2015/lib/forms/sole/index.js +2 -1
- package/esm2015/lib/forms/sole/sole-business-allocations.form.js +2 -1
- package/esm2015/lib/forms/sole/sole-business.form.js +3 -3
- package/esm2015/lib/forms/sole/sole-depreciation-method.form.js +10 -0
- package/esm2015/lib/forms/sole/sole-invoice-template.form.js +2 -2
- package/esm2015/lib/forms/vehicle/vehicle-claim-details.form.js +3 -7
- package/esm2015/lib/forms/vehicle/vehicle-claim.form.js +8 -2
- package/esm2015/lib/forms/vehicle/vehicle-logbook.form.js +22 -15
- package/esm2015/lib/models/account-setup/account-setup-items.const.js +2 -2
- package/esm2015/lib/models/bank/bank-account.js +4 -1
- package/esm2015/lib/models/chart-accounts/chart-accounts.js +9 -9
- package/esm2015/lib/models/depreciation/depreciation-group.enum.js +2 -1
- package/esm2015/lib/models/depreciation/depreciation-groups.const.js +7 -2
- package/esm2015/lib/models/depreciation/depreciation.js +32 -25
- package/esm2015/lib/models/endpoint/endpoints.const.js +6 -4
- package/esm2015/lib/models/event/app-event-type.enum.js +33 -31
- package/esm2015/lib/models/financial-year/financial-year.js +2 -1
- package/esm2015/lib/models/report/depreciation/depreciation-report-item.js +2 -2
- package/esm2015/lib/models/report/my-tax/my-tax-deductions/my-tax-deductions.js +3 -3
- package/esm2015/lib/models/sole/index.js +3 -1
- package/esm2015/lib/models/sole/sole-business-activity.js +4 -0
- package/esm2015/lib/models/sole/sole-business.js +5 -1
- package/esm2015/lib/models/sole/sole-depreciation-method.js +8 -0
- package/esm2015/lib/models/sole/sole-invoice-template.js +5 -4
- package/esm2015/lib/models/transaction/transaction.js +3 -3
- package/esm2015/lib/models/vehicle/logbook-period.js +2 -1
- package/esm2015/lib/models/vehicle/vehicle-claim-details.js +12 -11
- package/esm2015/lib/models/vehicle/vehicle-claim.js +14 -13
- package/esm2015/lib/models/vehicle/vehicle-logbook.js +18 -5
- package/esm2015/lib/services/account-setup/account-setup.service.js +2 -2
- package/esm2015/lib/services/affiliate/rewardful/rewardful.service.js +34 -0
- package/esm2015/lib/services/http/depreciation/depreciation.service.js +19 -2
- package/esm2015/lib/services/http/property/property.service.js +8 -1
- package/esm2015/lib/services/http/sole/index.js +3 -1
- package/esm2015/lib/services/http/sole/sole-business-activity/sole-business-activity.service.js +21 -0
- package/esm2015/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.js +62 -0
- package/esm2015/lib/services/http/transaction/transaction.service.js +1 -2
- package/esm2015/lib/services/http/vehicle/vehicle-claim-details.service.js +7 -6
- package/esm2015/lib/services/http/vehicle/vehicle-claim.service.js +10 -10
- package/esm2015/lib/services/index.js +2 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/taxtank-core.js +381 -189
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/chart-accounts.collection.d.ts +2 -2
- package/lib/collections/depreciation.collection.d.ts +2 -1
- package/lib/collections/transaction/transaction.collection.d.ts +2 -2
- package/lib/collections/vehicle/vehicle-claim.collection.d.ts +1 -3
- package/lib/collections/vehicle/vehicle-logbook.collection.d.ts +4 -9
- package/lib/db/Enums/depreciation-calculation.enum.d.ts +2 -1
- package/lib/db/Enums/sole-depreciation-method.enum.d.ts +4 -0
- package/lib/db/Models/sole/sole-business-activity.d.ts +6 -0
- package/lib/db/Models/sole/sole-business.d.ts +2 -1
- package/lib/db/Models/sole/sole-depreciation-method.d.ts +10 -0
- package/lib/db/Models/user/user.d.ts +1 -0
- package/lib/forms/abstract.form.d.ts +3 -1
- package/lib/forms/bank/bank-account/bank-account-allocation.form.d.ts +4 -2
- package/lib/forms/sole/index.d.ts +1 -0
- package/lib/forms/sole/sole-business-allocations.form.d.ts +1 -0
- package/lib/forms/sole/sole-business.form.d.ts +1 -1
- package/lib/forms/sole/sole-depreciation-method.form.d.ts +5 -0
- package/lib/forms/vehicle/vehicle-claim-details.form.d.ts +1 -6
- package/lib/forms/vehicle/vehicle-claim.form.d.ts +3 -0
- package/lib/forms/vehicle/vehicle-logbook.form.d.ts +4 -0
- package/lib/models/bank/bank-account.d.ts +2 -0
- package/lib/models/chart-accounts/chart-accounts.d.ts +6 -6
- package/lib/models/depreciation/depreciation-group.enum.d.ts +2 -1
- package/lib/models/depreciation/depreciation.d.ts +9 -16
- package/lib/models/event/app-event-type.enum.d.ts +32 -30
- package/lib/models/financial-year/financial-year.d.ts +1 -0
- package/lib/models/sole/index.d.ts +2 -0
- package/lib/models/sole/sole-business-activity.d.ts +3 -0
- package/lib/models/sole/sole-business.d.ts +2 -0
- package/lib/models/sole/sole-depreciation-method.d.ts +4 -0
- package/lib/models/sole/sole-invoice-template.d.ts +1 -1
- package/lib/models/transaction/transaction.d.ts +2 -2
- package/lib/models/vehicle/logbook-period.d.ts +1 -0
- package/lib/models/vehicle/vehicle-claim-details.d.ts +8 -2
- package/lib/models/vehicle/vehicle-claim.d.ts +6 -4
- package/lib/models/vehicle/vehicle-logbook.d.ts +8 -4
- package/lib/services/affiliate/rewardful/rewardful.service.d.ts +13 -0
- package/lib/services/http/depreciation/depreciation.service.d.ts +8 -0
- package/lib/services/http/property/property.service.d.ts +1 -0
- package/lib/services/http/sole/index.d.ts +2 -0
- package/lib/services/http/sole/sole-business-activity/sole-business-activity.service.d.ts +11 -0
- package/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.d.ts +23 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
package/fesm2015/taxtank-core.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as i1$1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule, DatePipe } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpParams, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
7
|
-
import { ReplaySubject, Subject, BehaviorSubject, throwError, combineLatest, forkJoin,
|
|
7
|
+
import { ReplaySubject, Subject, BehaviorSubject, throwError, combineLatest, forkJoin, Observable, of, from } from 'rxjs';
|
|
8
8
|
import { map, filter, catchError, take, switchMap, finalize, mergeMap, skip, distinctUntilChanged } from 'rxjs/operators';
|
|
9
9
|
import { plainToClass, classToPlain, Type, Exclude, Transform, Expose } from 'class-transformer';
|
|
10
10
|
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
@@ -14,8 +14,8 @@ import last from 'lodash/last';
|
|
|
14
14
|
import flatten from 'lodash/flatten';
|
|
15
15
|
import hasIn from 'lodash/hasIn';
|
|
16
16
|
import first from 'lodash/first';
|
|
17
|
-
import * as moment from 'moment';
|
|
18
|
-
import { DateRange } from 'moment-range';
|
|
17
|
+
import * as moment$1 from 'moment';
|
|
18
|
+
import { extendMoment, DateRange } from 'moment-range';
|
|
19
19
|
import uniqBy from 'lodash/uniqBy';
|
|
20
20
|
import concat from 'lodash/concat';
|
|
21
21
|
import { throwError as throwError$1 } from 'rxjs/internal/observable/throwError';
|
|
@@ -225,36 +225,38 @@ var AppEventTypeEnum;
|
|
|
225
225
|
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_CREATED"] = 25] = "MESSAGE_FILE_CREATED";
|
|
226
226
|
AppEventTypeEnum[AppEventTypeEnum["MESSAGE_FILE_DELETED"] = 26] = "MESSAGE_FILE_DELETED";
|
|
227
227
|
AppEventTypeEnum[AppEventTypeEnum["NOTIFICATION_ADDED"] = 27] = "NOTIFICATION_ADDED";
|
|
228
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
229
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
230
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
231
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
232
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
233
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
234
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
235
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
236
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
237
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
238
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
239
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
240
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
241
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
242
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
243
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
244
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
245
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
246
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
247
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
248
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
249
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
250
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
251
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
252
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
253
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
254
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
255
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
256
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
257
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
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";
|
|
258
260
|
})(AppEventTypeEnum || (AppEventTypeEnum = {}));
|
|
259
261
|
|
|
260
262
|
class EventDispatcherService {
|
|
@@ -680,11 +682,13 @@ const ENDPOINTS = {
|
|
|
680
682
|
SUBSCRIPTION_ITEMS_PUT: new Endpoint('PUT', '\\/subscriptions\\/items'),
|
|
681
683
|
SOLE_BUSINESSES_GET: new Endpoint('GET', '\\/sole-businesses'),
|
|
682
684
|
SOLE_BUSINESSES_POST: new Endpoint('POST', '\\/sole-businesses'),
|
|
683
|
-
SOLE_BUSINESSES_PUT: new Endpoint('PUT', '\\/sole-businesses
|
|
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+'),
|
|
684
688
|
SOLE_INVOICE_TEMPLATES_GET: new Endpoint('GET', '\\/sole-invoice-templates'),
|
|
685
689
|
SOLE_INVOICE_TEMPLATES_POST: new Endpoint('POST', '\\/sole-invoice-templates'),
|
|
686
|
-
SOLE_INVOICE_TEMPLATES_PUT: new Endpoint('PUT', '\\/sole-invoice-templates
|
|
687
|
-
SOLE_INVOICE_TEMPLATES_DELETE: new Endpoint('DELETE', '\\/sole-invoice-templates
|
|
690
|
+
SOLE_INVOICE_TEMPLATES_PUT: new Endpoint('PUT', '\\/sole-invoice-templates\\/\\d+'),
|
|
691
|
+
SOLE_INVOICE_TEMPLATES_DELETE: new Endpoint('DELETE', '\\/sole-invoice-templates\\/\\d+'),
|
|
688
692
|
TAX_CALCULATION_POST: new Endpoint('POST', '\\/tax-calculation'),
|
|
689
693
|
TAX_REVIEWS_GET: new Endpoint('GET', '\\/tax-reviews'),
|
|
690
694
|
TAX_REVIEWS_DELETE: new Endpoint('DELETE', '\\/tax-reviews\\/\\d+'),
|
|
@@ -1237,6 +1241,7 @@ class FinancialYear {
|
|
|
1237
1241
|
return months;
|
|
1238
1242
|
}
|
|
1239
1243
|
}
|
|
1244
|
+
FinancialYear.weeksInYear = 52;
|
|
1240
1245
|
FinancialYear.startMonthIndex = 6;
|
|
1241
1246
|
|
|
1242
1247
|
/**
|
|
@@ -2237,26 +2242,26 @@ class ChartAccounts extends ChartAccounts$1 {
|
|
|
2237
2242
|
return this.name;
|
|
2238
2243
|
}
|
|
2239
2244
|
/**
|
|
2240
|
-
* Check if chart accounts id is related for '
|
|
2245
|
+
* Check if chart accounts id is related for 'Kms travelled for work' category
|
|
2241
2246
|
*/
|
|
2242
|
-
|
|
2247
|
+
isKmsForWork() {
|
|
2243
2248
|
return this.id === ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK;
|
|
2244
2249
|
}
|
|
2245
2250
|
/**
|
|
2246
|
-
* Check if chart accounts id is related for '
|
|
2251
|
+
* Check if chart accounts id is related for 'Kms travelled for sole' category
|
|
2247
2252
|
*/
|
|
2248
|
-
|
|
2253
|
+
isKmsForSole() {
|
|
2249
2254
|
return this.id === ChartAccountsListEnum.KLMS_TRAVELLED;
|
|
2250
2255
|
}
|
|
2251
2256
|
/**
|
|
2252
|
-
* Check if accounts id is related for
|
|
2257
|
+
* Check if accounts id is related for KMs category related to passed tank type
|
|
2253
2258
|
*/
|
|
2254
|
-
|
|
2259
|
+
isKMsByTankType(tankType) {
|
|
2255
2260
|
switch (tankType) {
|
|
2256
2261
|
case TankTypeEnum.WORK:
|
|
2257
|
-
return this.
|
|
2262
|
+
return this.isKmsForWork();
|
|
2258
2263
|
case TankTypeEnum.SOLE:
|
|
2259
|
-
return this.
|
|
2264
|
+
return this.isKmsForSole();
|
|
2260
2265
|
default:
|
|
2261
2266
|
return false;
|
|
2262
2267
|
}
|
|
@@ -2417,8 +2422,9 @@ class SoleInvoiceTemplate$1 extends AbstractModel {
|
|
|
2417
2422
|
}
|
|
2418
2423
|
|
|
2419
2424
|
class SoleInvoiceTemplate extends SoleInvoiceTemplate$1 {
|
|
2420
|
-
|
|
2421
|
-
|
|
2425
|
+
constructor() {
|
|
2426
|
+
super(...arguments);
|
|
2427
|
+
this.isTaxIncluded = false;
|
|
2422
2428
|
}
|
|
2423
2429
|
}
|
|
2424
2430
|
__decorate([
|
|
@@ -2455,6 +2461,7 @@ __decorate([
|
|
|
2455
2461
|
/**
|
|
2456
2462
|
* Class contains traveled kilometers and work usage percent in 12 weeks date range
|
|
2457
2463
|
* @TODO Vik: Best period: move this and related logic to backend
|
|
2464
|
+
* @TODO Alex: check if we need this class when calculation refactored with backend
|
|
2458
2465
|
*/
|
|
2459
2466
|
class LogbookPeriod {
|
|
2460
2467
|
isEndOfYear() {
|
|
@@ -2478,6 +2485,7 @@ class Vehicle$1 extends AbstractModel {
|
|
|
2478
2485
|
class VehicleLogbook$1 extends AbstractModel {
|
|
2479
2486
|
}
|
|
2480
2487
|
|
|
2488
|
+
const moment = extendMoment(moment$1);
|
|
2481
2489
|
class VehicleLogbook extends VehicleLogbook$1 {
|
|
2482
2490
|
get kilometers() {
|
|
2483
2491
|
return this.odometerEnd - this.odometerStart;
|
|
@@ -2491,13 +2499,18 @@ class VehicleLogbook extends VehicleLogbook$1 {
|
|
|
2491
2499
|
isSoleTank() {
|
|
2492
2500
|
return !!this.business;
|
|
2493
2501
|
}
|
|
2502
|
+
/**
|
|
2503
|
+
* Get logbook period date range from logbook date and weeksInPeriod duration
|
|
2504
|
+
*/
|
|
2505
|
+
getPeriod() {
|
|
2506
|
+
return moment.rangeFromInterval('weeks', VehicleLogbook.bestPeriodWeeks, this.date);
|
|
2507
|
+
}
|
|
2494
2508
|
}
|
|
2495
2509
|
/**
|
|
2496
|
-
*
|
|
2497
|
-
*
|
|
2498
|
-
* The logbook period is a minimum continuous period of 12 weeks." © Nicole Kelly
|
|
2510
|
+
* Logbook period duration in weeks.
|
|
2511
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
2499
2512
|
*/
|
|
2500
|
-
VehicleLogbook.
|
|
2513
|
+
VehicleLogbook.bestPeriodWeeks = 12;
|
|
2501
2514
|
__decorate([
|
|
2502
2515
|
Type(() => Date)
|
|
2503
2516
|
], VehicleLogbook.prototype, "date", void 0);
|
|
@@ -2524,26 +2537,32 @@ var VehicleClaimDetailsMethodEnum;
|
|
|
2524
2537
|
})(VehicleClaimDetailsMethodEnum || (VehicleClaimDetailsMethodEnum = {}));
|
|
2525
2538
|
|
|
2526
2539
|
class VehicleClaimDetails extends VehicleClaimDetails$1 {
|
|
2540
|
+
constructor() {
|
|
2541
|
+
super(...arguments);
|
|
2542
|
+
/**
|
|
2543
|
+
* Init default values for the new instances
|
|
2544
|
+
*/
|
|
2545
|
+
this.isManual = true;
|
|
2546
|
+
this.method = VehicleClaimDetailsMethodEnum.KMS;
|
|
2547
|
+
this.financialYear = new FinancialYear().year;
|
|
2548
|
+
}
|
|
2527
2549
|
isLogbookMethod() {
|
|
2528
2550
|
return this.method === VehicleClaimDetailsMethodEnum.LOGBOOK;
|
|
2529
2551
|
}
|
|
2530
|
-
|
|
2552
|
+
isKmsMethod() {
|
|
2531
2553
|
return this.method === VehicleClaimDetailsMethodEnum.KMS;
|
|
2532
2554
|
}
|
|
2533
|
-
// @TODO Alex: discuss with Vik and think about abstract method in AbstractModel
|
|
2534
|
-
static create() {
|
|
2535
|
-
return plainToClass(VehicleClaimDetails, {
|
|
2536
|
-
isManual: true,
|
|
2537
|
-
method: VehicleClaimDetailsMethodEnum.KMS,
|
|
2538
|
-
financialYear: new FinancialYear().year
|
|
2539
|
-
});
|
|
2540
|
-
}
|
|
2541
2555
|
}
|
|
2542
2556
|
__decorate([
|
|
2543
2557
|
Type(() => User)
|
|
2544
2558
|
], VehicleClaimDetails.prototype, "user", void 0);
|
|
2545
2559
|
|
|
2546
2560
|
class VehicleClaim extends VehicleClaim$1 {
|
|
2561
|
+
constructor() {
|
|
2562
|
+
super(...arguments);
|
|
2563
|
+
this.kilometers = 0;
|
|
2564
|
+
this.workUsage = 0;
|
|
2565
|
+
}
|
|
2547
2566
|
isWorkTank() {
|
|
2548
2567
|
return !this.business;
|
|
2549
2568
|
}
|
|
@@ -2554,9 +2573,9 @@ class VehicleClaim extends VehicleClaim$1 {
|
|
|
2554
2573
|
return this.isSoleTank() ? TankTypeEnum.SOLE : TankTypeEnum.WORK;
|
|
2555
2574
|
}
|
|
2556
2575
|
/**
|
|
2557
|
-
* Claim amount for
|
|
2576
|
+
* Claim amount for KMs method. Exists only for KMs method.
|
|
2558
2577
|
*/
|
|
2559
|
-
|
|
2578
|
+
getKMSClaimAmount(vehicleClaimRate) {
|
|
2560
2579
|
return +(this.kilometers * vehicleClaimRate).toFixed(2);
|
|
2561
2580
|
}
|
|
2562
2581
|
/**
|
|
@@ -2571,19 +2590,14 @@ class VehicleClaim extends VehicleClaim$1 {
|
|
|
2571
2590
|
// Math.abs because amount will be negative (because we sum expenses), but we don't want negative percent value
|
|
2572
2591
|
return Math.abs(transactionsAmount) * this.workUsage / 100;
|
|
2573
2592
|
}
|
|
2574
|
-
|
|
2593
|
+
getAverageWeeklyKMS() {
|
|
2594
|
+
return this.kilometers / FinancialYear.weeksInYear;
|
|
2595
|
+
}
|
|
2596
|
+
static getKMSChartAccountsIdByTankType(tankType) {
|
|
2575
2597
|
return tankType === TankTypeEnum.WORK
|
|
2576
2598
|
? ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK
|
|
2577
2599
|
: ChartAccountsListEnum.KLMS_TRAVELLED;
|
|
2578
2600
|
}
|
|
2579
|
-
static create(details, business) {
|
|
2580
|
-
return plainToClass(VehicleClaim, {
|
|
2581
|
-
kilometers: 0,
|
|
2582
|
-
workUsage: 0,
|
|
2583
|
-
details,
|
|
2584
|
-
business
|
|
2585
|
-
});
|
|
2586
|
-
}
|
|
2587
2601
|
}
|
|
2588
2602
|
/**
|
|
2589
2603
|
* limit for kms claim method
|
|
@@ -2672,6 +2686,7 @@ var DepreciationCalculationEnum;
|
|
|
2672
2686
|
DepreciationCalculationEnum[DepreciationCalculationEnum["CAPITAL"] = 3] = "CAPITAL";
|
|
2673
2687
|
DepreciationCalculationEnum[DepreciationCalculationEnum["LVP"] = 4] = "LVP";
|
|
2674
2688
|
DepreciationCalculationEnum[DepreciationCalculationEnum["AMORTISATION"] = 5] = "AMORTISATION";
|
|
2689
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["SBP"] = 6] = "SBP";
|
|
2675
2690
|
})(DepreciationCalculationEnum || (DepreciationCalculationEnum = {}));
|
|
2676
2691
|
|
|
2677
2692
|
class DepreciationCapitalProject$1 extends AbstractModel {
|
|
@@ -2691,7 +2706,7 @@ class DepreciationForecast extends DepreciationForecast$1 {
|
|
|
2691
2706
|
return this.claimAmount / this.daysApplied;
|
|
2692
2707
|
}
|
|
2693
2708
|
get daysApplied() {
|
|
2694
|
-
return moment(this.toDate).diff(moment(this.fromDate), 'days');
|
|
2709
|
+
return moment$1(this.toDate).diff(moment$1(this.fromDate), 'days');
|
|
2695
2710
|
}
|
|
2696
2711
|
getDaysByMonth(month) {
|
|
2697
2712
|
// @TODO find a better place
|
|
@@ -3043,9 +3058,9 @@ class Transaction extends Transaction$1 {
|
|
|
3043
3058
|
}
|
|
3044
3059
|
}
|
|
3045
3060
|
/**
|
|
3046
|
-
* Check if transaction has '
|
|
3061
|
+
* Check if transaction has 'Kms travelled for work' chart accounts category
|
|
3047
3062
|
*/
|
|
3048
|
-
get
|
|
3063
|
+
get isKmsChartAccountsCategory() {
|
|
3049
3064
|
return this.chartAccounts.id === ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK;
|
|
3050
3065
|
}
|
|
3051
3066
|
/**
|
|
@@ -3263,6 +3278,9 @@ __decorate([
|
|
|
3263
3278
|
Type(() => Date)
|
|
3264
3279
|
], BankTransaction.prototype, "date", void 0);
|
|
3265
3280
|
|
|
3281
|
+
/**
|
|
3282
|
+
* @TODO Alex: clarify grouping rules and refactor
|
|
3283
|
+
*/
|
|
3266
3284
|
class Depreciation extends Depreciation$1 {
|
|
3267
3285
|
constructor() {
|
|
3268
3286
|
super(...arguments);
|
|
@@ -3273,6 +3291,7 @@ class Depreciation extends Depreciation$1 {
|
|
|
3273
3291
|
*/
|
|
3274
3292
|
this.amount = 0;
|
|
3275
3293
|
}
|
|
3294
|
+
// Type checking
|
|
3276
3295
|
isCapital() {
|
|
3277
3296
|
return this.type === DepreciationTypeEnum.CAPITAL_WORKS;
|
|
3278
3297
|
}
|
|
@@ -3282,30 +3301,9 @@ class Depreciation extends Depreciation$1 {
|
|
|
3282
3301
|
isAsset() {
|
|
3283
3302
|
return this.type === DepreciationTypeEnum.PLANT_EQUIPMENT;
|
|
3284
3303
|
}
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
* @TODO new FinancialYear(this.writeOffDate) === new FinancialYear()
|
|
3289
|
-
*/
|
|
3290
|
-
isWrittenOff() {
|
|
3291
|
-
return this.isAsset && this.writeOffDate && new FinancialYear(this.writeOffDate).year === this.financialYear;
|
|
3292
|
-
}
|
|
3293
|
-
/**
|
|
3294
|
-
* Check if depreciation is Plant & Equipment
|
|
3295
|
-
*/
|
|
3296
|
-
isPlantEquipment() {
|
|
3297
|
-
return this.isAsset() && !this.isWrittenOff() && !this.isLowValuePool();
|
|
3298
|
-
}
|
|
3299
|
-
/**
|
|
3300
|
-
* check if depreciation should be displayed in low value pool
|
|
3301
|
-
* details in project documentation
|
|
3302
|
-
* @TODO new FinancialYear(this.writeOffDate) === new FinancialYear()
|
|
3303
|
-
*/
|
|
3304
|
-
isLowValuePool() {
|
|
3305
|
-
return this.isAsset &&
|
|
3306
|
-
this.calculation === DepreciationCalculationEnum.DIMINISHING &&
|
|
3307
|
-
this.amount > Depreciation.WRITTEN_OFF_THRESHOLD &&
|
|
3308
|
-
this.amount <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
|
|
3304
|
+
// Calculation checking
|
|
3305
|
+
isSBPCalculation() {
|
|
3306
|
+
return this.calculation === DepreciationCalculationEnum.SBP;
|
|
3309
3307
|
}
|
|
3310
3308
|
isPrimeCost() {
|
|
3311
3309
|
return this.calculation === DepreciationCalculationEnum.PRIME_COST;
|
|
@@ -3313,6 +3311,30 @@ class Depreciation extends Depreciation$1 {
|
|
|
3313
3311
|
isDiminishing() {
|
|
3314
3312
|
return this.calculation === DepreciationCalculationEnum.DIMINISHING;
|
|
3315
3313
|
}
|
|
3314
|
+
// Pool checking
|
|
3315
|
+
isPlantEquipmentPool() {
|
|
3316
|
+
return this.isAsset() && !this.isSBPCalculation() && !this.isWrittenOff() && !this.isLVP();
|
|
3317
|
+
}
|
|
3318
|
+
isLVP() {
|
|
3319
|
+
return this.isAsset()
|
|
3320
|
+
&& !this.isSBPCalculation()
|
|
3321
|
+
&& this.isDiminishing()
|
|
3322
|
+
&& this.currentYearForecast.closeBalance > Depreciation.WRITTEN_OFF_THRESHOLD
|
|
3323
|
+
&& this.currentYearForecast.closeBalance <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
|
|
3324
|
+
}
|
|
3325
|
+
isSBP() {
|
|
3326
|
+
return this.isAsset() && this.isSBPCalculation() && !this.isWrittenOff();
|
|
3327
|
+
}
|
|
3328
|
+
isWrittenOff() {
|
|
3329
|
+
return this.writeOffYear === new FinancialYear().year;
|
|
3330
|
+
}
|
|
3331
|
+
get writeOffYear() {
|
|
3332
|
+
var _a;
|
|
3333
|
+
if (!this.writeOffManualDate && !this.writeOffDate) {
|
|
3334
|
+
return null;
|
|
3335
|
+
}
|
|
3336
|
+
return (_a = new FinancialYear(this.writeOffManualDate || this.writeOffDate)) === null || _a === void 0 ? void 0 : _a.year;
|
|
3337
|
+
}
|
|
3316
3338
|
/**
|
|
3317
3339
|
* Check if depreciation chart accounts heading related to vehicles category
|
|
3318
3340
|
*/
|
|
@@ -3415,6 +3437,9 @@ __decorate([
|
|
|
3415
3437
|
Type(() => BankTransaction)
|
|
3416
3438
|
], Depreciation.prototype, "bankTransaction", void 0);
|
|
3417
3439
|
|
|
3440
|
+
class SoleBusinessActivity$1 extends AbstractModel {
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3418
3443
|
class SoleBusiness extends SoleBusiness$1 {
|
|
3419
3444
|
getPhotoPlaceholder() {
|
|
3420
3445
|
return `${this.name[0]}${this.name[1]}`;
|
|
@@ -3451,6 +3476,27 @@ __decorate([
|
|
|
3451
3476
|
__decorate([
|
|
3452
3477
|
Type(() => Depreciation)
|
|
3453
3478
|
], SoleBusiness.prototype, "depreciations", void 0);
|
|
3479
|
+
__decorate([
|
|
3480
|
+
Type(() => SoleBusinessActivity$1)
|
|
3481
|
+
], SoleBusiness.prototype, "activity", void 0);
|
|
3482
|
+
|
|
3483
|
+
class SoleBusinessActivity extends SoleBusinessActivity$1 {
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
class SoleDepreciationMethod$1 extends AbstractModel {
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
var SoleDepreciationMethodEnum;
|
|
3490
|
+
(function (SoleDepreciationMethodEnum) {
|
|
3491
|
+
SoleDepreciationMethodEnum[SoleDepreciationMethodEnum["SBP"] = 1] = "SBP";
|
|
3492
|
+
SoleDepreciationMethodEnum[SoleDepreciationMethodEnum["DEPRECIATION"] = 2] = "DEPRECIATION";
|
|
3493
|
+
})(SoleDepreciationMethodEnum || (SoleDepreciationMethodEnum = {}));
|
|
3494
|
+
|
|
3495
|
+
class SoleDepreciationMethod extends SoleDepreciationMethod$1 {
|
|
3496
|
+
isSBP() {
|
|
3497
|
+
return this.method === SoleDepreciationMethodEnum.SBP;
|
|
3498
|
+
}
|
|
3499
|
+
}
|
|
3454
3500
|
|
|
3455
3501
|
class SoleDetails$1 extends AbstractModel {
|
|
3456
3502
|
}
|
|
@@ -3957,7 +4003,7 @@ class Property extends Property$1 {
|
|
|
3957
4003
|
* ownership duration from purchase till sale
|
|
3958
4004
|
*/
|
|
3959
4005
|
getOwnershipDuration(sale, unitOfTime = 'days') {
|
|
3960
|
-
return moment(sale.contractDate).diff(moment(this.contractDate), unitOfTime);
|
|
4006
|
+
return moment$1(sale.contractDate).diff(moment$1(this.contractDate), unitOfTime);
|
|
3961
4007
|
}
|
|
3962
4008
|
/**
|
|
3963
4009
|
* Tax Position = Income - Expense - Interest - Depreciation
|
|
@@ -4097,6 +4143,9 @@ __decorate([
|
|
|
4097
4143
|
], BankConnection.prototype, "bank", void 0);
|
|
4098
4144
|
|
|
4099
4145
|
class BankAccount extends BankAccount$1 {
|
|
4146
|
+
get bank() {
|
|
4147
|
+
return this.bankConnection.bank;
|
|
4148
|
+
}
|
|
4100
4149
|
/**
|
|
4101
4150
|
* Get current opening balance amount
|
|
4102
4151
|
*/
|
|
@@ -4723,9 +4772,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
4723
4772
|
class VehicleClaimCollection extends Collection {
|
|
4724
4773
|
/**
|
|
4725
4774
|
* Get remaining kilometers limit. Total limit ({@link VehicleClaim.totalKmsLimit}) - claimed kilometers from other vehicle claims
|
|
4726
|
-
* @param claim may not exist when user come to vehicle claim page 1st time and not created claim yet
|
|
4727
4775
|
*/
|
|
4728
|
-
|
|
4776
|
+
getKmsLimitForClaim(claim) {
|
|
4729
4777
|
let collection = this;
|
|
4730
4778
|
if (claim) {
|
|
4731
4779
|
collection = collection.removeBy('id', claim.id);
|
|
@@ -4734,7 +4782,6 @@ class VehicleClaimCollection extends Collection {
|
|
|
4734
4782
|
}
|
|
4735
4783
|
/**
|
|
4736
4784
|
* Get remaining work usage limit. Total limit ({@link VehicleClaim.totalWorkUsagePercent}) - claimed percent from other vehicle claims
|
|
4737
|
-
* @param claim may not exist when user come to vehicle claim page 1st time and not created claim yet
|
|
4738
4785
|
*/
|
|
4739
4786
|
getWorkUsageLimitForClaim(claim) {
|
|
4740
4787
|
let collection = this;
|
|
@@ -4747,14 +4794,14 @@ class VehicleClaimCollection extends Collection {
|
|
|
4747
4794
|
|
|
4748
4795
|
class VehicleLogbookCollection extends Collection {
|
|
4749
4796
|
/**
|
|
4750
|
-
* Best period may be calculated only when user has logbooks minimum for
|
|
4797
|
+
* Best period may be calculated only when user has logbooks minimum for VehicleLogbook.bestPeriodWeeks
|
|
4751
4798
|
* @TODO Vik: Best period: move this and related logic to backend
|
|
4752
4799
|
*/
|
|
4753
4800
|
isBestPeriodExist() {
|
|
4754
4801
|
if (this.items.length < 2) {
|
|
4755
4802
|
return false;
|
|
4756
4803
|
}
|
|
4757
|
-
return VehicleLogbook.
|
|
4804
|
+
return VehicleLogbook.bestPeriodWeeks < (this.last.date.getTime() - this.first.date.getTime());
|
|
4758
4805
|
}
|
|
4759
4806
|
/**
|
|
4760
4807
|
* Get collection of non-personal logbooks (work-related, sole-related).
|
|
@@ -4764,15 +4811,14 @@ class VehicleLogbookCollection extends Collection {
|
|
|
4764
4811
|
return this.filterBy('isPersonal', false);
|
|
4765
4812
|
}
|
|
4766
4813
|
/**
|
|
4767
|
-
* Logbook Period
|
|
4768
|
-
* Best period duration is defined as
|
|
4814
|
+
* Get Logbook Period with the biggest work usage percent
|
|
4815
|
+
* Best period duration is defined as VehicleLogbook.bestPeriodWeeks by the ATO
|
|
4769
4816
|
* @TODO Vik: Best period: move this and related logic to backend
|
|
4770
4817
|
*/
|
|
4771
4818
|
getBestPeriod() {
|
|
4772
4819
|
if (!this.isBestPeriodExist()) {
|
|
4773
4820
|
return null;
|
|
4774
4821
|
}
|
|
4775
|
-
// declare best period variable
|
|
4776
4822
|
let bestPeriod;
|
|
4777
4823
|
// get list of all logbooks available for best period calculation
|
|
4778
4824
|
const claimableLogbooks = this.getClaimableLogbooks().toArray();
|
|
@@ -4782,12 +4828,12 @@ class VehicleLogbookCollection extends Collection {
|
|
|
4782
4828
|
break;
|
|
4783
4829
|
}
|
|
4784
4830
|
// get date range started from current handling logbook date
|
|
4785
|
-
const dateRange =
|
|
4831
|
+
const dateRange = claimableLogbooks[i].getPeriod();
|
|
4786
4832
|
// get all logbooks included in current logbook period
|
|
4787
|
-
const logbooksInRange = this.filterByRange('date', dateRange.
|
|
4833
|
+
const logbooksInRange = this.filterByRange('date', dateRange.start, dateRange.end);
|
|
4788
4834
|
const currentPeriod = plainToClass(LogbookPeriod, {
|
|
4789
|
-
from: dateRange.
|
|
4790
|
-
to: dateRange.
|
|
4835
|
+
from: dateRange.start,
|
|
4836
|
+
to: dateRange.end,
|
|
4791
4837
|
kilometers: logbooksInRange.getClaimableLogbooks().kilometers,
|
|
4792
4838
|
workUsage: logbooksInRange.getWorkUsage(),
|
|
4793
4839
|
logbooks: logbooksInRange
|
|
@@ -4821,28 +4867,15 @@ class VehicleLogbookCollection extends Collection {
|
|
|
4821
4867
|
const workKilometers = this.getClaimableLogbooks().kilometers;
|
|
4822
4868
|
return Math.round(workKilometers / this.kilometers * 100);
|
|
4823
4869
|
}
|
|
4824
|
-
/**
|
|
4825
|
-
* Get LOGBOOK_PERIOD_DURATION date range from passed start date
|
|
4826
|
-
* @TODO Vik: Best period: move this and related logic to backend
|
|
4827
|
-
*/
|
|
4828
|
-
getPeriodRange(from) {
|
|
4829
|
-
// set end date as VehicleLogbook.periodDuration after start date
|
|
4830
|
-
let to = new Date(from.getTime() + VehicleLogbook.periodDuration);
|
|
4831
|
-
const financialYear = new FinancialYear();
|
|
4832
|
-
// set as period last VehicleLogbook.periodDuration of current year if period end date after end of current year
|
|
4833
|
-
if (to > financialYear.endDate) {
|
|
4834
|
-
to = financialYear.endDate;
|
|
4835
|
-
from = new Date(to.getTime() - VehicleLogbook.periodDuration);
|
|
4836
|
-
}
|
|
4837
|
-
return { from, to };
|
|
4838
|
-
}
|
|
4839
4870
|
/**
|
|
4840
4871
|
* Get list of logbooks related to passed vehicle claim
|
|
4841
4872
|
*/
|
|
4842
|
-
getByVehicleClaim(
|
|
4843
|
-
return
|
|
4844
|
-
|
|
4845
|
-
|
|
4873
|
+
getByVehicleClaim(vehicleClaim) {
|
|
4874
|
+
return vehicleClaim.isSoleTank()
|
|
4875
|
+
// sole tank may have multiple vehicle claims, so we need to filter by business.id
|
|
4876
|
+
? this.filterBy('business.id', vehicleClaim.business.id)
|
|
4877
|
+
// work tank may have only one vehicle claim, so we need to filter by tank type
|
|
4878
|
+
: this.filterBy('tankType', TankTypeEnum.WORK);
|
|
4846
4879
|
}
|
|
4847
4880
|
}
|
|
4848
4881
|
|
|
@@ -4976,9 +5009,9 @@ class BankTransactionCollection extends Collection {
|
|
|
4976
5009
|
|
|
4977
5010
|
class ChartAccountsCollection extends Collection {
|
|
4978
5011
|
/**
|
|
4979
|
-
* Get '
|
|
5012
|
+
* Get 'Kms travelled for work' related chart account value
|
|
4980
5013
|
*/
|
|
4981
|
-
|
|
5014
|
+
getVehicleKmsRate(year = new FinancialYear().year) {
|
|
4982
5015
|
return this.findBy('id', ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK).getValueByYear(year).value;
|
|
4983
5016
|
}
|
|
4984
5017
|
}
|
|
@@ -5236,6 +5269,9 @@ class TransactionCollection extends ExportableCollection {
|
|
|
5236
5269
|
* Get list of vehicle transactions filtered by vehicle claim
|
|
5237
5270
|
*/
|
|
5238
5271
|
getByVehicleClaim(vehicleClaim) {
|
|
5272
|
+
if (!vehicleClaim) {
|
|
5273
|
+
return this.create([]);
|
|
5274
|
+
}
|
|
5239
5275
|
return vehicleClaim.isSoleTank()
|
|
5240
5276
|
// sole tank may have multiple vehicle claims, so we need to filter by business.id
|
|
5241
5277
|
? this.getVehicleTransactions().filterBy('business.id', vehicleClaim.business.id)
|
|
@@ -5243,7 +5279,7 @@ class TransactionCollection extends ExportableCollection {
|
|
|
5243
5279
|
: this.getVehicleTransactions().filterBy('tankType', TankTypeEnum.WORK);
|
|
5244
5280
|
}
|
|
5245
5281
|
/**
|
|
5246
|
-
* Get list of vehicle transactions except
|
|
5282
|
+
* Get list of vehicle transactions except KMS transactions
|
|
5247
5283
|
*/
|
|
5248
5284
|
getLogbookTransactions() {
|
|
5249
5285
|
return this
|
|
@@ -5306,19 +5342,22 @@ class DepreciationCollection extends Collection {
|
|
|
5306
5342
|
return this.filter((depreciation) => depreciation.isAsset());
|
|
5307
5343
|
}
|
|
5308
5344
|
getPlantEquipment() {
|
|
5309
|
-
return this.filter((depreciation) => depreciation.
|
|
5345
|
+
return this.filter((depreciation) => depreciation.isPlantEquipmentPool());
|
|
5310
5346
|
}
|
|
5311
5347
|
getCapitalDepreciations() {
|
|
5312
5348
|
return this.filter((depreciation) => depreciation.isCapital());
|
|
5313
5349
|
}
|
|
5314
5350
|
getBorrowingExpenseDepreciations() {
|
|
5315
|
-
return
|
|
5351
|
+
return this.filter((depreciation) => depreciation.isBorrowingExpense());
|
|
5316
5352
|
}
|
|
5317
5353
|
getWrittenOffDepreciations() {
|
|
5318
|
-
return
|
|
5354
|
+
return this.filter((depreciation) => depreciation.isWrittenOff());
|
|
5319
5355
|
}
|
|
5320
|
-
|
|
5321
|
-
return
|
|
5356
|
+
getLVPDepreciations() {
|
|
5357
|
+
return this.filter((depreciation) => depreciation.isLVP());
|
|
5358
|
+
}
|
|
5359
|
+
getSBPDepreciations() {
|
|
5360
|
+
return this.filter((depreciation) => depreciation.isSBP());
|
|
5322
5361
|
}
|
|
5323
5362
|
getCapitalProjects() {
|
|
5324
5363
|
return uniqBy(compact(this.items.map((depreciation) => {
|
|
@@ -5329,9 +5368,7 @@ class DepreciationCollection extends Collection {
|
|
|
5329
5368
|
* Get a new collection of depreciations related to vehicles
|
|
5330
5369
|
*/
|
|
5331
5370
|
getVehicleDepreciations() {
|
|
5332
|
-
return this.
|
|
5333
|
-
return depreciation.isVehicleDepreciation();
|
|
5334
|
-
}));
|
|
5371
|
+
return this.filter((depreciation) => depreciation.isVehicleDepreciation());
|
|
5335
5372
|
}
|
|
5336
5373
|
getByTankType(tankType) {
|
|
5337
5374
|
return this.create(this.items.filter((depreciation) => {
|
|
@@ -5648,7 +5685,7 @@ class DepreciationReportItem extends Depreciation {
|
|
|
5648
5685
|
}
|
|
5649
5686
|
get categoryTitle() {
|
|
5650
5687
|
switch (true) {
|
|
5651
|
-
case this.
|
|
5688
|
+
case this.isPlantEquipmentPool():
|
|
5652
5689
|
return 'Plant & Equipment';
|
|
5653
5690
|
case this.isWrittenOff():
|
|
5654
5691
|
return 'Written Off Items';
|
|
@@ -7219,6 +7256,7 @@ var DepreciationGroupEnum;
|
|
|
7219
7256
|
DepreciationGroupEnum[DepreciationGroupEnum["LOW_VALUE_POOL"] = 2] = "LOW_VALUE_POOL";
|
|
7220
7257
|
DepreciationGroupEnum[DepreciationGroupEnum["WRITTEN_OFF_ITEMS"] = 3] = "WRITTEN_OFF_ITEMS";
|
|
7221
7258
|
DepreciationGroupEnum[DepreciationGroupEnum["BORROWING_EXPENSES"] = 4] = "BORROWING_EXPENSES";
|
|
7259
|
+
DepreciationGroupEnum[DepreciationGroupEnum["SMALL_BUSINESS_POOL"] = 5] = "SMALL_BUSINESS_POOL";
|
|
7222
7260
|
})(DepreciationGroupEnum || (DepreciationGroupEnum = {}));
|
|
7223
7261
|
|
|
7224
7262
|
/**
|
|
@@ -7276,7 +7314,12 @@ const DEPRECIATION_GROUPS = {
|
|
|
7276
7314
|
label: 'Written Off Items',
|
|
7277
7315
|
description: 'Items below $300, replaced or obsolete are fully deductible',
|
|
7278
7316
|
icon: 'cart'
|
|
7279
|
-
}
|
|
7317
|
+
},
|
|
7318
|
+
[DepreciationGroupEnum.SMALL_BUSINESS_POOL]: {
|
|
7319
|
+
label: 'Small business pool',
|
|
7320
|
+
description: 'The small business pool allows business owners to claim depreciation on plant and equipment items at an accelerated rate.',
|
|
7321
|
+
icon: 'portfolio'
|
|
7322
|
+
},
|
|
7280
7323
|
};
|
|
7281
7324
|
|
|
7282
7325
|
class DepreciationReceipt$1 extends AbstractModel {
|
|
@@ -8025,7 +8068,7 @@ class MyTaxDeductions {
|
|
|
8025
8068
|
DeductionSelfEducationTypeEnum.IMPROVE_SKILLS_FOR_CURRENT_EARNINGS_K : null;
|
|
8026
8069
|
this.workRelatedSelfEducationTotalAmount = this.workRelatedSelfEducationExpenses.sumBy('claimAmount');
|
|
8027
8070
|
this.lowValuePoolDeductionTotalAmount = this.depreciations.getByTankType(TankTypeEnum.WORK)
|
|
8028
|
-
.
|
|
8071
|
+
.getLVPDepreciations().sumBy('claimAmount');
|
|
8029
8072
|
this.interestExpensesTotalAmount = this.transactions
|
|
8030
8073
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.interestExpenses)
|
|
8031
8074
|
.sumBy('claimAmount');
|
|
@@ -8059,7 +8102,7 @@ class MyTaxDeductions {
|
|
|
8059
8102
|
return 0;
|
|
8060
8103
|
}
|
|
8061
8104
|
setVehicleClaimData() {
|
|
8062
|
-
this.klmsMethodClaimAmount = this.vehicleClaim.
|
|
8105
|
+
this.klmsMethodClaimAmount = this.vehicleClaim.getKMSClaimAmount(this.vehicleClaimRate);
|
|
8063
8106
|
this.totalExpensesAmount = this.vehicleClaim.getLogbookClaimAmount(new TransactionCollection([
|
|
8064
8107
|
...this.transactions.getByTankType(this.vehicleClaim.tankType),
|
|
8065
8108
|
...this.depreciations.getByTankType(this.vehicleClaim.tankType).toTransactions().toArray()
|
|
@@ -8767,6 +8810,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
8767
8810
|
}]
|
|
8768
8811
|
}] });
|
|
8769
8812
|
|
|
8813
|
+
class SoleBusinessActivityService extends RestService {
|
|
8814
|
+
constructor() {
|
|
8815
|
+
super(...arguments);
|
|
8816
|
+
this.modelClass = SoleBusinessActivity;
|
|
8817
|
+
this.url = 'sole-business-activities';
|
|
8818
|
+
this.isHydra = true;
|
|
8819
|
+
}
|
|
8820
|
+
}
|
|
8821
|
+
SoleBusinessActivityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessActivityService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
8822
|
+
SoleBusinessActivityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessActivityService, providedIn: 'root' });
|
|
8823
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleBusinessActivityService, decorators: [{
|
|
8824
|
+
type: Injectable,
|
|
8825
|
+
args: [{
|
|
8826
|
+
providedIn: 'root'
|
|
8827
|
+
}]
|
|
8828
|
+
}] });
|
|
8829
|
+
|
|
8770
8830
|
class SoleContactService extends RestService {
|
|
8771
8831
|
constructor() {
|
|
8772
8832
|
super(...arguments);
|
|
@@ -8784,6 +8844,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
8784
8844
|
}]
|
|
8785
8845
|
}] });
|
|
8786
8846
|
|
|
8847
|
+
/**
|
|
8848
|
+
* @TODO Alex: extend rest service when refactored
|
|
8849
|
+
*/
|
|
8850
|
+
class SoleDepreciationMethodService {
|
|
8851
|
+
constructor(http, environment, eventDispatcherService, toastService) {
|
|
8852
|
+
this.http = http;
|
|
8853
|
+
this.environment = environment;
|
|
8854
|
+
this.eventDispatcherService = eventDispatcherService;
|
|
8855
|
+
this.toastService = toastService;
|
|
8856
|
+
this.cacheSubject = new ReplaySubject(1);
|
|
8857
|
+
this.url = 'sole-depreciation-methods';
|
|
8858
|
+
}
|
|
8859
|
+
get() {
|
|
8860
|
+
if (!this.cache) {
|
|
8861
|
+
this.http.get(`${this.environment.apiV2}/${this.url}`)
|
|
8862
|
+
.pipe(map((response) => plainToClass(SoleDepreciationMethod, response['hydra:member'][0])))
|
|
8863
|
+
.subscribe((soleDepreciationMethod) => {
|
|
8864
|
+
this.cache = soleDepreciationMethod;
|
|
8865
|
+
this.cacheSubject.next(this.cache);
|
|
8866
|
+
return soleDepreciationMethod;
|
|
8867
|
+
});
|
|
8868
|
+
}
|
|
8869
|
+
return this.cacheSubject.asObservable();
|
|
8870
|
+
}
|
|
8871
|
+
update(soleDepreciationMethod) {
|
|
8872
|
+
return this.http.put(`${this.environment.apiV2}/${this.url}/${soleDepreciationMethod.id}`, soleDepreciationMethod)
|
|
8873
|
+
.pipe(map((soleDepreciationMethodBase) => {
|
|
8874
|
+
const method = plainToClass(SoleDepreciationMethod, soleDepreciationMethodBase);
|
|
8875
|
+
this.cache = method;
|
|
8876
|
+
this.cacheSubject.next(this.cache);
|
|
8877
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.SOLE_DEPRECIATION_METHOD_UPDATED, method));
|
|
8878
|
+
return this.cache;
|
|
8879
|
+
}), catchError((error) => {
|
|
8880
|
+
this.toastService.error(error.error['hydra:description']);
|
|
8881
|
+
return throwError$1(error);
|
|
8882
|
+
}));
|
|
8883
|
+
}
|
|
8884
|
+
}
|
|
8885
|
+
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 });
|
|
8886
|
+
SoleDepreciationMethodService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleDepreciationMethodService, providedIn: 'root' });
|
|
8887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SoleDepreciationMethodService, decorators: [{
|
|
8888
|
+
type: Injectable,
|
|
8889
|
+
args: [{
|
|
8890
|
+
providedIn: 'root'
|
|
8891
|
+
}]
|
|
8892
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
8893
|
+
type: Inject,
|
|
8894
|
+
args: ['environment']
|
|
8895
|
+
}] }, { type: EventDispatcherService }, { type: ToastService }]; } });
|
|
8896
|
+
|
|
8787
8897
|
/**
|
|
8788
8898
|
* @TODO TT-1777 Alex: extend from rest service when it refactored
|
|
8789
8899
|
*/
|
|
@@ -8899,10 +9009,7 @@ class VehicleClaimService extends RestService {
|
|
|
8899
9009
|
* when details method changed, all claims current values become 0
|
|
8900
9010
|
*/
|
|
8901
9011
|
listenVehicleClaimDetailsChanges() {
|
|
8902
|
-
this.eventDispatcherService.on(
|
|
8903
|
-
AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_CREATED,
|
|
8904
|
-
AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_UPDATED
|
|
8905
|
-
])
|
|
9012
|
+
this.eventDispatcherService.on(AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_UPDATED)
|
|
8906
9013
|
.subscribe(() => {
|
|
8907
9014
|
this.resetCache();
|
|
8908
9015
|
});
|
|
@@ -8927,14 +9034,17 @@ class VehicleClaimService extends RestService {
|
|
|
8927
9034
|
* @TODO Vik: Best period move this and related logic to backend
|
|
8928
9035
|
*/
|
|
8929
9036
|
updateWorkUsage(bestPeriod) {
|
|
8930
|
-
//
|
|
8931
|
-
|
|
9037
|
+
// no need to update if cache not exist
|
|
9038
|
+
if (!this.cache) {
|
|
9039
|
+
return;
|
|
9040
|
+
}
|
|
9041
|
+
// @TODO Vik (TT-2210): need batch endpoint for this update
|
|
9042
|
+
// @TODO Alex (TT-2210): fix frontend when endpoint ready
|
|
8932
9043
|
const batch$ = this.cache.map((claim) => {
|
|
8933
9044
|
const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage: bestPeriod === null || bestPeriod === void 0 ? void 0 : bestPeriod.getWorkUsageByClaim(claim) }));
|
|
8934
9045
|
return this.update(claimToUpdate);
|
|
8935
9046
|
});
|
|
8936
|
-
|
|
8937
|
-
combineLatest(batch$).pipe(take(1)).subscribe();
|
|
9047
|
+
combineLatest(batch$).subscribe();
|
|
8938
9048
|
}
|
|
8939
9049
|
}
|
|
8940
9050
|
VehicleClaimService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: VehicleClaimService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -9008,11 +9118,12 @@ class VehicleClaimDetailsService {
|
|
|
9008
9118
|
* @TODO Vik: Best period move this and related logic to backend
|
|
9009
9119
|
*/
|
|
9010
9120
|
updateToManual() {
|
|
9011
|
-
//
|
|
9012
|
-
|
|
9121
|
+
// no need to update if cache not exist
|
|
9122
|
+
if (!this.cache) {
|
|
9123
|
+
return;
|
|
9124
|
+
}
|
|
9013
9125
|
const vehicleClaimDetails = plainToClass(VehicleClaimDetails, Object.assign({}, this.cache, { isManual: true }));
|
|
9014
|
-
|
|
9015
|
-
this.update(vehicleClaimDetails).pipe(take(1)).subscribe();
|
|
9126
|
+
this.update(vehicleClaimDetails).subscribe();
|
|
9016
9127
|
}
|
|
9017
9128
|
}
|
|
9018
9129
|
VehicleClaimDetailsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: VehicleClaimDetailsService, deps: [{ token: 'environment' }, { token: i1.HttpClient }, { token: EventDispatcherService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -9163,6 +9274,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
9163
9274
|
}]
|
|
9164
9275
|
}] });
|
|
9165
9276
|
|
|
9277
|
+
/**
|
|
9278
|
+
* Service to work with Rewardful (affiliate program) API
|
|
9279
|
+
* https://developers.rewardful.com/javascript-api/overview#executing-code-when-rewardful-loads
|
|
9280
|
+
*/
|
|
9281
|
+
class RewardfulService {
|
|
9282
|
+
constructor(environment) {
|
|
9283
|
+
this.environment = environment;
|
|
9284
|
+
}
|
|
9285
|
+
getReferralCode() {
|
|
9286
|
+
return new Observable((observer) => {
|
|
9287
|
+
if (!this.environment.rewardfulId) {
|
|
9288
|
+
return observer.next(null);
|
|
9289
|
+
}
|
|
9290
|
+
window['rewardful']('ready', () => {
|
|
9291
|
+
observer.next(window['Rewardful'].referral);
|
|
9292
|
+
});
|
|
9293
|
+
});
|
|
9294
|
+
}
|
|
9295
|
+
}
|
|
9296
|
+
RewardfulService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RewardfulService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9297
|
+
RewardfulService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RewardfulService, providedIn: 'root' });
|
|
9298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RewardfulService, decorators: [{
|
|
9299
|
+
type: Injectable,
|
|
9300
|
+
args: [{
|
|
9301
|
+
providedIn: 'root'
|
|
9302
|
+
}]
|
|
9303
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
9304
|
+
type: Inject,
|
|
9305
|
+
args: ['environment']
|
|
9306
|
+
}] }]; } });
|
|
9307
|
+
|
|
9166
9308
|
/**
|
|
9167
9309
|
* Service for logbook best period calculation
|
|
9168
9310
|
* @TODO Vik: improve structure for such cases (TT-2043)
|
|
@@ -9272,7 +9414,7 @@ const ACCOUNT_SETUP_ITEMS = {
|
|
|
9272
9414
|
}),
|
|
9273
9415
|
[AccountSetupItemsEnum.WORK_LOGBOOK]: plainToClass(AccountSetupItem, {
|
|
9274
9416
|
title: 'Set up your logbook method',
|
|
9275
|
-
description: 'Do you use your vehicle for work? Select your method and the
|
|
9417
|
+
description: 'Do you use your vehicle for work? Select your method and the kms or logbook % to automate accurately all vehicle expenses throughout the year.',
|
|
9276
9418
|
url: '/client/work-tank/logbook',
|
|
9277
9419
|
urlFragment: 'productTour'
|
|
9278
9420
|
}),
|
|
@@ -9395,6 +9537,13 @@ class PropertyService extends RestService {
|
|
|
9395
9537
|
return updatedProperty;
|
|
9396
9538
|
}));
|
|
9397
9539
|
}
|
|
9540
|
+
updateDepreciationCalculation(property) {
|
|
9541
|
+
const propertyToUpdate = plainToClass(Property, { id: property.id, depreciationCalculation: property.depreciationCalculation });
|
|
9542
|
+
return this.update(propertyToUpdate).pipe(map((updatedProperty) => {
|
|
9543
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_DEPRECIATION_CALCULATION_UPDATED, updatedProperty));
|
|
9544
|
+
return updatedProperty;
|
|
9545
|
+
}));
|
|
9546
|
+
}
|
|
9398
9547
|
getByCategoryId(id) {
|
|
9399
9548
|
return this.get().pipe(map((properties) => {
|
|
9400
9549
|
return properties.filter((property) => property.category.id === id);
|
|
@@ -10141,7 +10290,6 @@ class TransactionService extends RestService {
|
|
|
10141
10290
|
this.eventDispatcherService.on([
|
|
10142
10291
|
AppEventTypeEnum.VEHICLE_CLAIM_CREATED,
|
|
10143
10292
|
AppEventTypeEnum.VEHICLE_CLAIM_UPDATED,
|
|
10144
|
-
AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_CREATED,
|
|
10145
10293
|
AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_UPDATED
|
|
10146
10294
|
]).subscribe(() => {
|
|
10147
10295
|
this.resetCache();
|
|
@@ -10245,7 +10393,7 @@ class AccountSetupService {
|
|
|
10245
10393
|
}
|
|
10246
10394
|
// Bank feeds item is completed when user added at least one bank account (basiq or manual)
|
|
10247
10395
|
batch.push(this.create(AccountSetupItemsEnum.BANK_FEEDS, this.bankAccountsService.get()));
|
|
10248
|
-
// Logbook item is completed when user has at least one vehicle claim with any method (
|
|
10396
|
+
// Logbook item is completed when user has at least one vehicle claim with any method (kms or logbook)
|
|
10249
10397
|
batch.push(this.getLogbookItem());
|
|
10250
10398
|
// @TODO waiting for sole tank forecast page
|
|
10251
10399
|
// Sole item is completed when user added at least one sole income source
|
|
@@ -11335,6 +11483,8 @@ class DepreciationService extends RestService {
|
|
|
11335
11483
|
this.listenReceiptDeleted();
|
|
11336
11484
|
this.listenVehicleClaimChanges();
|
|
11337
11485
|
this.listenToUpdatedBankAccount();
|
|
11486
|
+
this.listenSoleDepreciationMethodChanges();
|
|
11487
|
+
this.listenPropertyDepreciationCalculationChanges();
|
|
11338
11488
|
}
|
|
11339
11489
|
getOpenBalance(depreciation) {
|
|
11340
11490
|
return this.http.post(`${this.environment.apiV2}/${this.url}/opening-balance?financialYear=${new FinancialYear().year}`, depreciation)
|
|
@@ -11383,7 +11533,6 @@ class DepreciationService extends RestService {
|
|
|
11383
11533
|
this.eventDispatcherService.on([
|
|
11384
11534
|
AppEventTypeEnum.VEHICLE_CLAIM_CREATED,
|
|
11385
11535
|
AppEventTypeEnum.VEHICLE_CLAIM_UPDATED,
|
|
11386
|
-
AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_CREATED,
|
|
11387
11536
|
AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_UPDATED
|
|
11388
11537
|
]).subscribe(() => {
|
|
11389
11538
|
this.resetCache();
|
|
@@ -11393,6 +11542,22 @@ class DepreciationService extends RestService {
|
|
|
11393
11542
|
replace(this.cache, depreciationToReplace);
|
|
11394
11543
|
this.updateCache();
|
|
11395
11544
|
}
|
|
11545
|
+
/**
|
|
11546
|
+
* @TODO Alex: create common method resetCacheOn(events: AppEventType[])
|
|
11547
|
+
*/
|
|
11548
|
+
listenSoleDepreciationMethodChanges() {
|
|
11549
|
+
this.eventDispatcherService.on(AppEventTypeEnum.SOLE_DEPRECIATION_METHOD_UPDATED).subscribe(() => {
|
|
11550
|
+
this.resetCache();
|
|
11551
|
+
});
|
|
11552
|
+
}
|
|
11553
|
+
/**
|
|
11554
|
+
* @TODO Alex: create common method resetCacheOn(events: AppEventType[])
|
|
11555
|
+
*/
|
|
11556
|
+
listenPropertyDepreciationCalculationChanges() {
|
|
11557
|
+
this.eventDispatcherService.on(AppEventTypeEnum.PROPERTY_DEPRECIATION_CALCULATION_UPDATED).subscribe(() => {
|
|
11558
|
+
this.resetCache();
|
|
11559
|
+
});
|
|
11560
|
+
}
|
|
11396
11561
|
}
|
|
11397
11562
|
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 });
|
|
11398
11563
|
DepreciationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DepreciationService, providedIn: 'root' });
|
|
@@ -13657,7 +13822,7 @@ function taxReviewFilterPredicate(data, filter) {
|
|
|
13657
13822
|
/**
|
|
13658
13823
|
* Abstract form class
|
|
13659
13824
|
* @TODO rename to AbstractFormGroup
|
|
13660
|
-
* @TODO Alex: refactor: check and improve logic
|
|
13825
|
+
* @TODO Alex TT-2190: refactor: check and improve logic
|
|
13661
13826
|
*/
|
|
13662
13827
|
class AbstractForm extends FormGroup {
|
|
13663
13828
|
constructor(controls, model, validatorOrOpts, asyncValidator) {
|
|
@@ -13673,13 +13838,14 @@ class AbstractForm extends FormGroup {
|
|
|
13673
13838
|
if (model && !model['id']) {
|
|
13674
13839
|
this.markAsUnsaved();
|
|
13675
13840
|
}
|
|
13676
|
-
this.
|
|
13677
|
-
!!model && !!model['id'] && isEqual(this.value, this.initialValue) ? this.markAsSaved() : this.markAsUnsaved();
|
|
13678
|
-
});
|
|
13841
|
+
this.listenValueChanges();
|
|
13679
13842
|
}
|
|
13680
13843
|
get saved() {
|
|
13681
13844
|
return !this.unsaved;
|
|
13682
13845
|
}
|
|
13846
|
+
get currentValue() {
|
|
13847
|
+
return this.createModelInstance(Object.assign({}, this.model, this.getRawValue()));
|
|
13848
|
+
}
|
|
13683
13849
|
/**
|
|
13684
13850
|
* Check validation and return a new instance of generic model.
|
|
13685
13851
|
* Merge form value to initial object
|
|
@@ -13708,6 +13874,11 @@ class AbstractForm extends FormGroup {
|
|
|
13708
13874
|
createModelInstance(data = {}) {
|
|
13709
13875
|
return plainToClass(this.modelClass, data);
|
|
13710
13876
|
}
|
|
13877
|
+
listenValueChanges() {
|
|
13878
|
+
this.valueChanges.subscribe(() => {
|
|
13879
|
+
!!this.model && !!this.model['id'] && isEqual(this.value, this.initialValue) ? this.markAsSaved() : this.markAsUnsaved();
|
|
13880
|
+
});
|
|
13881
|
+
}
|
|
13711
13882
|
}
|
|
13712
13883
|
|
|
13713
13884
|
/**
|
|
@@ -13977,7 +14148,7 @@ class SoleBusinessForm extends AbstractForm {
|
|
|
13977
14148
|
constructor(business = plainToClass(SoleBusiness, {})) {
|
|
13978
14149
|
super({
|
|
13979
14150
|
name: new FormControl(business.name, Validators.required),
|
|
13980
|
-
|
|
14151
|
+
activity: new FormControl(business.activity, Validators.required),
|
|
13981
14152
|
description: new FormControl(business.description),
|
|
13982
14153
|
website: new FormControl(business.website)
|
|
13983
14154
|
}, business);
|
|
@@ -13987,6 +14158,7 @@ class SoleBusinessForm extends AbstractForm {
|
|
|
13987
14158
|
/**
|
|
13988
14159
|
* Form array with bank account business allocations
|
|
13989
14160
|
* @TODO create AbstractFormArray
|
|
14161
|
+
* @TODO Alex/Vik (TT-2184): copypasted from bank-account-properties.form, improve logic and create common parent class maybe
|
|
13990
14162
|
*/
|
|
13991
14163
|
class SoleBusinessAllocationsForm extends FormArray {
|
|
13992
14164
|
constructor(businessAllocations) {
|
|
@@ -14060,6 +14232,14 @@ class SoleContactForm extends AbstractForm {
|
|
|
14060
14232
|
}
|
|
14061
14233
|
}
|
|
14062
14234
|
|
|
14235
|
+
class SoleDepreciationMethodForm extends AbstractForm {
|
|
14236
|
+
constructor(soleDepreciationMethod) {
|
|
14237
|
+
super({
|
|
14238
|
+
method: new FormControl(soleDepreciationMethod.method)
|
|
14239
|
+
}, soleDepreciationMethod);
|
|
14240
|
+
}
|
|
14241
|
+
}
|
|
14242
|
+
|
|
14063
14243
|
class SoleDetailsForm extends AbstractForm {
|
|
14064
14244
|
constructor(soleDetails) {
|
|
14065
14245
|
super({
|
|
@@ -14075,7 +14255,7 @@ class SoleInvoiceTemplateForm extends AbstractForm {
|
|
|
14075
14255
|
name: new FormControl(invoiceTemplate.name, Validators.required),
|
|
14076
14256
|
isTaxIncluded: new FormControl(invoiceTemplate.isTaxIncluded),
|
|
14077
14257
|
term: new FormControl(invoiceTemplate.term, [Validators.required, Validators.min(0)]),
|
|
14078
|
-
bankAccount: new FormControl(invoiceTemplate.bankAccount)
|
|
14258
|
+
bankAccount: new FormControl(invoiceTemplate.bankAccount, [Validators.required])
|
|
14079
14259
|
}, invoiceTemplate);
|
|
14080
14260
|
}
|
|
14081
14261
|
}
|
|
@@ -14092,9 +14272,12 @@ class BankAccountAllocationForm extends AbstractForm {
|
|
|
14092
14272
|
if (bankAccount === null || bankAccount === void 0 ? void 0 : bankAccount.isSoleTank()) {
|
|
14093
14273
|
this.addControl('businessAllocations', new SoleBusinessAllocationsForm(bankAccount.businessAllocations));
|
|
14094
14274
|
}
|
|
14095
|
-
this.
|
|
14275
|
+
this.listenEvents();
|
|
14276
|
+
}
|
|
14277
|
+
listenEvents() {
|
|
14278
|
+
this.listenTankTypeChanges();
|
|
14096
14279
|
}
|
|
14097
|
-
|
|
14280
|
+
listenTankTypeChanges() {
|
|
14098
14281
|
this.get('tankType').valueChanges.subscribe((tankType) => {
|
|
14099
14282
|
var _a, _b;
|
|
14100
14283
|
this.removeControl('bankAccountProperties');
|
|
@@ -14755,9 +14938,14 @@ class VehicleClaimForm extends AbstractForm {
|
|
|
14755
14938
|
}),
|
|
14756
14939
|
workUsage: new FormControl({
|
|
14757
14940
|
value: vehicleClaim.workUsage,
|
|
14758
|
-
disabled: !details.isManual || details.
|
|
14941
|
+
disabled: !details.isManual || details.isKmsMethod()
|
|
14759
14942
|
})
|
|
14760
14943
|
}, vehicleClaim);
|
|
14944
|
+
this.vehicleClaim = vehicleClaim;
|
|
14945
|
+
this.details = details;
|
|
14946
|
+
}
|
|
14947
|
+
getAverageWeeklyKMS() {
|
|
14948
|
+
return this.get('kilometers').value / FinancialYear.weeksInYear;
|
|
14761
14949
|
}
|
|
14762
14950
|
}
|
|
14763
14951
|
|
|
@@ -14765,16 +14953,12 @@ class VehicleClaimForm extends AbstractForm {
|
|
|
14765
14953
|
* Add/Edit vehicle claim details form
|
|
14766
14954
|
*/
|
|
14767
14955
|
class VehicleClaimDetailsForm extends AbstractForm {
|
|
14768
|
-
|
|
14769
|
-
* @param vehicleClaimDetails required because we create a new details with prefilled data (like Financial year)
|
|
14770
|
-
* @param logbooks required for isManual field disabled state management
|
|
14771
|
-
*/
|
|
14772
|
-
constructor(vehicleClaimDetails, logbooks) {
|
|
14956
|
+
constructor(vehicleClaimDetails, isBestPeriodExist) {
|
|
14773
14957
|
super({
|
|
14774
14958
|
method: new FormControl(vehicleClaimDetails.method, Validators.required),
|
|
14775
14959
|
isManual: new FormControl({
|
|
14776
14960
|
value: vehicleClaimDetails.isManual,
|
|
14777
|
-
disabled: !
|
|
14961
|
+
disabled: !isBestPeriodExist
|
|
14778
14962
|
}),
|
|
14779
14963
|
}, vehicleClaimDetails);
|
|
14780
14964
|
}
|
|
@@ -14799,30 +14983,38 @@ class VehicleLogbookForm extends AbstractForm {
|
|
|
14799
14983
|
date: new FormControl(logbook.date, Validators.required),
|
|
14800
14984
|
odometerStart: new FormControl(logbook.odometerStart, Validators.required),
|
|
14801
14985
|
odometerEnd: new FormControl(logbook.odometerEnd, Validators.required),
|
|
14802
|
-
business: new FormControl(logbook.business)
|
|
14803
|
-
// @TODO Alex: remove when backend fixed
|
|
14804
|
-
purpose: new FormControl(VehicleLogbookPurposeEnum.BUSINESS)
|
|
14986
|
+
business: new FormControl(logbook.business)
|
|
14805
14987
|
}, logbook);
|
|
14806
14988
|
this.logbook = logbook;
|
|
14807
14989
|
this.logbooks = logbooks;
|
|
14990
|
+
this.updateStateAndValidators();
|
|
14991
|
+
}
|
|
14992
|
+
/**
|
|
14993
|
+
* Set logbook validators and disable state depends of initial logbook and its place in the whole list
|
|
14994
|
+
*/
|
|
14995
|
+
updateStateAndValidators() {
|
|
14808
14996
|
switch (true) {
|
|
14809
14997
|
// Create the first or edit the single logbook
|
|
14810
|
-
case !logbook.id && !logbooks.length:
|
|
14811
|
-
case !!logbook.id && logbooks.length === 1:
|
|
14998
|
+
case !this.logbook.id && !this.logbooks.length:
|
|
14999
|
+
case !!this.logbook.id && this.logbooks.length === 1:
|
|
14812
15000
|
this.get('odometerStart').setValidators(Validators.min(0));
|
|
14813
15001
|
this.get('date').setValidators(dateRangeValidator(new FinancialYear().startDate, new FinancialYear().endDate));
|
|
14814
15002
|
break;
|
|
14815
|
-
// Create the non-first
|
|
14816
|
-
case !logbook.id && !!logbooks.length:
|
|
14817
|
-
case !!logbook.id && logbook.id === logbooks.last.id && logbooks.length > 1:
|
|
15003
|
+
// Create the non-first
|
|
15004
|
+
case !this.logbook.id && !!this.logbooks.length:
|
|
14818
15005
|
this.get('odometerStart').disable();
|
|
14819
|
-
this.get('odometerEnd').setValidators(Validators.min(logbooks.last.odometerEnd));
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
15006
|
+
this.get('odometerEnd').setValidators(Validators.min(this.logbooks.last.odometerEnd));
|
|
15007
|
+
this.get('date').setValidators(dateRangeValidator(this.logbooks.last.date, new FinancialYear().endDate));
|
|
15008
|
+
break;
|
|
15009
|
+
// Edit the last logbook
|
|
15010
|
+
case !!this.logbook.id && this.logbook.id === this.logbooks.last.id && this.logbooks.length > 1:
|
|
15011
|
+
this.get('odometerStart').disable();
|
|
15012
|
+
this.get('odometerEnd').setValidators(Validators.min(this.logbooks.last.odometerEnd));
|
|
15013
|
+
const preLastDate = this.logbooks.toArray()[this.logbooks.length - 1].date;
|
|
15014
|
+
this.get('date').setValidators(dateRangeValidator(preLastDate, new FinancialYear().endDate));
|
|
14823
15015
|
break;
|
|
14824
15016
|
// Edit the non-last logbook
|
|
14825
|
-
case !!logbook.id && logbook.id !== logbooks.last.id && logbooks.length > 1:
|
|
15017
|
+
case !!this.logbook.id && this.logbook.id !== this.logbooks.last.id && this.logbooks.length > 1:
|
|
14826
15018
|
this.get('odometerStart').disable();
|
|
14827
15019
|
this.get('odometerEnd').disable();
|
|
14828
15020
|
this.get('date').disable();
|
|
@@ -14837,5 +15029,5 @@ VehicleLogbookForm.maxDescriptionLength = 60;
|
|
|
14837
15029
|
* Generated bundle index. Do not edit.
|
|
14838
15030
|
*/
|
|
14839
15031
|
|
|
14840
|
-
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, 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 };
|
|
15032
|
+
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, RewardfulService, 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 };
|
|
14841
15033
|
//# sourceMappingURL=taxtank-core.js.map
|