taxtank-core 0.28.11 → 0.28.14
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 +1800 -1534
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection-dictionary.js +5 -2
- package/esm2015/lib/collections/sole/sole-invoice-item.collection.js +7 -0
- package/esm2015/lib/db/Enums/chart-accounts-list.enum.js +3 -1
- package/esm2015/lib/db/Enums/document-type.enum.js +5 -0
- package/esm2015/lib/db/Enums/index.js +3 -0
- package/esm2015/lib/db/Enums/sole-invoice-tax-type.enum.js +7 -0
- package/esm2015/lib/db/Enums/sole-invoice-template-tax-type.enum.js +4 -4
- package/esm2015/lib/db/Models/sole/sole-invoice-item.js +1 -1
- package/esm2015/lib/db/Models/sole/sole-invoice.js +1 -1
- package/esm2015/lib/forms/bank/bank-account/bank-account-add-manual.form.js +10 -6
- package/esm2015/lib/forms/bank/bank-account/bank-account-allocation.form.js +5 -4
- package/esm2015/lib/forms/sole/sole-business.form.js +21 -2
- package/esm2015/lib/forms/sole/sole-invoice-item.form.js +3 -31
- package/esm2015/lib/forms/sole/sole-invoice-template.form.js +4 -5
- package/esm2015/lib/forms/sole/sole-invoice.form.js +93 -18
- package/esm2015/lib/interceptors/basiq-client-id.interceptor.js +3 -3
- package/esm2015/lib/interceptors/basiq-token.interceptor.js +3 -3
- package/esm2015/lib/interceptors/corelogic-interceptor.js +3 -3
- package/esm2015/lib/interceptors/financial-year-interceptor.js +3 -3
- package/esm2015/lib/interceptors/interceptors.module.js +4 -4
- package/esm2015/lib/interceptors/jwt-interceptor.js +3 -3
- package/esm2015/lib/interceptors/preloader.interceptor.js +3 -3
- package/esm2015/lib/interceptors/user-switcher-interceptor.js +3 -3
- package/esm2015/lib/models/dictionary/dictionary.js +2 -2
- package/esm2015/lib/models/document/index.js +3 -0
- package/esm2015/lib/models/income-source/income-source.js +3 -3
- package/esm2015/lib/models/index.js +2 -1
- package/esm2015/lib/models/sole/sole-details.js +1 -3
- package/esm2015/lib/models/sole/sole-invoice-item.js +10 -2
- package/esm2015/lib/models/sole/sole-invoice-template.js +13 -10
- package/esm2015/lib/models/sole/sole-invoice.js +82 -28
- package/esm2015/lib/services/account-setup/account-setup.service.js +3 -3
- package/esm2015/lib/services/affiliate/rewardful/rewardful.service.js +3 -3
- package/esm2015/lib/services/asset/assets.service.js +3 -3
- package/esm2015/lib/services/auth/auth.service.js +3 -3
- package/esm2015/lib/services/auth/jwt.service.js +3 -3
- package/esm2015/lib/services/bank/bank-account-calculation.service.js +3 -3
- package/esm2015/lib/services/bank/bank-transaction-calculation.service.js +3 -3
- package/esm2015/lib/services/event/event-dispatcher.service.js +3 -3
- package/esm2015/lib/services/event/sse.service.js +3 -3
- package/esm2015/lib/services/export/export-formatter.service.js +3 -3
- package/esm2015/lib/services/header-title/header-title.service.js +3 -3
- package/esm2015/lib/services/http/address/address.service.js +3 -3
- package/esm2015/lib/services/http/bank/bank-account/bank-account.service.js +3 -3
- package/esm2015/lib/services/http/bank/bank-connection/bank-connection.service.js +3 -3
- package/esm2015/lib/services/http/bank/bank-transaction/bank-transaction.service.js +3 -3
- package/esm2015/lib/services/http/bank/bank.service.js +3 -3
- package/esm2015/lib/services/http/bank/basiq/basiq-token.service.js +3 -3
- package/esm2015/lib/services/http/bank/basiq/basiq.service.js +3 -3
- package/esm2015/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.js +3 -3
- package/esm2015/lib/services/http/chart-accounts/chart-accounts.service.js +3 -3
- package/esm2015/lib/services/http/chat/chat.service.js +3 -3
- package/esm2015/lib/services/http/chat/message/message.service.js +3 -3
- package/esm2015/lib/services/http/chat/message-document/message-document.service.js +3 -3
- package/esm2015/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.js +3 -3
- package/esm2015/lib/services/http/depreciation/depreciation-receipt/depreciation-receipt.service.js +3 -3
- package/esm2015/lib/services/http/depreciation/depreciation.service.js +3 -3
- package/esm2015/lib/services/http/document/document-folder/document-folder.service.js +4 -4
- package/esm2015/lib/services/http/document/document.service.js +20 -0
- package/esm2015/lib/services/http/document/index.js +3 -0
- package/esm2015/lib/services/http/facebook/facebook.service.js +3 -3
- package/esm2015/lib/services/http/firm/client-income/client-income-types.service.js +3 -3
- package/esm2015/lib/services/http/firm/client-invite/client-invite.service.js +3 -3
- package/esm2015/lib/services/http/firm/client-movement/client-movement.service.js +3 -3
- package/esm2015/lib/services/http/firm/employee/employee.service.js +3 -3
- package/esm2015/lib/services/http/firm/employee-invite/employee-invite.service.js +3 -3
- package/esm2015/lib/services/http/firm/firm.service.js +3 -3
- package/esm2015/lib/services/http/firm/portfolio-report/client-portfolio-report.service.js +3 -3
- package/esm2015/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.js +3 -3
- package/esm2015/lib/services/http/income-source/income-source.service.js +5 -4
- package/esm2015/lib/services/http/income-source/salary-forecast/salary-forecast.service.js +3 -3
- package/esm2015/lib/services/http/income-source/sole-forecast/sole-forecast.service.js +3 -3
- package/esm2015/lib/services/http/index.js +2 -1
- package/esm2015/lib/services/http/loan/borrowing-expense/borrowing-expense.service.js +3 -3
- package/esm2015/lib/services/http/loan/loan.service.js +3 -3
- package/esm2015/lib/services/http/property/property-category/property-category.service.js +3 -3
- package/esm2015/lib/services/http/property/property-category-movement/property-category-movement.service.js +3 -3
- package/esm2015/lib/services/http/property/property-document/property-document.service.js +3 -3
- package/esm2015/lib/services/http/property/property-sale/property-sale.service.js +3 -3
- package/esm2015/lib/services/http/property/property-sale/tax-exemption/tax-exemption.service.js +3 -3
- package/esm2015/lib/services/http/property/property-share/property-share.service.js +3 -3
- package/esm2015/lib/services/http/property/property.service.js +3 -3
- package/esm2015/lib/services/http/receipt/receipt.service.js +3 -3
- package/esm2015/lib/services/http/rest/rest.service.js +26 -10
- package/esm2015/lib/services/http/service-notification/service-notification.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-business-activity/sole-business-activity.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-contact/sole-contact.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-depreciation-method/sole-depreciation-method.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +3 -3
- package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +18 -4
- package/esm2015/lib/services/http/sole/sole-invoice-template/sole-invoice-template.service.js +3 -3
- package/esm2015/lib/services/http/subscription/service-price.service.js +3 -3
- package/esm2015/lib/services/http/subscription/subscription.service.js +3 -3
- package/esm2015/lib/services/http/tax-review/tax-review-history/tax-review-history.service.js +3 -3
- package/esm2015/lib/services/http/tax-review/tax-review.service.js +3 -3
- package/esm2015/lib/services/http/tax-summary/tax-summary.service.js +3 -3
- package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +3 -3
- package/esm2015/lib/services/http/transaction/transaction-receipt/transaction-receipt.service.js +3 -3
- package/esm2015/lib/services/http/transaction/transaction.service.js +3 -3
- package/esm2015/lib/services/http/tutorial-video/tutorial-video.service.js +3 -3
- package/esm2015/lib/services/http/user/occupation/occupation.service.js +3 -3
- package/esm2015/lib/services/http/user/user-event-setting/user-event-setting.service.js +3 -3
- package/esm2015/lib/services/http/user/user-event-type/user-event-type.service.js +3 -3
- package/esm2015/lib/services/http/user/user.service.js +3 -3
- package/esm2015/lib/services/http/user/users-invite/users-invite.service.js +3 -3
- package/esm2015/lib/services/http/vehicle/vehicle-claim-details.service.js +3 -3
- package/esm2015/lib/services/http/vehicle/vehicle-claim.service.js +3 -3
- package/esm2015/lib/services/http/vehicle/vehicle-logbook.service.js +3 -3
- package/esm2015/lib/services/http/vehicle/vehicle.service.js +3 -3
- package/esm2015/lib/services/intercom/intercom.service.js +3 -3
- package/esm2015/lib/services/kompassify/kompassify.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.js +20 -8
- package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-table.service.js +3 -3
- package/esm2015/lib/services/preloader/preloader.service.js +3 -3
- package/esm2015/lib/services/property/corelogic/corelogic.service.js +3 -3
- package/esm2015/lib/services/property/equity-position-chart/equity-position-chart.service.js +3 -3
- package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +3 -3
- package/esm2015/lib/services/report/property/property-transaction-report.service.js +3 -3
- package/esm2015/lib/services/toast/toast.service.js +3 -3
- package/esm2015/lib/services/transaction/transaction-calculation.service.js +16 -4
- package/esm2015/lib/services/user/user-switcher.service.js +3 -3
- package/esm2015/lib/services/vehicle/logbook-best-period.service.js +3 -3
- package/esm2015/lib/services/xlsx/xlsx.service.js +3 -3
- package/esm2015/lib/tt-core.module.js +4 -4
- package/esm2015/public-api.js +3 -2
- package/fesm2015/taxtank-core.js +1476 -1257
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/sole/sole-invoice-item.collection.d.ts +5 -0
- package/lib/db/Enums/chart-accounts-list.enum.d.ts +3 -1
- package/lib/db/Enums/document-type.enum.d.ts +3 -0
- package/lib/db/Enums/index.d.ts +1 -0
- package/lib/db/Enums/sole-invoice-tax-type.enum.d.ts +5 -0
- package/lib/db/Enums/sole-invoice-template-tax-type.enum.d.ts +3 -3
- package/lib/db/Models/sole/sole-invoice-item.d.ts +3 -1
- package/lib/db/Models/sole/sole-invoice.d.ts +8 -5
- package/lib/forms/bank/bank-account/bank-account-add-manual.form.d.ts +3 -1
- package/lib/forms/bank/bank-account/bank-account-allocation.form.d.ts +4 -1
- package/lib/forms/sole/sole-business.form.d.ts +10 -1
- package/lib/forms/sole/sole-invoice-item.form.d.ts +2 -7
- package/lib/forms/sole/sole-invoice-template.form.d.ts +2 -3
- package/lib/forms/sole/sole-invoice.form.d.ts +19 -2
- package/lib/models/document/index.d.ts +2 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/sole/sole-details.d.ts +0 -2
- package/lib/models/sole/sole-invoice-item.d.ts +7 -1
- package/lib/models/sole/sole-invoice-template.d.ts +10 -3
- package/lib/models/sole/sole-invoice.d.ts +49 -5
- package/lib/services/http/document/document.service.d.ts +10 -0
- package/lib/services/http/document/index.d.ts +2 -0
- package/lib/services/http/index.d.ts +1 -0
- package/lib/services/http/rest/rest.service.d.ts +13 -4
- package/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +6 -1
- package/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.d.ts +5 -1
- package/lib/services/transaction/transaction-calculation.service.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('class-transformer'), require('@auth0/angular-jwt'), require('lodash/get'), require('lodash/last'), require('lodash/flatten'), require('lodash/hasIn'), require('lodash/first'), require('moment'), require('moment-range'), require('lodash/uniqBy'), require('lodash/concat'), require('rxjs/internal/observable/throwError'), require('lodash/cloneDeep'), require('event-source-polyfill/src/eventsource.min.js'), require('lodash/compact'), require('@angular/forms'), require('lodash/isEqual'), require('lodash/fromPairs'), require('lodash'), require('@angular/router'), require('lodash/clone'), require('html2pdf.js'), require('jspdf'), require('jspdf-autotable'), require('@stripe/stripe-js'), require('xlsx'), require('file-saver')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('taxtank-core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs', 'rxjs/operators', 'class-transformer', '@auth0/angular-jwt', 'lodash/get', 'lodash/last', 'lodash/flatten', 'lodash/hasIn', 'lodash/first', 'moment', 'moment-range', 'lodash/uniqBy', 'lodash/concat', 'rxjs/internal/observable/throwError', 'lodash/cloneDeep', 'event-source-polyfill/src/eventsource.min.js', 'lodash/compact', '@angular/forms', 'lodash/isEqual', 'lodash/fromPairs', 'lodash', '@angular/router', 'lodash/clone', 'html2pdf.js', 'jspdf', 'jspdf-autotable', '@stripe/stripe-js', 'xlsx', 'file-saver'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["taxtank-core"] = {}, global.ng.core, global.ng.common, global.ng.common.http, global.rxjs, global.rxjs.operators, global.classTransformer, global.angularJwt, global.get, global.last, global.flatten, global.hasIn, global.first, global.moment$1, global.momentRange, global.uniqBy, global.concat, global.rxjs["internal/observable/throwError"], global.cloneDeep$1, global.eventsource_min_js, global.compact, global.ng.forms, global.isEqual, global.fromPairs, global._, global.ng.router, global.clone, global.html2pdf, global.jsPDF, global.autoTable, global.stripeJs, global.xlsx, global.FileSaver));
|
|
5
|
-
})(this, (function (exports, i0, i1$1, i1, rxjs, operators, classTransformer, angularJwt, get, last, flatten, hasIn, first, moment$1, momentRange, uniqBy, concat, throwError, cloneDeep$1, eventsource_min_js, compact, forms, isEqual, fromPairs, _, i1$2, clone, html2pdf, jsPDF, autoTable, stripeJs, xlsx, FileSaver) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('class-transformer'), require('@auth0/angular-jwt'), require('lodash/get'), require('lodash/last'), require('lodash/flatten'), require('lodash/hasIn'), require('lodash/first'), require('moment'), require('moment-range'), require('lodash/uniqBy'), require('lodash/concat'), require('rxjs/internal/observable/throwError'), require('lodash/cloneDeep'), require('event-source-polyfill/src/eventsource.min.js'), require('lodash/compact'), require('@angular/forms'), require('lodash/merge'), require('lodash/isEqual'), require('lodash/fromPairs'), require('lodash'), require('@angular/router'), require('lodash/clone'), require('html2pdf.js'), require('jspdf'), require('jspdf-autotable'), require('@stripe/stripe-js'), require('xlsx'), require('file-saver')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('taxtank-core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs', 'rxjs/operators', 'class-transformer', '@auth0/angular-jwt', 'lodash/get', 'lodash/last', 'lodash/flatten', 'lodash/hasIn', 'lodash/first', 'moment', 'moment-range', 'lodash/uniqBy', 'lodash/concat', 'rxjs/internal/observable/throwError', 'lodash/cloneDeep', 'event-source-polyfill/src/eventsource.min.js', 'lodash/compact', '@angular/forms', 'lodash/merge', 'lodash/isEqual', 'lodash/fromPairs', 'lodash', '@angular/router', 'lodash/clone', 'html2pdf.js', 'jspdf', 'jspdf-autotable', '@stripe/stripe-js', 'xlsx', 'file-saver'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["taxtank-core"] = {}, global.ng.core, global.ng.common, global.ng.common.http, global.rxjs, global.rxjs.operators, global.classTransformer, global.angularJwt, global.get, global.last, global.flatten, global.hasIn, global.first, global.moment$1, global.momentRange, global.uniqBy, global.concat, global.rxjs["internal/observable/throwError"], global.cloneDeep$1, global.eventsource_min_js, global.compact, global.ng.forms, global.merge, global.isEqual, global.fromPairs, global._, global.ng.router, global.clone, global.html2pdf, global.jsPDF, global.autoTable, global.stripeJs, global.xlsx, global.FileSaver));
|
|
5
|
+
})(this, (function (exports, i0, i1$1, i1, rxjs, operators, classTransformer, angularJwt, get, last, flatten, hasIn, first, moment$1, momentRange, uniqBy, concat, throwError, cloneDeep$1, eventsource_min_js, compact, forms, merge, isEqual, fromPairs, _, i1$2, clone, html2pdf, jsPDF, autoTable, stripeJs, xlsx, FileSaver) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
var concat__default = /*#__PURE__*/_interopDefaultLegacy(concat);
|
|
38
38
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep$1);
|
|
39
39
|
var compact__default = /*#__PURE__*/_interopDefaultLegacy(compact);
|
|
40
|
+
var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
|
|
40
41
|
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
41
42
|
var fromPairs__default = /*#__PURE__*/_interopDefaultLegacy(fromPairs);
|
|
42
43
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
@@ -89,9 +90,9 @@
|
|
|
89
90
|
};
|
|
90
91
|
return CorelogicService;
|
|
91
92
|
}());
|
|
92
|
-
CorelogicService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
93
|
-
CorelogicService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
94
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
93
|
+
CorelogicService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CorelogicService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
CorelogicService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CorelogicService, providedIn: 'root' });
|
|
95
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CorelogicService, decorators: [{
|
|
95
96
|
type: i0.Injectable,
|
|
96
97
|
args: [{
|
|
97
98
|
providedIn: 'root'
|
|
@@ -136,9 +137,9 @@
|
|
|
136
137
|
};
|
|
137
138
|
return CorelogicInterceptor;
|
|
138
139
|
}());
|
|
139
|
-
CorelogicInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
140
|
-
CorelogicInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
141
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
140
|
+
CorelogicInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CorelogicInterceptor, deps: [{ token: CorelogicService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
141
|
+
CorelogicInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CorelogicInterceptor });
|
|
142
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CorelogicInterceptor, decorators: [{
|
|
142
143
|
type: i0.Injectable
|
|
143
144
|
}], ctorParameters: function () {
|
|
144
145
|
return [{ type: CorelogicService }, { type: undefined, decorators: [{
|
|
@@ -178,9 +179,9 @@
|
|
|
178
179
|
};
|
|
179
180
|
return FinancialYearInterceptor;
|
|
180
181
|
}());
|
|
181
|
-
FinancialYearInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
182
|
-
FinancialYearInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
183
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
182
|
+
FinancialYearInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FinancialYearInterceptor, deps: [{ token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
183
|
+
FinancialYearInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FinancialYearInterceptor });
|
|
184
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FinancialYearInterceptor, decorators: [{
|
|
184
185
|
type: i0.Injectable
|
|
185
186
|
}], ctorParameters: function () {
|
|
186
187
|
return [{ type: undefined, decorators: [{
|
|
@@ -189,7 +190,7 @@
|
|
|
189
190
|
}] }];
|
|
190
191
|
} });
|
|
191
192
|
|
|
192
|
-
|
|
193
|
+
/******************************************************************************
|
|
193
194
|
Copyright (c) Microsoft Corporation.
|
|
194
195
|
|
|
195
196
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -351,7 +352,11 @@
|
|
|
351
352
|
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
352
353
|
if (k2 === undefined)
|
|
353
354
|
k2 = k;
|
|
354
|
-
Object.
|
|
355
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
356
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
357
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
358
|
+
}
|
|
359
|
+
Object.defineProperty(o, k2, desc);
|
|
355
360
|
}) : (function (o, m, k, k2) {
|
|
356
361
|
if (k2 === undefined)
|
|
357
362
|
k2 = k;
|
|
@@ -506,6 +511,11 @@
|
|
|
506
511
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
507
512
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
508
513
|
}
|
|
514
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
515
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
516
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
517
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
518
|
+
}
|
|
509
519
|
|
|
510
520
|
var NAME_TOKEN = 'token';
|
|
511
521
|
var NAME_REFRESH_TOKEN = 'refreshToken';
|
|
@@ -536,9 +546,9 @@
|
|
|
536
546
|
};
|
|
537
547
|
return JwtService;
|
|
538
548
|
}(angularJwt.JwtHelperService));
|
|
539
|
-
JwtService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
540
|
-
JwtService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
541
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
549
|
+
JwtService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: JwtService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
550
|
+
JwtService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: JwtService, providedIn: 'root' });
|
|
551
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: JwtService, decorators: [{
|
|
542
552
|
type: i0.Injectable,
|
|
543
553
|
args: [{
|
|
544
554
|
providedIn: 'root'
|
|
@@ -630,9 +640,9 @@
|
|
|
630
640
|
};
|
|
631
641
|
return EventDispatcherService;
|
|
632
642
|
}());
|
|
633
|
-
EventDispatcherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
634
|
-
EventDispatcherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
635
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
643
|
+
EventDispatcherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EventDispatcherService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
644
|
+
EventDispatcherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EventDispatcherService, providedIn: 'root' });
|
|
645
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EventDispatcherService, decorators: [{
|
|
636
646
|
type: i0.Injectable,
|
|
637
647
|
args: [{
|
|
638
648
|
providedIn: 'root'
|
|
@@ -686,9 +696,9 @@
|
|
|
686
696
|
};
|
|
687
697
|
return AuthService;
|
|
688
698
|
}());
|
|
689
|
-
AuthService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
690
|
-
AuthService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
691
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
699
|
+
AuthService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthService, deps: [{ token: i1__namespace.HttpClient }, { token: JwtService }, { token: EventDispatcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
700
|
+
AuthService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthService, providedIn: 'root' });
|
|
701
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthService, decorators: [{
|
|
692
702
|
type: i0.Injectable,
|
|
693
703
|
args: [{
|
|
694
704
|
providedIn: 'root'
|
|
@@ -829,9 +839,9 @@
|
|
|
829
839
|
};
|
|
830
840
|
return JwtInterceptor;
|
|
831
841
|
}());
|
|
832
|
-
JwtInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
833
|
-
JwtInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
834
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
842
|
+
JwtInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: JwtInterceptor, deps: [{ token: JwtService }, { token: AuthService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
843
|
+
JwtInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: JwtInterceptor });
|
|
844
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: JwtInterceptor, decorators: [{
|
|
835
845
|
type: i0.Injectable
|
|
836
846
|
}], ctorParameters: function () {
|
|
837
847
|
return [{ type: JwtService }, { type: AuthService }, { type: undefined, decorators: [{
|
|
@@ -869,9 +879,9 @@
|
|
|
869
879
|
};
|
|
870
880
|
return UserSwitcherService;
|
|
871
881
|
}());
|
|
872
|
-
UserSwitcherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
873
|
-
UserSwitcherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
874
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
882
|
+
UserSwitcherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserSwitcherService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
883
|
+
UserSwitcherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserSwitcherService, providedIn: 'root' });
|
|
884
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserSwitcherService, decorators: [{
|
|
875
885
|
type: i0.Injectable,
|
|
876
886
|
args: [{
|
|
877
887
|
providedIn: 'root'
|
|
@@ -908,9 +918,9 @@
|
|
|
908
918
|
};
|
|
909
919
|
return UserSwitcherInterceptor;
|
|
910
920
|
}());
|
|
911
|
-
UserSwitcherInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
912
|
-
UserSwitcherInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
913
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
921
|
+
UserSwitcherInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserSwitcherInterceptor, deps: [{ token: UserSwitcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
922
|
+
UserSwitcherInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserSwitcherInterceptor });
|
|
923
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserSwitcherInterceptor, decorators: [{
|
|
914
924
|
type: i0.Injectable
|
|
915
925
|
}], ctorParameters: function () {
|
|
916
926
|
return [{ type: UserSwitcherService }, { type: undefined, decorators: [{
|
|
@@ -1140,9 +1150,9 @@
|
|
|
1140
1150
|
};
|
|
1141
1151
|
return PreloaderService;
|
|
1142
1152
|
}());
|
|
1143
|
-
PreloaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1144
|
-
PreloaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1145
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1153
|
+
PreloaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreloaderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1154
|
+
PreloaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreloaderService, providedIn: 'root' });
|
|
1155
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreloaderService, decorators: [{
|
|
1146
1156
|
type: i0.Injectable,
|
|
1147
1157
|
args: [{
|
|
1148
1158
|
providedIn: 'root'
|
|
@@ -1172,9 +1182,9 @@
|
|
|
1172
1182
|
};
|
|
1173
1183
|
return PreloaderInterceptor;
|
|
1174
1184
|
}());
|
|
1175
|
-
PreloaderInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1176
|
-
PreloaderInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1177
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1185
|
+
PreloaderInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreloaderInterceptor, deps: [{ token: PreloaderService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1186
|
+
PreloaderInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreloaderInterceptor });
|
|
1187
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreloaderInterceptor, decorators: [{
|
|
1178
1188
|
type: i0.Injectable
|
|
1179
1189
|
}], ctorParameters: function () { return [{ type: PreloaderService }]; } });
|
|
1180
1190
|
|
|
@@ -1286,9 +1296,9 @@
|
|
|
1286
1296
|
};
|
|
1287
1297
|
return ToastService;
|
|
1288
1298
|
}());
|
|
1289
|
-
ToastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1290
|
-
ToastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1291
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1299
|
+
ToastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ToastService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1300
|
+
ToastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ToastService, providedIn: 'root' });
|
|
1301
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ToastService, decorators: [{
|
|
1292
1302
|
type: i0.Injectable,
|
|
1293
1303
|
args: [{
|
|
1294
1304
|
providedIn: 'root'
|
|
@@ -1341,12 +1351,11 @@
|
|
|
1341
1351
|
};
|
|
1342
1352
|
/**
|
|
1343
1353
|
* add new instance and update cache
|
|
1344
|
-
* @TODO rename to post
|
|
1345
1354
|
*/
|
|
1346
|
-
RestService.prototype.
|
|
1355
|
+
RestService.prototype.create = function (data, shouldUpdateCache) {
|
|
1347
1356
|
var _this = this;
|
|
1348
1357
|
if (shouldUpdateCache === void 0) { shouldUpdateCache = true; }
|
|
1349
|
-
return this.http.post(this.environment.apiV2 + "/" + this.url,
|
|
1358
|
+
return this.http.post(this.environment.apiV2 + "/" + this.url, data)
|
|
1350
1359
|
.pipe(operators.map(function (newItem) {
|
|
1351
1360
|
if (!shouldUpdateCache) {
|
|
1352
1361
|
return null;
|
|
@@ -1362,11 +1371,30 @@
|
|
|
1362
1371
|
return newInstance;
|
|
1363
1372
|
}));
|
|
1364
1373
|
};
|
|
1374
|
+
/**
|
|
1375
|
+
* @TODO Alex TT-1777 rename to post
|
|
1376
|
+
*/
|
|
1377
|
+
RestService.prototype.add = function (model, shouldUpdateCache) {
|
|
1378
|
+
if (shouldUpdateCache === void 0) { shouldUpdateCache = true; }
|
|
1379
|
+
return this.create(classTransformer.classToPlain(model), shouldUpdateCache);
|
|
1380
|
+
};
|
|
1381
|
+
/**
|
|
1382
|
+
* @TODO Alex TT-1777 rename to upload
|
|
1383
|
+
*/
|
|
1384
|
+
RestService.prototype.postForm = function (file, params) {
|
|
1385
|
+
if (params === void 0) { params = {}; }
|
|
1386
|
+
var formData = new FormData();
|
|
1387
|
+
formData.append('file', file);
|
|
1388
|
+
for (var key in params) {
|
|
1389
|
+
formData.append(key, params[key]);
|
|
1390
|
+
}
|
|
1391
|
+
return this.create(formData);
|
|
1392
|
+
};
|
|
1365
1393
|
/**
|
|
1366
1394
|
* Add several new items
|
|
1367
1395
|
* @param models Array of new items for saving
|
|
1368
1396
|
* @param queryParams query parameters for request
|
|
1369
|
-
* @TODO rename to postBatch
|
|
1397
|
+
* @TODO Alex TT-1777 rename to postBatch
|
|
1370
1398
|
*/
|
|
1371
1399
|
RestService.prototype.addBatch = function (models, queryParams) {
|
|
1372
1400
|
var _this = this;
|
|
@@ -1389,7 +1417,7 @@
|
|
|
1389
1417
|
* Update item
|
|
1390
1418
|
* @param model Existing instance for updating
|
|
1391
1419
|
* @param queryParams query parameters for request
|
|
1392
|
-
* @TODO rename to put
|
|
1420
|
+
* @TODO Alex TT-1777 rename to put
|
|
1393
1421
|
*/
|
|
1394
1422
|
RestService.prototype.update = function (model, queryParams) {
|
|
1395
1423
|
var _this = this;
|
|
@@ -1409,7 +1437,7 @@
|
|
|
1409
1437
|
* Update several items
|
|
1410
1438
|
* @param models Array of items for updating
|
|
1411
1439
|
* @param queryParams query parameters for request
|
|
1412
|
-
* TODO rename to putBatch
|
|
1440
|
+
* TODO Alex TT-1777 rename to putBatch
|
|
1413
1441
|
*/
|
|
1414
1442
|
RestService.prototype.updateBatch = function (models, queryParams) {
|
|
1415
1443
|
var _this = this;
|
|
@@ -1500,9 +1528,9 @@
|
|
|
1500
1528
|
RestService.prototype.listenEvents = function () { };
|
|
1501
1529
|
return RestService;
|
|
1502
1530
|
}());
|
|
1503
|
-
RestService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1504
|
-
RestService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1505
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1531
|
+
RestService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RestService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1532
|
+
RestService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RestService, providedIn: 'root' });
|
|
1533
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RestService, decorators: [{
|
|
1506
1534
|
type: i0.Injectable,
|
|
1507
1535
|
args: [{
|
|
1508
1536
|
providedIn: 'root'
|
|
@@ -1712,7 +1740,10 @@
|
|
|
1712
1740
|
*/
|
|
1713
1741
|
CollectionDictionary.prototype.merge = function (keys) {
|
|
1714
1742
|
var _this = this;
|
|
1715
|
-
|
|
1743
|
+
if (!this.length) {
|
|
1744
|
+
return this.createCollection([]);
|
|
1745
|
+
}
|
|
1746
|
+
return this.createCollection(flatten__default["default"](keys.map(function (key) { return _this.get(key.toString()).items; })));
|
|
1716
1747
|
};
|
|
1717
1748
|
/**
|
|
1718
1749
|
* Create instance of collection
|
|
@@ -2825,6 +2856,8 @@
|
|
|
2825
2856
|
ChartAccountsListEnum[ChartAccountsListEnum["ASSESSABLE_AMOUNT_CAPPED_DEFINED_BENEFIT"] = 639] = "ASSESSABLE_AMOUNT_CAPPED_DEFINED_BENEFIT";
|
|
2826
2857
|
ChartAccountsListEnum[ChartAccountsListEnum["CODE_B_SUPERANNUATION_INCOME_STREAMS_DISABILITY"] = 558] = "CODE_B_SUPERANNUATION_INCOME_STREAMS_DISABILITY";
|
|
2827
2858
|
ChartAccountsListEnum[ChartAccountsListEnum["CODE_A_SUPERANNUATION_INCOME_STREAMS_DEATH"] = 640] = "CODE_A_SUPERANNUATION_INCOME_STREAMS_DEATH";
|
|
2859
|
+
ChartAccountsListEnum[ChartAccountsListEnum["PERSONAL_EXPENSES"] = 628] = "PERSONAL_EXPENSES";
|
|
2860
|
+
ChartAccountsListEnum[ChartAccountsListEnum["PERSONAL_INCOME"] = 630] = "PERSONAL_INCOME";
|
|
2828
2861
|
})(exports.ChartAccountsListEnum || (exports.ChartAccountsListEnum = {}));
|
|
2829
2862
|
|
|
2830
2863
|
exports.ChartAccountsCategoryEnum = void 0;
|
|
@@ -3105,573 +3138,591 @@
|
|
|
3105
3138
|
classTransformer.Type(function () { return ChartAccountsMetadata; })
|
|
3106
3139
|
], ChartAccounts.prototype, "metadata", void 0);
|
|
3107
3140
|
|
|
3108
|
-
var
|
|
3109
|
-
__extends(
|
|
3110
|
-
function
|
|
3111
|
-
|
|
3112
|
-
_this.isGST = false;
|
|
3113
|
-
return _this;
|
|
3141
|
+
var TransactionBase = /** @class */ (function (_super) {
|
|
3142
|
+
__extends(TransactionBase, _super);
|
|
3143
|
+
function TransactionBase() {
|
|
3144
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3114
3145
|
}
|
|
3115
|
-
Object.defineProperty(
|
|
3146
|
+
Object.defineProperty(TransactionBase.prototype, "tankType", {
|
|
3116
3147
|
get: function () {
|
|
3117
|
-
|
|
3148
|
+
switch (true) {
|
|
3149
|
+
case this.isPropertyTank():
|
|
3150
|
+
return exports.TankTypeEnum.PROPERTY;
|
|
3151
|
+
case this.isWorkTank():
|
|
3152
|
+
return exports.TankTypeEnum.WORK;
|
|
3153
|
+
case this.isSoleTank():
|
|
3154
|
+
return exports.TankTypeEnum.SOLE;
|
|
3155
|
+
default:
|
|
3156
|
+
return exports.TankTypeEnum.OTHER;
|
|
3157
|
+
}
|
|
3118
3158
|
},
|
|
3119
3159
|
enumerable: false,
|
|
3120
3160
|
configurable: true
|
|
3121
3161
|
});
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3162
|
+
/**
|
|
3163
|
+
* Check if current tank is Property
|
|
3164
|
+
*/
|
|
3165
|
+
TransactionBase.prototype.isPropertyTank = function () {
|
|
3166
|
+
// chart accounts may be empty for new instances
|
|
3167
|
+
if (this.chartAccounts) {
|
|
3168
|
+
return CHART_ACCOUNTS_CATEGORIES.property.includes(this.chartAccounts.category);
|
|
3169
|
+
}
|
|
3170
|
+
return !!this.property;
|
|
3171
|
+
};
|
|
3172
|
+
/**
|
|
3173
|
+
* Check if current tank is Work
|
|
3174
|
+
*/
|
|
3175
|
+
TransactionBase.prototype.isWorkTank = function () {
|
|
3176
|
+
var _a;
|
|
3177
|
+
// chart accounts may be empty for new instances
|
|
3178
|
+
if (this.chartAccounts) {
|
|
3179
|
+
return CHART_ACCOUNTS_CATEGORIES.work.includes((_a = this.chartAccounts) === null || _a === void 0 ? void 0 : _a.category);
|
|
3180
|
+
}
|
|
3181
|
+
return !this.isPropertyTank() && !this.isSoleTank();
|
|
3182
|
+
};
|
|
3183
|
+
/**
|
|
3184
|
+
* Check if current tank is Sole
|
|
3185
|
+
*/
|
|
3186
|
+
TransactionBase.prototype.isSoleTank = function () {
|
|
3187
|
+
var _a;
|
|
3188
|
+
// chart accounts may be empty for new instances
|
|
3189
|
+
if (this.chartAccounts) {
|
|
3190
|
+
return CHART_ACCOUNTS_CATEGORIES.sole.includes((_a = this.chartAccounts) === null || _a === void 0 ? void 0 : _a.category);
|
|
3191
|
+
}
|
|
3192
|
+
return !!this.business;
|
|
3193
|
+
};
|
|
3194
|
+
return TransactionBase;
|
|
3195
|
+
}(AbstractModel));
|
|
3127
3196
|
__decorate([
|
|
3128
|
-
classTransformer.
|
|
3129
|
-
|
|
3197
|
+
classTransformer.Exclude({ toPlainOnly: true }),
|
|
3198
|
+
classTransformer.Type(function () { return Object; }),
|
|
3199
|
+
classTransformer.Transform(function (_b) {
|
|
3200
|
+
var obj = _b.obj;
|
|
3201
|
+
return obj.file;
|
|
3202
|
+
})
|
|
3203
|
+
], TransactionBase.prototype, "file", void 0);
|
|
3130
3204
|
|
|
3131
|
-
var
|
|
3132
|
-
__extends(
|
|
3133
|
-
function
|
|
3205
|
+
var Transaction$1 = /** @class */ (function (_super) {
|
|
3206
|
+
__extends(Transaction, _super);
|
|
3207
|
+
function Transaction() {
|
|
3134
3208
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3135
3209
|
}
|
|
3136
|
-
return
|
|
3137
|
-
}(
|
|
3210
|
+
return Transaction;
|
|
3211
|
+
}(TransactionBase));
|
|
3138
3212
|
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
}
|
|
3145
|
-
Object.defineProperty(SoleContact.prototype, "fullName", {
|
|
3146
|
-
get: function () {
|
|
3147
|
-
return this.firstName + " " + this.lastName;
|
|
3148
|
-
},
|
|
3149
|
-
enumerable: false,
|
|
3150
|
-
configurable: true
|
|
3151
|
-
});
|
|
3152
|
-
SoleContact.prototype.getPhotoPlaceholder = function () {
|
|
3153
|
-
return "" + this.firstName[0].toUpperCase() + this.lastName[0].toUpperCase();
|
|
3154
|
-
};
|
|
3155
|
-
// @TODO Vik: add photo field to SoleContact
|
|
3156
|
-
SoleContact.prototype.getPhoto = function () {
|
|
3157
|
-
return '';
|
|
3158
|
-
};
|
|
3159
|
-
return SoleContact;
|
|
3160
|
-
}(SoleContact$1));
|
|
3161
|
-
__decorate([
|
|
3162
|
-
classTransformer.Type(function () { return User; })
|
|
3163
|
-
], SoleContact.prototype, "user", void 0);
|
|
3164
|
-
__decorate([
|
|
3165
|
-
classTransformer.Type(function () { return Phone; })
|
|
3166
|
-
], SoleContact.prototype, "phone", void 0);
|
|
3167
|
-
__decorate([
|
|
3168
|
-
classTransformer.Type(function () { return Address; })
|
|
3169
|
-
], SoleContact.prototype, "address", void 0);
|
|
3170
|
-
__decorate([
|
|
3171
|
-
classTransformer.Type(function () { return SoleInvoice; })
|
|
3172
|
-
], SoleContact.prototype, "invoices", void 0);
|
|
3213
|
+
exports.TransactionTypeEnum = void 0;
|
|
3214
|
+
(function (TransactionTypeEnum) {
|
|
3215
|
+
TransactionTypeEnum[TransactionTypeEnum["DEBIT"] = 1] = "DEBIT";
|
|
3216
|
+
TransactionTypeEnum[TransactionTypeEnum["CREDIT"] = 2] = "CREDIT";
|
|
3217
|
+
})(exports.TransactionTypeEnum || (exports.TransactionTypeEnum = {}));
|
|
3173
3218
|
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3219
|
+
exports.TransactionOperationEnum = void 0;
|
|
3220
|
+
(function (TransactionOperationEnum) {
|
|
3221
|
+
TransactionOperationEnum[TransactionOperationEnum["ALLOCATE"] = 1] = "ALLOCATE";
|
|
3222
|
+
TransactionOperationEnum[TransactionOperationEnum["FIND_AND_MATCH"] = 2] = "FIND_AND_MATCH";
|
|
3223
|
+
TransactionOperationEnum[TransactionOperationEnum["TRANSFER"] = 3] = "TRANSFER";
|
|
3224
|
+
})(exports.TransactionOperationEnum || (exports.TransactionOperationEnum = {}));
|
|
3225
|
+
|
|
3226
|
+
exports.TransactionSourceEnum = void 0;
|
|
3227
|
+
(function (TransactionSourceEnum) {
|
|
3228
|
+
TransactionSourceEnum[TransactionSourceEnum["CASH"] = 1] = "CASH";
|
|
3229
|
+
TransactionSourceEnum[TransactionSourceEnum["BANK_TRANSACTION"] = 2] = "BANK_TRANSACTION";
|
|
3230
|
+
})(exports.TransactionSourceEnum || (exports.TransactionSourceEnum = {}));
|
|
3231
|
+
|
|
3232
|
+
exports.DepreciationTypeEnum = void 0;
|
|
3233
|
+
(function (DepreciationTypeEnum) {
|
|
3234
|
+
DepreciationTypeEnum[DepreciationTypeEnum["PLANT_EQUIPMENT"] = 1] = "PLANT_EQUIPMENT";
|
|
3235
|
+
DepreciationTypeEnum[DepreciationTypeEnum["CAPITAL_WORKS"] = 2] = "CAPITAL_WORKS";
|
|
3236
|
+
DepreciationTypeEnum[DepreciationTypeEnum["BULK_DEPRECIATION"] = 3] = "BULK_DEPRECIATION";
|
|
3237
|
+
DepreciationTypeEnum[DepreciationTypeEnum["BORROWING_EXPENSES"] = 4] = "BORROWING_EXPENSES";
|
|
3238
|
+
})(exports.DepreciationTypeEnum || (exports.DepreciationTypeEnum = {}));
|
|
3239
|
+
|
|
3240
|
+
exports.DepreciationCalculationEnum = void 0;
|
|
3241
|
+
(function (DepreciationCalculationEnum) {
|
|
3242
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["PRIME_COST"] = 1] = "PRIME_COST";
|
|
3243
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["DIMINISHING"] = 2] = "DIMINISHING";
|
|
3244
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["CAPITAL"] = 3] = "CAPITAL";
|
|
3245
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["LVP"] = 4] = "LVP";
|
|
3246
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["AMORTISATION"] = 5] = "AMORTISATION";
|
|
3247
|
+
DepreciationCalculationEnum[DepreciationCalculationEnum["SBP"] = 6] = "SBP";
|
|
3248
|
+
})(exports.DepreciationCalculationEnum || (exports.DepreciationCalculationEnum = {}));
|
|
3249
|
+
|
|
3250
|
+
var TransactionReceipt$1 = /** @class */ (function (_super) {
|
|
3251
|
+
__extends(TransactionReceipt, _super);
|
|
3252
|
+
function TransactionReceipt() {
|
|
3177
3253
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3178
3254
|
}
|
|
3179
|
-
return
|
|
3255
|
+
return TransactionReceipt;
|
|
3180
3256
|
}(AbstractModel));
|
|
3181
3257
|
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3258
|
+
// @TODO this enum should come from backend
|
|
3259
|
+
/**
|
|
3260
|
+
* Enum with asset types
|
|
3261
|
+
*/
|
|
3262
|
+
exports.AssetTypeEnum = void 0;
|
|
3263
|
+
(function (AssetTypeEnum) {
|
|
3264
|
+
AssetTypeEnum["RECEIPTS"] = "receipts";
|
|
3265
|
+
AssetTypeEnum["DOCUMENTS"] = "documents";
|
|
3266
|
+
AssetTypeEnum["MESSAGE"] = "message";
|
|
3267
|
+
})(exports.AssetTypeEnum || (exports.AssetTypeEnum = {}));
|
|
3188
3268
|
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3269
|
+
/**
|
|
3270
|
+
* Enum with asset entity types
|
|
3271
|
+
*/
|
|
3272
|
+
exports.AssetEntityTypeEnum = void 0;
|
|
3273
|
+
(function (AssetEntityTypeEnum) {
|
|
3274
|
+
AssetEntityTypeEnum["PROPERTIES"] = "properties";
|
|
3275
|
+
AssetEntityTypeEnum["FOLDERS"] = "folders";
|
|
3276
|
+
AssetEntityTypeEnum["DEPRECIATIONS"] = "depreciations";
|
|
3277
|
+
AssetEntityTypeEnum["TRANSACTIONS"] = "transactions";
|
|
3278
|
+
AssetEntityTypeEnum["MESSAGES"] = "messages";
|
|
3279
|
+
})(exports.AssetEntityTypeEnum || (exports.AssetEntityTypeEnum = {}));
|
|
3280
|
+
|
|
3281
|
+
var TransactionReceipt = /** @class */ (function (_super) {
|
|
3282
|
+
__extends(TransactionReceipt, _super);
|
|
3283
|
+
function TransactionReceipt() {
|
|
3192
3284
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
3193
|
-
_this.
|
|
3285
|
+
_this.type = exports.AssetTypeEnum.RECEIPTS;
|
|
3286
|
+
_this.entityType = exports.AssetEntityTypeEnum.TRANSACTIONS;
|
|
3194
3287
|
return _this;
|
|
3195
3288
|
}
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
};
|
|
3199
|
-
SoleInvoiceTemplate.prototype.isTaxExclusive = function () {
|
|
3200
|
-
return this.taxType === exports.SoleInvoiceTemplateTaxTypeEnum.EXCLUSIVE;
|
|
3201
|
-
};
|
|
3202
|
-
SoleInvoiceTemplate.prototype.isTaxInclusive = function () {
|
|
3203
|
-
return this.taxType === exports.SoleInvoiceTemplateTaxTypeEnum.INCLUSIVE;
|
|
3204
|
-
};
|
|
3205
|
-
return SoleInvoiceTemplate;
|
|
3206
|
-
}(SoleInvoiceTemplate$1));
|
|
3207
|
-
__decorate([
|
|
3208
|
-
classTransformer.Type(function () { return SoleBusiness; })
|
|
3209
|
-
], SoleInvoiceTemplate.prototype, "business", void 0);
|
|
3210
|
-
__decorate([
|
|
3211
|
-
classTransformer.Type(function () { return BankAccount; })
|
|
3212
|
-
], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
|
|
3213
|
-
|
|
3214
|
-
exports.SoleInvoiceStatusesEnum = void 0;
|
|
3215
|
-
(function (SoleInvoiceStatusesEnum) {
|
|
3216
|
-
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["CANCELED"] = 0] = "CANCELED";
|
|
3217
|
-
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["DRAFT"] = 1] = "DRAFT";
|
|
3218
|
-
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["PENDING"] = 2] = "PENDING";
|
|
3219
|
-
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["PAID"] = 3] = "PAID";
|
|
3220
|
-
})(exports.SoleInvoiceStatusesEnum || (exports.SoleInvoiceStatusesEnum = {}));
|
|
3289
|
+
return TransactionReceipt;
|
|
3290
|
+
}(TransactionReceipt$1));
|
|
3221
3291
|
|
|
3222
|
-
var
|
|
3223
|
-
__extends(
|
|
3224
|
-
function
|
|
3292
|
+
var IncomeSource$1 = /** @class */ (function (_super) {
|
|
3293
|
+
__extends(IncomeSource, _super);
|
|
3294
|
+
function IncomeSource() {
|
|
3225
3295
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3226
3296
|
}
|
|
3227
|
-
return
|
|
3297
|
+
return IncomeSource;
|
|
3228
3298
|
}(AbstractModel));
|
|
3229
3299
|
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3300
|
+
exports.IncomeSourceTypeEnum = void 0;
|
|
3301
|
+
(function (IncomeSourceTypeEnum) {
|
|
3302
|
+
IncomeSourceTypeEnum[IncomeSourceTypeEnum["WORK"] = 1] = "WORK";
|
|
3303
|
+
IncomeSourceTypeEnum[IncomeSourceTypeEnum["SOLE"] = 2] = "SOLE";
|
|
3304
|
+
IncomeSourceTypeEnum[IncomeSourceTypeEnum["OTHER"] = 3] = "OTHER";
|
|
3305
|
+
})(exports.IncomeSourceTypeEnum || (exports.IncomeSourceTypeEnum = {}));
|
|
3306
|
+
|
|
3307
|
+
var SalaryForecast$1 = /** @class */ (function (_super) {
|
|
3308
|
+
__extends(SalaryForecast, _super);
|
|
3309
|
+
function SalaryForecast() {
|
|
3233
3310
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3234
3311
|
}
|
|
3235
|
-
return
|
|
3236
|
-
}(
|
|
3237
|
-
SoleDetails.GSTPercentMultiplier = 0.1;
|
|
3238
|
-
SoleDetails.GSTPercentDivider = 11;
|
|
3239
|
-
__decorate([
|
|
3240
|
-
classTransformer.Type(function () { return User; })
|
|
3241
|
-
], SoleDetails.prototype, "user", void 0);
|
|
3312
|
+
return SalaryForecast;
|
|
3313
|
+
}(AbstractModel));
|
|
3242
3314
|
|
|
3243
|
-
var
|
|
3244
|
-
__extends(
|
|
3245
|
-
function
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3315
|
+
var SalaryForecast = /** @class */ (function (_super) {
|
|
3316
|
+
__extends(SalaryForecast, _super);
|
|
3317
|
+
function SalaryForecast() {
|
|
3318
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3319
|
+
}
|
|
3320
|
+
return SalaryForecast;
|
|
3321
|
+
}(SalaryForecast$1));
|
|
3322
|
+
__decorate([
|
|
3323
|
+
classTransformer.Transform(function (_a) {
|
|
3324
|
+
var obj = _a.obj;
|
|
3325
|
+
return obj.netPay + obj.tax;
|
|
3326
|
+
}),
|
|
3327
|
+
classTransformer.Expose()
|
|
3328
|
+
], SalaryForecast.prototype, "grossAmount", void 0);
|
|
3329
|
+
__decorate([
|
|
3330
|
+
classTransformer.Type(function () { return IncomeSource; })
|
|
3331
|
+
], SalaryForecast.prototype, "incomeSource", void 0);
|
|
3332
|
+
|
|
3333
|
+
var SoleForecast$1 = /** @class */ (function (_super) {
|
|
3334
|
+
__extends(SoleForecast, _super);
|
|
3335
|
+
function SoleForecast() {
|
|
3336
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3337
|
+
}
|
|
3338
|
+
return SoleForecast;
|
|
3339
|
+
}(AbstractModel));
|
|
3340
|
+
|
|
3341
|
+
var SoleForecast = /** @class */ (function (_super) {
|
|
3342
|
+
__extends(SoleForecast, _super);
|
|
3343
|
+
function SoleForecast() {
|
|
3344
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3250
3345
|
}
|
|
3251
|
-
Object.defineProperty(
|
|
3346
|
+
Object.defineProperty(SoleForecast.prototype, "netPay", {
|
|
3252
3347
|
get: function () {
|
|
3253
|
-
return this.
|
|
3348
|
+
return this.amount;
|
|
3254
3349
|
},
|
|
3255
3350
|
enumerable: false,
|
|
3256
3351
|
configurable: true
|
|
3257
3352
|
});
|
|
3258
|
-
|
|
3259
|
-
|
|
3353
|
+
;
|
|
3354
|
+
return SoleForecast;
|
|
3355
|
+
}(SoleForecast$1));
|
|
3356
|
+
__decorate([
|
|
3357
|
+
classTransformer.Type(function () { return IncomeSource; })
|
|
3358
|
+
], SoleForecast.prototype, "incomeSource", void 0);
|
|
3359
|
+
|
|
3360
|
+
var IncomeSourceForecast$1 = /** @class */ (function (_super) {
|
|
3361
|
+
__extends(IncomeSourceForecast, _super);
|
|
3362
|
+
function IncomeSourceForecast() {
|
|
3363
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3364
|
+
}
|
|
3365
|
+
return IncomeSourceForecast;
|
|
3366
|
+
}(AbstractModel));
|
|
3367
|
+
|
|
3368
|
+
exports.SalaryForecastFrequencyEnum = void 0;
|
|
3369
|
+
(function (SalaryForecastFrequencyEnum) {
|
|
3370
|
+
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["ANNUAL"] = 1] = "ANNUAL";
|
|
3371
|
+
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["MONTHLY"] = 12] = "MONTHLY";
|
|
3372
|
+
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["FORTNIGHTLY"] = 26] = "FORTNIGHTLY";
|
|
3373
|
+
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["WEEKLY"] = 52] = "WEEKLY";
|
|
3374
|
+
})(exports.SalaryForecastFrequencyEnum || (exports.SalaryForecastFrequencyEnum = {}));
|
|
3375
|
+
|
|
3376
|
+
var IncomeSourceType$1 = /** @class */ (function (_super) {
|
|
3377
|
+
__extends(IncomeSourceType, _super);
|
|
3378
|
+
function IncomeSourceType() {
|
|
3379
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3380
|
+
}
|
|
3381
|
+
return IncomeSourceType;
|
|
3382
|
+
}(AbstractModel));
|
|
3383
|
+
|
|
3384
|
+
exports.IncomeSourceTypeListWorkEnum = void 0;
|
|
3385
|
+
(function (IncomeSourceTypeListWorkEnum) {
|
|
3386
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["BONUSES"] = 1] = "BONUSES";
|
|
3387
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["DIRECTOR_FEES"] = 2] = "DIRECTOR_FEES";
|
|
3388
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["DIVIDENDS"] = 3] = "DIVIDENDS";
|
|
3389
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["INTEREST"] = 4] = "INTEREST";
|
|
3390
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["PENSIONS_AND_ALLOWANCES"] = 5] = "PENSIONS_AND_ALLOWANCES";
|
|
3391
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["SUPERANNUATION"] = 8] = "SUPERANNUATION";
|
|
3392
|
+
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["ATTRIBUTED_P_S_I"] = 11] = "ATTRIBUTED_P_S_I";
|
|
3393
|
+
})(exports.IncomeSourceTypeListWorkEnum || (exports.IncomeSourceTypeListWorkEnum = {}));
|
|
3394
|
+
|
|
3395
|
+
exports.IncomeSourceTypeListOtherEnum = void 0;
|
|
3396
|
+
(function (IncomeSourceTypeListOtherEnum) {
|
|
3397
|
+
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["PSI"] = 6] = "PSI";
|
|
3398
|
+
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["SOLE_TRADER"] = 7] = "SOLE_TRADER";
|
|
3399
|
+
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["TRUSTS"] = 9] = "TRUSTS";
|
|
3400
|
+
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["OTHER_INCOME"] = 10] = "OTHER_INCOME";
|
|
3401
|
+
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["PARTNERSHIPS"] = 12] = "PARTNERSHIPS";
|
|
3402
|
+
})(exports.IncomeSourceTypeListOtherEnum || (exports.IncomeSourceTypeListOtherEnum = {}));
|
|
3403
|
+
|
|
3404
|
+
exports.IncomeSourceTypeListSoleEnum = void 0;
|
|
3405
|
+
(function (IncomeSourceTypeListSoleEnum) {
|
|
3406
|
+
IncomeSourceTypeListSoleEnum[IncomeSourceTypeListSoleEnum["SOLE_TRADER"] = 7] = "SOLE_TRADER";
|
|
3407
|
+
})(exports.IncomeSourceTypeListSoleEnum || (exports.IncomeSourceTypeListSoleEnum = {}));
|
|
3408
|
+
|
|
3409
|
+
var IncomeSourceType = /** @class */ (function (_super) {
|
|
3410
|
+
__extends(IncomeSourceType, _super);
|
|
3411
|
+
function IncomeSourceType() {
|
|
3412
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3413
|
+
}
|
|
3414
|
+
IncomeSourceType.prototype.isBonuses = function () {
|
|
3415
|
+
return this.id === exports.IncomeSourceTypeListWorkEnum.BONUSES;
|
|
3416
|
+
};
|
|
3417
|
+
IncomeSourceType.prototype.isWork = function () {
|
|
3418
|
+
return !!exports.IncomeSourceTypeListWorkEnum[this.id];
|
|
3260
3419
|
};
|
|
3261
|
-
|
|
3262
|
-
return this.
|
|
3420
|
+
IncomeSourceType.prototype.isOther = function () {
|
|
3421
|
+
return !!exports.IncomeSourceTypeListOtherEnum[this.id];
|
|
3422
|
+
};
|
|
3423
|
+
IncomeSourceType.prototype.isSole = function () {
|
|
3424
|
+
return !!exports.IncomeSourceTypeListSoleEnum[this.id];
|
|
3263
3425
|
};
|
|
3264
|
-
Object.defineProperty(
|
|
3426
|
+
Object.defineProperty(IncomeSourceType.prototype, "type", {
|
|
3265
3427
|
get: function () {
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3428
|
+
switch (true) {
|
|
3429
|
+
case this.isWork():
|
|
3430
|
+
return exports.IncomeSourceTypeEnum.WORK;
|
|
3431
|
+
case this.isSole():
|
|
3432
|
+
return exports.IncomeSourceTypeEnum.SOLE;
|
|
3433
|
+
default:
|
|
3434
|
+
return exports.IncomeSourceTypeEnum.OTHER;
|
|
3269
3435
|
}
|
|
3270
|
-
return this.amount;
|
|
3271
3436
|
},
|
|
3272
3437
|
enumerable: false,
|
|
3273
3438
|
configurable: true
|
|
3274
3439
|
});
|
|
3275
|
-
|
|
3440
|
+
return IncomeSourceType;
|
|
3441
|
+
}(IncomeSourceType$1));
|
|
3442
|
+
|
|
3443
|
+
var IncomeSourceForecast = /** @class */ (function (_super) {
|
|
3444
|
+
__extends(IncomeSourceForecast, _super);
|
|
3445
|
+
function IncomeSourceForecast() {
|
|
3446
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
3447
|
+
_this.paygIncome = 0;
|
|
3448
|
+
_this.frequency = exports.SalaryForecastFrequencyEnum.ANNUAL;
|
|
3449
|
+
_this.isTaxFree = false;
|
|
3450
|
+
return _this;
|
|
3451
|
+
}
|
|
3452
|
+
Object.defineProperty(IncomeSourceForecast.prototype, "netPay", {
|
|
3453
|
+
/**
|
|
3454
|
+
* Sometimes Income source has Salary & Income source forecasts,
|
|
3455
|
+
* and we need these fields to work with Income source forecasts like with Salary Forecasts
|
|
3456
|
+
*/
|
|
3276
3457
|
get: function () {
|
|
3277
|
-
|
|
3278
|
-
switch (true) {
|
|
3279
|
-
case (_a = this.template) === null || _a === void 0 ? void 0 : _a.isTaxInclusive():
|
|
3280
|
-
return +(this.getGSTItemsAmount() / SoleDetails.GSTPercentDivider).toFixed(2);
|
|
3281
|
-
case (_b = this.template) === null || _b === void 0 ? void 0 : _b.isTaxExclusive():
|
|
3282
|
-
return +(this.getGSTItemsAmount() * SoleDetails.GSTPercentMultiplier).toFixed(2);
|
|
3283
|
-
default:
|
|
3284
|
-
return 0;
|
|
3285
|
-
}
|
|
3458
|
+
return this.amount;
|
|
3286
3459
|
},
|
|
3287
3460
|
enumerable: false,
|
|
3288
3461
|
configurable: true
|
|
3289
3462
|
});
|
|
3290
|
-
Object.defineProperty(
|
|
3463
|
+
Object.defineProperty(IncomeSourceForecast.prototype, "grossAmount", {
|
|
3291
3464
|
get: function () {
|
|
3292
|
-
|
|
3293
|
-
if ((_a = this.template) === null || _a === void 0 ? void 0 : _a.isTaxExclusive()) {
|
|
3294
|
-
return this.amount + this.GSTAmount;
|
|
3295
|
-
}
|
|
3296
|
-
return this.amount;
|
|
3465
|
+
return this.amount + this.tax + this.taxInstalments + this.frankingCredits;
|
|
3297
3466
|
},
|
|
3298
3467
|
enumerable: false,
|
|
3299
3468
|
configurable: true
|
|
3300
3469
|
});
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3470
|
+
return IncomeSourceForecast;
|
|
3471
|
+
}(IncomeSourceForecast$1));
|
|
3472
|
+
__decorate([
|
|
3473
|
+
classTransformer.Type(function () { return IncomeSourceType; })
|
|
3474
|
+
], IncomeSourceForecast.prototype, "incomeSourceType", void 0);
|
|
3475
|
+
__decorate([
|
|
3476
|
+
classTransformer.Type(function () { return IncomeSource; })
|
|
3477
|
+
], IncomeSourceForecast.prototype, "incomeSource", void 0);
|
|
3478
|
+
|
|
3479
|
+
var IncomeSource = /** @class */ (function (_super) {
|
|
3480
|
+
__extends(IncomeSource, _super);
|
|
3481
|
+
function IncomeSource() {
|
|
3482
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3483
|
+
}
|
|
3484
|
+
IncomeSource.prototype.isSalaryIncome = function () {
|
|
3485
|
+
return !!this.salaryForecasts.length;
|
|
3486
|
+
// @TODO Vik: old code
|
|
3487
|
+
// return this.type === IncomeSourceTypeEnum.SALARY;
|
|
3306
3488
|
};
|
|
3307
|
-
|
|
3308
|
-
return this.
|
|
3489
|
+
IncomeSource.prototype.isSoleIncome = function () {
|
|
3490
|
+
return !!this.soleForecasts.length;
|
|
3309
3491
|
};
|
|
3310
|
-
|
|
3311
|
-
return this.
|
|
3492
|
+
IncomeSource.prototype.isWorkIncome = function () {
|
|
3493
|
+
return this.type === exports.IncomeSourceTypeEnum.WORK;
|
|
3312
3494
|
};
|
|
3313
|
-
|
|
3314
|
-
return this.
|
|
3495
|
+
IncomeSource.prototype.isOtherIncome = function () {
|
|
3496
|
+
return this.type === exports.IncomeSourceTypeEnum.OTHER || (!this.isSoleIncome() && !this.isSalaryIncome());
|
|
3315
3497
|
};
|
|
3316
|
-
|
|
3317
|
-
|
|
3498
|
+
Object.defineProperty(IncomeSource.prototype, "forecasts", {
|
|
3499
|
+
/**
|
|
3500
|
+
* Get salary and other income forecasts
|
|
3501
|
+
*/
|
|
3502
|
+
get: function () {
|
|
3503
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(this.salaryForecasts)), __read(this.incomeSourceForecasts)), __read(this.soleForecasts));
|
|
3504
|
+
},
|
|
3505
|
+
enumerable: false,
|
|
3506
|
+
configurable: true
|
|
3507
|
+
});
|
|
3508
|
+
Object.defineProperty(IncomeSource.prototype, "actualForecast", {
|
|
3509
|
+
/**
|
|
3510
|
+
* Get actual (1st from the list) forecast
|
|
3511
|
+
*/
|
|
3512
|
+
get: function () {
|
|
3513
|
+
return this.forecasts[0];
|
|
3514
|
+
},
|
|
3515
|
+
enumerable: false,
|
|
3516
|
+
configurable: true
|
|
3517
|
+
});
|
|
3518
|
+
/**
|
|
3519
|
+
* Check if user was working in month taken by the index
|
|
3520
|
+
* @param monthIndex by which month should be taken
|
|
3521
|
+
*/
|
|
3522
|
+
IncomeSource.prototype.isWorkedInMonth = function (monthIndex) {
|
|
3523
|
+
var monthDate = new FinancialYear().getMonthDate(monthIndex);
|
|
3524
|
+
return (!this.dateFrom || monthDate >= this.dateFrom) && (!this.dateTo || monthDate < this.dateTo);
|
|
3318
3525
|
};
|
|
3319
|
-
return
|
|
3320
|
-
}(
|
|
3321
|
-
__decorate([
|
|
3322
|
-
classTransformer.Type(function () { return Date; })
|
|
3323
|
-
], SoleInvoice.prototype, "dateFrom", void 0);
|
|
3324
|
-
__decorate([
|
|
3325
|
-
classTransformer.Type(function () { return Date; })
|
|
3326
|
-
], SoleInvoice.prototype, "dateTo", void 0);
|
|
3526
|
+
return IncomeSource;
|
|
3527
|
+
}(IncomeSource$1));
|
|
3327
3528
|
__decorate([
|
|
3328
|
-
classTransformer.Type(function () { return
|
|
3329
|
-
],
|
|
3529
|
+
classTransformer.Type(function () { return SalaryForecast; })
|
|
3530
|
+
], IncomeSource.prototype, "salaryForecasts", void 0);
|
|
3330
3531
|
__decorate([
|
|
3331
|
-
classTransformer.Type(function () { return
|
|
3332
|
-
],
|
|
3532
|
+
classTransformer.Type(function () { return SoleForecast; })
|
|
3533
|
+
], IncomeSource.prototype, "soleForecasts", void 0);
|
|
3333
3534
|
__decorate([
|
|
3334
|
-
classTransformer.Type(function () { return
|
|
3335
|
-
],
|
|
3535
|
+
classTransformer.Type(function () { return IncomeSourceForecast; })
|
|
3536
|
+
], IncomeSource.prototype, "incomeSourceForecasts", void 0);
|
|
3336
3537
|
__decorate([
|
|
3337
|
-
classTransformer.Type(function () { return
|
|
3338
|
-
],
|
|
3538
|
+
classTransformer.Type(function () { return Date; })
|
|
3539
|
+
], IncomeSource.prototype, "dateFrom", void 0);
|
|
3339
3540
|
__decorate([
|
|
3340
|
-
classTransformer.Type(function () { return
|
|
3341
|
-
],
|
|
3541
|
+
classTransformer.Type(function () { return Date; })
|
|
3542
|
+
], IncomeSource.prototype, "dateTo", void 0);
|
|
3342
3543
|
|
|
3343
|
-
/**
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
*/
|
|
3348
|
-
var LogbookPeriod = /** @class */ (function () {
|
|
3349
|
-
function LogbookPeriod() {
|
|
3544
|
+
var TransactionMetadata$1 = /** @class */ (function (_super) {
|
|
3545
|
+
__extends(TransactionMetadata, _super);
|
|
3546
|
+
function TransactionMetadata() {
|
|
3547
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3350
3548
|
}
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
classTransformer.Type(function () { return Date; })
|
|
3362
|
-
], LogbookPeriod.prototype, "from", void 0);
|
|
3549
|
+
return TransactionMetadata;
|
|
3550
|
+
}(AbstractModel));
|
|
3551
|
+
|
|
3552
|
+
var TransactionMetadata = /** @class */ (function (_super) {
|
|
3553
|
+
__extends(TransactionMetadata, _super);
|
|
3554
|
+
function TransactionMetadata() {
|
|
3555
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3556
|
+
}
|
|
3557
|
+
return TransactionMetadata;
|
|
3558
|
+
}(TransactionMetadata$1));
|
|
3363
3559
|
__decorate([
|
|
3364
|
-
classTransformer.Type(function () { return
|
|
3365
|
-
],
|
|
3560
|
+
classTransformer.Type(function () { return ChartAccountsMetadata; })
|
|
3561
|
+
], TransactionMetadata.prototype, "metadata", void 0);
|
|
3366
3562
|
|
|
3367
|
-
var
|
|
3368
|
-
__extends(
|
|
3369
|
-
function
|
|
3563
|
+
var TransactionAllocation$1 = /** @class */ (function (_super) {
|
|
3564
|
+
__extends(TransactionAllocation, _super);
|
|
3565
|
+
function TransactionAllocation() {
|
|
3370
3566
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3371
3567
|
}
|
|
3372
|
-
return
|
|
3568
|
+
return TransactionAllocation;
|
|
3373
3569
|
}(AbstractModel));
|
|
3374
3570
|
|
|
3375
|
-
var
|
|
3376
|
-
__extends(
|
|
3377
|
-
function
|
|
3571
|
+
var BankTransaction$1 = /** @class */ (function (_super) {
|
|
3572
|
+
__extends(BankTransaction, _super);
|
|
3573
|
+
function BankTransaction() {
|
|
3378
3574
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3379
3575
|
}
|
|
3380
|
-
return
|
|
3576
|
+
return BankTransaction;
|
|
3381
3577
|
}(AbstractModel));
|
|
3382
3578
|
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3579
|
+
exports.BankTransactionTypeEnum = void 0;
|
|
3580
|
+
(function (BankTransactionTypeEnum) {
|
|
3581
|
+
BankTransactionTypeEnum[BankTransactionTypeEnum["DEBIT"] = 1] = "DEBIT";
|
|
3582
|
+
BankTransactionTypeEnum[BankTransactionTypeEnum["CREDIT"] = 2] = "CREDIT";
|
|
3583
|
+
})(exports.BankTransactionTypeEnum || (exports.BankTransactionTypeEnum = {}));
|
|
3584
|
+
|
|
3585
|
+
var BankTransaction = /** @class */ (function (_super) {
|
|
3586
|
+
__extends(BankTransaction, _super);
|
|
3587
|
+
function BankTransaction() {
|
|
3588
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
3589
|
+
// allocated money amount for bank transaction
|
|
3590
|
+
_this.allocatedAmount = 0;
|
|
3591
|
+
_this.unallocatedAmount = 0;
|
|
3592
|
+
return _this;
|
|
3388
3593
|
}
|
|
3389
|
-
Object.defineProperty(
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
enumerable: false,
|
|
3394
|
-
configurable: true
|
|
3395
|
-
});
|
|
3396
|
-
Object.defineProperty(VehicleLogbook.prototype, "tankType", {
|
|
3594
|
+
Object.defineProperty(BankTransaction.prototype, "balanceAmount", {
|
|
3595
|
+
/**
|
|
3596
|
+
* get allocated amount value but with +/- sign
|
|
3597
|
+
*/
|
|
3397
3598
|
get: function () {
|
|
3398
|
-
return this.
|
|
3599
|
+
return this.isCredit() ? this.allocatedAmount : -this.allocatedAmount;
|
|
3399
3600
|
},
|
|
3400
3601
|
enumerable: false,
|
|
3401
3602
|
configurable: true
|
|
3402
3603
|
});
|
|
3403
|
-
|
|
3404
|
-
|
|
3604
|
+
/**
|
|
3605
|
+
* check if bank transaction is debit
|
|
3606
|
+
*/
|
|
3607
|
+
BankTransaction.prototype.isDebit = function () {
|
|
3608
|
+
return this.type === exports.BankTransactionTypeEnum.DEBIT;
|
|
3405
3609
|
};
|
|
3406
|
-
|
|
3407
|
-
|
|
3610
|
+
/**
|
|
3611
|
+
* check if bank transaction is credit
|
|
3612
|
+
*/
|
|
3613
|
+
BankTransaction.prototype.isCredit = function () {
|
|
3614
|
+
return this.type === exports.BankTransactionTypeEnum.CREDIT;
|
|
3408
3615
|
};
|
|
3409
3616
|
/**
|
|
3410
|
-
*
|
|
3617
|
+
* Create Transaction instance based on Bank Transaction
|
|
3411
3618
|
*/
|
|
3412
|
-
|
|
3413
|
-
return
|
|
3619
|
+
BankTransaction.prototype.toTransaction = function () {
|
|
3620
|
+
return classTransformer.plainToClass(Transaction, {
|
|
3621
|
+
amount: +this.amount.toFixed(2),
|
|
3622
|
+
description: this.description,
|
|
3623
|
+
date: this.date,
|
|
3624
|
+
source: exports.TransactionSourceEnum.BANK_TRANSACTION,
|
|
3625
|
+
operation: this.operation,
|
|
3626
|
+
type: this.type,
|
|
3627
|
+
});
|
|
3414
3628
|
};
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3629
|
+
/**
|
|
3630
|
+
* Check if bank transaction is completely allocated
|
|
3631
|
+
*/
|
|
3632
|
+
BankTransaction.prototype.isAllocated = function (allocations) {
|
|
3633
|
+
return this.amount === this.getAllocatedAmount(allocations);
|
|
3634
|
+
};
|
|
3635
|
+
/**
|
|
3636
|
+
* Get bank transaction allocated amount
|
|
3637
|
+
*/
|
|
3638
|
+
BankTransaction.prototype.getAllocatedAmount = function (allocations) {
|
|
3639
|
+
return allocations.getByBankTransactionsIds([this.id]).amount;
|
|
3640
|
+
};
|
|
3641
|
+
/**
|
|
3642
|
+
* Get bank transaction unallocated amount
|
|
3643
|
+
*/
|
|
3644
|
+
BankTransaction.prototype.getUnallocatedAmount = function (allocations) {
|
|
3645
|
+
return this.amount - this.getAllocatedAmount(allocations);
|
|
3646
|
+
};
|
|
3647
|
+
return BankTransaction;
|
|
3648
|
+
}(BankTransaction$1));
|
|
3422
3649
|
__decorate([
|
|
3423
3650
|
classTransformer.Type(function () { return Date; })
|
|
3424
|
-
],
|
|
3425
|
-
__decorate([
|
|
3426
|
-
classTransformer.Type(function () { return SoleBusiness; })
|
|
3427
|
-
], VehicleLogbook.prototype, "business", void 0);
|
|
3651
|
+
], BankTransaction.prototype, "date", void 0);
|
|
3428
3652
|
|
|
3429
|
-
var
|
|
3430
|
-
__extends(
|
|
3431
|
-
function
|
|
3653
|
+
var TransactionAllocation = /** @class */ (function (_super) {
|
|
3654
|
+
__extends(TransactionAllocation, _super);
|
|
3655
|
+
function TransactionAllocation() {
|
|
3432
3656
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3433
3657
|
}
|
|
3434
|
-
|
|
3435
|
-
|
|
3658
|
+
/**
|
|
3659
|
+
* Create a new instance of transaction allocation
|
|
3660
|
+
* transaction could be empty since we can POST allocation inside a new transaction
|
|
3661
|
+
*/
|
|
3662
|
+
TransactionAllocation.create = function (amount, bankTransaction, transaction) {
|
|
3663
|
+
return classTransformer.plainToClass(TransactionAllocation, { amount: amount, transaction: transaction, bankTransaction: bankTransaction });
|
|
3664
|
+
};
|
|
3665
|
+
return TransactionAllocation;
|
|
3666
|
+
}(TransactionAllocation$1));
|
|
3436
3667
|
__decorate([
|
|
3437
|
-
classTransformer.Type(function () { return
|
|
3438
|
-
],
|
|
3668
|
+
classTransformer.Type(function () { return BankTransaction; })
|
|
3669
|
+
], TransactionAllocation.prototype, "bankTransaction", void 0);
|
|
3670
|
+
__decorate([
|
|
3671
|
+
classTransformer.Type(function () { return Transaction; })
|
|
3672
|
+
], TransactionAllocation.prototype, "transaction", void 0);
|
|
3439
3673
|
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3674
|
+
/**
|
|
3675
|
+
* Enum with income amount types (Net or Gross)
|
|
3676
|
+
*/
|
|
3677
|
+
exports.IncomeAmountTypeEnum = void 0;
|
|
3678
|
+
(function (IncomeAmountTypeEnum) {
|
|
3679
|
+
IncomeAmountTypeEnum[IncomeAmountTypeEnum["NET"] = 0] = "NET";
|
|
3680
|
+
IncomeAmountTypeEnum[IncomeAmountTypeEnum["GROSS"] = 1] = "GROSS";
|
|
3681
|
+
})(exports.IncomeAmountTypeEnum || (exports.IncomeAmountTypeEnum = {}));
|
|
3682
|
+
|
|
3683
|
+
var Depreciation$1 = /** @class */ (function (_super) {
|
|
3684
|
+
__extends(Depreciation, _super);
|
|
3685
|
+
function Depreciation() {
|
|
3443
3686
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3444
3687
|
}
|
|
3445
|
-
return
|
|
3446
|
-
}(
|
|
3688
|
+
return Depreciation;
|
|
3689
|
+
}(TransactionBase));
|
|
3447
3690
|
|
|
3448
|
-
var
|
|
3449
|
-
__extends(
|
|
3450
|
-
function
|
|
3691
|
+
var DepreciationCapitalProject$1 = /** @class */ (function (_super) {
|
|
3692
|
+
__extends(DepreciationCapitalProject, _super);
|
|
3693
|
+
function DepreciationCapitalProject() {
|
|
3451
3694
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3452
3695
|
}
|
|
3453
|
-
return
|
|
3696
|
+
return DepreciationCapitalProject;
|
|
3454
3697
|
}(AbstractModel));
|
|
3455
3698
|
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
})(exports.VehicleClaimDetailsMethodEnum || (exports.VehicleClaimDetailsMethodEnum = {}));
|
|
3461
|
-
|
|
3462
|
-
var VehicleClaimDetails = /** @class */ (function (_super) {
|
|
3463
|
-
__extends(VehicleClaimDetails, _super);
|
|
3464
|
-
function VehicleClaimDetails() {
|
|
3465
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
3466
|
-
/**
|
|
3467
|
-
* Init default values for the new instances
|
|
3468
|
-
*/
|
|
3469
|
-
_this.isManual = true;
|
|
3470
|
-
_this.method = exports.VehicleClaimDetailsMethodEnum.KMS;
|
|
3471
|
-
_this.financialYear = new FinancialYear().year;
|
|
3472
|
-
return _this;
|
|
3699
|
+
var DepreciationCapitalProject = /** @class */ (function (_super) {
|
|
3700
|
+
__extends(DepreciationCapitalProject, _super);
|
|
3701
|
+
function DepreciationCapitalProject() {
|
|
3702
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3473
3703
|
}
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
};
|
|
3477
|
-
VehicleClaimDetails.prototype.isKmsMethod = function () {
|
|
3478
|
-
return this.method === exports.VehicleClaimDetailsMethodEnum.KMS;
|
|
3479
|
-
};
|
|
3480
|
-
return VehicleClaimDetails;
|
|
3481
|
-
}(VehicleClaimDetails$1));
|
|
3704
|
+
return DepreciationCapitalProject;
|
|
3705
|
+
}(DepreciationCapitalProject$1));
|
|
3482
3706
|
__decorate([
|
|
3483
|
-
classTransformer.Type(function () { return
|
|
3484
|
-
],
|
|
3707
|
+
classTransformer.Type(function () { return Date; })
|
|
3708
|
+
], DepreciationCapitalProject.prototype, "effectiveDate", void 0);
|
|
3485
3709
|
|
|
3486
|
-
var
|
|
3487
|
-
__extends(
|
|
3488
|
-
function
|
|
3489
|
-
|
|
3490
|
-
_this.kilometers = 0;
|
|
3491
|
-
_this.workUsage = 0;
|
|
3492
|
-
return _this;
|
|
3710
|
+
var DepreciationForecast$1 = /** @class */ (function (_super) {
|
|
3711
|
+
__extends(DepreciationForecast, _super);
|
|
3712
|
+
function DepreciationForecast() {
|
|
3713
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3493
3714
|
}
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3715
|
+
return DepreciationForecast;
|
|
3716
|
+
}(AbstractModel));
|
|
3717
|
+
|
|
3718
|
+
var DepreciationForecast = /** @class */ (function (_super) {
|
|
3719
|
+
__extends(DepreciationForecast, _super);
|
|
3720
|
+
function DepreciationForecast() {
|
|
3721
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3722
|
+
}
|
|
3723
|
+
Object.defineProperty(DepreciationForecast.prototype, "dailyClaimAmount", {
|
|
3501
3724
|
get: function () {
|
|
3502
|
-
return this.
|
|
3503
|
-
},
|
|
3504
|
-
enumerable: false,
|
|
3505
|
-
configurable: true
|
|
3506
|
-
});
|
|
3507
|
-
/**
|
|
3508
|
-
* Claim amount for KMs method. Exists only for KMs method.
|
|
3509
|
-
*/
|
|
3510
|
-
VehicleClaim.prototype.getKMSClaimAmount = function (vehicleClaimRate) {
|
|
3511
|
-
return +(this.kilometers * vehicleClaimRate).toFixed(2);
|
|
3512
|
-
};
|
|
3513
|
-
/**
|
|
3514
|
-
* Get logbook claim amount. Exists only for logbook method.
|
|
3515
|
-
* ClaimAmount = WorkUsage * transaction/depreciation amount
|
|
3516
|
-
*/
|
|
3517
|
-
VehicleClaim.prototype.getLogbookClaimAmount = function (transactions) {
|
|
3518
|
-
var transactionsAmount = transactions
|
|
3519
|
-
.getByVehicleClaim(this)
|
|
3520
|
-
.getLogbookTransactions()
|
|
3521
|
-
.sumBy('amount');
|
|
3522
|
-
// Math.abs because amount will be negative (because we sum expenses), but we don't want negative percent value
|
|
3523
|
-
return Math.abs(transactionsAmount) * this.workUsage / 100;
|
|
3524
|
-
};
|
|
3525
|
-
VehicleClaim.prototype.getAverageWeeklyKMS = function () {
|
|
3526
|
-
return this.kilometers / FinancialYear.weeksInYear;
|
|
3527
|
-
};
|
|
3528
|
-
VehicleClaim.getKMSChartAccountsIdByTankType = function (tankType) {
|
|
3529
|
-
return tankType === exports.TankTypeEnum.WORK
|
|
3530
|
-
? exports.ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK
|
|
3531
|
-
: exports.ChartAccountsListEnum.KLMS_TRAVELLED;
|
|
3532
|
-
};
|
|
3533
|
-
return VehicleClaim;
|
|
3534
|
-
}(VehicleClaim$1));
|
|
3535
|
-
/**
|
|
3536
|
-
* limit for kms claim method
|
|
3537
|
-
*/
|
|
3538
|
-
VehicleClaim.totalKmsLimit = 5000;
|
|
3539
|
-
/**
|
|
3540
|
-
* limit for work usage claim method
|
|
3541
|
-
*/
|
|
3542
|
-
VehicleClaim.totalWorkUsagePercent = 100;
|
|
3543
|
-
__decorate([
|
|
3544
|
-
classTransformer.Type(function () { return VehicleClaimDetails; })
|
|
3545
|
-
], VehicleClaim.prototype, "details", void 0);
|
|
3546
|
-
__decorate([
|
|
3547
|
-
classTransformer.Type(function () { return SoleBusiness; })
|
|
3548
|
-
], VehicleClaim.prototype, "business", void 0);
|
|
3549
|
-
|
|
3550
|
-
var TransactionBase = /** @class */ (function (_super) {
|
|
3551
|
-
__extends(TransactionBase, _super);
|
|
3552
|
-
function TransactionBase() {
|
|
3553
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3554
|
-
}
|
|
3555
|
-
Object.defineProperty(TransactionBase.prototype, "tankType", {
|
|
3556
|
-
get: function () {
|
|
3557
|
-
switch (true) {
|
|
3558
|
-
case this.isPropertyTank():
|
|
3559
|
-
return exports.TankTypeEnum.PROPERTY;
|
|
3560
|
-
case this.isWorkTank():
|
|
3561
|
-
return exports.TankTypeEnum.WORK;
|
|
3562
|
-
case this.isSoleTank():
|
|
3563
|
-
return exports.TankTypeEnum.SOLE;
|
|
3564
|
-
default:
|
|
3565
|
-
return exports.TankTypeEnum.OTHER;
|
|
3566
|
-
}
|
|
3567
|
-
},
|
|
3568
|
-
enumerable: false,
|
|
3569
|
-
configurable: true
|
|
3570
|
-
});
|
|
3571
|
-
/**
|
|
3572
|
-
* Check if current tank is Property
|
|
3573
|
-
*/
|
|
3574
|
-
TransactionBase.prototype.isPropertyTank = function () {
|
|
3575
|
-
// chart accounts may be empty for new instances
|
|
3576
|
-
if (this.chartAccounts) {
|
|
3577
|
-
return CHART_ACCOUNTS_CATEGORIES.property.includes(this.chartAccounts.category);
|
|
3578
|
-
}
|
|
3579
|
-
return !!this.property;
|
|
3580
|
-
};
|
|
3581
|
-
/**
|
|
3582
|
-
* Check if current tank is Work
|
|
3583
|
-
*/
|
|
3584
|
-
TransactionBase.prototype.isWorkTank = function () {
|
|
3585
|
-
var _a;
|
|
3586
|
-
// chart accounts may be empty for new instances
|
|
3587
|
-
if (this.chartAccounts) {
|
|
3588
|
-
return CHART_ACCOUNTS_CATEGORIES.work.includes((_a = this.chartAccounts) === null || _a === void 0 ? void 0 : _a.category);
|
|
3589
|
-
}
|
|
3590
|
-
return !this.isPropertyTank() && !this.isSoleTank();
|
|
3591
|
-
};
|
|
3592
|
-
/**
|
|
3593
|
-
* Check if current tank is Sole
|
|
3594
|
-
*/
|
|
3595
|
-
TransactionBase.prototype.isSoleTank = function () {
|
|
3596
|
-
var _a;
|
|
3597
|
-
// chart accounts may be empty for new instances
|
|
3598
|
-
if (this.chartAccounts) {
|
|
3599
|
-
return CHART_ACCOUNTS_CATEGORIES.sole.includes((_a = this.chartAccounts) === null || _a === void 0 ? void 0 : _a.category);
|
|
3600
|
-
}
|
|
3601
|
-
return !!this.business;
|
|
3602
|
-
};
|
|
3603
|
-
return TransactionBase;
|
|
3604
|
-
}(AbstractModel));
|
|
3605
|
-
__decorate([
|
|
3606
|
-
classTransformer.Exclude({ toPlainOnly: true }),
|
|
3607
|
-
classTransformer.Type(function () { return Object; }),
|
|
3608
|
-
classTransformer.Transform(function (_b) {
|
|
3609
|
-
var obj = _b.obj;
|
|
3610
|
-
return obj.file;
|
|
3611
|
-
})
|
|
3612
|
-
], TransactionBase.prototype, "file", void 0);
|
|
3613
|
-
|
|
3614
|
-
var Depreciation$1 = /** @class */ (function (_super) {
|
|
3615
|
-
__extends(Depreciation, _super);
|
|
3616
|
-
function Depreciation() {
|
|
3617
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3618
|
-
}
|
|
3619
|
-
return Depreciation;
|
|
3620
|
-
}(TransactionBase));
|
|
3621
|
-
|
|
3622
|
-
exports.DepreciationTypeEnum = void 0;
|
|
3623
|
-
(function (DepreciationTypeEnum) {
|
|
3624
|
-
DepreciationTypeEnum[DepreciationTypeEnum["PLANT_EQUIPMENT"] = 1] = "PLANT_EQUIPMENT";
|
|
3625
|
-
DepreciationTypeEnum[DepreciationTypeEnum["CAPITAL_WORKS"] = 2] = "CAPITAL_WORKS";
|
|
3626
|
-
DepreciationTypeEnum[DepreciationTypeEnum["BULK_DEPRECIATION"] = 3] = "BULK_DEPRECIATION";
|
|
3627
|
-
DepreciationTypeEnum[DepreciationTypeEnum["BORROWING_EXPENSES"] = 4] = "BORROWING_EXPENSES";
|
|
3628
|
-
})(exports.DepreciationTypeEnum || (exports.DepreciationTypeEnum = {}));
|
|
3629
|
-
|
|
3630
|
-
exports.DepreciationCalculationEnum = void 0;
|
|
3631
|
-
(function (DepreciationCalculationEnum) {
|
|
3632
|
-
DepreciationCalculationEnum[DepreciationCalculationEnum["PRIME_COST"] = 1] = "PRIME_COST";
|
|
3633
|
-
DepreciationCalculationEnum[DepreciationCalculationEnum["DIMINISHING"] = 2] = "DIMINISHING";
|
|
3634
|
-
DepreciationCalculationEnum[DepreciationCalculationEnum["CAPITAL"] = 3] = "CAPITAL";
|
|
3635
|
-
DepreciationCalculationEnum[DepreciationCalculationEnum["LVP"] = 4] = "LVP";
|
|
3636
|
-
DepreciationCalculationEnum[DepreciationCalculationEnum["AMORTISATION"] = 5] = "AMORTISATION";
|
|
3637
|
-
DepreciationCalculationEnum[DepreciationCalculationEnum["SBP"] = 6] = "SBP";
|
|
3638
|
-
})(exports.DepreciationCalculationEnum || (exports.DepreciationCalculationEnum = {}));
|
|
3639
|
-
|
|
3640
|
-
var DepreciationCapitalProject$1 = /** @class */ (function (_super) {
|
|
3641
|
-
__extends(DepreciationCapitalProject, _super);
|
|
3642
|
-
function DepreciationCapitalProject() {
|
|
3643
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3644
|
-
}
|
|
3645
|
-
return DepreciationCapitalProject;
|
|
3646
|
-
}(AbstractModel));
|
|
3647
|
-
|
|
3648
|
-
var DepreciationCapitalProject = /** @class */ (function (_super) {
|
|
3649
|
-
__extends(DepreciationCapitalProject, _super);
|
|
3650
|
-
function DepreciationCapitalProject() {
|
|
3651
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3652
|
-
}
|
|
3653
|
-
return DepreciationCapitalProject;
|
|
3654
|
-
}(DepreciationCapitalProject$1));
|
|
3655
|
-
__decorate([
|
|
3656
|
-
classTransformer.Type(function () { return Date; })
|
|
3657
|
-
], DepreciationCapitalProject.prototype, "effectiveDate", void 0);
|
|
3658
|
-
|
|
3659
|
-
var DepreciationForecast$1 = /** @class */ (function (_super) {
|
|
3660
|
-
__extends(DepreciationForecast, _super);
|
|
3661
|
-
function DepreciationForecast() {
|
|
3662
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3663
|
-
}
|
|
3664
|
-
return DepreciationForecast;
|
|
3665
|
-
}(AbstractModel));
|
|
3666
|
-
|
|
3667
|
-
var DepreciationForecast = /** @class */ (function (_super) {
|
|
3668
|
-
__extends(DepreciationForecast, _super);
|
|
3669
|
-
function DepreciationForecast() {
|
|
3670
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3671
|
-
}
|
|
3672
|
-
Object.defineProperty(DepreciationForecast.prototype, "dailyClaimAmount", {
|
|
3673
|
-
get: function () {
|
|
3674
|
-
return this.claimAmount / this.daysApplied;
|
|
3725
|
+
return this.claimAmount / this.daysApplied;
|
|
3675
3726
|
},
|
|
3676
3727
|
enumerable: false,
|
|
3677
3728
|
configurable: true
|
|
@@ -3724,397 +3775,181 @@
|
|
|
3724
3775
|
return DepreciationForecast;
|
|
3725
3776
|
}(DepreciationForecast$1));
|
|
3726
3777
|
|
|
3727
|
-
var BankTransaction$1 = /** @class */ (function (_super) {
|
|
3728
|
-
__extends(BankTransaction, _super);
|
|
3729
|
-
function BankTransaction() {
|
|
3730
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3731
|
-
}
|
|
3732
|
-
return BankTransaction;
|
|
3733
|
-
}(AbstractModel));
|
|
3734
|
-
|
|
3735
|
-
exports.BankTransactionTypeEnum = void 0;
|
|
3736
|
-
(function (BankTransactionTypeEnum) {
|
|
3737
|
-
BankTransactionTypeEnum[BankTransactionTypeEnum["DEBIT"] = 1] = "DEBIT";
|
|
3738
|
-
BankTransactionTypeEnum[BankTransactionTypeEnum["CREDIT"] = 2] = "CREDIT";
|
|
3739
|
-
})(exports.BankTransactionTypeEnum || (exports.BankTransactionTypeEnum = {}));
|
|
3740
|
-
|
|
3741
|
-
exports.TransactionSourceEnum = void 0;
|
|
3742
|
-
(function (TransactionSourceEnum) {
|
|
3743
|
-
TransactionSourceEnum[TransactionSourceEnum["CASH"] = 1] = "CASH";
|
|
3744
|
-
TransactionSourceEnum[TransactionSourceEnum["BANK_TRANSACTION"] = 2] = "BANK_TRANSACTION";
|
|
3745
|
-
})(exports.TransactionSourceEnum || (exports.TransactionSourceEnum = {}));
|
|
3746
|
-
|
|
3747
|
-
var Transaction$1 = /** @class */ (function (_super) {
|
|
3748
|
-
__extends(Transaction, _super);
|
|
3749
|
-
function Transaction() {
|
|
3750
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3751
|
-
}
|
|
3752
|
-
return Transaction;
|
|
3753
|
-
}(TransactionBase));
|
|
3754
|
-
|
|
3755
|
-
exports.TransactionTypeEnum = void 0;
|
|
3756
|
-
(function (TransactionTypeEnum) {
|
|
3757
|
-
TransactionTypeEnum[TransactionTypeEnum["DEBIT"] = 1] = "DEBIT";
|
|
3758
|
-
TransactionTypeEnum[TransactionTypeEnum["CREDIT"] = 2] = "CREDIT";
|
|
3759
|
-
})(exports.TransactionTypeEnum || (exports.TransactionTypeEnum = {}));
|
|
3760
|
-
|
|
3761
|
-
exports.TransactionOperationEnum = void 0;
|
|
3762
|
-
(function (TransactionOperationEnum) {
|
|
3763
|
-
TransactionOperationEnum[TransactionOperationEnum["ALLOCATE"] = 1] = "ALLOCATE";
|
|
3764
|
-
TransactionOperationEnum[TransactionOperationEnum["FIND_AND_MATCH"] = 2] = "FIND_AND_MATCH";
|
|
3765
|
-
TransactionOperationEnum[TransactionOperationEnum["TRANSFER"] = 3] = "TRANSFER";
|
|
3766
|
-
})(exports.TransactionOperationEnum || (exports.TransactionOperationEnum = {}));
|
|
3767
|
-
|
|
3768
|
-
var TransactionReceipt$1 = /** @class */ (function (_super) {
|
|
3769
|
-
__extends(TransactionReceipt, _super);
|
|
3770
|
-
function TransactionReceipt() {
|
|
3771
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3772
|
-
}
|
|
3773
|
-
return TransactionReceipt;
|
|
3774
|
-
}(AbstractModel));
|
|
3775
|
-
|
|
3776
|
-
// @TODO this enum should come from backend
|
|
3777
|
-
/**
|
|
3778
|
-
* Enum with asset types
|
|
3779
|
-
*/
|
|
3780
|
-
exports.AssetTypeEnum = void 0;
|
|
3781
|
-
(function (AssetTypeEnum) {
|
|
3782
|
-
AssetTypeEnum["RECEIPTS"] = "receipts";
|
|
3783
|
-
AssetTypeEnum["DOCUMENTS"] = "documents";
|
|
3784
|
-
AssetTypeEnum["MESSAGE"] = "message";
|
|
3785
|
-
})(exports.AssetTypeEnum || (exports.AssetTypeEnum = {}));
|
|
3786
|
-
|
|
3787
3778
|
/**
|
|
3788
|
-
*
|
|
3779
|
+
* @TODO Alex: clarify grouping rules and refactor
|
|
3789
3780
|
*/
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
AssetEntityTypeEnum["FOLDERS"] = "folders";
|
|
3794
|
-
AssetEntityTypeEnum["DEPRECIATIONS"] = "depreciations";
|
|
3795
|
-
AssetEntityTypeEnum["TRANSACTIONS"] = "transactions";
|
|
3796
|
-
AssetEntityTypeEnum["MESSAGES"] = "messages";
|
|
3797
|
-
})(exports.AssetEntityTypeEnum || (exports.AssetEntityTypeEnum = {}));
|
|
3798
|
-
|
|
3799
|
-
var TransactionReceipt = /** @class */ (function (_super) {
|
|
3800
|
-
__extends(TransactionReceipt, _super);
|
|
3801
|
-
function TransactionReceipt() {
|
|
3781
|
+
var Depreciation = /** @class */ (function (_super) {
|
|
3782
|
+
__extends(Depreciation, _super);
|
|
3783
|
+
function Depreciation() {
|
|
3802
3784
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
3803
|
-
_this.
|
|
3804
|
-
_this.
|
|
3785
|
+
_this.forecasts = [];
|
|
3786
|
+
_this.type = exports.DepreciationTypeEnum.PLANT_EQUIPMENT;
|
|
3787
|
+
/**
|
|
3788
|
+
* @TODO remove after ? signs removed from db models
|
|
3789
|
+
*/
|
|
3790
|
+
_this.amount = 0;
|
|
3805
3791
|
return _this;
|
|
3806
3792
|
}
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
var IncomeSource$1 = /** @class */ (function (_super) {
|
|
3811
|
-
__extends(IncomeSource, _super);
|
|
3812
|
-
function IncomeSource() {
|
|
3813
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3814
|
-
}
|
|
3815
|
-
return IncomeSource;
|
|
3816
|
-
}(AbstractModel));
|
|
3817
|
-
|
|
3818
|
-
exports.IncomeSourceTypeEnum = void 0;
|
|
3819
|
-
(function (IncomeSourceTypeEnum) {
|
|
3820
|
-
IncomeSourceTypeEnum[IncomeSourceTypeEnum["WORK"] = 1] = "WORK";
|
|
3821
|
-
IncomeSourceTypeEnum[IncomeSourceTypeEnum["SOLE"] = 2] = "SOLE";
|
|
3822
|
-
IncomeSourceTypeEnum[IncomeSourceTypeEnum["OTHER"] = 3] = "OTHER";
|
|
3823
|
-
})(exports.IncomeSourceTypeEnum || (exports.IncomeSourceTypeEnum = {}));
|
|
3824
|
-
|
|
3825
|
-
var SalaryForecast$1 = /** @class */ (function (_super) {
|
|
3826
|
-
__extends(SalaryForecast, _super);
|
|
3827
|
-
function SalaryForecast() {
|
|
3828
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3829
|
-
}
|
|
3830
|
-
return SalaryForecast;
|
|
3831
|
-
}(AbstractModel));
|
|
3832
|
-
|
|
3833
|
-
var SalaryForecast = /** @class */ (function (_super) {
|
|
3834
|
-
__extends(SalaryForecast, _super);
|
|
3835
|
-
function SalaryForecast() {
|
|
3836
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3837
|
-
}
|
|
3838
|
-
return SalaryForecast;
|
|
3839
|
-
}(SalaryForecast$1));
|
|
3840
|
-
__decorate([
|
|
3841
|
-
classTransformer.Transform(function (_a) {
|
|
3842
|
-
var obj = _a.obj;
|
|
3843
|
-
return obj.netPay + obj.tax;
|
|
3844
|
-
}),
|
|
3845
|
-
classTransformer.Expose()
|
|
3846
|
-
], SalaryForecast.prototype, "grossAmount", void 0);
|
|
3847
|
-
__decorate([
|
|
3848
|
-
classTransformer.Type(function () { return IncomeSource; })
|
|
3849
|
-
], SalaryForecast.prototype, "incomeSource", void 0);
|
|
3850
|
-
|
|
3851
|
-
var SoleForecast$1 = /** @class */ (function (_super) {
|
|
3852
|
-
__extends(SoleForecast, _super);
|
|
3853
|
-
function SoleForecast() {
|
|
3854
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3855
|
-
}
|
|
3856
|
-
return SoleForecast;
|
|
3857
|
-
}(AbstractModel));
|
|
3858
|
-
|
|
3859
|
-
var SoleForecast = /** @class */ (function (_super) {
|
|
3860
|
-
__extends(SoleForecast, _super);
|
|
3861
|
-
function SoleForecast() {
|
|
3862
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3863
|
-
}
|
|
3864
|
-
Object.defineProperty(SoleForecast.prototype, "netPay", {
|
|
3865
|
-
get: function () {
|
|
3866
|
-
return this.amount;
|
|
3867
|
-
},
|
|
3868
|
-
enumerable: false,
|
|
3869
|
-
configurable: true
|
|
3870
|
-
});
|
|
3871
|
-
;
|
|
3872
|
-
return SoleForecast;
|
|
3873
|
-
}(SoleForecast$1));
|
|
3874
|
-
__decorate([
|
|
3875
|
-
classTransformer.Type(function () { return IncomeSource; })
|
|
3876
|
-
], SoleForecast.prototype, "incomeSource", void 0);
|
|
3877
|
-
|
|
3878
|
-
var IncomeSourceForecast$1 = /** @class */ (function (_super) {
|
|
3879
|
-
__extends(IncomeSourceForecast, _super);
|
|
3880
|
-
function IncomeSourceForecast() {
|
|
3881
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3882
|
-
}
|
|
3883
|
-
return IncomeSourceForecast;
|
|
3884
|
-
}(AbstractModel));
|
|
3885
|
-
|
|
3886
|
-
exports.SalaryForecastFrequencyEnum = void 0;
|
|
3887
|
-
(function (SalaryForecastFrequencyEnum) {
|
|
3888
|
-
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["ANNUAL"] = 1] = "ANNUAL";
|
|
3889
|
-
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["MONTHLY"] = 12] = "MONTHLY";
|
|
3890
|
-
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["FORTNIGHTLY"] = 26] = "FORTNIGHTLY";
|
|
3891
|
-
SalaryForecastFrequencyEnum[SalaryForecastFrequencyEnum["WEEKLY"] = 52] = "WEEKLY";
|
|
3892
|
-
})(exports.SalaryForecastFrequencyEnum || (exports.SalaryForecastFrequencyEnum = {}));
|
|
3893
|
-
|
|
3894
|
-
var IncomeSourceType$1 = /** @class */ (function (_super) {
|
|
3895
|
-
__extends(IncomeSourceType, _super);
|
|
3896
|
-
function IncomeSourceType() {
|
|
3897
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3898
|
-
}
|
|
3899
|
-
return IncomeSourceType;
|
|
3900
|
-
}(AbstractModel));
|
|
3901
|
-
|
|
3902
|
-
exports.IncomeSourceTypeListWorkEnum = void 0;
|
|
3903
|
-
(function (IncomeSourceTypeListWorkEnum) {
|
|
3904
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["BONUSES"] = 1] = "BONUSES";
|
|
3905
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["DIRECTOR_FEES"] = 2] = "DIRECTOR_FEES";
|
|
3906
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["DIVIDENDS"] = 3] = "DIVIDENDS";
|
|
3907
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["INTEREST"] = 4] = "INTEREST";
|
|
3908
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["PENSIONS_AND_ALLOWANCES"] = 5] = "PENSIONS_AND_ALLOWANCES";
|
|
3909
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["SUPERANNUATION"] = 8] = "SUPERANNUATION";
|
|
3910
|
-
IncomeSourceTypeListWorkEnum[IncomeSourceTypeListWorkEnum["ATTRIBUTED_P_S_I"] = 11] = "ATTRIBUTED_P_S_I";
|
|
3911
|
-
})(exports.IncomeSourceTypeListWorkEnum || (exports.IncomeSourceTypeListWorkEnum = {}));
|
|
3912
|
-
|
|
3913
|
-
exports.IncomeSourceTypeListOtherEnum = void 0;
|
|
3914
|
-
(function (IncomeSourceTypeListOtherEnum) {
|
|
3915
|
-
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["PSI"] = 6] = "PSI";
|
|
3916
|
-
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["SOLE_TRADER"] = 7] = "SOLE_TRADER";
|
|
3917
|
-
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["TRUSTS"] = 9] = "TRUSTS";
|
|
3918
|
-
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["OTHER_INCOME"] = 10] = "OTHER_INCOME";
|
|
3919
|
-
IncomeSourceTypeListOtherEnum[IncomeSourceTypeListOtherEnum["PARTNERSHIPS"] = 12] = "PARTNERSHIPS";
|
|
3920
|
-
})(exports.IncomeSourceTypeListOtherEnum || (exports.IncomeSourceTypeListOtherEnum = {}));
|
|
3921
|
-
|
|
3922
|
-
exports.IncomeSourceTypeListSoleEnum = void 0;
|
|
3923
|
-
(function (IncomeSourceTypeListSoleEnum) {
|
|
3924
|
-
IncomeSourceTypeListSoleEnum[IncomeSourceTypeListSoleEnum["SOLE_TRADER"] = 7] = "SOLE_TRADER";
|
|
3925
|
-
})(exports.IncomeSourceTypeListSoleEnum || (exports.IncomeSourceTypeListSoleEnum = {}));
|
|
3926
|
-
|
|
3927
|
-
var IncomeSourceType = /** @class */ (function (_super) {
|
|
3928
|
-
__extends(IncomeSourceType, _super);
|
|
3929
|
-
function IncomeSourceType() {
|
|
3930
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3931
|
-
}
|
|
3932
|
-
IncomeSourceType.prototype.isBonuses = function () {
|
|
3933
|
-
return this.id === exports.IncomeSourceTypeListWorkEnum.BONUSES;
|
|
3793
|
+
// Type checking
|
|
3794
|
+
Depreciation.prototype.isCapital = function () {
|
|
3795
|
+
return this.type === exports.DepreciationTypeEnum.CAPITAL_WORKS;
|
|
3934
3796
|
};
|
|
3935
|
-
|
|
3936
|
-
return
|
|
3797
|
+
Depreciation.prototype.isBorrowingExpense = function () {
|
|
3798
|
+
return this.type === exports.DepreciationTypeEnum.BORROWING_EXPENSES;
|
|
3937
3799
|
};
|
|
3938
|
-
|
|
3939
|
-
return
|
|
3800
|
+
Depreciation.prototype.isAsset = function () {
|
|
3801
|
+
return this.type === exports.DepreciationTypeEnum.PLANT_EQUIPMENT;
|
|
3940
3802
|
};
|
|
3941
|
-
|
|
3942
|
-
|
|
3803
|
+
// Calculation checking
|
|
3804
|
+
Depreciation.prototype.isSBPCalculation = function () {
|
|
3805
|
+
return this.calculation === exports.DepreciationCalculationEnum.SBP;
|
|
3943
3806
|
};
|
|
3944
|
-
|
|
3807
|
+
Depreciation.prototype.isPrimeCost = function () {
|
|
3808
|
+
return this.calculation === exports.DepreciationCalculationEnum.PRIME_COST;
|
|
3809
|
+
};
|
|
3810
|
+
Depreciation.prototype.isDiminishing = function () {
|
|
3811
|
+
return this.calculation === exports.DepreciationCalculationEnum.DIMINISHING;
|
|
3812
|
+
};
|
|
3813
|
+
// Pool checking
|
|
3814
|
+
Depreciation.prototype.isPlantEquipmentPool = function () {
|
|
3815
|
+
return this.isAsset() && !this.isSBPCalculation() && !this.isWrittenOff() && !this.isLVP();
|
|
3816
|
+
};
|
|
3817
|
+
Depreciation.prototype.isLVP = function () {
|
|
3818
|
+
return this.isAsset()
|
|
3819
|
+
&& !this.isSBPCalculation()
|
|
3820
|
+
&& this.isDiminishing()
|
|
3821
|
+
&& this.currentYearForecast.closeBalance > Depreciation.WRITTEN_OFF_THRESHOLD
|
|
3822
|
+
&& this.currentYearForecast.closeBalance <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
|
|
3823
|
+
};
|
|
3824
|
+
Depreciation.prototype.isSBP = function () {
|
|
3825
|
+
return this.isAsset() && this.isSBPCalculation() && !this.isWrittenOff();
|
|
3826
|
+
};
|
|
3827
|
+
Depreciation.prototype.isWrittenOff = function () {
|
|
3828
|
+
return this.writeOffYear === new FinancialYear().year;
|
|
3829
|
+
};
|
|
3830
|
+
Object.defineProperty(Depreciation.prototype, "writeOffYear", {
|
|
3945
3831
|
get: function () {
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
case this.isSole():
|
|
3950
|
-
return exports.IncomeSourceTypeEnum.SOLE;
|
|
3951
|
-
default:
|
|
3952
|
-
return exports.IncomeSourceTypeEnum.OTHER;
|
|
3832
|
+
var _a;
|
|
3833
|
+
if (!this.writeOffManualDate && !this.writeOffDate) {
|
|
3834
|
+
return null;
|
|
3953
3835
|
}
|
|
3836
|
+
return (_a = new FinancialYear(this.writeOffManualDate || this.writeOffDate)) === null || _a === void 0 ? void 0 : _a.year;
|
|
3954
3837
|
},
|
|
3955
3838
|
enumerable: false,
|
|
3956
3839
|
configurable: true
|
|
3957
3840
|
});
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3841
|
+
/**
|
|
3842
|
+
* Check if depreciation chart accounts heading related to vehicles category
|
|
3843
|
+
*/
|
|
3844
|
+
Depreciation.prototype.isVehicleDepreciation = function () {
|
|
3845
|
+
var _a;
|
|
3846
|
+
return ((_a = this.chartAccounts.heading) === null || _a === void 0 ? void 0 : _a.id) === exports.ChartAccountsHeadingVehicleListEnum.DEPRECIATION_VEHICLES;
|
|
3847
|
+
};
|
|
3848
|
+
/**
|
|
3849
|
+
* Get depreciation purchase date
|
|
3850
|
+
*/
|
|
3851
|
+
Depreciation.prototype.getDate = function () {
|
|
3852
|
+
return this.date;
|
|
3853
|
+
};
|
|
3854
|
+
Object.defineProperty(Depreciation.prototype, "currentYearForecast", {
|
|
3971
3855
|
/**
|
|
3972
|
-
*
|
|
3973
|
-
* and we need these fields to work with Income source forecasts like with Salary Forecasts
|
|
3856
|
+
* @TODO Vik: Research a problem with depreciations without current year forecast
|
|
3974
3857
|
*/
|
|
3975
3858
|
get: function () {
|
|
3976
|
-
return this.
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3859
|
+
return this.forecasts.find(function (forecast) {
|
|
3860
|
+
return forecast.financialYear === new FinancialYear().year;
|
|
3861
|
+
}) || classTransformer.plainToClass(DepreciationForecast, {
|
|
3862
|
+
financialYear: new FinancialYear().year,
|
|
3863
|
+
openBalance: 0,
|
|
3864
|
+
closeBalance: 0,
|
|
3865
|
+
amount: 0,
|
|
3866
|
+
claimPercent: 0
|
|
3867
|
+
});
|
|
3984
3868
|
},
|
|
3985
3869
|
enumerable: false,
|
|
3986
3870
|
configurable: true
|
|
3987
3871
|
});
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
], IncomeSourceForecast.prototype, "incomeSourceType", void 0);
|
|
3993
|
-
__decorate([
|
|
3994
|
-
classTransformer.Type(function () { return IncomeSource; })
|
|
3995
|
-
], IncomeSourceForecast.prototype, "incomeSource", void 0);
|
|
3996
|
-
|
|
3997
|
-
var IncomeSource = /** @class */ (function (_super) {
|
|
3998
|
-
__extends(IncomeSource, _super);
|
|
3999
|
-
function IncomeSource() {
|
|
4000
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4001
|
-
}
|
|
4002
|
-
IncomeSource.prototype.isSalaryIncome = function () {
|
|
4003
|
-
return !!this.salaryForecasts.length;
|
|
4004
|
-
// @TODO Vik: old code
|
|
4005
|
-
// return this.type === IncomeSourceTypeEnum.SALARY;
|
|
3872
|
+
Depreciation.prototype.getForecastByYear = function (year) {
|
|
3873
|
+
return this.forecasts.find(function (forecast) {
|
|
3874
|
+
return forecast.financialYear === year;
|
|
3875
|
+
});
|
|
4006
3876
|
};
|
|
4007
|
-
|
|
4008
|
-
|
|
3877
|
+
Depreciation.prototype.getClaimAmountByYear = function (year) {
|
|
3878
|
+
var _a;
|
|
3879
|
+
return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.claimAmount) || 0;
|
|
4009
3880
|
};
|
|
4010
|
-
|
|
4011
|
-
|
|
3881
|
+
Depreciation.prototype.getCloseBalanceByYear = function (year) {
|
|
3882
|
+
var _a;
|
|
3883
|
+
return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
|
|
4012
3884
|
};
|
|
4013
|
-
|
|
4014
|
-
return this.
|
|
3885
|
+
Depreciation.prototype.isBuildingAtCost = function () {
|
|
3886
|
+
return this.chartAccounts.id === exports.ChartAccountsListEnum.BUILDING_AT_COST;
|
|
4015
3887
|
};
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
configurable: true
|
|
4025
|
-
});
|
|
4026
|
-
Object.defineProperty(IncomeSource.prototype, "actualForecast", {
|
|
3888
|
+
/**
|
|
3889
|
+
* Create a new transaction from current depreciation
|
|
3890
|
+
*/
|
|
3891
|
+
Depreciation.prototype.toTransaction = function (params) {
|
|
3892
|
+
if (params === void 0) { params = {}; }
|
|
3893
|
+
return classTransformer.plainToClass(Transaction, Object.assign(params, this, { amount: -this.claimAmount, claimAmount: -this.amount * (this.claimPercent / 100) }));
|
|
3894
|
+
};
|
|
3895
|
+
Object.defineProperty(Depreciation.prototype, "claimAmount", {
|
|
4027
3896
|
/**
|
|
4028
|
-
*
|
|
3897
|
+
* @TODO Michael: remove and check everywhere in reports
|
|
4029
3898
|
*/
|
|
4030
3899
|
get: function () {
|
|
4031
|
-
|
|
3900
|
+
var _a;
|
|
3901
|
+
return ((_a = this.currentYearForecast) === null || _a === void 0 ? void 0 : _a.claimAmount) || 0;
|
|
4032
3902
|
},
|
|
4033
3903
|
enumerable: false,
|
|
4034
3904
|
configurable: true
|
|
4035
3905
|
});
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
IncomeSource.prototype.isWorkedInMonth = function (monthIndex) {
|
|
4041
|
-
var monthDate = new FinancialYear().getMonthDate(monthIndex);
|
|
4042
|
-
return (!this.dateFrom || monthDate >= this.dateFrom) && (!this.dateTo || monthDate < this.dateTo);
|
|
4043
|
-
};
|
|
4044
|
-
return IncomeSource;
|
|
4045
|
-
}(IncomeSource$1));
|
|
3906
|
+
return Depreciation;
|
|
3907
|
+
}(Depreciation$1));
|
|
3908
|
+
Depreciation.WRITTEN_OFF_THRESHOLD = 300;
|
|
3909
|
+
Depreciation.LOW_VALUE_POOL_THRESHOLD = 1000;
|
|
4046
3910
|
__decorate([
|
|
4047
|
-
classTransformer.Type(function () { return
|
|
4048
|
-
],
|
|
3911
|
+
classTransformer.Type(function () { return Date; })
|
|
3912
|
+
], Depreciation.prototype, "purchaseDate", void 0);
|
|
4049
3913
|
__decorate([
|
|
4050
|
-
classTransformer.Type(function () { return
|
|
4051
|
-
],
|
|
3914
|
+
classTransformer.Type(function () { return Date; })
|
|
3915
|
+
], Depreciation.prototype, "date", void 0);
|
|
4052
3916
|
__decorate([
|
|
4053
|
-
classTransformer.Type(function () { return
|
|
4054
|
-
],
|
|
3917
|
+
classTransformer.Type(function () { return Date; })
|
|
3918
|
+
], Depreciation.prototype, "lowValuePoolDate", void 0);
|
|
4055
3919
|
__decorate([
|
|
4056
3920
|
classTransformer.Type(function () { return Date; })
|
|
4057
|
-
],
|
|
3921
|
+
], Depreciation.prototype, "writeOffManualDate", void 0);
|
|
4058
3922
|
__decorate([
|
|
4059
3923
|
classTransformer.Type(function () { return Date; })
|
|
4060
|
-
],
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
3924
|
+
], Depreciation.prototype, "writeOffDate", void 0);
|
|
3925
|
+
__decorate([
|
|
3926
|
+
classTransformer.Type(function () { return DepreciationCapitalProject; })
|
|
3927
|
+
], Depreciation.prototype, "depreciationCapitalProject", void 0);
|
|
3928
|
+
__decorate([
|
|
3929
|
+
classTransformer.Type(function () { return DepreciationForecast; }),
|
|
3930
|
+
classTransformer.Transform(function (_b) {
|
|
3931
|
+
var value = _b.value, obj = _b.obj;
|
|
3932
|
+
// value = array of DepreciationForecast
|
|
3933
|
+
// obj = plain (whole Depreciation object)
|
|
3934
|
+
// Set isLVP flag for each DepreciationForecast
|
|
3935
|
+
// @TODO refactor
|
|
3936
|
+
value.forEach(function (forecast) {
|
|
3937
|
+
forecast.isLVP =
|
|
3938
|
+
forecast.closeBalance < 1000 &&
|
|
3939
|
+
obj.calculation === exports.DepreciationCalculationEnum.DIMINISHING &&
|
|
3940
|
+
obj.type === exports.DepreciationTypeEnum.PLANT_EQUIPMENT &&
|
|
3941
|
+
!(obj.amount > Depreciation.WRITTEN_OFF_THRESHOLD && obj.amount < Depreciation.LOW_VALUE_POOL_THRESHOLD) &&
|
|
3942
|
+
!(obj.writeOffDate && new FinancialYear(new Date(obj.writeOffDate)).year === obj.financialYear);
|
|
3943
|
+
});
|
|
3944
|
+
return value;
|
|
3945
|
+
})
|
|
3946
|
+
], Depreciation.prototype, "forecasts", void 0);
|
|
4077
3947
|
__decorate([
|
|
4078
|
-
classTransformer.Type(function () { return
|
|
4079
|
-
],
|
|
4080
|
-
|
|
4081
|
-
var TransactionAllocation$1 = /** @class */ (function (_super) {
|
|
4082
|
-
__extends(TransactionAllocation, _super);
|
|
4083
|
-
function TransactionAllocation() {
|
|
4084
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4085
|
-
}
|
|
4086
|
-
return TransactionAllocation;
|
|
4087
|
-
}(AbstractModel));
|
|
4088
|
-
|
|
4089
|
-
var TransactionAllocation = /** @class */ (function (_super) {
|
|
4090
|
-
__extends(TransactionAllocation, _super);
|
|
4091
|
-
function TransactionAllocation() {
|
|
4092
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
4093
|
-
}
|
|
4094
|
-
/**
|
|
4095
|
-
* Create a new instance of transaction allocation
|
|
4096
|
-
* transaction could be empty since we can POST allocation inside a new transaction
|
|
4097
|
-
*/
|
|
4098
|
-
TransactionAllocation.create = function (amount, bankTransaction, transaction) {
|
|
4099
|
-
return classTransformer.plainToClass(TransactionAllocation, { amount: amount, transaction: transaction, bankTransaction: bankTransaction });
|
|
4100
|
-
};
|
|
4101
|
-
return TransactionAllocation;
|
|
4102
|
-
}(TransactionAllocation$1));
|
|
3948
|
+
classTransformer.Type(function () { return ChartAccounts; })
|
|
3949
|
+
], Depreciation.prototype, "chartAccounts", void 0);
|
|
4103
3950
|
__decorate([
|
|
4104
3951
|
classTransformer.Type(function () { return BankTransaction; })
|
|
4105
|
-
],
|
|
4106
|
-
__decorate([
|
|
4107
|
-
classTransformer.Type(function () { return Transaction; })
|
|
4108
|
-
], TransactionAllocation.prototype, "transaction", void 0);
|
|
4109
|
-
|
|
4110
|
-
/**
|
|
4111
|
-
* Enum with income amount types (Net or Gross)
|
|
4112
|
-
*/
|
|
4113
|
-
exports.IncomeAmountTypeEnum = void 0;
|
|
4114
|
-
(function (IncomeAmountTypeEnum) {
|
|
4115
|
-
IncomeAmountTypeEnum[IncomeAmountTypeEnum["NET"] = 0] = "NET";
|
|
4116
|
-
IncomeAmountTypeEnum[IncomeAmountTypeEnum["GROSS"] = 1] = "GROSS";
|
|
4117
|
-
})(exports.IncomeAmountTypeEnum || (exports.IncomeAmountTypeEnum = {}));
|
|
3952
|
+
], Depreciation.prototype, "bankTransaction", void 0);
|
|
4118
3953
|
|
|
4119
3954
|
// @TODO refactor with baseModel in constructor
|
|
4120
3955
|
var Transaction = /** @class */ (function (_super) {
|
|
@@ -4361,249 +4196,530 @@
|
|
|
4361
4196
|
classTransformer.Type(function () { return TransactionAllocation; })
|
|
4362
4197
|
], Transaction.prototype, "allocations", void 0);
|
|
4363
4198
|
|
|
4364
|
-
var
|
|
4365
|
-
__extends(
|
|
4366
|
-
function
|
|
4199
|
+
var SoleInvoiceItem = /** @class */ (function (_super) {
|
|
4200
|
+
__extends(SoleInvoiceItem, _super);
|
|
4201
|
+
function SoleInvoiceItem() {
|
|
4367
4202
|
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4368
|
-
|
|
4369
|
-
_this.allocatedAmount = 0;
|
|
4370
|
-
_this.unallocatedAmount = 0;
|
|
4203
|
+
_this.isGST = false;
|
|
4371
4204
|
return _this;
|
|
4372
4205
|
}
|
|
4373
|
-
Object.defineProperty(
|
|
4206
|
+
Object.defineProperty(SoleInvoiceItem.prototype, "totalPrice", {
|
|
4207
|
+
get: function () {
|
|
4208
|
+
return this.price * this.quantity;
|
|
4209
|
+
},
|
|
4210
|
+
enumerable: false,
|
|
4211
|
+
configurable: true
|
|
4212
|
+
});
|
|
4213
|
+
return SoleInvoiceItem;
|
|
4214
|
+
}(SoleInvoiceItem$1));
|
|
4215
|
+
/**
|
|
4216
|
+
* GST percent value
|
|
4217
|
+
*/
|
|
4218
|
+
SoleInvoiceItem.GSTRatio = 0.1;
|
|
4219
|
+
__decorate([
|
|
4220
|
+
classTransformer.Type(function () { return SoleInvoice; })
|
|
4221
|
+
], SoleInvoiceItem.prototype, "invoice", void 0);
|
|
4222
|
+
__decorate([
|
|
4223
|
+
classTransformer.Type(function () { return ChartAccounts; })
|
|
4224
|
+
], SoleInvoiceItem.prototype, "chartAccounts", void 0);
|
|
4225
|
+
__decorate([
|
|
4226
|
+
classTransformer.Type(function () { return Transaction; })
|
|
4227
|
+
], SoleInvoiceItem.prototype, "transaction", void 0);
|
|
4228
|
+
|
|
4229
|
+
var SoleContact$1 = /** @class */ (function (_super) {
|
|
4230
|
+
__extends(SoleContact, _super);
|
|
4231
|
+
function SoleContact() {
|
|
4232
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4233
|
+
}
|
|
4234
|
+
return SoleContact;
|
|
4235
|
+
}(AbstractModel));
|
|
4236
|
+
|
|
4237
|
+
// @TODO Alex/Vik: Create some base class for User and SoleContact with common methods and properties
|
|
4238
|
+
var SoleContact = /** @class */ (function (_super) {
|
|
4239
|
+
__extends(SoleContact, _super);
|
|
4240
|
+
function SoleContact() {
|
|
4241
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4242
|
+
}
|
|
4243
|
+
Object.defineProperty(SoleContact.prototype, "fullName", {
|
|
4244
|
+
get: function () {
|
|
4245
|
+
return this.firstName + " " + this.lastName;
|
|
4246
|
+
},
|
|
4247
|
+
enumerable: false,
|
|
4248
|
+
configurable: true
|
|
4249
|
+
});
|
|
4250
|
+
SoleContact.prototype.getPhotoPlaceholder = function () {
|
|
4251
|
+
return "" + this.firstName[0].toUpperCase() + this.lastName[0].toUpperCase();
|
|
4252
|
+
};
|
|
4253
|
+
// @TODO Vik: add photo field to SoleContact
|
|
4254
|
+
SoleContact.prototype.getPhoto = function () {
|
|
4255
|
+
return '';
|
|
4256
|
+
};
|
|
4257
|
+
return SoleContact;
|
|
4258
|
+
}(SoleContact$1));
|
|
4259
|
+
__decorate([
|
|
4260
|
+
classTransformer.Type(function () { return User; })
|
|
4261
|
+
], SoleContact.prototype, "user", void 0);
|
|
4262
|
+
__decorate([
|
|
4263
|
+
classTransformer.Type(function () { return Phone; })
|
|
4264
|
+
], SoleContact.prototype, "phone", void 0);
|
|
4265
|
+
__decorate([
|
|
4266
|
+
classTransformer.Type(function () { return Address; })
|
|
4267
|
+
], SoleContact.prototype, "address", void 0);
|
|
4268
|
+
__decorate([
|
|
4269
|
+
classTransformer.Type(function () { return SoleInvoice; })
|
|
4270
|
+
], SoleContact.prototype, "invoices", void 0);
|
|
4271
|
+
|
|
4272
|
+
var SoleInvoiceTemplate$1 = /** @class */ (function (_super) {
|
|
4273
|
+
__extends(SoleInvoiceTemplate, _super);
|
|
4274
|
+
function SoleInvoiceTemplate() {
|
|
4275
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4276
|
+
}
|
|
4277
|
+
return SoleInvoiceTemplate;
|
|
4278
|
+
}(AbstractModel));
|
|
4279
|
+
|
|
4280
|
+
exports.SoleInvoiceTemplateTaxTypeEnum = void 0;
|
|
4281
|
+
(function (SoleInvoiceTemplateTaxTypeEnum) {
|
|
4282
|
+
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["TAX_EXCLUSIVE"] = 0] = "TAX_EXCLUSIVE";
|
|
4283
|
+
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["TAX_INCLUSIVE"] = 1] = "TAX_INCLUSIVE";
|
|
4284
|
+
SoleInvoiceTemplateTaxTypeEnum[SoleInvoiceTemplateTaxTypeEnum["NO_TAX"] = 2] = "NO_TAX";
|
|
4285
|
+
})(exports.SoleInvoiceTemplateTaxTypeEnum || (exports.SoleInvoiceTemplateTaxTypeEnum = {}));
|
|
4286
|
+
|
|
4287
|
+
var SoleInvoiceTemplate = /** @class */ (function (_super) {
|
|
4288
|
+
__extends(SoleInvoiceTemplate, _super);
|
|
4289
|
+
function SoleInvoiceTemplate() {
|
|
4290
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4374
4291
|
/**
|
|
4375
|
-
*
|
|
4292
|
+
* Affects to SoleInvoiceItem.isGST flag availability.
|
|
4293
|
+
* When NONE: isGST is unavailable
|
|
4294
|
+
* When EXCLUSIVE: GST amount added additionaly to invoice total price
|
|
4295
|
+
* When INCLUSIVE: GST amount is already included to invoice total price
|
|
4296
|
+
*/
|
|
4297
|
+
_this.taxType = exports.SoleInvoiceTemplateTaxTypeEnum.NO_TAX;
|
|
4298
|
+
return _this;
|
|
4299
|
+
}
|
|
4300
|
+
Object.defineProperty(SoleInvoiceTemplate.prototype, "termTime", {
|
|
4301
|
+
/**
|
|
4302
|
+
* Get term duration in milliseconds
|
|
4376
4303
|
*/
|
|
4377
4304
|
get: function () {
|
|
4378
|
-
return this.
|
|
4305
|
+
return this.term * 24 * 3600 * 1000;
|
|
4379
4306
|
},
|
|
4380
4307
|
enumerable: false,
|
|
4381
4308
|
configurable: true
|
|
4382
4309
|
});
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4310
|
+
return SoleInvoiceTemplate;
|
|
4311
|
+
}(SoleInvoiceTemplate$1));
|
|
4312
|
+
__decorate([
|
|
4313
|
+
classTransformer.Type(function () { return SoleBusiness; })
|
|
4314
|
+
], SoleInvoiceTemplate.prototype, "business", void 0);
|
|
4315
|
+
__decorate([
|
|
4316
|
+
classTransformer.Type(function () { return BankAccount; })
|
|
4317
|
+
], SoleInvoiceTemplate.prototype, "bankAccount", void 0);
|
|
4318
|
+
|
|
4319
|
+
exports.SoleInvoiceStatusesEnum = void 0;
|
|
4320
|
+
(function (SoleInvoiceStatusesEnum) {
|
|
4321
|
+
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["CANCELED"] = 0] = "CANCELED";
|
|
4322
|
+
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["DRAFT"] = 1] = "DRAFT";
|
|
4323
|
+
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["PENDING"] = 2] = "PENDING";
|
|
4324
|
+
SoleInvoiceStatusesEnum[SoleInvoiceStatusesEnum["PAID"] = 3] = "PAID";
|
|
4325
|
+
})(exports.SoleInvoiceStatusesEnum || (exports.SoleInvoiceStatusesEnum = {}));
|
|
4326
|
+
|
|
4327
|
+
exports.SoleInvoiceTaxTypeEnum = void 0;
|
|
4328
|
+
(function (SoleInvoiceTaxTypeEnum) {
|
|
4329
|
+
SoleInvoiceTaxTypeEnum[SoleInvoiceTaxTypeEnum["TAX_EXCLUSIVE"] = 0] = "TAX_EXCLUSIVE";
|
|
4330
|
+
SoleInvoiceTaxTypeEnum[SoleInvoiceTaxTypeEnum["TAX_INCLUSIVE"] = 1] = "TAX_INCLUSIVE";
|
|
4331
|
+
SoleInvoiceTaxTypeEnum[SoleInvoiceTaxTypeEnum["NO_TAX"] = 2] = "NO_TAX";
|
|
4332
|
+
})(exports.SoleInvoiceTaxTypeEnum || (exports.SoleInvoiceTaxTypeEnum = {}));
|
|
4333
|
+
|
|
4334
|
+
var SoleInvoiceItemCollection = /** @class */ (function (_super) {
|
|
4335
|
+
__extends(SoleInvoiceItemCollection, _super);
|
|
4336
|
+
function SoleInvoiceItemCollection() {
|
|
4337
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4338
|
+
}
|
|
4339
|
+
Object.defineProperty(SoleInvoiceItemCollection.prototype, "gstPrice", {
|
|
4340
|
+
get: function () {
|
|
4341
|
+
return this.filterBy('isGST', true).sumBy('totalPrice');
|
|
4342
|
+
},
|
|
4343
|
+
enumerable: false,
|
|
4344
|
+
configurable: true
|
|
4345
|
+
});
|
|
4346
|
+
return SoleInvoiceItemCollection;
|
|
4347
|
+
}(Collection));
|
|
4348
|
+
|
|
4349
|
+
var SoleInvoice = /** @class */ (function (_super) {
|
|
4350
|
+
__extends(SoleInvoice, _super);
|
|
4351
|
+
function SoleInvoice() {
|
|
4352
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4353
|
+
_this.status = exports.SoleInvoiceStatusesEnum.DRAFT;
|
|
4354
|
+
_this.taxType = exports.SoleInvoiceTaxTypeEnum.NO_TAX;
|
|
4355
|
+
return _this;
|
|
4356
|
+
}
|
|
4357
|
+
Object.defineProperty(SoleInvoice.prototype, "itemsCollection", {
|
|
4358
|
+
/**
|
|
4359
|
+
* Get items array as collection
|
|
4360
|
+
*/
|
|
4361
|
+
get: function () {
|
|
4362
|
+
return new SoleInvoiceItemCollection(this.items);
|
|
4363
|
+
},
|
|
4364
|
+
enumerable: false,
|
|
4365
|
+
configurable: true
|
|
4366
|
+
});
|
|
4367
|
+
Object.defineProperty(SoleInvoice.prototype, "price", {
|
|
4368
|
+
/**
|
|
4369
|
+
* Total price of all items
|
|
4370
|
+
*/
|
|
4371
|
+
get: function () {
|
|
4372
|
+
return this.itemsCollection.sumBy('totalPrice');
|
|
4373
|
+
},
|
|
4374
|
+
enumerable: false,
|
|
4375
|
+
configurable: true
|
|
4376
|
+
});
|
|
4377
|
+
Object.defineProperty(SoleInvoice.prototype, "netPrice", {
|
|
4378
|
+
/**
|
|
4379
|
+
* Total invoice price without GST
|
|
4380
|
+
*/
|
|
4381
|
+
get: function () {
|
|
4382
|
+
if (this.isTaxInclusive()) {
|
|
4383
|
+
return this.price - this.GSTAmount;
|
|
4384
|
+
}
|
|
4385
|
+
return this.price;
|
|
4386
|
+
},
|
|
4387
|
+
enumerable: false,
|
|
4388
|
+
configurable: true
|
|
4389
|
+
});
|
|
4390
|
+
Object.defineProperty(SoleInvoice.prototype, "grossPrice", {
|
|
4391
|
+
/**
|
|
4392
|
+
* Total final price (net + GST)
|
|
4393
|
+
*/
|
|
4394
|
+
get: function () {
|
|
4395
|
+
if (this.isTaxExclusive()) {
|
|
4396
|
+
return this.price + this.GSTAmount;
|
|
4397
|
+
}
|
|
4398
|
+
return this.price;
|
|
4399
|
+
},
|
|
4400
|
+
enumerable: false,
|
|
4401
|
+
configurable: true
|
|
4402
|
+
});
|
|
4403
|
+
Object.defineProperty(SoleInvoice.prototype, "GSTAmount", {
|
|
4404
|
+
/**
|
|
4405
|
+
* Total GST amount
|
|
4406
|
+
*/
|
|
4407
|
+
get: function () {
|
|
4408
|
+
switch (this.taxType) {
|
|
4409
|
+
case exports.SoleInvoiceTaxTypeEnum.TAX_INCLUSIVE:
|
|
4410
|
+
return this.inclusiveGSTAmount;
|
|
4411
|
+
case exports.SoleInvoiceTaxTypeEnum.TAX_EXCLUSIVE:
|
|
4412
|
+
return this.exclusiveGSTAmount;
|
|
4413
|
+
case exports.SoleInvoiceTaxTypeEnum.NO_TAX:
|
|
4414
|
+
return 0;
|
|
4415
|
+
}
|
|
4416
|
+
},
|
|
4417
|
+
enumerable: false,
|
|
4418
|
+
configurable: true
|
|
4419
|
+
});
|
|
4420
|
+
Object.defineProperty(SoleInvoice.prototype, "inclusiveGSTAmount", {
|
|
4421
|
+
/**
|
|
4422
|
+
* When tax inclusive, GST amount is included to total price
|
|
4423
|
+
*/
|
|
4424
|
+
get: function () {
|
|
4425
|
+
var gstPrice = this.itemsCollection.gstPrice;
|
|
4426
|
+
return +(gstPrice - (gstPrice / (1 + SoleInvoiceItem.GSTRatio))).toFixed(2);
|
|
4427
|
+
},
|
|
4428
|
+
enumerable: false,
|
|
4429
|
+
configurable: true
|
|
4430
|
+
});
|
|
4431
|
+
Object.defineProperty(SoleInvoice.prototype, "exclusiveGSTAmount", {
|
|
4432
|
+
/**
|
|
4433
|
+
* When tax exclusive, GST amount should be added additionally to total price
|
|
4434
|
+
*/
|
|
4435
|
+
get: function () {
|
|
4436
|
+
return +(this.itemsCollection.gstPrice * SoleInvoiceItem.GSTRatio).toFixed(2);
|
|
4437
|
+
},
|
|
4438
|
+
enumerable: false,
|
|
4439
|
+
configurable: true
|
|
4440
|
+
});
|
|
4441
|
+
SoleInvoice.prototype.isDraft = function () {
|
|
4442
|
+
return this.status === exports.SoleInvoiceStatusesEnum.DRAFT;
|
|
4388
4443
|
};
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
return this.
|
|
4444
|
+
SoleInvoice.prototype.isCancelled = function () {
|
|
4445
|
+
return this.status === exports.SoleInvoiceStatusesEnum.CANCELED;
|
|
4446
|
+
};
|
|
4447
|
+
SoleInvoice.prototype.isPending = function () {
|
|
4448
|
+
return this.status === exports.SoleInvoiceStatusesEnum.PENDING;
|
|
4449
|
+
};
|
|
4450
|
+
SoleInvoice.prototype.isPaid = function () {
|
|
4451
|
+
return this.status === exports.SoleInvoiceStatusesEnum.PAID;
|
|
4452
|
+
};
|
|
4453
|
+
SoleInvoice.prototype.isOverdue = function () {
|
|
4454
|
+
return this.isPending() && this.dateTo < new Date();
|
|
4455
|
+
};
|
|
4456
|
+
SoleInvoice.prototype.isUnpaid = function () {
|
|
4457
|
+
return this.isPending() && this.dateTo >= new Date();
|
|
4394
4458
|
};
|
|
4395
4459
|
/**
|
|
4396
|
-
*
|
|
4460
|
+
* GST is not available for invoices without taxes
|
|
4397
4461
|
*/
|
|
4398
|
-
|
|
4399
|
-
return
|
|
4400
|
-
amount: +this.amount.toFixed(2),
|
|
4401
|
-
description: this.description,
|
|
4402
|
-
date: this.date,
|
|
4403
|
-
source: exports.TransactionSourceEnum.BANK_TRANSACTION,
|
|
4404
|
-
operation: this.operation,
|
|
4405
|
-
type: this.type,
|
|
4406
|
-
});
|
|
4462
|
+
SoleInvoice.prototype.isNoTax = function () {
|
|
4463
|
+
return this.taxType === exports.SoleInvoiceTaxTypeEnum.NO_TAX;
|
|
4407
4464
|
};
|
|
4408
4465
|
/**
|
|
4409
|
-
*
|
|
4466
|
+
* GST amount is not included in items prices for invoices with tax exclusive,
|
|
4467
|
+
* we should add GST amount additionaly to subtotal price to get total price
|
|
4410
4468
|
*/
|
|
4411
|
-
|
|
4412
|
-
return this.
|
|
4469
|
+
SoleInvoice.prototype.isTaxExclusive = function () {
|
|
4470
|
+
return this.taxType === exports.SoleInvoiceTaxTypeEnum.TAX_EXCLUSIVE;
|
|
4413
4471
|
};
|
|
4414
4472
|
/**
|
|
4415
|
-
*
|
|
4473
|
+
* GST amount already included in items prices for invoices with tax inclusive,
|
|
4474
|
+
* we should subtract GST amount from total price to get subtotal price
|
|
4416
4475
|
*/
|
|
4417
|
-
|
|
4418
|
-
return
|
|
4476
|
+
SoleInvoice.prototype.isTaxInclusive = function () {
|
|
4477
|
+
return this.taxType === exports.SoleInvoiceTaxTypeEnum.TAX_INCLUSIVE;
|
|
4419
4478
|
};
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
*/
|
|
4423
|
-
BankTransaction.prototype.getUnallocatedAmount = function (allocations) {
|
|
4424
|
-
return this.amount - this.getAllocatedAmount(allocations);
|
|
4479
|
+
SoleInvoice.prototype.getNumber = function () {
|
|
4480
|
+
return String(this.number).padStart(SoleInvoice.NUMBER_LENGTH, '0');
|
|
4425
4481
|
};
|
|
4426
|
-
|
|
4427
|
-
|
|
4482
|
+
Object.defineProperty(SoleInvoice.prototype, "name", {
|
|
4483
|
+
get: function () {
|
|
4484
|
+
return "invoice-" + this.getNumber() + ".pdf";
|
|
4485
|
+
},
|
|
4486
|
+
enumerable: false,
|
|
4487
|
+
configurable: true
|
|
4488
|
+
});
|
|
4489
|
+
return SoleInvoice;
|
|
4490
|
+
}(SoleInvoice$1));
|
|
4491
|
+
SoleInvoice.NUMBER_LENGTH = 4;
|
|
4428
4492
|
__decorate([
|
|
4429
4493
|
classTransformer.Type(function () { return Date; })
|
|
4430
|
-
],
|
|
4494
|
+
], SoleInvoice.prototype, "dateFrom", void 0);
|
|
4495
|
+
__decorate([
|
|
4496
|
+
classTransformer.Type(function () { return Date; })
|
|
4497
|
+
], SoleInvoice.prototype, "dateTo", void 0);
|
|
4498
|
+
__decorate([
|
|
4499
|
+
classTransformer.Type(function () { return User; })
|
|
4500
|
+
], SoleInvoice.prototype, "user", void 0);
|
|
4501
|
+
__decorate([
|
|
4502
|
+
classTransformer.Type(function () { return SoleBusiness; })
|
|
4503
|
+
], SoleInvoice.prototype, "business", void 0);
|
|
4504
|
+
__decorate([
|
|
4505
|
+
classTransformer.Type(function () { return SoleInvoiceItem; })
|
|
4506
|
+
], SoleInvoice.prototype, "items", void 0);
|
|
4507
|
+
__decorate([
|
|
4508
|
+
classTransformer.Type(function () { return SoleContact; })
|
|
4509
|
+
], SoleInvoice.prototype, "payer", void 0);
|
|
4510
|
+
__decorate([
|
|
4511
|
+
classTransformer.Type(function () { return SoleInvoiceTemplate; })
|
|
4512
|
+
], SoleInvoice.prototype, "template", void 0);
|
|
4513
|
+
__decorate([
|
|
4514
|
+
classTransformer.Type(function () { return BankAccount; })
|
|
4515
|
+
], SoleInvoice.prototype, "bankAccount", void 0);
|
|
4431
4516
|
|
|
4432
4517
|
/**
|
|
4433
|
-
*
|
|
4518
|
+
* Class contains traveled kilometers and work usage percent in 12 weeks date range
|
|
4519
|
+
* @TODO Vik: Best period: move this and related logic to backend
|
|
4520
|
+
* @TODO Alex: check if we need this class when calculation refactored with backend
|
|
4434
4521
|
*/
|
|
4435
|
-
var
|
|
4436
|
-
|
|
4437
|
-
function Depreciation() {
|
|
4438
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4439
|
-
_this.forecasts = [];
|
|
4440
|
-
_this.type = exports.DepreciationTypeEnum.PLANT_EQUIPMENT;
|
|
4441
|
-
/**
|
|
4442
|
-
* @TODO remove after ? signs removed from db models
|
|
4443
|
-
*/
|
|
4444
|
-
_this.amount = 0;
|
|
4445
|
-
return _this;
|
|
4522
|
+
var LogbookPeriod = /** @class */ (function () {
|
|
4523
|
+
function LogbookPeriod() {
|
|
4446
4524
|
}
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
return this.type === exports.DepreciationTypeEnum.CAPITAL_WORKS;
|
|
4450
|
-
};
|
|
4451
|
-
Depreciation.prototype.isBorrowingExpense = function () {
|
|
4452
|
-
return this.type === exports.DepreciationTypeEnum.BORROWING_EXPENSES;
|
|
4453
|
-
};
|
|
4454
|
-
Depreciation.prototype.isAsset = function () {
|
|
4455
|
-
return this.type === exports.DepreciationTypeEnum.PLANT_EQUIPMENT;
|
|
4456
|
-
};
|
|
4457
|
-
// Calculation checking
|
|
4458
|
-
Depreciation.prototype.isSBPCalculation = function () {
|
|
4459
|
-
return this.calculation === exports.DepreciationCalculationEnum.SBP;
|
|
4460
|
-
};
|
|
4461
|
-
Depreciation.prototype.isPrimeCost = function () {
|
|
4462
|
-
return this.calculation === exports.DepreciationCalculationEnum.PRIME_COST;
|
|
4463
|
-
};
|
|
4464
|
-
Depreciation.prototype.isDiminishing = function () {
|
|
4465
|
-
return this.calculation === exports.DepreciationCalculationEnum.DIMINISHING;
|
|
4466
|
-
};
|
|
4467
|
-
// Pool checking
|
|
4468
|
-
Depreciation.prototype.isPlantEquipmentPool = function () {
|
|
4469
|
-
return this.isAsset() && !this.isSBPCalculation() && !this.isWrittenOff() && !this.isLVP();
|
|
4470
|
-
};
|
|
4471
|
-
Depreciation.prototype.isLVP = function () {
|
|
4472
|
-
return this.isAsset()
|
|
4473
|
-
&& !this.isSBPCalculation()
|
|
4474
|
-
&& this.isDiminishing()
|
|
4475
|
-
&& this.currentYearForecast.closeBalance > Depreciation.WRITTEN_OFF_THRESHOLD
|
|
4476
|
-
&& this.currentYearForecast.closeBalance <= Depreciation.LOW_VALUE_POOL_THRESHOLD;
|
|
4477
|
-
};
|
|
4478
|
-
Depreciation.prototype.isSBP = function () {
|
|
4479
|
-
return this.isAsset() && this.isSBPCalculation() && !this.isWrittenOff();
|
|
4525
|
+
LogbookPeriod.prototype.isEndOfYear = function () {
|
|
4526
|
+
return this.to === new FinancialYear().endDate;
|
|
4480
4527
|
};
|
|
4481
|
-
|
|
4482
|
-
|
|
4528
|
+
LogbookPeriod.prototype.getWorkUsageByClaim = function (claim) {
|
|
4529
|
+
var claimKilometers = this.logbooks.getByVehicleClaim(claim).getClaimableLogbooks().kilometers;
|
|
4530
|
+
return Math.round(this.workUsage * (claimKilometers / this.kilometers));
|
|
4483
4531
|
};
|
|
4484
|
-
|
|
4532
|
+
return LogbookPeriod;
|
|
4533
|
+
}());
|
|
4534
|
+
__decorate([
|
|
4535
|
+
classTransformer.Type(function () { return Date; })
|
|
4536
|
+
], LogbookPeriod.prototype, "from", void 0);
|
|
4537
|
+
__decorate([
|
|
4538
|
+
classTransformer.Type(function () { return Date; })
|
|
4539
|
+
], LogbookPeriod.prototype, "to", void 0);
|
|
4540
|
+
|
|
4541
|
+
var Vehicle$1 = /** @class */ (function (_super) {
|
|
4542
|
+
__extends(Vehicle, _super);
|
|
4543
|
+
function Vehicle() {
|
|
4544
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4545
|
+
}
|
|
4546
|
+
return Vehicle;
|
|
4547
|
+
}(AbstractModel));
|
|
4548
|
+
|
|
4549
|
+
var VehicleLogbook$1 = /** @class */ (function (_super) {
|
|
4550
|
+
__extends(VehicleLogbook, _super);
|
|
4551
|
+
function VehicleLogbook() {
|
|
4552
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4553
|
+
}
|
|
4554
|
+
return VehicleLogbook;
|
|
4555
|
+
}(AbstractModel));
|
|
4556
|
+
|
|
4557
|
+
var moment = momentRange.extendMoment(moment__namespace);
|
|
4558
|
+
var VehicleLogbook = /** @class */ (function (_super) {
|
|
4559
|
+
__extends(VehicleLogbook, _super);
|
|
4560
|
+
function VehicleLogbook() {
|
|
4561
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4562
|
+
}
|
|
4563
|
+
Object.defineProperty(VehicleLogbook.prototype, "kilometers", {
|
|
4485
4564
|
get: function () {
|
|
4486
|
-
|
|
4487
|
-
if (!this.writeOffManualDate && !this.writeOffDate) {
|
|
4488
|
-
return null;
|
|
4489
|
-
}
|
|
4490
|
-
return (_a = new FinancialYear(this.writeOffManualDate || this.writeOffDate)) === null || _a === void 0 ? void 0 : _a.year;
|
|
4565
|
+
return this.odometerEnd - this.odometerStart;
|
|
4491
4566
|
},
|
|
4492
4567
|
enumerable: false,
|
|
4493
4568
|
configurable: true
|
|
4494
4569
|
});
|
|
4495
|
-
|
|
4496
|
-
* Check if depreciation chart accounts heading related to vehicles category
|
|
4497
|
-
*/
|
|
4498
|
-
Depreciation.prototype.isVehicleDepreciation = function () {
|
|
4499
|
-
var _a;
|
|
4500
|
-
return ((_a = this.chartAccounts.heading) === null || _a === void 0 ? void 0 : _a.id) === exports.ChartAccountsHeadingVehicleListEnum.DEPRECIATION_VEHICLES;
|
|
4501
|
-
};
|
|
4502
|
-
/**
|
|
4503
|
-
* Get depreciation purchase date
|
|
4504
|
-
*/
|
|
4505
|
-
Depreciation.prototype.getDate = function () {
|
|
4506
|
-
return this.date;
|
|
4507
|
-
};
|
|
4508
|
-
Object.defineProperty(Depreciation.prototype, "currentYearForecast", {
|
|
4509
|
-
/**
|
|
4510
|
-
* @TODO Vik: Research a problem with depreciations without current year forecast
|
|
4511
|
-
*/
|
|
4570
|
+
Object.defineProperty(VehicleLogbook.prototype, "tankType", {
|
|
4512
4571
|
get: function () {
|
|
4513
|
-
return this.
|
|
4514
|
-
return forecast.financialYear === new FinancialYear().year;
|
|
4515
|
-
}) || classTransformer.plainToClass(DepreciationForecast, {
|
|
4516
|
-
financialYear: new FinancialYear().year,
|
|
4517
|
-
openBalance: 0,
|
|
4518
|
-
closeBalance: 0,
|
|
4519
|
-
amount: 0,
|
|
4520
|
-
claimPercent: 0
|
|
4521
|
-
});
|
|
4572
|
+
return this.isSoleTank() ? exports.TankTypeEnum.SOLE : exports.TankTypeEnum.WORK;
|
|
4522
4573
|
},
|
|
4523
4574
|
enumerable: false,
|
|
4524
4575
|
configurable: true
|
|
4525
4576
|
});
|
|
4526
|
-
|
|
4527
|
-
return this.
|
|
4528
|
-
return forecast.financialYear === year;
|
|
4529
|
-
});
|
|
4577
|
+
VehicleLogbook.prototype.isWorkTank = function () {
|
|
4578
|
+
return !this.business;
|
|
4530
4579
|
};
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4580
|
+
VehicleLogbook.prototype.isSoleTank = function () {
|
|
4581
|
+
return !!this.business;
|
|
4582
|
+
};
|
|
4583
|
+
/**
|
|
4584
|
+
* Get logbook period date range from logbook date and weeksInPeriod duration
|
|
4585
|
+
*/
|
|
4586
|
+
VehicleLogbook.prototype.getPeriod = function () {
|
|
4587
|
+
return moment.rangeFromInterval('milliseconds', VehicleLogbook.bestPeriodDuration, this.date);
|
|
4588
|
+
};
|
|
4589
|
+
return VehicleLogbook;
|
|
4590
|
+
}(VehicleLogbook$1));
|
|
4591
|
+
/**
|
|
4592
|
+
* Logbook period duration in milliseconds.
|
|
4593
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/211517441/Logbook+Vehicle
|
|
4594
|
+
*/
|
|
4595
|
+
VehicleLogbook.bestPeriodDuration = 12 * 7 * 24 * 3600 * 1000;
|
|
4596
|
+
__decorate([
|
|
4597
|
+
classTransformer.Type(function () { return Date; })
|
|
4598
|
+
], VehicleLogbook.prototype, "date", void 0);
|
|
4599
|
+
__decorate([
|
|
4600
|
+
classTransformer.Type(function () { return SoleBusiness; })
|
|
4601
|
+
], VehicleLogbook.prototype, "business", void 0);
|
|
4602
|
+
|
|
4603
|
+
var Vehicle = /** @class */ (function (_super) {
|
|
4604
|
+
__extends(Vehicle, _super);
|
|
4605
|
+
function Vehicle() {
|
|
4606
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4607
|
+
}
|
|
4608
|
+
return Vehicle;
|
|
4609
|
+
}(Vehicle$1));
|
|
4610
|
+
__decorate([
|
|
4611
|
+
classTransformer.Type(function () { return VehicleLogbook; })
|
|
4612
|
+
], Vehicle.prototype, "logbook", void 0);
|
|
4613
|
+
|
|
4614
|
+
var VehicleClaim$1 = /** @class */ (function (_super) {
|
|
4615
|
+
__extends(VehicleClaim, _super);
|
|
4616
|
+
function VehicleClaim() {
|
|
4617
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4618
|
+
}
|
|
4619
|
+
return VehicleClaim;
|
|
4620
|
+
}(AbstractModel));
|
|
4621
|
+
|
|
4622
|
+
var VehicleClaimDetails$1 = /** @class */ (function (_super) {
|
|
4623
|
+
__extends(VehicleClaimDetails, _super);
|
|
4624
|
+
function VehicleClaimDetails() {
|
|
4625
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4626
|
+
}
|
|
4627
|
+
return VehicleClaimDetails;
|
|
4628
|
+
}(AbstractModel));
|
|
4629
|
+
|
|
4630
|
+
exports.VehicleClaimDetailsMethodEnum = void 0;
|
|
4631
|
+
(function (VehicleClaimDetailsMethodEnum) {
|
|
4632
|
+
VehicleClaimDetailsMethodEnum[VehicleClaimDetailsMethodEnum["KMS"] = 1] = "KMS";
|
|
4633
|
+
VehicleClaimDetailsMethodEnum[VehicleClaimDetailsMethodEnum["LOGBOOK"] = 2] = "LOGBOOK";
|
|
4634
|
+
})(exports.VehicleClaimDetailsMethodEnum || (exports.VehicleClaimDetailsMethodEnum = {}));
|
|
4635
|
+
|
|
4636
|
+
var VehicleClaimDetails = /** @class */ (function (_super) {
|
|
4637
|
+
__extends(VehicleClaimDetails, _super);
|
|
4638
|
+
function VehicleClaimDetails() {
|
|
4639
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4640
|
+
/**
|
|
4641
|
+
* Init default values for the new instances
|
|
4642
|
+
*/
|
|
4643
|
+
_this.isManual = true;
|
|
4644
|
+
_this.method = exports.VehicleClaimDetailsMethodEnum.KMS;
|
|
4645
|
+
_this.financialYear = new FinancialYear().year;
|
|
4646
|
+
return _this;
|
|
4647
|
+
}
|
|
4648
|
+
VehicleClaimDetails.prototype.isLogbookMethod = function () {
|
|
4649
|
+
return this.method === exports.VehicleClaimDetailsMethodEnum.LOGBOOK;
|
|
4534
4650
|
};
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
|
|
4651
|
+
VehicleClaimDetails.prototype.isKmsMethod = function () {
|
|
4652
|
+
return this.method === exports.VehicleClaimDetailsMethodEnum.KMS;
|
|
4538
4653
|
};
|
|
4539
|
-
|
|
4540
|
-
|
|
4654
|
+
return VehicleClaimDetails;
|
|
4655
|
+
}(VehicleClaimDetails$1));
|
|
4656
|
+
__decorate([
|
|
4657
|
+
classTransformer.Type(function () { return User; })
|
|
4658
|
+
], VehicleClaimDetails.prototype, "user", void 0);
|
|
4659
|
+
|
|
4660
|
+
var VehicleClaim = /** @class */ (function (_super) {
|
|
4661
|
+
__extends(VehicleClaim, _super);
|
|
4662
|
+
function VehicleClaim() {
|
|
4663
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
4664
|
+
_this.kilometers = 0;
|
|
4665
|
+
_this.workUsage = 0;
|
|
4666
|
+
return _this;
|
|
4667
|
+
}
|
|
4668
|
+
VehicleClaim.prototype.isWorkTank = function () {
|
|
4669
|
+
return !this.business;
|
|
4541
4670
|
};
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
*/
|
|
4545
|
-
Depreciation.prototype.toTransaction = function (params) {
|
|
4546
|
-
if (params === void 0) { params = {}; }
|
|
4547
|
-
return classTransformer.plainToClass(Transaction, Object.assign(params, this, { amount: -this.claimAmount, claimAmount: -this.amount * (this.claimPercent / 100) }));
|
|
4671
|
+
VehicleClaim.prototype.isSoleTank = function () {
|
|
4672
|
+
return !!this.business;
|
|
4548
4673
|
};
|
|
4549
|
-
Object.defineProperty(
|
|
4550
|
-
/**
|
|
4551
|
-
* @TODO Michael: remove and check everywhere in reports
|
|
4552
|
-
*/
|
|
4674
|
+
Object.defineProperty(VehicleClaim.prototype, "tankType", {
|
|
4553
4675
|
get: function () {
|
|
4554
|
-
|
|
4555
|
-
return ((_a = this.currentYearForecast) === null || _a === void 0 ? void 0 : _a.claimAmount) || 0;
|
|
4676
|
+
return this.isSoleTank() ? exports.TankTypeEnum.SOLE : exports.TankTypeEnum.WORK;
|
|
4556
4677
|
},
|
|
4557
4678
|
enumerable: false,
|
|
4558
4679
|
configurable: true
|
|
4559
4680
|
});
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
!(obj.writeOffDate && new FinancialYear(new Date(obj.writeOffDate)).year === obj.financialYear);
|
|
4597
|
-
});
|
|
4598
|
-
return value;
|
|
4599
|
-
})
|
|
4600
|
-
], Depreciation.prototype, "forecasts", void 0);
|
|
4681
|
+
/**
|
|
4682
|
+
* Claim amount for KMs method. Exists only for KMs method.
|
|
4683
|
+
*/
|
|
4684
|
+
VehicleClaim.prototype.getKMSClaimAmount = function (vehicleClaimRate) {
|
|
4685
|
+
return +(this.kilometers * vehicleClaimRate).toFixed(2);
|
|
4686
|
+
};
|
|
4687
|
+
/**
|
|
4688
|
+
* Get logbook claim amount. Exists only for logbook method.
|
|
4689
|
+
* ClaimAmount = WorkUsage * transaction/depreciation amount
|
|
4690
|
+
*/
|
|
4691
|
+
VehicleClaim.prototype.getLogbookClaimAmount = function (transactions) {
|
|
4692
|
+
var transactionsAmount = transactions
|
|
4693
|
+
.getByVehicleClaim(this)
|
|
4694
|
+
.getLogbookTransactions()
|
|
4695
|
+
.sumBy('amount');
|
|
4696
|
+
// Math.abs because amount will be negative (because we sum expenses), but we don't want negative percent value
|
|
4697
|
+
return Math.abs(transactionsAmount) * this.workUsage / 100;
|
|
4698
|
+
};
|
|
4699
|
+
VehicleClaim.prototype.getAverageWeeklyKMS = function () {
|
|
4700
|
+
return this.kilometers / FinancialYear.weeksInYear;
|
|
4701
|
+
};
|
|
4702
|
+
VehicleClaim.getKMSChartAccountsIdByTankType = function (tankType) {
|
|
4703
|
+
return tankType === exports.TankTypeEnum.WORK
|
|
4704
|
+
? exports.ChartAccountsListEnum.KLMS_TRAVELLED_FOR_WORK
|
|
4705
|
+
: exports.ChartAccountsListEnum.KLMS_TRAVELLED;
|
|
4706
|
+
};
|
|
4707
|
+
return VehicleClaim;
|
|
4708
|
+
}(VehicleClaim$1));
|
|
4709
|
+
/**
|
|
4710
|
+
* limit for kms claim method
|
|
4711
|
+
*/
|
|
4712
|
+
VehicleClaim.totalKmsLimit = 5000;
|
|
4713
|
+
/**
|
|
4714
|
+
* limit for work usage claim method
|
|
4715
|
+
*/
|
|
4716
|
+
VehicleClaim.totalWorkUsagePercent = 100;
|
|
4601
4717
|
__decorate([
|
|
4602
|
-
classTransformer.Type(function () { return
|
|
4603
|
-
],
|
|
4718
|
+
classTransformer.Type(function () { return VehicleClaimDetails; })
|
|
4719
|
+
], VehicleClaim.prototype, "details", void 0);
|
|
4604
4720
|
__decorate([
|
|
4605
|
-
classTransformer.Type(function () { return
|
|
4606
|
-
],
|
|
4721
|
+
classTransformer.Type(function () { return SoleBusiness; })
|
|
4722
|
+
], VehicleClaim.prototype, "business", void 0);
|
|
4607
4723
|
|
|
4608
4724
|
var SoleBusinessActivity$1 = /** @class */ (function (_super) {
|
|
4609
4725
|
__extends(SoleBusinessActivity, _super);
|
|
@@ -4694,6 +4810,25 @@
|
|
|
4694
4810
|
return SoleDepreciationMethod;
|
|
4695
4811
|
}(SoleDepreciationMethod$1));
|
|
4696
4812
|
|
|
4813
|
+
var SoleDetails$1 = /** @class */ (function (_super) {
|
|
4814
|
+
__extends(SoleDetails, _super);
|
|
4815
|
+
function SoleDetails() {
|
|
4816
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4817
|
+
}
|
|
4818
|
+
return SoleDetails;
|
|
4819
|
+
}(AbstractModel));
|
|
4820
|
+
|
|
4821
|
+
var SoleDetails = /** @class */ (function (_super) {
|
|
4822
|
+
__extends(SoleDetails, _super);
|
|
4823
|
+
function SoleDetails() {
|
|
4824
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4825
|
+
}
|
|
4826
|
+
return SoleDetails;
|
|
4827
|
+
}(SoleDetails$1));
|
|
4828
|
+
__decorate([
|
|
4829
|
+
classTransformer.Type(function () { return User; })
|
|
4830
|
+
], SoleDetails.prototype, "user", void 0);
|
|
4831
|
+
|
|
4697
4832
|
var User = /** @class */ (function (_super) {
|
|
4698
4833
|
__extends(User, _super);
|
|
4699
4834
|
function User() {
|
|
@@ -5986,9 +6121,9 @@
|
|
|
5986
6121
|
UserEventTypeTypeEnum.BASIQ_NEW_ACCOUNTS,
|
|
5987
6122
|
UserEventTypeTypeEnum.BASIQ_AUTHORIZATION_FAIL
|
|
5988
6123
|
];
|
|
5989
|
-
BankConnectionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
5990
|
-
BankConnectionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
5991
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6124
|
+
BankConnectionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankConnectionService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6125
|
+
BankConnectionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankConnectionService, providedIn: 'root' });
|
|
6126
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankConnectionService, decorators: [{
|
|
5992
6127
|
type: i0.Injectable,
|
|
5993
6128
|
args: [{
|
|
5994
6129
|
providedIn: 'root'
|
|
@@ -6088,9 +6223,9 @@
|
|
|
6088
6223
|
return BasiqService;
|
|
6089
6224
|
}(RestService));
|
|
6090
6225
|
BasiqService.basiqApiUrl = 'https://au-api.basiq.io';
|
|
6091
|
-
BasiqService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6092
|
-
BasiqService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6093
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6226
|
+
BasiqService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: BankConnectionService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6227
|
+
BasiqService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqService, providedIn: 'root' });
|
|
6228
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqService, decorators: [{
|
|
6094
6229
|
type: i0.Injectable,
|
|
6095
6230
|
args: [{
|
|
6096
6231
|
providedIn: 'root'
|
|
@@ -6142,9 +6277,9 @@
|
|
|
6142
6277
|
};
|
|
6143
6278
|
return BasiqTokenService;
|
|
6144
6279
|
}());
|
|
6145
|
-
BasiqTokenService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6146
|
-
BasiqTokenService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6147
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6280
|
+
BasiqTokenService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqTokenService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6281
|
+
BasiqTokenService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqTokenService, providedIn: 'root' });
|
|
6282
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqTokenService, decorators: [{
|
|
6148
6283
|
type: i0.Injectable,
|
|
6149
6284
|
args: [{
|
|
6150
6285
|
providedIn: 'root'
|
|
@@ -6182,9 +6317,9 @@
|
|
|
6182
6317
|
};
|
|
6183
6318
|
return BasiqTokenInterceptor;
|
|
6184
6319
|
}());
|
|
6185
|
-
BasiqTokenInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6186
|
-
BasiqTokenInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6187
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6320
|
+
BasiqTokenInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqTokenInterceptor, deps: [{ token: BasiqTokenService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6321
|
+
BasiqTokenInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqTokenInterceptor });
|
|
6322
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqTokenInterceptor, decorators: [{
|
|
6188
6323
|
type: i0.Injectable
|
|
6189
6324
|
}], ctorParameters: function () { return [{ type: BasiqTokenService }]; } });
|
|
6190
6325
|
|
|
@@ -6222,9 +6357,9 @@
|
|
|
6222
6357
|
};
|
|
6223
6358
|
return SseService;
|
|
6224
6359
|
}());
|
|
6225
|
-
SseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6226
|
-
SseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6227
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6360
|
+
SseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SseService, deps: [{ token: i0__namespace.NgZone }, { token: JwtService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6361
|
+
SseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SseService, providedIn: 'root' });
|
|
6362
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SseService, decorators: [{
|
|
6228
6363
|
type: i0.Injectable,
|
|
6229
6364
|
args: [{
|
|
6230
6365
|
providedIn: 'root'
|
|
@@ -6389,9 +6524,9 @@
|
|
|
6389
6524
|
};
|
|
6390
6525
|
return UserService;
|
|
6391
6526
|
}());
|
|
6392
|
-
UserService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6393
|
-
UserService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6394
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6527
|
+
UserService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserService, deps: [{ token: i1__namespace.HttpClient }, { token: JwtService }, { token: EventDispatcherService }, { token: SseService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6528
|
+
UserService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserService, providedIn: 'root' });
|
|
6529
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserService, decorators: [{
|
|
6395
6530
|
type: i0.Injectable,
|
|
6396
6531
|
args: [{
|
|
6397
6532
|
providedIn: 'root'
|
|
@@ -6425,9 +6560,9 @@
|
|
|
6425
6560
|
};
|
|
6426
6561
|
return BasiqClientIdInterceptor;
|
|
6427
6562
|
}());
|
|
6428
|
-
BasiqClientIdInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6429
|
-
BasiqClientIdInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
6430
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6563
|
+
BasiqClientIdInterceptor.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqClientIdInterceptor, deps: [{ token: UserService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
6564
|
+
BasiqClientIdInterceptor.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqClientIdInterceptor });
|
|
6565
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BasiqClientIdInterceptor, decorators: [{
|
|
6431
6566
|
type: i0.Injectable
|
|
6432
6567
|
}], ctorParameters: function () { return [{ type: UserService }]; } });
|
|
6433
6568
|
|
|
@@ -6436,9 +6571,9 @@
|
|
|
6436
6571
|
}
|
|
6437
6572
|
return InterceptorsModule;
|
|
6438
6573
|
}());
|
|
6439
|
-
InterceptorsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6440
|
-
InterceptorsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
6441
|
-
InterceptorsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
6574
|
+
InterceptorsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: InterceptorsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
6575
|
+
InterceptorsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: InterceptorsModule });
|
|
6576
|
+
InterceptorsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: InterceptorsModule, providers: [
|
|
6442
6577
|
{
|
|
6443
6578
|
provide: i1.HTTP_INTERCEPTORS,
|
|
6444
6579
|
useClass: CorelogicInterceptor,
|
|
@@ -6476,7 +6611,7 @@
|
|
|
6476
6611
|
multi: true
|
|
6477
6612
|
}
|
|
6478
6613
|
] });
|
|
6479
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6614
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: InterceptorsModule, decorators: [{
|
|
6480
6615
|
type: i0.NgModule,
|
|
6481
6616
|
args: [{
|
|
6482
6617
|
providers: [
|
|
@@ -6537,14 +6672,14 @@
|
|
|
6537
6672
|
};
|
|
6538
6673
|
return TtCoreModule;
|
|
6539
6674
|
}());
|
|
6540
|
-
TtCoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
6541
|
-
TtCoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
6675
|
+
TtCoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TtCoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
6676
|
+
TtCoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TtCoreModule, imports: [i1$1.CommonModule,
|
|
6542
6677
|
InterceptorsModule] });
|
|
6543
|
-
TtCoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
6678
|
+
TtCoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TtCoreModule, imports: [[
|
|
6544
6679
|
i1$1.CommonModule,
|
|
6545
6680
|
InterceptorsModule
|
|
6546
6681
|
]] });
|
|
6547
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
6682
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TtCoreModule, decorators: [{
|
|
6548
6683
|
type: i0.NgModule,
|
|
6549
6684
|
args: [{
|
|
6550
6685
|
declarations: [],
|
|
@@ -6555,6 +6690,65 @@
|
|
|
6555
6690
|
}]
|
|
6556
6691
|
}] });
|
|
6557
6692
|
|
|
6693
|
+
var Document$1 = /** @class */ (function (_super) {
|
|
6694
|
+
__extends(Document, _super);
|
|
6695
|
+
function Document() {
|
|
6696
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6697
|
+
}
|
|
6698
|
+
return Document;
|
|
6699
|
+
}(AbstractModel));
|
|
6700
|
+
|
|
6701
|
+
/**
|
|
6702
|
+
* Enum with document types which used to API url prefix
|
|
6703
|
+
*/
|
|
6704
|
+
exports.DocumentApiUrlPrefixEnum = void 0;
|
|
6705
|
+
(function (DocumentApiUrlPrefixEnum) {
|
|
6706
|
+
DocumentApiUrlPrefixEnum["FOLDERS"] = "folders";
|
|
6707
|
+
DocumentApiUrlPrefixEnum["PROPERTIES"] = "properties";
|
|
6708
|
+
})(exports.DocumentApiUrlPrefixEnum || (exports.DocumentApiUrlPrefixEnum = {}));
|
|
6709
|
+
|
|
6710
|
+
var Document = /** @class */ (function (_super) {
|
|
6711
|
+
__extends(Document, _super);
|
|
6712
|
+
function Document() {
|
|
6713
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
6714
|
+
_this.type = exports.AssetTypeEnum.DOCUMENTS;
|
|
6715
|
+
_this.entityType = exports.AssetEntityTypeEnum.FOLDERS;
|
|
6716
|
+
return _this;
|
|
6717
|
+
}
|
|
6718
|
+
/**
|
|
6719
|
+
* Get folder as document parent entity
|
|
6720
|
+
*/
|
|
6721
|
+
Document.prototype.getEntity = function () {
|
|
6722
|
+
return this.folder;
|
|
6723
|
+
};
|
|
6724
|
+
/**
|
|
6725
|
+
* Get API url prefix
|
|
6726
|
+
*/
|
|
6727
|
+
Document.prototype.getApiUrlPrefix = function () {
|
|
6728
|
+
return exports.DocumentApiUrlPrefixEnum.FOLDERS;
|
|
6729
|
+
};
|
|
6730
|
+
return Document;
|
|
6731
|
+
}(Document$1));
|
|
6732
|
+
|
|
6733
|
+
var DocumentFolder$1 = /** @class */ (function (_super) {
|
|
6734
|
+
__extends(DocumentFolder, _super);
|
|
6735
|
+
function DocumentFolder() {
|
|
6736
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6737
|
+
}
|
|
6738
|
+
return DocumentFolder;
|
|
6739
|
+
}(AbstractModel));
|
|
6740
|
+
|
|
6741
|
+
var DocumentFolder = /** @class */ (function (_super) {
|
|
6742
|
+
__extends(DocumentFolder, _super);
|
|
6743
|
+
function DocumentFolder() {
|
|
6744
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6745
|
+
}
|
|
6746
|
+
return DocumentFolder;
|
|
6747
|
+
}(DocumentFolder$1));
|
|
6748
|
+
__decorate([
|
|
6749
|
+
classTransformer.Type(function () { return Document; })
|
|
6750
|
+
], DocumentFolder.prototype, "documents", void 0);
|
|
6751
|
+
|
|
6558
6752
|
var VehicleClaimCollection = /** @class */ (function (_super) {
|
|
6559
6753
|
__extends(VehicleClaimCollection, _super);
|
|
6560
6754
|
function VehicleClaimCollection() {
|
|
@@ -8433,6 +8627,13 @@
|
|
|
8433
8627
|
return ChartAccountsCategoryECollection;
|
|
8434
8628
|
}());
|
|
8435
8629
|
|
|
8630
|
+
exports.DocumentTypeEnum = void 0;
|
|
8631
|
+
(function (DocumentTypeEnum) {
|
|
8632
|
+
DocumentTypeEnum[DocumentTypeEnum["INVOICE"] = 1] = "INVOICE";
|
|
8633
|
+
})(exports.DocumentTypeEnum || (exports.DocumentTypeEnum = {}));
|
|
8634
|
+
|
|
8635
|
+
// @TODO Artem TT-2308 move everything
|
|
8636
|
+
|
|
8436
8637
|
exports.ChartAccountsEtpEnum = void 0;
|
|
8437
8638
|
(function (ChartAccountsEtpEnum) {
|
|
8438
8639
|
ChartAccountsEtpEnum[ChartAccountsEtpEnum["ETP_R"] = 549] = "ETP_R";
|
|
@@ -9637,7 +9838,7 @@
|
|
|
9637
9838
|
this.items[key] = value;
|
|
9638
9839
|
};
|
|
9639
9840
|
Dictionary.prototype.get = function (key) {
|
|
9640
|
-
return this.items[key] ? this.items[key] : null;
|
|
9841
|
+
return this.items[key] !== undefined ? this.items[key] : null;
|
|
9641
9842
|
};
|
|
9642
9843
|
Dictionary.prototype.groupItems = function (items, path) {
|
|
9643
9844
|
var _this = this;
|
|
@@ -9737,58 +9938,18 @@
|
|
|
9737
9938
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
9738
9939
|
}
|
|
9739
9940
|
return DepreciationReceipt;
|
|
9740
|
-
}(AbstractModel));
|
|
9741
|
-
|
|
9742
|
-
var DepreciationReceipt = /** @class */ (function (_super) {
|
|
9743
|
-
__extends(DepreciationReceipt, _super);
|
|
9744
|
-
function DepreciationReceipt() {
|
|
9745
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
9746
|
-
_this.type = exports.AssetTypeEnum.RECEIPTS;
|
|
9747
|
-
_this.entityType = exports.AssetEntityTypeEnum.DEPRECIATIONS;
|
|
9748
|
-
return _this;
|
|
9749
|
-
}
|
|
9750
|
-
return DepreciationReceipt;
|
|
9751
|
-
}(DepreciationReceipt$1));
|
|
9752
|
-
|
|
9753
|
-
var Document$1 = /** @class */ (function (_super) {
|
|
9754
|
-
__extends(Document, _super);
|
|
9755
|
-
function Document() {
|
|
9756
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
9757
|
-
}
|
|
9758
|
-
return Document;
|
|
9759
|
-
}(AbstractModel));
|
|
9760
|
-
|
|
9761
|
-
/**
|
|
9762
|
-
* Enum with document types which used to API url prefix
|
|
9763
|
-
*/
|
|
9764
|
-
exports.DocumentApiUrlPrefixEnum = void 0;
|
|
9765
|
-
(function (DocumentApiUrlPrefixEnum) {
|
|
9766
|
-
DocumentApiUrlPrefixEnum["FOLDERS"] = "folders";
|
|
9767
|
-
DocumentApiUrlPrefixEnum["PROPERTIES"] = "properties";
|
|
9768
|
-
})(exports.DocumentApiUrlPrefixEnum || (exports.DocumentApiUrlPrefixEnum = {}));
|
|
9769
|
-
|
|
9770
|
-
var Document = /** @class */ (function (_super) {
|
|
9771
|
-
__extends(Document, _super);
|
|
9772
|
-
function Document() {
|
|
9773
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
9774
|
-
_this.type = exports.AssetTypeEnum.DOCUMENTS;
|
|
9775
|
-
_this.entityType = exports.AssetEntityTypeEnum.FOLDERS;
|
|
9776
|
-
return _this;
|
|
9777
|
-
}
|
|
9778
|
-
/**
|
|
9779
|
-
* Get folder as document parent entity
|
|
9780
|
-
*/
|
|
9781
|
-
Document.prototype.getEntity = function () {
|
|
9782
|
-
return this.folder;
|
|
9783
|
-
};
|
|
9784
|
-
/**
|
|
9785
|
-
* Get API url prefix
|
|
9786
|
-
*/
|
|
9787
|
-
Document.prototype.getApiUrlPrefix = function () {
|
|
9788
|
-
return exports.DocumentApiUrlPrefixEnum.FOLDERS;
|
|
9789
|
-
};
|
|
9790
|
-
return Document;
|
|
9791
|
-
}(Document$1));
|
|
9941
|
+
}(AbstractModel));
|
|
9942
|
+
|
|
9943
|
+
var DepreciationReceipt = /** @class */ (function (_super) {
|
|
9944
|
+
__extends(DepreciationReceipt, _super);
|
|
9945
|
+
function DepreciationReceipt() {
|
|
9946
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
9947
|
+
_this.type = exports.AssetTypeEnum.RECEIPTS;
|
|
9948
|
+
_this.entityType = exports.AssetEntityTypeEnum.DEPRECIATIONS;
|
|
9949
|
+
return _this;
|
|
9950
|
+
}
|
|
9951
|
+
return DepreciationReceipt;
|
|
9952
|
+
}(DepreciationReceipt$1));
|
|
9792
9953
|
|
|
9793
9954
|
var DOCUMENT_FILE_TYPES = {
|
|
9794
9955
|
image: [
|
|
@@ -9813,25 +9974,6 @@
|
|
|
9813
9974
|
]
|
|
9814
9975
|
};
|
|
9815
9976
|
|
|
9816
|
-
var DocumentFolder$1 = /** @class */ (function (_super) {
|
|
9817
|
-
__extends(DocumentFolder, _super);
|
|
9818
|
-
function DocumentFolder() {
|
|
9819
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
9820
|
-
}
|
|
9821
|
-
return DocumentFolder;
|
|
9822
|
-
}(AbstractModel));
|
|
9823
|
-
|
|
9824
|
-
var DocumentFolder = /** @class */ (function (_super) {
|
|
9825
|
-
__extends(DocumentFolder, _super);
|
|
9826
|
-
function DocumentFolder() {
|
|
9827
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
9828
|
-
}
|
|
9829
|
-
return DocumentFolder;
|
|
9830
|
-
}(DocumentFolder$1));
|
|
9831
|
-
__decorate([
|
|
9832
|
-
classTransformer.Type(function () { return Document; })
|
|
9833
|
-
], DocumentFolder.prototype, "documents", void 0);
|
|
9834
|
-
|
|
9835
9977
|
var EmployeeInvite$1 = /** @class */ (function (_super) {
|
|
9836
9978
|
__extends(EmployeeInvite, _super);
|
|
9837
9979
|
function EmployeeInvite() {
|
|
@@ -11530,9 +11672,9 @@
|
|
|
11530
11672
|
};
|
|
11531
11673
|
return SoleBusinessService;
|
|
11532
11674
|
}(RestService));
|
|
11533
|
-
SoleBusinessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11534
|
-
SoleBusinessService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11535
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11675
|
+
SoleBusinessService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11676
|
+
SoleBusinessService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessService, providedIn: 'root' });
|
|
11677
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessService, decorators: [{
|
|
11536
11678
|
type: i0.Injectable,
|
|
11537
11679
|
args: [{
|
|
11538
11680
|
providedIn: 'root'
|
|
@@ -11550,9 +11692,9 @@
|
|
|
11550
11692
|
}
|
|
11551
11693
|
return SoleBusinessActivityService;
|
|
11552
11694
|
}(RestService));
|
|
11553
|
-
SoleBusinessActivityService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11554
|
-
SoleBusinessActivityService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11555
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11695
|
+
SoleBusinessActivityService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessActivityService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11696
|
+
SoleBusinessActivityService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessActivityService, providedIn: 'root' });
|
|
11697
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessActivityService, decorators: [{
|
|
11556
11698
|
type: i0.Injectable,
|
|
11557
11699
|
args: [{
|
|
11558
11700
|
providedIn: 'root'
|
|
@@ -11570,9 +11712,9 @@
|
|
|
11570
11712
|
}
|
|
11571
11713
|
return SoleBusinessLossService;
|
|
11572
11714
|
}(RestService));
|
|
11573
|
-
SoleBusinessLossService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11574
|
-
SoleBusinessLossService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11575
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11715
|
+
SoleBusinessLossService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessLossService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11716
|
+
SoleBusinessLossService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessLossService, providedIn: 'root' });
|
|
11717
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleBusinessLossService, decorators: [{
|
|
11576
11718
|
type: i0.Injectable,
|
|
11577
11719
|
args: [{
|
|
11578
11720
|
providedIn: 'root'
|
|
@@ -11590,9 +11732,9 @@
|
|
|
11590
11732
|
}
|
|
11591
11733
|
return SoleContactService;
|
|
11592
11734
|
}(RestService));
|
|
11593
|
-
SoleContactService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11594
|
-
SoleContactService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11595
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11735
|
+
SoleContactService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleContactService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11736
|
+
SoleContactService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleContactService, providedIn: 'root' });
|
|
11737
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleContactService, decorators: [{
|
|
11596
11738
|
type: i0.Injectable,
|
|
11597
11739
|
args: [{
|
|
11598
11740
|
providedIn: 'root'
|
|
@@ -11652,9 +11794,9 @@
|
|
|
11652
11794
|
};
|
|
11653
11795
|
return SoleDepreciationMethodService;
|
|
11654
11796
|
}());
|
|
11655
|
-
SoleDepreciationMethodService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11656
|
-
SoleDepreciationMethodService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11657
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11797
|
+
SoleDepreciationMethodService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleDepreciationMethodService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }, { token: EventDispatcherService }, { token: ToastService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11798
|
+
SoleDepreciationMethodService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleDepreciationMethodService, providedIn: 'root' });
|
|
11799
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleDepreciationMethodService, decorators: [{
|
|
11658
11800
|
type: i0.Injectable,
|
|
11659
11801
|
args: [{
|
|
11660
11802
|
providedIn: 'root'
|
|
@@ -11713,9 +11855,9 @@
|
|
|
11713
11855
|
};
|
|
11714
11856
|
return SoleDetailsService;
|
|
11715
11857
|
}());
|
|
11716
|
-
SoleDetailsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11717
|
-
SoleDetailsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11718
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11858
|
+
SoleDetailsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleDetailsService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }, { token: EventDispatcherService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11859
|
+
SoleDetailsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleDetailsService, providedIn: 'root' });
|
|
11860
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleDetailsService, decorators: [{
|
|
11719
11861
|
type: i0.Injectable,
|
|
11720
11862
|
args: [{
|
|
11721
11863
|
providedIn: 'root'
|
|
@@ -11736,11 +11878,22 @@
|
|
|
11736
11878
|
_this.isHydra = true;
|
|
11737
11879
|
return _this;
|
|
11738
11880
|
}
|
|
11881
|
+
SoleInvoiceService.prototype.updateStatus = function (invoice, status) {
|
|
11882
|
+
// use id only to avoid unexpected changes
|
|
11883
|
+
return this.update(classTransformer.plainToClass(SoleInvoice, merge__default["default"]({}, { id: invoice.id }, { status: status })));
|
|
11884
|
+
};
|
|
11885
|
+
SoleInvoiceService.prototype.publish = function (invoice, document) {
|
|
11886
|
+
// use id only to avoid unexpected changes
|
|
11887
|
+
return this.update(merge__default["default"]({}, invoice, { document: document, status: exports.SoleInvoiceStatusesEnum.PENDING }));
|
|
11888
|
+
};
|
|
11889
|
+
SoleInvoiceService.prototype.sendEmail = function (invoice) {
|
|
11890
|
+
return this.http.post(this.environment.apiV2 + "/" + this.url + "/" + invoice.id + "/send", {});
|
|
11891
|
+
};
|
|
11739
11892
|
return SoleInvoiceService;
|
|
11740
11893
|
}(RestService));
|
|
11741
|
-
SoleInvoiceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11742
|
-
SoleInvoiceService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11743
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11894
|
+
SoleInvoiceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleInvoiceService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11895
|
+
SoleInvoiceService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleInvoiceService, providedIn: 'root' });
|
|
11896
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleInvoiceService, decorators: [{
|
|
11744
11897
|
type: i0.Injectable,
|
|
11745
11898
|
args: [{
|
|
11746
11899
|
providedIn: 'root'
|
|
@@ -11758,9 +11911,9 @@
|
|
|
11758
11911
|
}
|
|
11759
11912
|
return SoleInvoiceTemplateService;
|
|
11760
11913
|
}(RestService));
|
|
11761
|
-
SoleInvoiceTemplateService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11762
|
-
SoleInvoiceTemplateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11763
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11914
|
+
SoleInvoiceTemplateService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleInvoiceTemplateService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11915
|
+
SoleInvoiceTemplateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleInvoiceTemplateService, providedIn: 'root' });
|
|
11916
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleInvoiceTemplateService, decorators: [{
|
|
11764
11917
|
type: i0.Injectable,
|
|
11765
11918
|
args: [{
|
|
11766
11919
|
providedIn: 'root'
|
|
@@ -11780,9 +11933,9 @@
|
|
|
11780
11933
|
}
|
|
11781
11934
|
return VehicleService;
|
|
11782
11935
|
}(RestService));
|
|
11783
|
-
VehicleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11784
|
-
VehicleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11785
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
11936
|
+
VehicleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11937
|
+
VehicleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleService, providedIn: 'root' });
|
|
11938
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleService, decorators: [{
|
|
11786
11939
|
type: i0.Injectable,
|
|
11787
11940
|
args: [{
|
|
11788
11941
|
providedIn: 'root'
|
|
@@ -11863,9 +12016,9 @@
|
|
|
11863
12016
|
};
|
|
11864
12017
|
return VehicleClaimService;
|
|
11865
12018
|
}(RestService));
|
|
11866
|
-
VehicleClaimService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11867
|
-
VehicleClaimService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11868
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12019
|
+
VehicleClaimService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleClaimService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12020
|
+
VehicleClaimService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleClaimService, providedIn: 'root' });
|
|
12021
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleClaimService, decorators: [{
|
|
11869
12022
|
type: i0.Injectable,
|
|
11870
12023
|
args: [{
|
|
11871
12024
|
providedIn: 'root'
|
|
@@ -11947,9 +12100,9 @@
|
|
|
11947
12100
|
};
|
|
11948
12101
|
return VehicleClaimDetailsService;
|
|
11949
12102
|
}());
|
|
11950
|
-
VehicleClaimDetailsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11951
|
-
VehicleClaimDetailsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11952
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12103
|
+
VehicleClaimDetailsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleClaimDetailsService, deps: [{ token: 'environment' }, { token: i1__namespace.HttpClient }, { token: EventDispatcherService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12104
|
+
VehicleClaimDetailsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleClaimDetailsService, providedIn: 'root' });
|
|
12105
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleClaimDetailsService, decorators: [{
|
|
11953
12106
|
type: i0.Injectable,
|
|
11954
12107
|
args: [{
|
|
11955
12108
|
providedIn: 'root'
|
|
@@ -11974,9 +12127,9 @@
|
|
|
11974
12127
|
}
|
|
11975
12128
|
return VehicleLogbookService;
|
|
11976
12129
|
}(RestService));
|
|
11977
|
-
VehicleLogbookService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11978
|
-
VehicleLogbookService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
11979
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12130
|
+
VehicleLogbookService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleLogbookService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12131
|
+
VehicleLogbookService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleLogbookService, providedIn: 'root' });
|
|
12132
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VehicleLogbookService, decorators: [{
|
|
11980
12133
|
type: i0.Injectable,
|
|
11981
12134
|
args: [{
|
|
11982
12135
|
providedIn: 'root'
|
|
@@ -12011,9 +12164,9 @@
|
|
|
12011
12164
|
};
|
|
12012
12165
|
return OccupationService;
|
|
12013
12166
|
}());
|
|
12014
|
-
OccupationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12015
|
-
OccupationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12016
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12167
|
+
OccupationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OccupationService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12168
|
+
OccupationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OccupationService, providedIn: 'root' });
|
|
12169
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: OccupationService, decorators: [{
|
|
12017
12170
|
type: i0.Injectable,
|
|
12018
12171
|
args: [{
|
|
12019
12172
|
providedIn: 'root'
|
|
@@ -12063,9 +12216,9 @@
|
|
|
12063
12216
|
};
|
|
12064
12217
|
return UserEventSettingService;
|
|
12065
12218
|
}(RestService));
|
|
12066
|
-
UserEventSettingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12067
|
-
UserEventSettingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12068
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12219
|
+
UserEventSettingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserEventSettingService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12220
|
+
UserEventSettingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserEventSettingService, providedIn: 'root' });
|
|
12221
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserEventSettingService, decorators: [{
|
|
12069
12222
|
type: i0.Injectable,
|
|
12070
12223
|
args: [{
|
|
12071
12224
|
providedIn: 'root'
|
|
@@ -12083,9 +12236,9 @@
|
|
|
12083
12236
|
}
|
|
12084
12237
|
return UserEventTypeService;
|
|
12085
12238
|
}(RestService));
|
|
12086
|
-
UserEventTypeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12087
|
-
UserEventTypeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12088
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12239
|
+
UserEventTypeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserEventTypeService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12240
|
+
UserEventTypeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserEventTypeService, providedIn: 'root' });
|
|
12241
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UserEventTypeService, decorators: [{
|
|
12089
12242
|
type: i0.Injectable,
|
|
12090
12243
|
args: [{
|
|
12091
12244
|
providedIn: 'root'
|
|
@@ -12105,9 +12258,102 @@
|
|
|
12105
12258
|
}
|
|
12106
12259
|
return UsersInviteService;
|
|
12107
12260
|
}(RestService));
|
|
12108
|
-
UsersInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12109
|
-
UsersInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12110
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12261
|
+
UsersInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UsersInviteService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12262
|
+
UsersInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UsersInviteService, providedIn: 'root' });
|
|
12263
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: UsersInviteService, decorators: [{
|
|
12264
|
+
type: i0.Injectable,
|
|
12265
|
+
args: [{
|
|
12266
|
+
providedIn: 'root'
|
|
12267
|
+
}]
|
|
12268
|
+
}] });
|
|
12269
|
+
|
|
12270
|
+
var DocumentService = /** @class */ (function (_super) {
|
|
12271
|
+
__extends(DocumentService, _super);
|
|
12272
|
+
function DocumentService() {
|
|
12273
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
12274
|
+
_this.url = 'documents';
|
|
12275
|
+
_this.modelClass = Document;
|
|
12276
|
+
return _this;
|
|
12277
|
+
}
|
|
12278
|
+
return DocumentService;
|
|
12279
|
+
}(RestService));
|
|
12280
|
+
DocumentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DocumentService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12281
|
+
DocumentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DocumentService, providedIn: 'root' });
|
|
12282
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DocumentService, decorators: [{
|
|
12283
|
+
type: i0.Injectable,
|
|
12284
|
+
args: [{
|
|
12285
|
+
providedIn: 'root'
|
|
12286
|
+
}]
|
|
12287
|
+
}] });
|
|
12288
|
+
|
|
12289
|
+
/**
|
|
12290
|
+
* Service to handle document-folders and depending documents logic
|
|
12291
|
+
*/
|
|
12292
|
+
var DocumentFolderService = /** @class */ (function (_super) {
|
|
12293
|
+
__extends(DocumentFolderService, _super);
|
|
12294
|
+
function DocumentFolderService() {
|
|
12295
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
12296
|
+
_this.url = 'folders';
|
|
12297
|
+
_this.modelClass = DocumentFolder;
|
|
12298
|
+
return _this;
|
|
12299
|
+
}
|
|
12300
|
+
/**
|
|
12301
|
+
* Add new document to the folder
|
|
12302
|
+
* @param file to be uploaded to the folder
|
|
12303
|
+
* @param folder for document
|
|
12304
|
+
*/
|
|
12305
|
+
DocumentFolderService.prototype.addDocument = function (file, folder) {
|
|
12306
|
+
var _this = this;
|
|
12307
|
+
// create formData object with provided file
|
|
12308
|
+
var formDataDocument = new FormData();
|
|
12309
|
+
formDataDocument.append('file', file);
|
|
12310
|
+
return this.http.post(this.environment.apiV2 + "/folders/" + folder.id + "/documents", formDataDocument).pipe(operators.map(function (response) {
|
|
12311
|
+
var updatedFolder = Object.assign(classTransformer.plainToClass(DocumentFolder, {}), folder);
|
|
12312
|
+
updatedFolder.documents.push(classTransformer.plainToClass(Document, response));
|
|
12313
|
+
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, updatedFolder));
|
|
12314
|
+
_this.cacheSubject.next(_this.cache);
|
|
12315
|
+
}));
|
|
12316
|
+
};
|
|
12317
|
+
/**
|
|
12318
|
+
* Edit folder document by moving it from one folder to another
|
|
12319
|
+
* @param editedDocument
|
|
12320
|
+
* @param selectedFolder to move the document to
|
|
12321
|
+
* @param oldFolderId: id of old folder from which need to remove the document
|
|
12322
|
+
*/
|
|
12323
|
+
DocumentFolderService.prototype.updateDocument = function (editedDocument, selectedFolder, oldFolderId) {
|
|
12324
|
+
var _this = this;
|
|
12325
|
+
return this.http.put(this.environment.apiV2 + "/folders/" + selectedFolder.id + "/documents/" + editedDocument.id, editedDocument).pipe(operators.map(function (response) {
|
|
12326
|
+
var oldFolder = _this.cache.find(function (folder) { return folder.id === oldFolderId; });
|
|
12327
|
+
// Remove document from old folder
|
|
12328
|
+
oldFolder.documents = oldFolder.documents.filter(function (deletedDocument) { return deletedDocument.id !== response.id; });
|
|
12329
|
+
// update old folder and replace it in cache
|
|
12330
|
+
response.folder = classTransformer.plainToClass(DocumentFolder, { id: selectedFolder.id, name: selectedFolder.name });
|
|
12331
|
+
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, oldFolder));
|
|
12332
|
+
// update new document folder and replace it in cache
|
|
12333
|
+
selectedFolder.documents.push(classTransformer.plainToClass(Document, response));
|
|
12334
|
+
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, selectedFolder));
|
|
12335
|
+
_this.cacheSubject.next(_this.cache);
|
|
12336
|
+
}));
|
|
12337
|
+
};
|
|
12338
|
+
/**
|
|
12339
|
+
* Delete document from folder
|
|
12340
|
+
* @param document to remove
|
|
12341
|
+
* @param folder from which document should be removed
|
|
12342
|
+
*/
|
|
12343
|
+
DocumentFolderService.prototype.deleteDocument = function (document, folder) {
|
|
12344
|
+
var _this = this;
|
|
12345
|
+
return this.http.delete(this.environment.apiV2 + "/folders/" + folder.id + "/documents/" + document.id).pipe(operators.map(function () {
|
|
12346
|
+
folder.documents = folder.documents
|
|
12347
|
+
.filter(function (deletedDocument) { return deletedDocument.id !== document.id; });
|
|
12348
|
+
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, folder));
|
|
12349
|
+
_this.cacheSubject.next(_this.cache);
|
|
12350
|
+
}));
|
|
12351
|
+
};
|
|
12352
|
+
return DocumentFolderService;
|
|
12353
|
+
}(RestService));
|
|
12354
|
+
DocumentFolderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DocumentFolderService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12355
|
+
DocumentFolderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DocumentFolderService, providedIn: 'root' });
|
|
12356
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DocumentFolderService, decorators: [{
|
|
12111
12357
|
type: i0.Injectable,
|
|
12112
12358
|
args: [{
|
|
12113
12359
|
providedIn: 'root'
|
|
@@ -12135,9 +12381,9 @@
|
|
|
12135
12381
|
};
|
|
12136
12382
|
return RewardfulService;
|
|
12137
12383
|
}());
|
|
12138
|
-
RewardfulService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12139
|
-
RewardfulService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12140
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12384
|
+
RewardfulService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RewardfulService, deps: [{ token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12385
|
+
RewardfulService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RewardfulService, providedIn: 'root' });
|
|
12386
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RewardfulService, decorators: [{
|
|
12141
12387
|
type: i0.Injectable,
|
|
12142
12388
|
args: [{
|
|
12143
12389
|
providedIn: 'root'
|
|
@@ -12206,9 +12452,9 @@
|
|
|
12206
12452
|
};
|
|
12207
12453
|
return LogbookBestPeriodService;
|
|
12208
12454
|
}());
|
|
12209
|
-
LogbookBestPeriodService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12210
|
-
LogbookBestPeriodService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12211
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12455
|
+
LogbookBestPeriodService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LogbookBestPeriodService, deps: [{ token: VehicleClaimDetailsService }, { token: VehicleClaimService }, { token: VehicleLogbookService }, { token: EventDispatcherService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12456
|
+
LogbookBestPeriodService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LogbookBestPeriodService, providedIn: 'root' });
|
|
12457
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LogbookBestPeriodService, decorators: [{
|
|
12212
12458
|
type: i0.Injectable,
|
|
12213
12459
|
args: [{
|
|
12214
12460
|
providedIn: 'root'
|
|
@@ -12318,9 +12564,9 @@
|
|
|
12318
12564
|
};
|
|
12319
12565
|
return ClientIncomeTypesService;
|
|
12320
12566
|
}());
|
|
12321
|
-
ClientIncomeTypesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12322
|
-
ClientIncomeTypesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12323
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12567
|
+
ClientIncomeTypesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientIncomeTypesService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12568
|
+
ClientIncomeTypesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientIncomeTypesService, providedIn: 'root' });
|
|
12569
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientIncomeTypesService, decorators: [{
|
|
12324
12570
|
type: i0.Injectable,
|
|
12325
12571
|
args: [{
|
|
12326
12572
|
providedIn: 'root'
|
|
@@ -12464,9 +12710,9 @@
|
|
|
12464
12710
|
};
|
|
12465
12711
|
return PropertyService;
|
|
12466
12712
|
}(RestService));
|
|
12467
|
-
PropertyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12468
|
-
PropertyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12469
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12713
|
+
PropertyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12714
|
+
PropertyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyService, providedIn: 'root' });
|
|
12715
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyService, decorators: [{
|
|
12470
12716
|
type: i0.Injectable,
|
|
12471
12717
|
args: [{
|
|
12472
12718
|
providedIn: 'root'
|
|
@@ -12568,14 +12814,15 @@
|
|
|
12568
12814
|
IncomeSourceService.prototype.listenSoleBusinessCreated = function () {
|
|
12569
12815
|
var _this = this;
|
|
12570
12816
|
this.eventDispatcherService.on(exports.AppEventTypeEnum.SOLE_BUSINESS_CREATED).subscribe(function () {
|
|
12817
|
+
// @TODO Alex/Vik (TT-1777): we clear cache a lot, a better and easier way required, add todo and task to refactor
|
|
12571
12818
|
_this.resetCache();
|
|
12572
12819
|
});
|
|
12573
12820
|
};
|
|
12574
12821
|
return IncomeSourceService;
|
|
12575
12822
|
}(RestService));
|
|
12576
|
-
IncomeSourceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12577
|
-
IncomeSourceService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12578
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12823
|
+
IncomeSourceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IncomeSourceService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12824
|
+
IncomeSourceService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IncomeSourceService, providedIn: 'root' });
|
|
12825
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IncomeSourceService, decorators: [{
|
|
12579
12826
|
type: i0.Injectable,
|
|
12580
12827
|
args: [{
|
|
12581
12828
|
providedIn: 'root'
|
|
@@ -12683,9 +12930,9 @@
|
|
|
12683
12930
|
};
|
|
12684
12931
|
return BankAccountService;
|
|
12685
12932
|
}(RestService));
|
|
12686
|
-
BankAccountService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12687
|
-
BankAccountService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12688
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
12933
|
+
BankAccountService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankAccountService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12934
|
+
BankAccountService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankAccountService, providedIn: 'root' });
|
|
12935
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankAccountService, decorators: [{
|
|
12689
12936
|
type: i0.Injectable,
|
|
12690
12937
|
args: [{
|
|
12691
12938
|
providedIn: 'root'
|
|
@@ -12765,9 +13012,9 @@
|
|
|
12765
13012
|
};
|
|
12766
13013
|
return TransactionAllocationService;
|
|
12767
13014
|
}(RestService));
|
|
12768
|
-
TransactionAllocationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12769
|
-
TransactionAllocationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12770
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13015
|
+
TransactionAllocationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionAllocationService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13016
|
+
TransactionAllocationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionAllocationService, providedIn: 'root' });
|
|
13017
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionAllocationService, decorators: [{
|
|
12771
13018
|
type: i0.Injectable,
|
|
12772
13019
|
args: [{
|
|
12773
13020
|
providedIn: 'root'
|
|
@@ -12848,9 +13095,9 @@
|
|
|
12848
13095
|
};
|
|
12849
13096
|
return ReceiptService;
|
|
12850
13097
|
}());
|
|
12851
|
-
ReceiptService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12852
|
-
ReceiptService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12853
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13098
|
+
ReceiptService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReceiptService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13099
|
+
ReceiptService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReceiptService, providedIn: 'root' });
|
|
13100
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ReceiptService, decorators: [{
|
|
12854
13101
|
type: i0.Injectable,
|
|
12855
13102
|
args: [{
|
|
12856
13103
|
providedIn: 'root'
|
|
@@ -12884,9 +13131,9 @@
|
|
|
12884
13131
|
}
|
|
12885
13132
|
return TransactionReceiptService;
|
|
12886
13133
|
}(ReceiptService));
|
|
12887
|
-
TransactionReceiptService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
12888
|
-
TransactionReceiptService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
12889
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13134
|
+
TransactionReceiptService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionReceiptService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13135
|
+
TransactionReceiptService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionReceiptService, providedIn: 'root' });
|
|
13136
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionReceiptService, decorators: [{
|
|
12890
13137
|
type: i0.Injectable,
|
|
12891
13138
|
args: [{
|
|
12892
13139
|
providedIn: 'root'
|
|
@@ -13231,9 +13478,9 @@
|
|
|
13231
13478
|
};
|
|
13232
13479
|
return TransactionService;
|
|
13233
13480
|
}(RestService));
|
|
13234
|
-
TransactionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13235
|
-
TransactionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13236
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13481
|
+
TransactionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: TransactionReceiptService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13482
|
+
TransactionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionService, providedIn: 'root' });
|
|
13483
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionService, decorators: [{
|
|
13237
13484
|
type: i0.Injectable,
|
|
13238
13485
|
args: [{
|
|
13239
13486
|
providedIn: 'root'
|
|
@@ -13374,9 +13621,9 @@
|
|
|
13374
13621
|
};
|
|
13375
13622
|
return AccountSetupService;
|
|
13376
13623
|
}());
|
|
13377
|
-
AccountSetupService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13378
|
-
AccountSetupService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13379
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13624
|
+
AccountSetupService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AccountSetupService, deps: [{ token: ClientIncomeTypesService }, { token: PropertyService }, { token: IncomeSourceService }, { token: BankAccountService }, { token: TransactionAllocationService }, { token: VehicleClaimService }, { token: TransactionService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13625
|
+
AccountSetupService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AccountSetupService, providedIn: 'root' });
|
|
13626
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AccountSetupService, decorators: [{
|
|
13380
13627
|
type: i0.Injectable,
|
|
13381
13628
|
args: [{
|
|
13382
13629
|
providedIn: 'root'
|
|
@@ -13405,9 +13652,9 @@
|
|
|
13405
13652
|
};
|
|
13406
13653
|
return AddressService;
|
|
13407
13654
|
}());
|
|
13408
|
-
AddressService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13409
|
-
AddressService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13410
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13655
|
+
AddressService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AddressService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13656
|
+
AddressService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AddressService, providedIn: 'root' });
|
|
13657
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AddressService, decorators: [{
|
|
13411
13658
|
type: i0.Injectable,
|
|
13412
13659
|
args: [{
|
|
13413
13660
|
providedIn: 'root'
|
|
@@ -13455,9 +13702,9 @@
|
|
|
13455
13702
|
};
|
|
13456
13703
|
return AssetsService;
|
|
13457
13704
|
}());
|
|
13458
|
-
AssetsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13459
|
-
AssetsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13460
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13705
|
+
AssetsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AssetsService, deps: [{ token: i1__namespace.HttpClient }, { token: UserSwitcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13706
|
+
AssetsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AssetsService, providedIn: 'root' });
|
|
13707
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AssetsService, decorators: [{
|
|
13461
13708
|
type: i0.Injectable,
|
|
13462
13709
|
args: [{
|
|
13463
13710
|
providedIn: 'root'
|
|
@@ -13489,9 +13736,9 @@
|
|
|
13489
13736
|
};
|
|
13490
13737
|
return BankService;
|
|
13491
13738
|
}(RestService));
|
|
13492
|
-
BankService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13493
|
-
BankService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13494
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13739
|
+
BankService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13740
|
+
BankService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankService, providedIn: 'root' });
|
|
13741
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankService, decorators: [{
|
|
13495
13742
|
type: i0.Injectable,
|
|
13496
13743
|
args: [{
|
|
13497
13744
|
providedIn: 'root'
|
|
@@ -13556,9 +13803,9 @@
|
|
|
13556
13803
|
};
|
|
13557
13804
|
return BankTransactionCalculationService;
|
|
13558
13805
|
}());
|
|
13559
|
-
BankTransactionCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13560
|
-
BankTransactionCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13561
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13806
|
+
BankTransactionCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankTransactionCalculationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13807
|
+
BankTransactionCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankTransactionCalculationService, providedIn: 'root' });
|
|
13808
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankTransactionCalculationService, decorators: [{
|
|
13562
13809
|
type: i0.Injectable,
|
|
13563
13810
|
args: [{
|
|
13564
13811
|
providedIn: 'root'
|
|
@@ -13588,9 +13835,9 @@
|
|
|
13588
13835
|
};
|
|
13589
13836
|
return BankAccountCalculationService;
|
|
13590
13837
|
}());
|
|
13591
|
-
BankAccountCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13592
|
-
BankAccountCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13593
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13838
|
+
BankAccountCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankAccountCalculationService, deps: [{ token: BankTransactionCalculationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13839
|
+
BankAccountCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankAccountCalculationService, providedIn: 'root' });
|
|
13840
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankAccountCalculationService, decorators: [{
|
|
13594
13841
|
type: i0.Injectable,
|
|
13595
13842
|
args: [{
|
|
13596
13843
|
providedIn: 'root'
|
|
@@ -13665,9 +13912,9 @@
|
|
|
13665
13912
|
};
|
|
13666
13913
|
return BankTransactionService;
|
|
13667
13914
|
}(RestService));
|
|
13668
|
-
BankTransactionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13669
|
-
BankTransactionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13670
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13915
|
+
BankTransactionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankTransactionService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13916
|
+
BankTransactionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankTransactionService, providedIn: 'root' });
|
|
13917
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BankTransactionService, decorators: [{
|
|
13671
13918
|
type: i0.Injectable,
|
|
13672
13919
|
args: [{
|
|
13673
13920
|
providedIn: 'root'
|
|
@@ -13729,9 +13976,9 @@
|
|
|
13729
13976
|
};
|
|
13730
13977
|
return BorrowingExpenseService;
|
|
13731
13978
|
}());
|
|
13732
|
-
BorrowingExpenseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13733
|
-
BorrowingExpenseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13734
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13979
|
+
BorrowingExpenseService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BorrowingExpenseService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
13980
|
+
BorrowingExpenseService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BorrowingExpenseService, providedIn: 'root' });
|
|
13981
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BorrowingExpenseService, decorators: [{
|
|
13735
13982
|
type: i0.Injectable,
|
|
13736
13983
|
args: [{
|
|
13737
13984
|
providedIn: 'root'
|
|
@@ -13821,9 +14068,9 @@
|
|
|
13821
14068
|
};
|
|
13822
14069
|
return ChartAccountsService;
|
|
13823
14070
|
}());
|
|
13824
|
-
ChartAccountsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13825
|
-
ChartAccountsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13826
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14071
|
+
ChartAccountsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChartAccountsService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14072
|
+
ChartAccountsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChartAccountsService, providedIn: 'root' });
|
|
14073
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChartAccountsService, decorators: [{
|
|
13827
14074
|
type: i0.Injectable,
|
|
13828
14075
|
args: [{
|
|
13829
14076
|
providedIn: 'root'
|
|
@@ -13861,9 +14108,9 @@
|
|
|
13861
14108
|
};
|
|
13862
14109
|
return ChartAccountsDepreciationService;
|
|
13863
14110
|
}(RestService));
|
|
13864
|
-
ChartAccountsDepreciationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13865
|
-
ChartAccountsDepreciationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13866
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14111
|
+
ChartAccountsDepreciationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChartAccountsDepreciationService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14112
|
+
ChartAccountsDepreciationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChartAccountsDepreciationService, providedIn: 'root' });
|
|
14113
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChartAccountsDepreciationService, decorators: [{
|
|
13867
14114
|
type: i0.Injectable,
|
|
13868
14115
|
args: [{
|
|
13869
14116
|
providedIn: 'root'
|
|
@@ -13939,9 +14186,9 @@
|
|
|
13939
14186
|
};
|
|
13940
14187
|
return ChatService;
|
|
13941
14188
|
}(RestService));
|
|
13942
|
-
ChatService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13943
|
-
ChatService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13944
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14189
|
+
ChatService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChatService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: SseService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14190
|
+
ChatService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChatService, providedIn: 'root' });
|
|
14191
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ChatService, decorators: [{
|
|
13945
14192
|
type: i0.Injectable,
|
|
13946
14193
|
args: [{
|
|
13947
14194
|
providedIn: 'root'
|
|
@@ -13993,9 +14240,9 @@
|
|
|
13993
14240
|
};
|
|
13994
14241
|
return MessageService;
|
|
13995
14242
|
}(RestService));
|
|
13996
|
-
MessageService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
13997
|
-
MessageService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
13998
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14243
|
+
MessageService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: SseService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14244
|
+
MessageService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageService, providedIn: 'root' });
|
|
14245
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageService, decorators: [{
|
|
13999
14246
|
type: i0.Injectable,
|
|
14000
14247
|
args: [{
|
|
14001
14248
|
providedIn: 'root'
|
|
@@ -14109,9 +14356,9 @@
|
|
|
14109
14356
|
};
|
|
14110
14357
|
return MessageDocumentService;
|
|
14111
14358
|
}());
|
|
14112
|
-
MessageDocumentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14113
|
-
MessageDocumentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14114
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14359
|
+
MessageDocumentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageDocumentService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14360
|
+
MessageDocumentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageDocumentService, providedIn: 'root' });
|
|
14361
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: MessageDocumentService, decorators: [{
|
|
14115
14362
|
type: i0.Injectable,
|
|
14116
14363
|
args: [{
|
|
14117
14364
|
providedIn: 'root'
|
|
@@ -14227,9 +14474,9 @@
|
|
|
14227
14474
|
};
|
|
14228
14475
|
return ClientInviteService;
|
|
14229
14476
|
}(RestService));
|
|
14230
|
-
ClientInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14231
|
-
ClientInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14232
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14477
|
+
ClientInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientInviteService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14478
|
+
ClientInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientInviteService, providedIn: 'root' });
|
|
14479
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientInviteService, decorators: [{
|
|
14233
14480
|
type: i0.Injectable,
|
|
14234
14481
|
args: [{
|
|
14235
14482
|
providedIn: 'root'
|
|
@@ -14316,9 +14563,9 @@
|
|
|
14316
14563
|
};
|
|
14317
14564
|
return ClientMovementService;
|
|
14318
14565
|
}(RestService));
|
|
14319
|
-
ClientMovementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14320
|
-
ClientMovementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14321
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14566
|
+
ClientMovementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientMovementService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14567
|
+
ClientMovementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientMovementService, providedIn: 'root' });
|
|
14568
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientMovementService, decorators: [{
|
|
14322
14569
|
type: i0.Injectable,
|
|
14323
14570
|
args: [{
|
|
14324
14571
|
providedIn: 'root'
|
|
@@ -14344,9 +14591,9 @@
|
|
|
14344
14591
|
};
|
|
14345
14592
|
return ClientPortfolioReportService;
|
|
14346
14593
|
}());
|
|
14347
|
-
ClientPortfolioReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14348
|
-
ClientPortfolioReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14349
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14594
|
+
ClientPortfolioReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientPortfolioReportService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14595
|
+
ClientPortfolioReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientPortfolioReportService, providedIn: 'root' });
|
|
14596
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ClientPortfolioReportService, decorators: [{
|
|
14350
14597
|
type: i0.Injectable,
|
|
14351
14598
|
args: [{
|
|
14352
14599
|
providedIn: 'root'
|
|
@@ -14380,9 +14627,9 @@
|
|
|
14380
14627
|
}
|
|
14381
14628
|
return DepreciationReceiptService;
|
|
14382
14629
|
}(ReceiptService));
|
|
14383
|
-
DepreciationReceiptService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14384
|
-
DepreciationReceiptService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14385
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14630
|
+
DepreciationReceiptService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationReceiptService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14631
|
+
DepreciationReceiptService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationReceiptService, providedIn: 'root' });
|
|
14632
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationReceiptService, decorators: [{
|
|
14386
14633
|
type: i0.Injectable,
|
|
14387
14634
|
args: [{
|
|
14388
14635
|
providedIn: 'root'
|
|
@@ -14548,9 +14795,9 @@
|
|
|
14548
14795
|
};
|
|
14549
14796
|
return DepreciationService;
|
|
14550
14797
|
}(RestService));
|
|
14551
|
-
DepreciationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14552
|
-
DepreciationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14553
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14798
|
+
DepreciationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: DepreciationReceiptService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14799
|
+
DepreciationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationService, providedIn: 'root' });
|
|
14800
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationService, decorators: [{
|
|
14554
14801
|
type: i0.Injectable,
|
|
14555
14802
|
args: [{
|
|
14556
14803
|
providedIn: 'root'
|
|
@@ -14609,9 +14856,9 @@
|
|
|
14609
14856
|
};
|
|
14610
14857
|
return DepreciationCapitalProjectService;
|
|
14611
14858
|
}());
|
|
14612
|
-
DepreciationCapitalProjectService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14613
|
-
DepreciationCapitalProjectService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14614
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14859
|
+
DepreciationCapitalProjectService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationCapitalProjectService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14860
|
+
DepreciationCapitalProjectService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationCapitalProjectService, providedIn: 'root' });
|
|
14861
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DepreciationCapitalProjectService, decorators: [{
|
|
14615
14862
|
type: i0.Injectable,
|
|
14616
14863
|
args: [{
|
|
14617
14864
|
providedIn: 'root'
|
|
@@ -14623,80 +14870,6 @@
|
|
|
14623
14870
|
}] }];
|
|
14624
14871
|
} });
|
|
14625
14872
|
|
|
14626
|
-
/**
|
|
14627
|
-
* Service to handle document-folders and depending documents logic
|
|
14628
|
-
*/
|
|
14629
|
-
var DocumentFolderService = /** @class */ (function (_super) {
|
|
14630
|
-
__extends(DocumentFolderService, _super);
|
|
14631
|
-
function DocumentFolderService() {
|
|
14632
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
14633
|
-
_this.url = 'folders';
|
|
14634
|
-
_this.modelClass = DocumentFolder;
|
|
14635
|
-
return _this;
|
|
14636
|
-
}
|
|
14637
|
-
/**
|
|
14638
|
-
* Add new document to the folder
|
|
14639
|
-
* @param file to be uploaded to the folder
|
|
14640
|
-
* @param folder for document
|
|
14641
|
-
*/
|
|
14642
|
-
DocumentFolderService.prototype.addDocument = function (file, folder) {
|
|
14643
|
-
var _this = this;
|
|
14644
|
-
// create formData object with provided file
|
|
14645
|
-
var formDataDocument = new FormData();
|
|
14646
|
-
formDataDocument.append('file', file);
|
|
14647
|
-
return this.http.post(this.environment.apiV2 + "/folders/" + folder.id + "/documents", formDataDocument).pipe(operators.map(function (response) {
|
|
14648
|
-
var updatedFolder = Object.assign(classTransformer.plainToClass(DocumentFolder, {}), folder);
|
|
14649
|
-
updatedFolder.documents.push(classTransformer.plainToClass(Document, response));
|
|
14650
|
-
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, updatedFolder));
|
|
14651
|
-
_this.cacheSubject.next(_this.cache);
|
|
14652
|
-
}));
|
|
14653
|
-
};
|
|
14654
|
-
/**
|
|
14655
|
-
* Edit folder document by moving it from one folder to another
|
|
14656
|
-
* @param editedDocument
|
|
14657
|
-
* @param selectedFolder to move the document to
|
|
14658
|
-
* @param oldFolderId: id of old folder from which need to remove the document
|
|
14659
|
-
*/
|
|
14660
|
-
DocumentFolderService.prototype.updateDocument = function (editedDocument, selectedFolder, oldFolderId) {
|
|
14661
|
-
var _this = this;
|
|
14662
|
-
return this.http.put(this.environment.apiV2 + "/folders/" + selectedFolder.id + "/documents/" + editedDocument.id, editedDocument).pipe(operators.map(function (response) {
|
|
14663
|
-
var oldFolder = _this.cache.find(function (folder) { return folder.id === oldFolderId; });
|
|
14664
|
-
// Remove document from old folder
|
|
14665
|
-
oldFolder.documents = oldFolder.documents.filter(function (deletedDocument) { return deletedDocument.id !== response.id; });
|
|
14666
|
-
// update old folder and replace it in cache
|
|
14667
|
-
response.folder = classTransformer.plainToClass(DocumentFolder, { id: selectedFolder.id, name: selectedFolder.name });
|
|
14668
|
-
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, oldFolder));
|
|
14669
|
-
// update new document folder and replace it in cache
|
|
14670
|
-
selectedFolder.documents.push(classTransformer.plainToClass(Document, response));
|
|
14671
|
-
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, selectedFolder));
|
|
14672
|
-
_this.cacheSubject.next(_this.cache);
|
|
14673
|
-
}));
|
|
14674
|
-
};
|
|
14675
|
-
/**
|
|
14676
|
-
* Delete document from folder
|
|
14677
|
-
* @param document to remove
|
|
14678
|
-
* @param folder from which document should be removed
|
|
14679
|
-
*/
|
|
14680
|
-
DocumentFolderService.prototype.deleteDocument = function (document, folder) {
|
|
14681
|
-
var _this = this;
|
|
14682
|
-
return this.http.delete(this.environment.apiV2 + "/folders/" + folder.id + "/documents/" + document.id).pipe(operators.map(function () {
|
|
14683
|
-
folder.documents = folder.documents
|
|
14684
|
-
.filter(function (deletedDocument) { return deletedDocument.id !== document.id; });
|
|
14685
|
-
replace(_this.cache, classTransformer.plainToClass(DocumentFolder, folder));
|
|
14686
|
-
_this.cacheSubject.next(_this.cache);
|
|
14687
|
-
}));
|
|
14688
|
-
};
|
|
14689
|
-
return DocumentFolderService;
|
|
14690
|
-
}(RestService));
|
|
14691
|
-
DocumentFolderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DocumentFolderService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14692
|
-
DocumentFolderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DocumentFolderService, providedIn: 'root' });
|
|
14693
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DocumentFolderService, decorators: [{
|
|
14694
|
-
type: i0.Injectable,
|
|
14695
|
-
args: [{
|
|
14696
|
-
providedIn: 'root'
|
|
14697
|
-
}]
|
|
14698
|
-
}] });
|
|
14699
|
-
|
|
14700
14873
|
var EmployeeService = /** @class */ (function (_super) {
|
|
14701
14874
|
__extends(EmployeeService, _super);
|
|
14702
14875
|
function EmployeeService() {
|
|
@@ -14723,9 +14896,9 @@
|
|
|
14723
14896
|
};
|
|
14724
14897
|
return EmployeeService;
|
|
14725
14898
|
}(RestService));
|
|
14726
|
-
EmployeeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14727
|
-
EmployeeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14728
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14899
|
+
EmployeeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmployeeService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14900
|
+
EmployeeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmployeeService, providedIn: 'root' });
|
|
14901
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmployeeService, decorators: [{
|
|
14729
14902
|
type: i0.Injectable,
|
|
14730
14903
|
args: [{
|
|
14731
14904
|
providedIn: 'root'
|
|
@@ -14772,9 +14945,9 @@
|
|
|
14772
14945
|
};
|
|
14773
14946
|
return EmployeeInviteService;
|
|
14774
14947
|
}(RestService));
|
|
14775
|
-
EmployeeInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14776
|
-
EmployeeInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14777
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
14948
|
+
EmployeeInviteService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmployeeInviteService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
14949
|
+
EmployeeInviteService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmployeeInviteService, providedIn: 'root' });
|
|
14950
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EmployeeInviteService, decorators: [{
|
|
14778
14951
|
type: i0.Injectable,
|
|
14779
14952
|
args: [{
|
|
14780
14953
|
providedIn: 'root'
|
|
@@ -14845,9 +15018,9 @@
|
|
|
14845
15018
|
};
|
|
14846
15019
|
return FirmService;
|
|
14847
15020
|
}());
|
|
14848
|
-
FirmService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14849
|
-
FirmService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14850
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15021
|
+
FirmService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FirmService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15022
|
+
FirmService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FirmService, providedIn: 'root' });
|
|
15023
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FirmService, decorators: [{
|
|
14851
15024
|
type: i0.Injectable,
|
|
14852
15025
|
args: [{
|
|
14853
15026
|
providedIn: 'root'
|
|
@@ -14879,9 +15052,9 @@
|
|
|
14879
15052
|
};
|
|
14880
15053
|
return ExportFormatterService;
|
|
14881
15054
|
}());
|
|
14882
|
-
ExportFormatterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14883
|
-
ExportFormatterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14884
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15055
|
+
ExportFormatterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExportFormatterService, deps: [{ token: i1__namespace$1.CurrencyPipe }, { token: i1__namespace$1.DatePipe }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15056
|
+
ExportFormatterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExportFormatterService, providedIn: 'root' });
|
|
15057
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ExportFormatterService, decorators: [{
|
|
14885
15058
|
type: i0.Injectable,
|
|
14886
15059
|
args: [{
|
|
14887
15060
|
providedIn: 'root'
|
|
@@ -14904,9 +15077,9 @@
|
|
|
14904
15077
|
};
|
|
14905
15078
|
return HeaderTitleService;
|
|
14906
15079
|
}());
|
|
14907
|
-
HeaderTitleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14908
|
-
HeaderTitleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14909
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15080
|
+
HeaderTitleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeaderTitleService, deps: [{ token: i1__namespace$2.Router }, { token: i1__namespace$2.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15081
|
+
HeaderTitleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeaderTitleService, providedIn: 'root' });
|
|
15082
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: HeaderTitleService, decorators: [{
|
|
14910
15083
|
type: i0.Injectable,
|
|
14911
15084
|
args: [{
|
|
14912
15085
|
providedIn: 'root'
|
|
@@ -14981,9 +15154,9 @@
|
|
|
14981
15154
|
};
|
|
14982
15155
|
return IncomeSourceForecastService;
|
|
14983
15156
|
}(RestService));
|
|
14984
|
-
IncomeSourceForecastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14985
|
-
IncomeSourceForecastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
14986
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15157
|
+
IncomeSourceForecastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IncomeSourceForecastService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15158
|
+
IncomeSourceForecastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IncomeSourceForecastService, providedIn: 'root' });
|
|
15159
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IncomeSourceForecastService, decorators: [{
|
|
14987
15160
|
type: i0.Injectable,
|
|
14988
15161
|
args: [{
|
|
14989
15162
|
providedIn: 'root'
|
|
@@ -15058,9 +15231,9 @@
|
|
|
15058
15231
|
};
|
|
15059
15232
|
return SalaryForecastService;
|
|
15060
15233
|
}(RestService));
|
|
15061
|
-
SalaryForecastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15062
|
-
SalaryForecastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15063
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15234
|
+
SalaryForecastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SalaryForecastService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15235
|
+
SalaryForecastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SalaryForecastService, providedIn: 'root' });
|
|
15236
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SalaryForecastService, decorators: [{
|
|
15064
15237
|
type: i0.Injectable,
|
|
15065
15238
|
args: [{
|
|
15066
15239
|
providedIn: 'root'
|
|
@@ -15132,9 +15305,9 @@
|
|
|
15132
15305
|
};
|
|
15133
15306
|
return SoleForecastService;
|
|
15134
15307
|
}(RestService));
|
|
15135
|
-
SoleForecastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15136
|
-
SoleForecastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15137
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15308
|
+
SoleForecastService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleForecastService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15309
|
+
SoleForecastService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleForecastService, providedIn: 'root' });
|
|
15310
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SoleForecastService, decorators: [{
|
|
15138
15311
|
type: i0.Injectable,
|
|
15139
15312
|
args: [{
|
|
15140
15313
|
providedIn: 'root'
|
|
@@ -15169,9 +15342,9 @@
|
|
|
15169
15342
|
};
|
|
15170
15343
|
return IntercomService;
|
|
15171
15344
|
}());
|
|
15172
|
-
IntercomService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15173
|
-
IntercomService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15174
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15345
|
+
IntercomService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IntercomService, deps: [{ token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15346
|
+
IntercomService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IntercomService, providedIn: 'root' });
|
|
15347
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IntercomService, decorators: [{
|
|
15175
15348
|
type: i0.Injectable,
|
|
15176
15349
|
args: [{
|
|
15177
15350
|
providedIn: 'root'
|
|
@@ -15202,9 +15375,9 @@
|
|
|
15202
15375
|
};
|
|
15203
15376
|
return KompassifyService;
|
|
15204
15377
|
}());
|
|
15205
|
-
KompassifyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15206
|
-
KompassifyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15207
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15378
|
+
KompassifyService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KompassifyService, deps: [{ token: i1__namespace$2.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15379
|
+
KompassifyService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KompassifyService, providedIn: 'root' });
|
|
15380
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: KompassifyService, decorators: [{
|
|
15208
15381
|
type: i0.Injectable,
|
|
15209
15382
|
args: [{
|
|
15210
15383
|
providedIn: 'root'
|
|
@@ -15337,9 +15510,9 @@
|
|
|
15337
15510
|
};
|
|
15338
15511
|
return LoanService;
|
|
15339
15512
|
}(RestService));
|
|
15340
|
-
LoanService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15341
|
-
LoanService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15342
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15513
|
+
LoanService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LoanService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15514
|
+
LoanService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LoanService, providedIn: 'root' });
|
|
15515
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LoanService, decorators: [{
|
|
15343
15516
|
type: i0.Injectable,
|
|
15344
15517
|
args: [{
|
|
15345
15518
|
providedIn: 'root'
|
|
@@ -15387,9 +15560,9 @@
|
|
|
15387
15560
|
};
|
|
15388
15561
|
return ServiceNotificationService;
|
|
15389
15562
|
}(RestService));
|
|
15390
|
-
ServiceNotificationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15391
|
-
ServiceNotificationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15392
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15563
|
+
ServiceNotificationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServiceNotificationService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }, { token: ToastService }, { token: SseService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15564
|
+
ServiceNotificationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServiceNotificationService, providedIn: 'root' });
|
|
15565
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServiceNotificationService, decorators: [{
|
|
15393
15566
|
type: i0.Injectable,
|
|
15394
15567
|
args: [{
|
|
15395
15568
|
providedIn: 'root'
|
|
@@ -15421,6 +15594,8 @@
|
|
|
15421
15594
|
};
|
|
15422
15595
|
|
|
15423
15596
|
/**
|
|
15597
|
+
* @TODO mikhail better typehint
|
|
15598
|
+
*
|
|
15424
15599
|
* Service to generate and export PDF file from provided HTML elements
|
|
15425
15600
|
* The file is generated using the html2pdf library in order to get a canvas at the output,
|
|
15426
15601
|
* in which all the styles that the user sees on the page will be saved
|
|
@@ -15428,25 +15603,35 @@
|
|
|
15428
15603
|
var PdfFromDomElementService = /** @class */ (function () {
|
|
15429
15604
|
function PdfFromDomElementService() {
|
|
15430
15605
|
}
|
|
15431
|
-
PdfFromDomElementService.prototype.
|
|
15606
|
+
PdfFromDomElementService.prototype.init = function (elements, fileSettings) {
|
|
15432
15607
|
var options = FILE_SETTINGS$1;
|
|
15433
|
-
|
|
15608
|
+
if (fileSettings) {
|
|
15609
|
+
merge__default["default"](options, fileSettings);
|
|
15610
|
+
}
|
|
15434
15611
|
// HTML container in which the exported DOM elements will be placed
|
|
15435
15612
|
var htmlWrapper = document.createElement('div');
|
|
15436
15613
|
elements.forEach(function (element) {
|
|
15437
15614
|
htmlWrapper.append(element.cloneNode(true));
|
|
15438
15615
|
});
|
|
15439
15616
|
// Set PDF options, save file and return result as Observable
|
|
15440
|
-
return
|
|
15441
|
-
|
|
15617
|
+
return html2pdf__namespace().from(htmlWrapper).set(options);
|
|
15618
|
+
};
|
|
15619
|
+
PdfFromDomElementService.prototype.download = function (elements, fileSettings) {
|
|
15620
|
+
return rxjs.from(this.init(elements, fileSettings)
|
|
15442
15621
|
.save()
|
|
15443
15622
|
.then());
|
|
15444
15623
|
};
|
|
15624
|
+
PdfFromDomElementService.prototype.export = function (elements, filename) {
|
|
15625
|
+
if (filename === void 0) { filename = FILE_SETTINGS$1.filename; }
|
|
15626
|
+
return rxjs.from(this.init(elements)
|
|
15627
|
+
.outputPdf('blob')
|
|
15628
|
+
.then(function (blob) { return new File([blob], filename, { type: 'application/pdf' }); }));
|
|
15629
|
+
};
|
|
15445
15630
|
return PdfFromDomElementService;
|
|
15446
15631
|
}());
|
|
15447
|
-
PdfFromDomElementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15448
|
-
PdfFromDomElementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15449
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15632
|
+
PdfFromDomElementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromDomElementService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15633
|
+
PdfFromDomElementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromDomElementService, providedIn: 'root' });
|
|
15634
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromDomElementService, decorators: [{
|
|
15450
15635
|
type: i0.Injectable,
|
|
15451
15636
|
args: [{
|
|
15452
15637
|
providedIn: 'root'
|
|
@@ -15529,9 +15714,9 @@
|
|
|
15529
15714
|
};
|
|
15530
15715
|
return PdfFromTableService;
|
|
15531
15716
|
}());
|
|
15532
|
-
PdfFromTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15533
|
-
PdfFromTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15534
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15717
|
+
PdfFromTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromTableService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15718
|
+
PdfFromTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromTableService, providedIn: 'root' });
|
|
15719
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromTableService, decorators: [{
|
|
15535
15720
|
type: i0.Injectable,
|
|
15536
15721
|
args: [{
|
|
15537
15722
|
providedIn: 'root'
|
|
@@ -15570,9 +15755,9 @@
|
|
|
15570
15755
|
};
|
|
15571
15756
|
return PdfFromHtmlTableService;
|
|
15572
15757
|
}(PdfFromTableService));
|
|
15573
|
-
PdfFromHtmlTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15574
|
-
PdfFromHtmlTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15575
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15758
|
+
PdfFromHtmlTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromHtmlTableService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15759
|
+
PdfFromHtmlTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromHtmlTableService, providedIn: 'root' });
|
|
15760
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromHtmlTableService, decorators: [{
|
|
15576
15761
|
type: i0.Injectable,
|
|
15577
15762
|
args: [{
|
|
15578
15763
|
providedIn: 'root'
|
|
@@ -15608,9 +15793,9 @@
|
|
|
15608
15793
|
};
|
|
15609
15794
|
return PdfFromDataTableService;
|
|
15610
15795
|
}(PdfFromTableService));
|
|
15611
|
-
PdfFromDataTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15612
|
-
PdfFromDataTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15613
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15796
|
+
PdfFromDataTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromDataTableService, deps: [{ token: ExportFormatterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15797
|
+
PdfFromDataTableService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromDataTableService, providedIn: 'root' });
|
|
15798
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PdfFromDataTableService, decorators: [{
|
|
15614
15799
|
type: i0.Injectable,
|
|
15615
15800
|
args: [{
|
|
15616
15801
|
providedIn: 'root'
|
|
@@ -15667,9 +15852,9 @@
|
|
|
15667
15852
|
};
|
|
15668
15853
|
return PropertyTransactionReportService;
|
|
15669
15854
|
}());
|
|
15670
|
-
PropertyTransactionReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15671
|
-
PropertyTransactionReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15672
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
15855
|
+
PropertyTransactionReportService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyTransactionReportService, deps: [{ token: PropertyService }, { token: TransactionService }, { token: DepreciationService }, { token: ChartAccountsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
15856
|
+
PropertyTransactionReportService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyTransactionReportService, providedIn: 'root' });
|
|
15857
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyTransactionReportService, decorators: [{
|
|
15673
15858
|
type: i0.Injectable,
|
|
15674
15859
|
args: [{
|
|
15675
15860
|
providedIn: 'root'
|
|
@@ -15852,9 +16037,9 @@
|
|
|
15852
16037
|
};
|
|
15853
16038
|
return PropertyCalculationService;
|
|
15854
16039
|
}());
|
|
15855
|
-
PropertyCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15856
|
-
PropertyCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15857
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16040
|
+
PropertyCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCalculationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16041
|
+
PropertyCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCalculationService, providedIn: 'root' });
|
|
16042
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCalculationService, decorators: [{
|
|
15858
16043
|
type: i0.Injectable,
|
|
15859
16044
|
args: [{
|
|
15860
16045
|
providedIn: 'root'
|
|
@@ -15874,9 +16059,9 @@
|
|
|
15874
16059
|
}
|
|
15875
16060
|
return PropertyCategoryService;
|
|
15876
16061
|
}(RestService));
|
|
15877
|
-
PropertyCategoryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15878
|
-
PropertyCategoryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15879
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16062
|
+
PropertyCategoryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCategoryService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16063
|
+
PropertyCategoryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCategoryService, providedIn: 'root' });
|
|
16064
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCategoryService, decorators: [{
|
|
15880
16065
|
type: i0.Injectable,
|
|
15881
16066
|
args: [{
|
|
15882
16067
|
providedIn: 'root'
|
|
@@ -15933,9 +16118,9 @@
|
|
|
15933
16118
|
};
|
|
15934
16119
|
return PropertyDocumentService;
|
|
15935
16120
|
}(RestService));
|
|
15936
|
-
PropertyDocumentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
15937
|
-
PropertyDocumentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
15938
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16121
|
+
PropertyDocumentService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyDocumentService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16122
|
+
PropertyDocumentService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyDocumentService, providedIn: 'root' });
|
|
16123
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyDocumentService, decorators: [{
|
|
15939
16124
|
type: i0.Injectable,
|
|
15940
16125
|
args: [{
|
|
15941
16126
|
providedIn: 'root'
|
|
@@ -16059,9 +16244,9 @@
|
|
|
16059
16244
|
};
|
|
16060
16245
|
return PropertyShareService;
|
|
16061
16246
|
}(RestService));
|
|
16062
|
-
PropertyShareService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16063
|
-
PropertyShareService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16064
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16247
|
+
PropertyShareService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyShareService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16248
|
+
PropertyShareService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyShareService, providedIn: 'root' });
|
|
16249
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyShareService, decorators: [{
|
|
16065
16250
|
type: i0.Injectable,
|
|
16066
16251
|
args: [{
|
|
16067
16252
|
providedIn: 'root'
|
|
@@ -16097,9 +16282,9 @@
|
|
|
16097
16282
|
};
|
|
16098
16283
|
return PropertySaleService;
|
|
16099
16284
|
}(RestService));
|
|
16100
|
-
PropertySaleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16101
|
-
PropertySaleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16102
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16285
|
+
PropertySaleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertySaleService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16286
|
+
PropertySaleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertySaleService, providedIn: 'root' });
|
|
16287
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertySaleService, decorators: [{
|
|
16103
16288
|
type: i0.Injectable,
|
|
16104
16289
|
args: [{
|
|
16105
16290
|
providedIn: 'root'
|
|
@@ -16133,9 +16318,9 @@
|
|
|
16133
16318
|
};
|
|
16134
16319
|
return EquityPositionChartService;
|
|
16135
16320
|
}());
|
|
16136
|
-
EquityPositionChartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16137
|
-
EquityPositionChartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16138
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16321
|
+
EquityPositionChartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EquityPositionChartService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16322
|
+
EquityPositionChartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EquityPositionChartService, providedIn: 'root' });
|
|
16323
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EquityPositionChartService, decorators: [{
|
|
16139
16324
|
type: i0.Injectable,
|
|
16140
16325
|
args: [{
|
|
16141
16326
|
providedIn: 'root'
|
|
@@ -16184,9 +16369,9 @@
|
|
|
16184
16369
|
};
|
|
16185
16370
|
return PropertyCategoryMovementService;
|
|
16186
16371
|
}(RestService));
|
|
16187
|
-
PropertyCategoryMovementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16188
|
-
PropertyCategoryMovementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16189
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16372
|
+
PropertyCategoryMovementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCategoryMovementService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16373
|
+
PropertyCategoryMovementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCategoryMovementService, providedIn: 'root' });
|
|
16374
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PropertyCategoryMovementService, decorators: [{
|
|
16190
16375
|
type: i0.Injectable,
|
|
16191
16376
|
args: [{
|
|
16192
16377
|
providedIn: 'root'
|
|
@@ -16291,9 +16476,9 @@
|
|
|
16291
16476
|
};
|
|
16292
16477
|
return SubscriptionService;
|
|
16293
16478
|
}());
|
|
16294
|
-
SubscriptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16295
|
-
SubscriptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16296
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16479
|
+
SubscriptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SubscriptionService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: SseService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16480
|
+
SubscriptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SubscriptionService, providedIn: 'root' });
|
|
16481
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SubscriptionService, decorators: [{
|
|
16297
16482
|
type: i0.Injectable,
|
|
16298
16483
|
args: [{
|
|
16299
16484
|
providedIn: 'root'
|
|
@@ -16319,9 +16504,9 @@
|
|
|
16319
16504
|
}
|
|
16320
16505
|
return ServicePriceService;
|
|
16321
16506
|
}(RestService));
|
|
16322
|
-
ServicePriceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16323
|
-
ServicePriceService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16324
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16507
|
+
ServicePriceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServicePriceService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16508
|
+
ServicePriceService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServicePriceService, providedIn: 'root' });
|
|
16509
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ServicePriceService, decorators: [{
|
|
16325
16510
|
type: i0.Injectable,
|
|
16326
16511
|
args: [{
|
|
16327
16512
|
providedIn: 'root'
|
|
@@ -16418,9 +16603,9 @@
|
|
|
16418
16603
|
};
|
|
16419
16604
|
return TaxReviewService;
|
|
16420
16605
|
}(RestService));
|
|
16421
|
-
TaxReviewService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16422
|
-
TaxReviewService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16423
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16606
|
+
TaxReviewService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxReviewService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16607
|
+
TaxReviewService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxReviewService, providedIn: 'root' });
|
|
16608
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxReviewService, decorators: [{
|
|
16424
16609
|
type: i0.Injectable,
|
|
16425
16610
|
args: [{
|
|
16426
16611
|
providedIn: 'root'
|
|
@@ -16456,9 +16641,9 @@
|
|
|
16456
16641
|
};
|
|
16457
16642
|
return TaxReviewHistoryService;
|
|
16458
16643
|
}(RestService));
|
|
16459
|
-
TaxReviewHistoryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16460
|
-
TaxReviewHistoryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16461
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16644
|
+
TaxReviewHistoryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxReviewHistoryService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16645
|
+
TaxReviewHistoryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxReviewHistoryService, providedIn: 'root' });
|
|
16646
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxReviewHistoryService, decorators: [{
|
|
16462
16647
|
type: i0.Injectable,
|
|
16463
16648
|
args: [{
|
|
16464
16649
|
providedIn: 'root'
|
|
@@ -16519,9 +16704,9 @@
|
|
|
16519
16704
|
};
|
|
16520
16705
|
return TaxSummaryService;
|
|
16521
16706
|
}());
|
|
16522
|
-
TaxSummaryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16523
|
-
TaxSummaryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16524
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16707
|
+
TaxSummaryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxSummaryService, deps: [{ token: i1__namespace.HttpClient }, { token: EventDispatcherService }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16708
|
+
TaxSummaryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxSummaryService, providedIn: 'root' });
|
|
16709
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxSummaryService, decorators: [{
|
|
16525
16710
|
type: i0.Injectable,
|
|
16526
16711
|
args: [{
|
|
16527
16712
|
providedIn: 'root'
|
|
@@ -16571,11 +16756,22 @@
|
|
|
16571
16756
|
return !_this.isAllocated(transaction, allocations);
|
|
16572
16757
|
}));
|
|
16573
16758
|
};
|
|
16759
|
+
/**
|
|
16760
|
+
* Get invoices allocated amounts grouped bu invoice id
|
|
16761
|
+
*/
|
|
16762
|
+
TransactionCalculationService.prototype.getAllocationsAmountsByInvoiceId = function (allocations, invoices) {
|
|
16763
|
+
var allocationsByTransactionId = allocations.groupBy('transaction.id');
|
|
16764
|
+
var dictionary = new Dictionary([]);
|
|
16765
|
+
invoices.toArray().forEach(function (invoice) {
|
|
16766
|
+
dictionary.add(invoice.id, allocationsByTransactionId.merge(invoice.itemsCollection.mapBy('transaction.id')).amount || 0);
|
|
16767
|
+
});
|
|
16768
|
+
return dictionary;
|
|
16769
|
+
};
|
|
16574
16770
|
return TransactionCalculationService;
|
|
16575
16771
|
}());
|
|
16576
|
-
TransactionCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16577
|
-
TransactionCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16578
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16772
|
+
TransactionCalculationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionCalculationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16773
|
+
TransactionCalculationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionCalculationService, providedIn: 'root' });
|
|
16774
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TransactionCalculationService, decorators: [{
|
|
16579
16775
|
type: i0.Injectable,
|
|
16580
16776
|
args: [{
|
|
16581
16777
|
providedIn: 'root'
|
|
@@ -16619,9 +16815,9 @@
|
|
|
16619
16815
|
};
|
|
16620
16816
|
return XlsxService;
|
|
16621
16817
|
}());
|
|
16622
|
-
XlsxService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16623
|
-
XlsxService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16624
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16818
|
+
XlsxService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: XlsxService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16819
|
+
XlsxService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: XlsxService, providedIn: 'root' });
|
|
16820
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: XlsxService, decorators: [{
|
|
16625
16821
|
type: i0.Injectable,
|
|
16626
16822
|
args: [{
|
|
16627
16823
|
providedIn: 'root'
|
|
@@ -16639,9 +16835,9 @@
|
|
|
16639
16835
|
}
|
|
16640
16836
|
return TaxExemptionService;
|
|
16641
16837
|
}(RestService));
|
|
16642
|
-
TaxExemptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16643
|
-
TaxExemptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16644
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16838
|
+
TaxExemptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxExemptionService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16839
|
+
TaxExemptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxExemptionService, providedIn: 'root' });
|
|
16840
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TaxExemptionService, decorators: [{
|
|
16645
16841
|
type: i0.Injectable,
|
|
16646
16842
|
args: [{
|
|
16647
16843
|
providedIn: 'root'
|
|
@@ -16730,9 +16926,9 @@
|
|
|
16730
16926
|
auth_type: 'rerequest',
|
|
16731
16927
|
return_scopes: true
|
|
16732
16928
|
};
|
|
16733
|
-
FacebookService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16734
|
-
FacebookService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16735
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16929
|
+
FacebookService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FacebookService, deps: [{ token: i1__namespace.HttpClient }, { token: ToastService }, { token: JwtService }, { token: i1__namespace$2.Router }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16930
|
+
FacebookService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FacebookService, providedIn: 'root' });
|
|
16931
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FacebookService, decorators: [{
|
|
16736
16932
|
type: i0.Injectable,
|
|
16737
16933
|
args: [{
|
|
16738
16934
|
providedIn: 'root'
|
|
@@ -16764,9 +16960,9 @@
|
|
|
16764
16960
|
}());
|
|
16765
16961
|
TutorialVideoService.googleUrl = "https://www.googleapis.com/drive/v3/files?fields=*&mimeType='video/mp4'&orderBy=name";
|
|
16766
16962
|
TutorialVideoService.parents = '1uLMLzi8WUy2go9xhfzJEwgFwOM43dukM';
|
|
16767
|
-
TutorialVideoService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
16768
|
-
TutorialVideoService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
16769
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
16963
|
+
TutorialVideoService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TutorialVideoService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
16964
|
+
TutorialVideoService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TutorialVideoService, providedIn: 'root' });
|
|
16965
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TutorialVideoService, decorators: [{
|
|
16770
16966
|
type: i0.Injectable,
|
|
16771
16967
|
args: [{
|
|
16772
16968
|
providedIn: 'root'
|
|
@@ -17223,7 +17419,7 @@
|
|
|
17223
17419
|
// User have to create income source with new business.
|
|
17224
17420
|
// Income source is not able for edit business
|
|
17225
17421
|
if (!business.id) {
|
|
17226
|
-
// @TODO Alex: move to separated form class
|
|
17422
|
+
// @TODO Alex (TT-2304): move to separated form class
|
|
17227
17423
|
_this.addControl('incomeSource', new forms.FormGroup({
|
|
17228
17424
|
type: new forms.FormControl(exports.IncomeSourceTypeEnum.SOLE, forms.Validators.required),
|
|
17229
17425
|
name: new forms.FormControl(null, forms.Validators.required),
|
|
@@ -17242,9 +17438,18 @@
|
|
|
17242
17438
|
})
|
|
17243
17439
|
]));
|
|
17244
17440
|
}
|
|
17441
|
+
_this.listenEvents();
|
|
17245
17442
|
return _this;
|
|
17246
17443
|
}
|
|
17444
|
+
SoleBusinessForm.prototype.listenEvents = function () {
|
|
17445
|
+
if (this.contains('incomeSource')) {
|
|
17446
|
+
this.listenNameChanges();
|
|
17447
|
+
}
|
|
17448
|
+
};
|
|
17247
17449
|
Object.defineProperty(SoleBusinessForm.prototype, "forecastFormGroup", {
|
|
17450
|
+
/**
|
|
17451
|
+
* We take the first forecast because income sources available only for new business, so we have only one forecast
|
|
17452
|
+
*/
|
|
17248
17453
|
get: function () {
|
|
17249
17454
|
return this.get('incomeSource').get('soleForecasts').at(0);
|
|
17250
17455
|
},
|
|
@@ -17252,12 +17457,23 @@
|
|
|
17252
17457
|
configurable: true
|
|
17253
17458
|
});
|
|
17254
17459
|
Object.defineProperty(SoleBusinessForm.prototype, "lossFormGroup", {
|
|
17460
|
+
/**
|
|
17461
|
+
* We take the first loss because losses available only for new business, so we have only one loss
|
|
17462
|
+
*/
|
|
17255
17463
|
get: function () {
|
|
17256
17464
|
return this.get('losses').at(0);
|
|
17257
17465
|
},
|
|
17258
17466
|
enumerable: false,
|
|
17259
17467
|
configurable: true
|
|
17260
17468
|
});
|
|
17469
|
+
SoleBusinessForm.prototype.listenNameChanges = function () {
|
|
17470
|
+
var _this = this;
|
|
17471
|
+
console.log('subs');
|
|
17472
|
+
this.get('name').valueChanges.subscribe(function (name) {
|
|
17473
|
+
console.log('listenNameChants');
|
|
17474
|
+
_this.get('incomeSource').get('name').setValue(name);
|
|
17475
|
+
});
|
|
17476
|
+
};
|
|
17261
17477
|
return SoleBusinessForm;
|
|
17262
17478
|
}(AbstractForm));
|
|
17263
17479
|
|
|
@@ -17385,55 +17601,38 @@
|
|
|
17385
17601
|
description: new forms.FormControl(item.description, forms.Validators.required),
|
|
17386
17602
|
quantity: new forms.FormControl(item.quantity, forms.Validators.required),
|
|
17387
17603
|
price: new forms.FormControl(item.price, forms.Validators.required),
|
|
17388
|
-
isGST: new forms.FormControl({ value: item.isGST, disabled: !((_a = item.chartAccounts) === null || _a === void 0 ? void 0 : _a.isGST) }),
|
|
17389
|
-
chartAccounts: new forms.FormControl(item.chartAccounts, forms.Validators.required)
|
|
17604
|
+
isGST: new forms.FormControl({ value: item.isGST || false, disabled: !((_a = item.chartAccounts) === null || _a === void 0 ? void 0 : _a.isGST) }),
|
|
17605
|
+
chartAccounts: new forms.FormControl(item.chartAccounts, forms.Validators.required),
|
|
17390
17606
|
}, item) || this;
|
|
17391
|
-
_this.listenEvents();
|
|
17392
17607
|
return _this;
|
|
17393
17608
|
}
|
|
17394
|
-
SoleInvoiceItemForm.prototype.listenEvents = function () {
|
|
17395
|
-
this.listenChartAccountsChanges();
|
|
17396
|
-
};
|
|
17397
|
-
SoleInvoiceItemForm.prototype.onTemplateChanged = function (template) {
|
|
17398
|
-
this.template = template;
|
|
17399
|
-
if (this.template.isNoTax()) {
|
|
17400
|
-
this.get('isGST').setValue(false);
|
|
17401
|
-
this.get('isGST').disable();
|
|
17402
|
-
}
|
|
17403
|
-
else {
|
|
17404
|
-
this.get('isGST').enable();
|
|
17405
|
-
}
|
|
17406
|
-
};
|
|
17407
|
-
SoleInvoiceItemForm.prototype.listenChartAccountsChanges = function () {
|
|
17408
|
-
var _this = this;
|
|
17409
|
-
this.get('chartAccounts').valueChanges.subscribe(function (chartAccounts) {
|
|
17410
|
-
if (_this.template.isNoTax()) {
|
|
17411
|
-
return;
|
|
17412
|
-
}
|
|
17413
|
-
if (chartAccounts.isGST) {
|
|
17414
|
-
_this.get('isGST').enable();
|
|
17415
|
-
}
|
|
17416
|
-
else {
|
|
17417
|
-
_this.get('isGST').setValue(false);
|
|
17418
|
-
_this.get('isGST').disable();
|
|
17419
|
-
}
|
|
17420
|
-
});
|
|
17421
|
-
};
|
|
17422
17609
|
return SoleInvoiceItemForm;
|
|
17423
17610
|
}(AbstractForm));
|
|
17424
17611
|
|
|
17425
17612
|
var SoleInvoiceForm = /** @class */ (function (_super) {
|
|
17426
17613
|
__extends(SoleInvoiceForm, _super);
|
|
17427
|
-
function SoleInvoiceForm(invoice) {
|
|
17614
|
+
function SoleInvoiceForm(invoice, soleDetailsGST) {
|
|
17428
17615
|
var _this = _super.call(this, {
|
|
17429
|
-
dateFrom: new forms.FormControl(invoice.dateFrom, forms.Validators.required),
|
|
17616
|
+
dateFrom: new forms.FormControl(invoice.dateFrom || new Date(), forms.Validators.required),
|
|
17430
17617
|
dateTo: new forms.FormControl(invoice.dateTo, forms.Validators.required),
|
|
17431
|
-
items: new forms.FormArray(invoice.items.map(function (item) { return new SoleInvoiceItemForm(item); })),
|
|
17618
|
+
items: new forms.FormArray((invoice.items || [classTransformer.plainToClass(SoleInvoiceItem, {})]).map(function (item) { return new SoleInvoiceItemForm(item); })),
|
|
17432
17619
|
payer: new forms.FormControl(invoice.payer, forms.Validators.required),
|
|
17433
|
-
|
|
17620
|
+
taxType: new forms.FormControl(invoice.taxType, forms.Validators.required),
|
|
17621
|
+
bankAccount: new forms.FormControl(invoice.bankAccount, forms.Validators.required)
|
|
17434
17622
|
}, invoice) || this;
|
|
17435
|
-
|
|
17436
|
-
|
|
17623
|
+
_this.soleDetailsGST = soleDetailsGST;
|
|
17624
|
+
// we need invoice template only for new invoices
|
|
17625
|
+
if (!invoice.id) {
|
|
17626
|
+
_this.addControl('template', new forms.FormControl(invoice.template));
|
|
17627
|
+
}
|
|
17628
|
+
// invoice.taxType is always NONE ('No Tax') when soleDetails.isGST === false
|
|
17629
|
+
if (!_this.soleDetailsGST) {
|
|
17630
|
+
_this.get('taxType').setValue(exports.SoleInvoiceTaxTypeEnum.NO_TAX);
|
|
17631
|
+
_this.get('taxType').disable();
|
|
17632
|
+
// Items isGST is not available when invoice.taxType === NONE ('No Tax')
|
|
17633
|
+
_this.items.controls.forEach(function (itemForm) {
|
|
17634
|
+
_this.disableItemGST(itemForm);
|
|
17635
|
+
});
|
|
17437
17636
|
}
|
|
17438
17637
|
_this.listenEvents();
|
|
17439
17638
|
return _this;
|
|
@@ -17446,59 +17645,121 @@
|
|
|
17446
17645
|
configurable: true
|
|
17447
17646
|
});
|
|
17448
17647
|
SoleInvoiceForm.prototype.listenEvents = function () {
|
|
17449
|
-
this
|
|
17648
|
+
var _this = this;
|
|
17649
|
+
// no need to listen tax type and items chart accounts changes when soleDetails.isGST === false
|
|
17650
|
+
// because invoice tax type always 'No Tax' in this case and not available for changing
|
|
17651
|
+
if (this.soleDetailsGST) {
|
|
17652
|
+
this.listenTaxTypeChanges();
|
|
17653
|
+
this.items.controls.forEach(function (itemForm) {
|
|
17654
|
+
_this.listenItemChartAccountsChanges(itemForm);
|
|
17655
|
+
});
|
|
17656
|
+
}
|
|
17657
|
+
// nothing to listen if template field is not учшые (edit invoice case)
|
|
17658
|
+
if (this.contains('template')) {
|
|
17659
|
+
this.listenTemplateChanges();
|
|
17660
|
+
}
|
|
17450
17661
|
};
|
|
17451
17662
|
SoleInvoiceForm.prototype.addItem = function () {
|
|
17452
|
-
|
|
17663
|
+
var itemForm = new SoleInvoiceItemForm(classTransformer.plainToClass(SoleInvoiceItem, {}));
|
|
17664
|
+
// no need to listen items chart accounts changes when soleDetails.isGST === false
|
|
17665
|
+
// because invoice tax type always 'No Tax' in this case and not available for changing
|
|
17666
|
+
if (this.soleDetailsGST) {
|
|
17667
|
+
this.listenItemChartAccountsChanges(itemForm);
|
|
17668
|
+
}
|
|
17669
|
+
this.items.push(itemForm);
|
|
17453
17670
|
};
|
|
17454
17671
|
SoleInvoiceForm.prototype.removeItem = function (index) {
|
|
17455
|
-
// do not remove the last item
|
|
17456
|
-
if (this.items.length === 1) {
|
|
17457
|
-
return;
|
|
17458
|
-
}
|
|
17459
17672
|
this.items.removeAt(index);
|
|
17460
17673
|
};
|
|
17461
17674
|
SoleInvoiceForm.prototype.submit = function (data) {
|
|
17462
17675
|
if (data === void 0) { data = {}; }
|
|
17676
|
+
// @TODO Alex TT-2190: move child custom forms submit to Abstract Form
|
|
17463
17677
|
var items = this.items.controls.map(function (control) { return control.submit(); });
|
|
17464
|
-
return _super.prototype.submit.call(this,
|
|
17678
|
+
return _super.prototype.submit.call(this, merge__default["default"](data, { items: items }));
|
|
17465
17679
|
};
|
|
17680
|
+
/**
|
|
17681
|
+
* Update default values from selected invoice template
|
|
17682
|
+
*/
|
|
17466
17683
|
SoleInvoiceForm.prototype.listenTemplateChanges = function () {
|
|
17467
17684
|
var _this = this;
|
|
17468
17685
|
this.get('template').valueChanges.subscribe(function (template) {
|
|
17469
|
-
_this.
|
|
17686
|
+
_this.get('bankAccount').setValue(template.bankAccount);
|
|
17687
|
+
var dateFrom = _this.get('dateFrom').value;
|
|
17688
|
+
if (dateFrom) {
|
|
17689
|
+
_this.get('dateTo').setValue(new Date(dateFrom.getTime() + template.termTime));
|
|
17690
|
+
}
|
|
17691
|
+
// invoice.taxType is always 'No Tax' when soleDetails.isGST = false and not available for changing
|
|
17692
|
+
if (_this.soleDetailsGST) {
|
|
17693
|
+
_this.get('taxType').setValue(template.taxType);
|
|
17694
|
+
}
|
|
17695
|
+
});
|
|
17696
|
+
};
|
|
17697
|
+
/**
|
|
17698
|
+
* GST is not available for items when invoice.taxType === NONE
|
|
17699
|
+
*/
|
|
17700
|
+
SoleInvoiceForm.prototype.listenTaxTypeChanges = function () {
|
|
17701
|
+
var _this = this;
|
|
17702
|
+
this.get('taxType').valueChanges.subscribe(function (type) {
|
|
17703
|
+
_this.items.controls.forEach(function (itemForm) {
|
|
17704
|
+
var chartAccounts = itemForm.get('chartAccounts').value;
|
|
17705
|
+
// Item GST is available when invoice.taxType !== NONE ('No Tax')
|
|
17706
|
+
if (type !== exports.SoleInvoiceTaxTypeEnum.NO_TAX && (chartAccounts === null || chartAccounts === void 0 ? void 0 : chartAccounts.isGST)) {
|
|
17707
|
+
_this.enableItemGST(itemForm);
|
|
17708
|
+
return;
|
|
17709
|
+
}
|
|
17710
|
+
_this.disableItemGST(itemForm);
|
|
17711
|
+
});
|
|
17470
17712
|
});
|
|
17471
17713
|
};
|
|
17472
|
-
|
|
17473
|
-
|
|
17474
|
-
|
|
17714
|
+
/**
|
|
17715
|
+
* GST availability depends of chart accounts isGST flag
|
|
17716
|
+
*/
|
|
17717
|
+
SoleInvoiceForm.prototype.listenItemChartAccountsChanges = function (itemForm) {
|
|
17718
|
+
var _this = this;
|
|
17719
|
+
itemForm.get('chartAccounts').valueChanges.subscribe(function (chartAccounts) {
|
|
17720
|
+
// item.isGST is available only when item.chartAccounts.isGST === true, soleDetails.isGST === true and invoice.taxType !== NONE ('No Tax')
|
|
17721
|
+
if (_this.soleDetailsGST && chartAccounts.isGST && !_this.currentValue.isNoTax()) {
|
|
17722
|
+
_this.enableItemGST(itemForm);
|
|
17723
|
+
return;
|
|
17724
|
+
}
|
|
17725
|
+
_this.disableItemGST(itemForm);
|
|
17475
17726
|
});
|
|
17476
17727
|
};
|
|
17728
|
+
SoleInvoiceForm.prototype.disableItemGST = function (itemForm) {
|
|
17729
|
+
itemForm.get('isGST').setValue(false);
|
|
17730
|
+
itemForm.get('isGST').disable();
|
|
17731
|
+
};
|
|
17732
|
+
/**
|
|
17733
|
+
* Enable GST field for passed item form. Value is always true by default because only case when this field is enabled is
|
|
17734
|
+
* when ChartAccounts.isGST === true, so we just use default value from chartAccounts.isGST
|
|
17735
|
+
*/
|
|
17736
|
+
SoleInvoiceForm.prototype.enableItemGST = function (itemForm) {
|
|
17737
|
+
itemForm.get('isGST').setValue(true);
|
|
17738
|
+
itemForm.get('isGST').enable();
|
|
17739
|
+
};
|
|
17477
17740
|
return SoleInvoiceForm;
|
|
17478
17741
|
}(AbstractForm));
|
|
17479
17742
|
|
|
17480
17743
|
var SoleInvoiceTemplateForm = /** @class */ (function (_super) {
|
|
17481
17744
|
__extends(SoleInvoiceTemplateForm, _super);
|
|
17482
|
-
function SoleInvoiceTemplateForm(invoiceTemplate
|
|
17483
|
-
|
|
17745
|
+
function SoleInvoiceTemplateForm(invoiceTemplate) {
|
|
17746
|
+
return _super.call(this, {
|
|
17484
17747
|
name: new forms.FormControl(invoiceTemplate.name, forms.Validators.required),
|
|
17485
|
-
// taxType always 'No Tax' when
|
|
17486
|
-
taxType: new forms.FormControl(
|
|
17748
|
+
// taxType is always 'No Tax' when soleDetails.isGST === false
|
|
17749
|
+
taxType: new forms.FormControl(invoiceTemplate.taxType, forms.Validators.required),
|
|
17487
17750
|
term: new forms.FormControl(invoiceTemplate.term, [forms.Validators.required, forms.Validators.min(0)]),
|
|
17488
17751
|
bankAccount: new forms.FormControl(invoiceTemplate.bankAccount, [forms.Validators.required])
|
|
17489
17752
|
}, invoiceTemplate) || this;
|
|
17490
|
-
_this.soleDetails = soleDetails;
|
|
17491
|
-
return _this;
|
|
17492
17753
|
}
|
|
17493
17754
|
return SoleInvoiceTemplateForm;
|
|
17494
17755
|
}(AbstractForm));
|
|
17495
17756
|
|
|
17496
17757
|
var BankAccountAllocationForm = /** @class */ (function (_super) {
|
|
17497
17758
|
__extends(BankAccountAllocationForm, _super);
|
|
17498
|
-
function BankAccountAllocationForm(bankAccount) {
|
|
17499
|
-
var _this = _super.call(this, {
|
|
17759
|
+
function BankAccountAllocationForm(bankAccount, controls) {
|
|
17760
|
+
var _this = _super.call(this, merge__default["default"](controls, {
|
|
17500
17761
|
tankType: new forms.FormControl(bankAccount ? bankAccount.tankType : null, forms.Validators.required)
|
|
17501
|
-
}, classTransformer.plainToClass(BankAccount, bankAccount || {})) || this;
|
|
17762
|
+
}), classTransformer.plainToClass(BankAccount, bankAccount || {})) || this;
|
|
17502
17763
|
_this.bankAccount = bankAccount;
|
|
17503
17764
|
if (bankAccount === null || bankAccount === void 0 ? void 0 : bankAccount.isPropertyTank()) {
|
|
17504
17765
|
_this.addControl('bankAccountProperties', new BankAccountPropertiesForm(bankAccount.bankAccountProperties));
|
|
@@ -17558,15 +17819,19 @@
|
|
|
17558
17819
|
var BankAccountAddManualForm = /** @class */ (function (_super) {
|
|
17559
17820
|
__extends(BankAccountAddManualForm, _super);
|
|
17560
17821
|
function BankAccountAddManualForm(connection) {
|
|
17561
|
-
var _this = _super.call(this
|
|
17822
|
+
var _this = _super.call(this, null, {
|
|
17823
|
+
type: new forms.FormControl(null, forms.Validators.required),
|
|
17824
|
+
accountName: new forms.FormControl(null, forms.Validators.required),
|
|
17825
|
+
currentBalance: new forms.FormControl(null, forms.Validators.required),
|
|
17826
|
+
accountNumber: new forms.FormControl(null, [forms.Validators.required, forms.Validators.pattern(BankAccountAddManualForm.accountNumberPattern)])
|
|
17827
|
+
}) || this;
|
|
17562
17828
|
_this.connection = connection;
|
|
17563
|
-
_this.addControl('type', new forms.FormControl(null, forms.Validators.required));
|
|
17564
|
-
_this.addControl('accountName', new forms.FormControl(null, forms.Validators.required));
|
|
17565
|
-
_this.addControl('currentBalance', new forms.FormControl(null, forms.Validators.required));
|
|
17566
|
-
_this.addControl('accountNumber', new forms.FormControl(null, [forms.Validators.required, forms.Validators.pattern(BankAccountAddManualForm.accountNumberPattern)]));
|
|
17567
|
-
_this.listenTypeChanges();
|
|
17568
17829
|
return _this;
|
|
17569
17830
|
}
|
|
17831
|
+
BankAccountAddManualForm.prototype.listenEvents = function () {
|
|
17832
|
+
_super.prototype.listenEvents.call(this);
|
|
17833
|
+
this.listenTypeChanges();
|
|
17834
|
+
};
|
|
17570
17835
|
/**
|
|
17571
17836
|
* Add/Remove loan form depends on selected bank account type
|
|
17572
17837
|
*/
|
|
@@ -18643,6 +18908,7 @@
|
|
|
18643
18908
|
exports.Document = Document;
|
|
18644
18909
|
exports.DocumentFolder = DocumentFolder;
|
|
18645
18910
|
exports.DocumentFolderService = DocumentFolderService;
|
|
18911
|
+
exports.DocumentService = DocumentService;
|
|
18646
18912
|
exports.ENDPOINTS = ENDPOINTS;
|
|
18647
18913
|
exports.EmployeeCollection = EmployeeCollection;
|
|
18648
18914
|
exports.EmployeeDetails = EmployeeDetails;
|