taxtank-core 0.16.13 → 0.17.0
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 +124 -140
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/bank-transaction.collection.js +1 -1
- package/esm2015/lib/collections/depreciation.collection.js +2 -2
- package/esm2015/lib/collections/exportable.collection.js +17 -0
- package/esm2015/lib/collections/loan/loan-payment.collection.js +31 -0
- package/esm2015/lib/collections/loan/loan.collection.js +18 -0
- package/esm2015/lib/collections/report/property/property-report-item-transaction.collection.js +1 -1
- package/esm2015/lib/collections/report/vehicle-expense/vehicle-expense.collection.js +1 -1
- package/esm2015/lib/collections/transaction/transaction-allocation.collection.js +40 -0
- package/esm2015/lib/collections/transaction/transaction.collection.js +167 -0
- package/esm2015/lib/models/bank/bank-transaction.js +1 -1
- package/esm2015/lib/models/export/export-cell-type.enum.js +10 -0
- package/esm2015/lib/models/export/export-cell.js +6 -0
- package/esm2015/lib/models/export/export-data-table.js +1 -7
- package/esm2015/lib/models/income-source/income-source-chart-data.js +1 -1
- package/esm2015/lib/models/loan/loan-payment.js +2 -24
- package/esm2015/lib/models/logbook/vehicle-claim.js +1 -1
- package/esm2015/lib/models/property/property-equity-chart-data.js +1 -1
- package/esm2015/lib/models/report/property/property-report-item-transaction.js +1 -1
- package/esm2015/lib/models/transaction/transaction.js +1 -1
- package/esm2015/lib/services/account-setup/account-setup.service.js +2 -2
- package/esm2015/lib/services/bank/bank-account-calculation.service.js +1 -1
- package/esm2015/lib/services/bank/bank-transaction-calculation.service.js +1 -1
- package/esm2015/lib/services/export/export-formatter.service.js +31 -0
- package/esm2015/lib/services/pdf/pdf.service.js +9 -4
- package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +1 -1
- package/esm2015/lib/services/report/property/property-transaction-report.service.js +2 -2
- package/esm2015/lib/services/transaction/transaction-calculation.service.js +2 -2
- package/esm2015/public-api.js +7 -10
- package/fesm2015/taxtank-core.js +105 -129
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/bank-transaction.collection.d.ts +1 -1
- package/lib/collections/depreciation.collection.d.ts +1 -1
- package/lib/collections/exportable.collection.d.ts +9 -0
- package/lib/collections/loan/loan-payment.collection.d.ts +7 -0
- package/lib/collections/{loan.collection.d.ts → loan/loan.collection.d.ts} +2 -2
- package/lib/collections/report/property/property-report-item-transaction.collection.d.ts +1 -1
- package/lib/collections/report/vehicle-expense/vehicle-expense.collection.d.ts +1 -1
- package/lib/collections/{transaction-allocation.collection.d.ts → transaction/transaction-allocation.collection.d.ts} +6 -6
- package/lib/collections/{transaction.collection.d.ts → transaction/transaction.collection.d.ts} +9 -5
- package/lib/models/bank/bank-transaction.d.ts +1 -1
- package/lib/models/export/export-cell-type.enum.d.ts +8 -0
- package/lib/models/export/export-cell.d.ts +8 -0
- package/lib/models/export/export-data-table.d.ts +3 -2
- package/lib/models/income-source/income-source-chart-data.d.ts +1 -1
- package/lib/models/loan/loan-payment.d.ts +1 -5
- package/lib/models/logbook/vehicle-claim.d.ts +1 -1
- package/lib/models/property/property-equity-chart-data.d.ts +1 -1
- package/lib/models/report/property/property-report-item-transaction.d.ts +1 -1
- package/lib/models/transaction/transaction.d.ts +1 -1
- package/lib/services/bank/bank-account-calculation.service.d.ts +1 -1
- package/lib/services/bank/bank-transaction-calculation.service.d.ts +1 -1
- package/lib/services/export/export-formatter.service.d.ts +11 -0
- package/lib/services/pdf/pdf.service.d.ts +3 -0
- package/lib/services/property/property-calculation/property-calculation.service.d.ts +2 -2
- package/lib/services/report/property/property-transaction-report.service.d.ts +1 -1
- package/lib/services/transaction/transaction-calculation.service.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +6 -9
- package/esm2015/lib/collections/loan.collection.js +0 -18
- package/esm2015/lib/collections/transaction-allocation.collection.js +0 -40
- package/esm2015/lib/collections/transaction.collection.js +0 -143
- package/esm2015/lib/interfaces/exportable.interface.js +0 -2
- package/esm2015/lib/services/data-table/data-table.service.js +0 -47
- package/esm2015/lib/services/property/property-holding-costs/property-holding-costs.service.js +0 -53
- package/lib/interfaces/exportable.interface.d.ts +0 -9
- package/lib/services/data-table/data-table.service.d.ts +0 -19
- package/lib/services/property/property-holding-costs/property-holding-costs.service.d.ts +0 -24
|
@@ -1876,6 +1876,50 @@
|
|
|
1876
1876
|
TankTypeEnum[TankTypeEnum["SOLE"] = 4] = "SOLE";
|
|
1877
1877
|
})(exports.TankTypeEnum || (exports.TankTypeEnum = {}));
|
|
1878
1878
|
|
|
1879
|
+
/**
|
|
1880
|
+
* export table column
|
|
1881
|
+
*/
|
|
1882
|
+
var ExportCell = /** @class */ (function () {
|
|
1883
|
+
function ExportCell() {
|
|
1884
|
+
}
|
|
1885
|
+
return ExportCell;
|
|
1886
|
+
}());
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* type of export table column value
|
|
1890
|
+
*/
|
|
1891
|
+
var ExportCellTypeEnum;
|
|
1892
|
+
(function (ExportCellTypeEnum) {
|
|
1893
|
+
ExportCellTypeEnum[ExportCellTypeEnum["STRING"] = 0] = "STRING";
|
|
1894
|
+
ExportCellTypeEnum[ExportCellTypeEnum["CURRENCY"] = 1] = "CURRENCY";
|
|
1895
|
+
ExportCellTypeEnum[ExportCellTypeEnum["DATE"] = 2] = "DATE";
|
|
1896
|
+
})(ExportCellTypeEnum || (ExportCellTypeEnum = {}));
|
|
1897
|
+
|
|
1898
|
+
var ExportDataTable = /** @class */ (function () {
|
|
1899
|
+
function ExportDataTable() {
|
|
1900
|
+
}
|
|
1901
|
+
return ExportDataTable;
|
|
1902
|
+
}());
|
|
1903
|
+
|
|
1904
|
+
var ExportableCollection = /** @class */ (function (_super) {
|
|
1905
|
+
__extends(ExportableCollection, _super);
|
|
1906
|
+
function ExportableCollection() {
|
|
1907
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1908
|
+
}
|
|
1909
|
+
ExportableCollection.prototype.getExportFooter = function (type) {
|
|
1910
|
+
return [];
|
|
1911
|
+
};
|
|
1912
|
+
;
|
|
1913
|
+
ExportableCollection.prototype.export = function (type) {
|
|
1914
|
+
return classTransformer.plainToClass(ExportDataTable, {
|
|
1915
|
+
header: this.getExportHeader(type),
|
|
1916
|
+
body: this.getExportBody(type),
|
|
1917
|
+
footer: [this.getExportFooter(type)]
|
|
1918
|
+
});
|
|
1919
|
+
};
|
|
1920
|
+
return ExportableCollection;
|
|
1921
|
+
}(Collection));
|
|
1922
|
+
|
|
1879
1923
|
/**
|
|
1880
1924
|
* Collection of transactions
|
|
1881
1925
|
*/
|
|
@@ -2047,8 +2091,29 @@
|
|
|
2047
2091
|
}
|
|
2048
2092
|
}));
|
|
2049
2093
|
};
|
|
2094
|
+
TransactionCollection.prototype.getExportHeader = function () {
|
|
2095
|
+
return ['Date', 'Description', 'Debit', 'Credit'];
|
|
2096
|
+
};
|
|
2097
|
+
TransactionCollection.prototype.getExportFooter = function () {
|
|
2098
|
+
return [
|
|
2099
|
+
classTransformer.plainToClass(ExportCell, { value: 'Total', type: ExportCellTypeEnum.STRING }),
|
|
2100
|
+
classTransformer.plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
|
|
2101
|
+
classTransformer.plainToClass(ExportCell, { value: this.sumBy('debit'), type: ExportCellTypeEnum.CURRENCY }),
|
|
2102
|
+
classTransformer.plainToClass(ExportCell, { value: this.sumBy('credit'), type: ExportCellTypeEnum.CURRENCY })
|
|
2103
|
+
];
|
|
2104
|
+
};
|
|
2105
|
+
TransactionCollection.prototype.getExportBody = function () {
|
|
2106
|
+
return this.items.map(function (transaction) {
|
|
2107
|
+
return [
|
|
2108
|
+
classTransformer.plainToClass(ExportCell, { value: transaction.date, type: ExportCellTypeEnum.DATE }),
|
|
2109
|
+
classTransformer.plainToClass(ExportCell, { value: transaction.description, type: ExportCellTypeEnum.STRING }),
|
|
2110
|
+
classTransformer.plainToClass(ExportCell, { value: transaction.debit, type: ExportCellTypeEnum.CURRENCY }),
|
|
2111
|
+
classTransformer.plainToClass(ExportCell, { value: transaction.credit, type: ExportCellTypeEnum.CURRENCY })
|
|
2112
|
+
];
|
|
2113
|
+
});
|
|
2114
|
+
};
|
|
2050
2115
|
return TransactionCollection;
|
|
2051
|
-
}(
|
|
2116
|
+
}(ExportableCollection));
|
|
2052
2117
|
|
|
2053
2118
|
var DepreciationCollection = /** @class */ (function (_super) {
|
|
2054
2119
|
__extends(DepreciationCollection, _super);
|
|
@@ -2259,6 +2324,38 @@
|
|
|
2259
2324
|
return LoanCollection;
|
|
2260
2325
|
}(Collection));
|
|
2261
2326
|
|
|
2327
|
+
var LoanPaymentCollection = /** @class */ (function (_super) {
|
|
2328
|
+
__extends(LoanPaymentCollection, _super);
|
|
2329
|
+
function LoanPaymentCollection() {
|
|
2330
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2331
|
+
}
|
|
2332
|
+
LoanPaymentCollection.prototype.getExportHeader = function () {
|
|
2333
|
+
return [
|
|
2334
|
+
'Pmt No.',
|
|
2335
|
+
'Date',
|
|
2336
|
+
'Payment Due',
|
|
2337
|
+
'Interest Accrued',
|
|
2338
|
+
'Principal Paid',
|
|
2339
|
+
'Principal Balance',
|
|
2340
|
+
'Payout'
|
|
2341
|
+
];
|
|
2342
|
+
};
|
|
2343
|
+
LoanPaymentCollection.prototype.getExportBody = function () {
|
|
2344
|
+
return this.items.map(function (payment) {
|
|
2345
|
+
return [
|
|
2346
|
+
classTransformer.plainToClass(ExportCell, { value: payment.number, type: ExportCellTypeEnum.STRING }),
|
|
2347
|
+
classTransformer.plainToClass(ExportCell, { value: payment.date, type: ExportCellTypeEnum.DATE }),
|
|
2348
|
+
classTransformer.plainToClass(ExportCell, { value: payment.paymentDue, type: ExportCellTypeEnum.CURRENCY }),
|
|
2349
|
+
classTransformer.plainToClass(ExportCell, { value: payment.interestAccrued, type: ExportCellTypeEnum.CURRENCY }),
|
|
2350
|
+
classTransformer.plainToClass(ExportCell, { value: payment.principalPaid, type: ExportCellTypeEnum.CURRENCY }),
|
|
2351
|
+
classTransformer.plainToClass(ExportCell, { value: payment.principalBalance, type: ExportCellTypeEnum.CURRENCY }),
|
|
2352
|
+
classTransformer.plainToClass(ExportCell, { value: payment.payout, type: ExportCellTypeEnum.CURRENCY }),
|
|
2353
|
+
];
|
|
2354
|
+
});
|
|
2355
|
+
};
|
|
2356
|
+
return LoanPaymentCollection;
|
|
2357
|
+
}(ExportableCollection));
|
|
2358
|
+
|
|
2262
2359
|
var MessageCollection = /** @class */ (function (_super) {
|
|
2263
2360
|
__extends(MessageCollection, _super);
|
|
2264
2361
|
function MessageCollection() {
|
|
@@ -4584,34 +4681,6 @@
|
|
|
4584
4681
|
LoanVehicleTypeEnum[LoanVehicleTypeEnum["COMMERCIAL_HIRE_PURCHASE"] = 10] = "COMMERCIAL_HIRE_PURCHASE";
|
|
4585
4682
|
})(exports.LoanVehicleTypeEnum || (exports.LoanVehicleTypeEnum = {}));
|
|
4586
4683
|
|
|
4587
|
-
/**
|
|
4588
|
-
* Class with structure of the data-table rows
|
|
4589
|
-
*/
|
|
4590
|
-
var ExportRow = /** @class */ (function () {
|
|
4591
|
-
function ExportRow() {
|
|
4592
|
-
}
|
|
4593
|
-
return ExportRow;
|
|
4594
|
-
}());
|
|
4595
|
-
|
|
4596
|
-
/**
|
|
4597
|
-
* Enum which shows what type (in terms of business logic) of the data-table row item
|
|
4598
|
-
*/
|
|
4599
|
-
var ExportRowDataTypeEnum;
|
|
4600
|
-
(function (ExportRowDataTypeEnum) {
|
|
4601
|
-
ExportRowDataTypeEnum[ExportRowDataTypeEnum["STRING"] = 0] = "STRING";
|
|
4602
|
-
ExportRowDataTypeEnum[ExportRowDataTypeEnum["CURRENCY"] = 1] = "CURRENCY";
|
|
4603
|
-
ExportRowDataTypeEnum[ExportRowDataTypeEnum["DATE"] = 2] = "DATE";
|
|
4604
|
-
})(ExportRowDataTypeEnum || (ExportRowDataTypeEnum = {}));
|
|
4605
|
-
|
|
4606
|
-
var EXPORT_DATA_TABLE_COLUMNS = [
|
|
4607
|
-
'Pmt No.',
|
|
4608
|
-
'Date',
|
|
4609
|
-
'Payment Due',
|
|
4610
|
-
'Interest Accrued',
|
|
4611
|
-
'Principal Paid',
|
|
4612
|
-
'Principal Balance',
|
|
4613
|
-
'Payout'
|
|
4614
|
-
];
|
|
4615
4684
|
// @Todo no base model from backend list
|
|
4616
4685
|
/**
|
|
4617
4686
|
* Loan payment class
|
|
@@ -4619,17 +4688,6 @@
|
|
|
4619
4688
|
var LoanPayment = /** @class */ (function () {
|
|
4620
4689
|
function LoanPayment() {
|
|
4621
4690
|
}
|
|
4622
|
-
LoanPayment.prototype.toDataTableRows = function () {
|
|
4623
|
-
return [
|
|
4624
|
-
classTransformer.plainToClass(ExportRow, { data: this.number, type: ExportRowDataTypeEnum.STRING }),
|
|
4625
|
-
classTransformer.plainToClass(ExportRow, { data: this.date, type: ExportRowDataTypeEnum.DATE }),
|
|
4626
|
-
classTransformer.plainToClass(ExportRow, { data: this.paymentDue, type: ExportRowDataTypeEnum.CURRENCY }),
|
|
4627
|
-
classTransformer.plainToClass(ExportRow, { data: this.interestAccrued, type: ExportRowDataTypeEnum.CURRENCY }),
|
|
4628
|
-
classTransformer.plainToClass(ExportRow, { data: this.principalPaid, type: ExportRowDataTypeEnum.CURRENCY }),
|
|
4629
|
-
classTransformer.plainToClass(ExportRow, { data: this.principalBalance, type: ExportRowDataTypeEnum.CURRENCY }),
|
|
4630
|
-
classTransformer.plainToClass(ExportRow, { data: this.payout, type: ExportRowDataTypeEnum.CURRENCY }),
|
|
4631
|
-
];
|
|
4632
|
-
};
|
|
4633
4691
|
return LoanPayment;
|
|
4634
4692
|
}());
|
|
4635
4693
|
__decorate([
|
|
@@ -7634,16 +7692,6 @@
|
|
|
7634
7692
|
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 42] = "VEHICLE_LOGBOOK_DELETED";
|
|
7635
7693
|
})(exports.AppEventTypeEnum || (exports.AppEventTypeEnum = {}));
|
|
7636
7694
|
|
|
7637
|
-
/**
|
|
7638
|
-
* Data table structure suitable for export
|
|
7639
|
-
*/
|
|
7640
|
-
var ExportDataTable = /** @class */ (function () {
|
|
7641
|
-
function ExportDataTable() {
|
|
7642
|
-
this.footer = [];
|
|
7643
|
-
}
|
|
7644
|
-
return ExportDataTable;
|
|
7645
|
-
}());
|
|
7646
|
-
|
|
7647
7695
|
exports.ExportFormatEnum = void 0;
|
|
7648
7696
|
(function (ExportFormatEnum) {
|
|
7649
7697
|
ExportFormatEnum["PDF"] = "PDF";
|
|
@@ -11702,43 +11750,29 @@
|
|
|
11702
11750
|
}] }];
|
|
11703
11751
|
} });
|
|
11704
11752
|
|
|
11705
|
-
/**
|
|
11706
|
-
|
|
11707
|
-
*/
|
|
11708
|
-
var DataTableService = /** @class */ (function () {
|
|
11709
|
-
function DataTableService(currencyPipe, datePipe) {
|
|
11753
|
+
var ExportFormatterService = /** @class */ (function () {
|
|
11754
|
+
function ExportFormatterService(currencyPipe, datePipe) {
|
|
11710
11755
|
this.currencyPipe = currencyPipe;
|
|
11711
11756
|
this.datePipe = datePipe;
|
|
11712
11757
|
}
|
|
11713
|
-
|
|
11714
|
-
return classTransformer.plainToClass(ExportDataTable, {
|
|
11715
|
-
header: headerColumns,
|
|
11716
|
-
rows: this.getDataTableRows(exportableModels),
|
|
11717
|
-
});
|
|
11718
|
-
};
|
|
11719
|
-
/**
|
|
11720
|
-
* Get data for the exporting table rows
|
|
11721
|
-
*/
|
|
11722
|
-
DataTableService.prototype.getDataTableRows = function (exportableModels) {
|
|
11758
|
+
ExportFormatterService.prototype.format = function (rows) {
|
|
11723
11759
|
var _this = this;
|
|
11724
|
-
return
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
});
|
|
11735
|
-
});
|
|
11760
|
+
return rows.map(function (row) { return row.map(function (column) {
|
|
11761
|
+
switch (column.type) {
|
|
11762
|
+
case ExportCellTypeEnum.DATE:
|
|
11763
|
+
return _this.datePipe.transform(column.value, 'dd/MM/YYYY').toString();
|
|
11764
|
+
case ExportCellTypeEnum.CURRENCY:
|
|
11765
|
+
return _this.currencyPipe.transform(column.value).toString();
|
|
11766
|
+
default:
|
|
11767
|
+
return column.value.toString();
|
|
11768
|
+
}
|
|
11769
|
+
}); });
|
|
11736
11770
|
};
|
|
11737
|
-
return
|
|
11771
|
+
return ExportFormatterService;
|
|
11738
11772
|
}());
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type:
|
|
11773
|
+
ExportFormatterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ExportFormatterService, deps: [{ token: i1__namespace$1.CurrencyPipe }, { token: i1__namespace$1.DatePipe }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11774
|
+
ExportFormatterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ExportFormatterService, providedIn: 'root' });
|
|
11775
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ExportFormatterService, decorators: [{
|
|
11742
11776
|
type: i0.Injectable,
|
|
11743
11777
|
args: [{
|
|
11744
11778
|
providedIn: 'root'
|
|
@@ -12301,10 +12335,12 @@
|
|
|
12301
12335
|
};
|
|
12302
12336
|
|
|
12303
12337
|
/**
|
|
12338
|
+
* @TODO vik refactor
|
|
12304
12339
|
* Service to work with PDF (generate, download, e.t.c.)
|
|
12305
12340
|
*/
|
|
12306
12341
|
var PdfService = /** @class */ (function () {
|
|
12307
|
-
function PdfService() {
|
|
12342
|
+
function PdfService(formatter) {
|
|
12343
|
+
this.formatter = formatter;
|
|
12308
12344
|
}
|
|
12309
12345
|
/**
|
|
12310
12346
|
* Export file from provided HTML tables
|
|
@@ -12329,7 +12365,7 @@
|
|
|
12329
12365
|
this.setDocumentTitle(pdf, title);
|
|
12330
12366
|
this.setDocumentLogo(pdf);
|
|
12331
12367
|
dataTables.forEach(function (dataTable) {
|
|
12332
|
-
autoTable__default["default"](pdf, Object.assign({ head: [dataTable.header], body: dataTable.
|
|
12368
|
+
autoTable__default["default"](pdf, Object.assign({ head: [dataTable.header], body: _this.formatter.format(dataTable.body), foot: _this.formatter.format(dataTable.footer) }, _this.setTableOptions(pdf, dataTable.caption)));
|
|
12333
12369
|
});
|
|
12334
12370
|
return pdf;
|
|
12335
12371
|
};
|
|
@@ -12386,14 +12422,14 @@
|
|
|
12386
12422
|
};
|
|
12387
12423
|
return PdfService;
|
|
12388
12424
|
}());
|
|
12389
|
-
PdfService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12425
|
+
PdfService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, deps: [{ token: ExportFormatterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12390
12426
|
PdfService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, providedIn: 'root' });
|
|
12391
12427
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, decorators: [{
|
|
12392
12428
|
type: i0.Injectable,
|
|
12393
12429
|
args: [{
|
|
12394
12430
|
providedIn: 'root'
|
|
12395
12431
|
}]
|
|
12396
|
-
}] });
|
|
12432
|
+
}], ctorParameters: function () { return [{ type: ExportFormatterService }]; } });
|
|
12397
12433
|
|
|
12398
12434
|
/**
|
|
12399
12435
|
* Service to handle Property transactions report items data (get income / expense report items, e.t.c.)
|
|
@@ -12584,54 +12620,6 @@
|
|
|
12584
12620
|
}]
|
|
12585
12621
|
}] });
|
|
12586
12622
|
|
|
12587
|
-
/**
|
|
12588
|
-
* Service to work with holding costs (transactions related to vacant land property)
|
|
12589
|
-
*/
|
|
12590
|
-
var PropertyHoldingCostsService = /** @class */ (function () {
|
|
12591
|
-
function PropertyHoldingCostsService(pdfService, currencyPipe, datePipe) {
|
|
12592
|
-
this.pdfService = pdfService;
|
|
12593
|
-
this.currencyPipe = currencyPipe;
|
|
12594
|
-
this.datePipe = datePipe;
|
|
12595
|
-
this.url = 'transactions';
|
|
12596
|
-
this.modelClass = Transaction;
|
|
12597
|
-
}
|
|
12598
|
-
PropertyHoldingCostsService.prototype.initDataTable = function (holdingCosts) {
|
|
12599
|
-
return classTransformer.plainToClass(ExportDataTable, {
|
|
12600
|
-
header: ['Date', 'Description', 'Debit', 'Credit'],
|
|
12601
|
-
rows: this.getDataTableRows(holdingCosts),
|
|
12602
|
-
footer: [
|
|
12603
|
-
'Total',
|
|
12604
|
-
'',
|
|
12605
|
-
this.currencyPipe.transform(holdingCosts.sumBy('debit')).toString(),
|
|
12606
|
-
this.currencyPipe.transform(holdingCosts.sumBy('credit')).toString(),
|
|
12607
|
-
]
|
|
12608
|
-
});
|
|
12609
|
-
};
|
|
12610
|
-
/**
|
|
12611
|
-
* Get data for the exporting table rows
|
|
12612
|
-
*/
|
|
12613
|
-
PropertyHoldingCostsService.prototype.getDataTableRows = function (holdingCosts) {
|
|
12614
|
-
var _this = this;
|
|
12615
|
-
return holdingCosts.items.map(function (transaction) {
|
|
12616
|
-
return [
|
|
12617
|
-
_this.datePipe.transform(transaction.date, 'dd/MM/YYYY').toString(),
|
|
12618
|
-
transaction.description,
|
|
12619
|
-
_this.currencyPipe.transform(transaction.debit).toString(),
|
|
12620
|
-
_this.currencyPipe.transform(transaction.credit).toString()
|
|
12621
|
-
];
|
|
12622
|
-
});
|
|
12623
|
-
};
|
|
12624
|
-
return PropertyHoldingCostsService;
|
|
12625
|
-
}());
|
|
12626
|
-
PropertyHoldingCostsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyHoldingCostsService, deps: [{ token: PdfService }, { token: i1__namespace$1.CurrencyPipe }, { token: i1__namespace$1.DatePipe }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
12627
|
-
PropertyHoldingCostsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyHoldingCostsService, providedIn: 'root' });
|
|
12628
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyHoldingCostsService, decorators: [{
|
|
12629
|
-
type: i0.Injectable,
|
|
12630
|
-
args: [{
|
|
12631
|
-
providedIn: 'root'
|
|
12632
|
-
}]
|
|
12633
|
-
}], ctorParameters: function () { return [{ type: PdfService }, { type: i1__namespace$1.CurrencyPipe }, { type: i1__namespace$1.DatePipe }]; } });
|
|
12634
|
-
|
|
12635
12623
|
/**
|
|
12636
12624
|
* Service for work with Property Categories
|
|
12637
12625
|
*/
|
|
@@ -14116,10 +14104,6 @@
|
|
|
14116
14104
|
return VehicleClaimForm;
|
|
14117
14105
|
}(AbstractForm));
|
|
14118
14106
|
|
|
14119
|
-
/**
|
|
14120
|
-
* Public API Surface of tt-core
|
|
14121
|
-
*/
|
|
14122
|
-
|
|
14123
14107
|
/**
|
|
14124
14108
|
* Generated bundle index. Do not edit.
|
|
14125
14109
|
*/
|
|
@@ -14192,7 +14176,6 @@
|
|
|
14192
14176
|
exports.DEFAULT_VEHICLE_EXPENSE = DEFAULT_VEHICLE_EXPENSE;
|
|
14193
14177
|
exports.DEPRECIATION_GROUPS = DEPRECIATION_GROUPS;
|
|
14194
14178
|
exports.DOCUMENT_FILE_TYPES = DOCUMENT_FILE_TYPES;
|
|
14195
|
-
exports.DataTableService = DataTableService;
|
|
14196
14179
|
exports.Depreciation = Depreciation;
|
|
14197
14180
|
exports.DepreciationCapitalProject = DepreciationCapitalProject;
|
|
14198
14181
|
exports.DepreciationCapitalProjectService = DepreciationCapitalProjectService;
|
|
@@ -14211,7 +14194,6 @@
|
|
|
14211
14194
|
exports.DocumentFolder = DocumentFolder;
|
|
14212
14195
|
exports.DocumentFolderService = DocumentFolderService;
|
|
14213
14196
|
exports.ENDPOINTS = ENDPOINTS;
|
|
14214
|
-
exports.EXPORT_DATA_TABLE_COLUMNS = EXPORT_DATA_TABLE_COLUMNS;
|
|
14215
14197
|
exports.EmployeeCollection = EmployeeCollection;
|
|
14216
14198
|
exports.EmployeeDetails = EmployeeDetails;
|
|
14217
14199
|
exports.EmployeeInvite = EmployeeInvite;
|
|
@@ -14221,6 +14203,8 @@
|
|
|
14221
14203
|
exports.EquityPositionChartService = EquityPositionChartService;
|
|
14222
14204
|
exports.EventDispatcherService = EventDispatcherService;
|
|
14223
14205
|
exports.ExportDataTable = ExportDataTable;
|
|
14206
|
+
exports.ExportFormatterService = ExportFormatterService;
|
|
14207
|
+
exports.ExportableCollection = ExportableCollection;
|
|
14224
14208
|
exports.FinancialYear = FinancialYear;
|
|
14225
14209
|
exports.Firm = Firm;
|
|
14226
14210
|
exports.FirmService = FirmService;
|
|
@@ -14240,6 +14224,7 @@
|
|
|
14240
14224
|
exports.Loan = Loan;
|
|
14241
14225
|
exports.LoanCollection = LoanCollection;
|
|
14242
14226
|
exports.LoanPayment = LoanPayment;
|
|
14227
|
+
exports.LoanPaymentCollection = LoanPaymentCollection;
|
|
14243
14228
|
exports.LoanPayout = LoanPayout;
|
|
14244
14229
|
exports.LoanService = LoanService;
|
|
14245
14230
|
exports.LogbookPeriod = LogbookPeriod;
|
|
@@ -14273,7 +14258,6 @@
|
|
|
14273
14258
|
exports.PropertyEquityChartData = PropertyEquityChartData;
|
|
14274
14259
|
exports.PropertyEquityChartItem = PropertyEquityChartItem;
|
|
14275
14260
|
exports.PropertyForecast = PropertyForecast;
|
|
14276
|
-
exports.PropertyHoldingCostsService = PropertyHoldingCostsService;
|
|
14277
14261
|
exports.PropertyReportItem = PropertyReportItem;
|
|
14278
14262
|
exports.PropertyReportItemCollection = PropertyReportItemCollection;
|
|
14279
14263
|
exports.PropertyReportItemDepreciationCollection = PropertyReportItemDepreciationCollection;
|