taxtank-core 0.10.4 → 0.10.7
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 +247 -139
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/collection.js +8 -1
- package/esm2015/lib/collections/report/property/property-report-item-depreciation.collection.js +12 -9
- package/esm2015/lib/collections/report/property/property-report-item-transaction.collection.js +12 -9
- package/esm2015/lib/collections/report/property/property-report-item.collection.js +13 -0
- package/esm2015/lib/db/Enums/property/property-category-list.enum.js +2 -1
- package/esm2015/lib/models/export/export-data-table.js +6 -0
- package/esm2015/lib/models/report/property/property-report-item-depreciation.js +10 -4
- package/esm2015/lib/models/report/property/property-report-item-transaction.js +2 -2
- package/esm2015/lib/models/report/property/property-report-item.js +10 -1
- package/esm2015/lib/services/http/transaction/transaction.service.js +11 -1
- package/esm2015/lib/services/pdf/pdf.service.js +47 -22
- package/esm2015/lib/services/property/property-holding-costs/property-holding-costs.service.js +53 -0
- package/esm2015/lib/services/report/property/property-transaction-report.service.js +14 -50
- package/esm2015/public-api.js +5 -1
- package/fesm2015/taxtank-core.js +221 -131
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/collection.d.ts +4 -0
- package/lib/collections/report/property/property-report-item-depreciation.collection.d.ts +4 -4
- package/lib/collections/report/property/property-report-item-transaction.collection.d.ts +4 -4
- package/lib/collections/report/property/property-report-item.collection.d.ts +9 -0
- package/lib/db/Enums/property/property-category-list.enum.d.ts +2 -1
- package/lib/models/export/export-data-table.d.ts +9 -0
- package/lib/models/report/property/property-report-item.d.ts +4 -0
- package/lib/services/http/transaction/transaction.service.d.ts +4 -0
- package/lib/services/pdf/pdf.service.d.ts +14 -1
- package/lib/services/property/property-holding-costs/property-holding-costs.service.d.ts +24 -0
- package/lib/services/report/property/property-transaction-report.service.d.ts +5 -12
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -36,6 +36,10 @@ export declare class Collection<Model extends object> implements Iterable<Model>
|
|
|
36
36
|
* Filter items by specific provided callback
|
|
37
37
|
*/
|
|
38
38
|
filter(callback: (item: Model) => boolean): Collection<Model>;
|
|
39
|
+
/**
|
|
40
|
+
* Sort collection items by provided field
|
|
41
|
+
*/
|
|
42
|
+
sortBy(filed?: string, isDesc?: boolean): void;
|
|
39
43
|
get first(): Model;
|
|
40
44
|
get last(): Model;
|
|
41
45
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Collection } from '../../collection';
|
|
2
|
-
import { PropertyReportItem } from '../../../models/report/property/property-report-item';
|
|
3
|
-
import { Property } from '../../../models/property/property';
|
|
4
2
|
import { ChartAccounts } from '../../../models/chart-accounts/chart-accounts';
|
|
5
3
|
import { DepreciationCollection } from '../../depreciation.collection';
|
|
4
|
+
import { PropertyReportItemCollection } from './property-report-item.collection';
|
|
5
|
+
import { PropertyCollection } from '../../property/property.collection';
|
|
6
6
|
/**
|
|
7
7
|
* Collection to work with depreciation-based property report items
|
|
8
8
|
*/
|
|
9
|
-
export declare class PropertyReportItemDepreciationCollection extends
|
|
10
|
-
constructor(depreciations: DepreciationCollection,
|
|
9
|
+
export declare class PropertyReportItemDepreciationCollection extends PropertyReportItemCollection {
|
|
10
|
+
constructor(depreciations: DepreciationCollection, properties: PropertyCollection, chartAccounts: Collection<ChartAccounts>);
|
|
11
11
|
private setItems;
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Collection } from '../../collection';
|
|
2
|
-
import { PropertyReportItem } from '../../../models/report/property/property-report-item';
|
|
3
2
|
import { TransactionCollection } from '../../transaction.collection';
|
|
4
|
-
import { Property } from '../../../models/property/property';
|
|
5
3
|
import { ChartAccounts } from '../../../models/chart-accounts/chart-accounts';
|
|
4
|
+
import { PropertyReportItemCollection } from './property-report-item.collection';
|
|
5
|
+
import { PropertyCollection } from '../../property/property.collection';
|
|
6
6
|
/**
|
|
7
7
|
* Collection to work with transaction-based property report items
|
|
8
8
|
*/
|
|
9
|
-
export declare class PropertyReportItemTransactionCollection extends
|
|
10
|
-
constructor(transactions: TransactionCollection,
|
|
9
|
+
export declare class PropertyReportItemTransactionCollection extends PropertyReportItemCollection {
|
|
10
|
+
constructor(transactions: TransactionCollection, properties: PropertyCollection, chartAccounts: Collection<ChartAccounts>);
|
|
11
11
|
private setItems;
|
|
12
12
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Collection } from '../../collection';
|
|
2
|
+
import { PropertyReportItem } from '../../../models/report/property/property-report-item';
|
|
3
|
+
/**
|
|
4
|
+
* Base collection to work with property report items
|
|
5
|
+
*/
|
|
6
|
+
export declare class PropertyReportItemCollection extends Collection<PropertyReportItem> {
|
|
7
|
+
getIncomes(): this;
|
|
8
|
+
getExpenses(): this;
|
|
9
|
+
}
|
|
@@ -12,7 +12,11 @@ export declare class PropertyReportItem {
|
|
|
12
12
|
subCode: string;
|
|
13
13
|
sharePercent: number;
|
|
14
14
|
claimPercent: number;
|
|
15
|
+
propertyId: number;
|
|
16
|
+
chartAccounts: ChartAccounts;
|
|
15
17
|
constructor(property: Property, chartAccounts: ChartAccounts);
|
|
16
18
|
get claimAmount(): number;
|
|
17
19
|
get shareClaimAmount(): number;
|
|
20
|
+
isIncome(): boolean;
|
|
21
|
+
isExpense(): boolean;
|
|
18
22
|
}
|
|
@@ -42,6 +42,10 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
|
|
|
42
42
|
* get list of transactions with tank type 'Work'
|
|
43
43
|
*/
|
|
44
44
|
getWorkTransactions(): Observable<Transaction[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Get list of property holding costs (transactions related to vacant land property)
|
|
47
|
+
*/
|
|
48
|
+
getPropertyHoldingCosts(propertyId: number): Observable<Transaction[]>;
|
|
45
49
|
/**
|
|
46
50
|
* get list of taxable transactions with tank type 'Work'
|
|
47
51
|
*/
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
import { ExportDataTable } from '../../models/export/export-data-table';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export declare class PdfService {
|
|
3
4
|
/**
|
|
4
|
-
* Export file
|
|
5
|
+
* Export file from provided HTML tables
|
|
5
6
|
*/
|
|
6
7
|
exportTables(tables: NodeListOf<HTMLTableElement>, title: string, fileName: string): void;
|
|
8
|
+
/**
|
|
9
|
+
* Export file from provided array-like table data
|
|
10
|
+
*/
|
|
11
|
+
exportFromDataTables(dataTables: ExportDataTable[], title: string, fileName: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Generate file from array-like table data
|
|
14
|
+
*/
|
|
15
|
+
private generateFromDataTables;
|
|
7
16
|
private generateFromTables;
|
|
17
|
+
/**
|
|
18
|
+
* Set basic options for PDF table
|
|
19
|
+
*/
|
|
20
|
+
private setTableOptions;
|
|
8
21
|
private setDocumentTitle;
|
|
9
22
|
private setDocumentLogo;
|
|
10
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdfService, never>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Transaction } from '../../../models/transaction/transaction';
|
|
2
|
+
import { ExportDataTable } from '../../../models/export/export-data-table';
|
|
3
|
+
import { PdfService } from '../../pdf/pdf.service';
|
|
4
|
+
import { TransactionCollection } from '../../../collections/transaction.collection';
|
|
5
|
+
import { CurrencyPipe, DatePipe } from '@angular/common';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Service to work with holding costs (transactions related to vacant land property)
|
|
9
|
+
*/
|
|
10
|
+
export declare class PropertyHoldingCostsService {
|
|
11
|
+
private pdfService;
|
|
12
|
+
private currencyPipe;
|
|
13
|
+
private datePipe;
|
|
14
|
+
url: string;
|
|
15
|
+
modelClass: typeof Transaction;
|
|
16
|
+
constructor(pdfService: PdfService, currencyPipe: CurrencyPipe, datePipe: DatePipe);
|
|
17
|
+
initDataTable(holdingCosts: TransactionCollection): ExportDataTable;
|
|
18
|
+
/**
|
|
19
|
+
* Get data for the exporting table rows
|
|
20
|
+
*/
|
|
21
|
+
private getDataTableRows;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PropertyHoldingCostsService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PropertyHoldingCostsService>;
|
|
24
|
+
}
|
|
@@ -7,9 +7,9 @@ import { Property } from '../../../models/property/property';
|
|
|
7
7
|
import { ChartAccounts } from '../../../models/chart-accounts/chart-accounts';
|
|
8
8
|
import { DepreciationCollection } from '../../../collections/depreciation.collection';
|
|
9
9
|
import { Collection } from '../../../collections/collection';
|
|
10
|
-
import { PropertyReportItem } from '../../../models/report/property/property-report-item';
|
|
11
10
|
import { CollectionDictionary } from '../../../collections/collection-dictionary';
|
|
12
11
|
import { TransactionCollection } from '../../../collections/transaction.collection';
|
|
12
|
+
import { PropertyReportItemCollection } from '../../../collections/report/property/property-report-item.collection';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
/**
|
|
15
15
|
* Service to handle Property transactions report items data (get income / expense report items, e.t.c.)
|
|
@@ -25,25 +25,18 @@ export declare class PropertyTransactionReportService {
|
|
|
25
25
|
chartAccounts: Collection<ChartAccounts>;
|
|
26
26
|
constructor(propertyService: PropertyService, transactionService: TransactionService, depreciationService: DepreciationService, chartAccountsService: ChartAccountsService);
|
|
27
27
|
/**
|
|
28
|
-
* Get
|
|
28
|
+
* Get collection of report items based on transactions & depreciations
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
get(): Observable<CollectionDictionary<PropertyReportItemCollection>>;
|
|
31
|
+
private create;
|
|
31
32
|
/**
|
|
32
|
-
* Get
|
|
33
|
-
*/
|
|
34
|
-
getExpenses(): Observable<CollectionDictionary<Collection<PropertyReportItem>>>;
|
|
35
|
-
private initIncomeItemsData;
|
|
36
|
-
private initExpenseItemsData;
|
|
37
|
-
/**
|
|
38
|
-
* Get colection of property transactions
|
|
33
|
+
* Get collection of property transactions
|
|
39
34
|
*/
|
|
40
35
|
private getTransactions;
|
|
41
36
|
/**
|
|
42
37
|
* Get list of asset & capital property depreciations
|
|
43
38
|
*/
|
|
44
39
|
private getDepreciations;
|
|
45
|
-
private getProperties;
|
|
46
|
-
private getChartAccounts;
|
|
47
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<PropertyTransactionReportService, never>;
|
|
48
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<PropertyTransactionReportService>;
|
|
49
42
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './lib/collections/message-document.collection';
|
|
|
23
23
|
export * from './lib/collections/property/property.collection';
|
|
24
24
|
export * from './lib/collections/report/depreciation/depreciation-lvp-report-item.collection';
|
|
25
25
|
export * from './lib/collections/report/depreciation/depreciation-report-item.collection';
|
|
26
|
+
export * from './lib/collections/report/property/property-report-item.collection';
|
|
26
27
|
export * from './lib/collections/report/property/property-report-item-transaction.collection';
|
|
27
28
|
export * from './lib/collections/report/property/property-report-item-depreciation.collection';
|
|
28
29
|
export * from './lib/collections/service-price.collection';
|
|
@@ -79,6 +80,7 @@ export * from './lib/db/Enums/loan-type.enum';
|
|
|
79
80
|
export * from './lib/db/Enums/loan-vehicle-type.enum';
|
|
80
81
|
export * from './lib/db/Enums/phone-type.enum';
|
|
81
82
|
export * from './lib/db/Enums/property/property-depreciation-calculation.enum';
|
|
83
|
+
export * from './lib/db/Enums/property/property-category-list.enum';
|
|
82
84
|
export * from './lib/db/Enums/property/property-share-access.enum';
|
|
83
85
|
export * from './lib/db/Enums/property/property-share-status.enum';
|
|
84
86
|
export * from './lib/db/Enums/registration-invite-status.enum';
|
|
@@ -176,6 +178,7 @@ export * from './lib/models/endpoint/endpoint';
|
|
|
176
178
|
export * from './lib/models/endpoint/endpoints.const';
|
|
177
179
|
export * from './lib/models/event/app-event';
|
|
178
180
|
export * from './lib/models/event/app-event-type.enum';
|
|
181
|
+
export * from './lib/models/export/export-data-table';
|
|
179
182
|
export * from './lib/models/export/export-format.enum';
|
|
180
183
|
export * from './lib/models/file/icons-file.enum';
|
|
181
184
|
export * from './lib/models/financial-year/financial-year';
|
|
@@ -308,6 +311,7 @@ export * from './lib/services/report/property/property-transaction-report.servic
|
|
|
308
311
|
export * from './lib/services/property/corelogic/corelogic.service';
|
|
309
312
|
export * from './lib/services/http/property/property.service';
|
|
310
313
|
export * from './lib/services/property/property-calculation/property-calculation.service';
|
|
314
|
+
export * from './lib/services/property/property-holding-costs/property-holding-costs.service';
|
|
311
315
|
export * from './lib/services/http/property/property-category/property-category.service';
|
|
312
316
|
export * from './lib/services/http/property/property-document/property-document.service';
|
|
313
317
|
export * from './lib/services/http/property/property-share/property-share.service';
|