taxtank-core 0.17.11 → 0.17.12
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 +33 -28
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/property/property.collection.js +20 -1
- package/esm2015/lib/models/depreciation/depreciation.js +11 -2
- package/esm2015/lib/models/property/property.js +4 -1
- package/esm2015/lib/services/http/depreciation/depreciation.service.js +1 -25
- package/esm2015/lib/services/http/property/property.service.js +2 -2
- package/fesm2015/taxtank-core.js +33 -26
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/property/property.collection.d.ts +10 -0
- package/lib/models/depreciation/depreciation.d.ts +4 -1
- package/lib/models/property/property.d.ts +3 -0
- package/lib/services/http/depreciation/depreciation.service.d.ts +0 -6
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Collection } from '../collection';
|
|
2
2
|
import { Property } from '../../models/property/property';
|
|
3
3
|
import { PropertyCategory } from '../../models/property/property-category';
|
|
4
|
+
import { DepreciationCollection } from '../depreciation.collection';
|
|
5
|
+
import { TransactionCollection } from '../transaction/transaction.collection';
|
|
4
6
|
export declare class PropertyCollection extends Collection<Property> {
|
|
5
7
|
/**
|
|
6
8
|
* Get new property collection filtered by category id
|
|
@@ -32,4 +34,12 @@ export declare class PropertyCollection extends Collection<Property> {
|
|
|
32
34
|
* Get list of unique property categories from collection
|
|
33
35
|
*/
|
|
34
36
|
getCategories(): PropertyCategory[];
|
|
37
|
+
/**
|
|
38
|
+
* Get property with the highest growth percent
|
|
39
|
+
*/
|
|
40
|
+
getBestPerformanceGrowthProperty(): Property;
|
|
41
|
+
/**
|
|
42
|
+
* Get property with the lowest tax position
|
|
43
|
+
*/
|
|
44
|
+
getBestPerformanceTaxProperty(transactions: TransactionCollection, depreciations: DepreciationCollection): Property;
|
|
35
45
|
}
|
|
@@ -56,7 +56,7 @@ export declare class Depreciation extends DepreciationBase implements Expense, I
|
|
|
56
56
|
*/
|
|
57
57
|
getDate(): Date;
|
|
58
58
|
/**
|
|
59
|
-
* @TODO
|
|
59
|
+
* @TODO Vik: Research a problem with depreciations without current year forecast
|
|
60
60
|
*/
|
|
61
61
|
get currentYearForecast(): DepreciationForecast;
|
|
62
62
|
getForecastByYear(year: number): DepreciationForecast;
|
|
@@ -67,5 +67,8 @@ export declare class Depreciation extends DepreciationBase implements Expense, I
|
|
|
67
67
|
* Create a new transaction from current depreciation
|
|
68
68
|
*/
|
|
69
69
|
toTransaction(params?: {}): Transaction;
|
|
70
|
+
/**
|
|
71
|
+
* @TODO Michael: remove and check everywhere in reports
|
|
72
|
+
*/
|
|
70
73
|
get claimAmount(): number;
|
|
71
74
|
}
|
|
@@ -12,6 +12,8 @@ import { User } from '../user/user';
|
|
|
12
12
|
import { TaxExemptionEnum } from '../../db/Enums/property/property-sale/tax-exemption.enum';
|
|
13
13
|
import { PropertySale } from './property-sale/property-sale';
|
|
14
14
|
import { unitOfTime } from 'moment';
|
|
15
|
+
import { TransactionCollection } from '../../collections/transaction/transaction.collection';
|
|
16
|
+
import { DepreciationCollection } from '../../collections/depreciation.collection';
|
|
15
17
|
/**
|
|
16
18
|
* propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
|
|
17
19
|
*/
|
|
@@ -84,4 +86,5 @@ export declare class Property extends PropertyBase implements Photoable, Documen
|
|
|
84
86
|
* ownership duration from purchase till sale
|
|
85
87
|
*/
|
|
86
88
|
getOwnershipDuration(sale: PropertySale, unitOfTime?: unitOfTime.Diff): number;
|
|
89
|
+
getTaxPosition(transactions: TransactionCollection, depreciations: DepreciationCollection): number;
|
|
87
90
|
}
|
|
@@ -22,12 +22,6 @@ export declare class DepreciationService extends RestService<DepreciationBase, D
|
|
|
22
22
|
*/
|
|
23
23
|
listenEvents(): void;
|
|
24
24
|
getOpenBalance(depreciation: Depreciation): Observable<number>;
|
|
25
|
-
/**
|
|
26
|
-
* @TODO wrong place, move to collection model
|
|
27
|
-
*/
|
|
28
|
-
calculateSummaryAmount(depreciationList: Depreciation[]): number;
|
|
29
|
-
calculateBorrowingExpenses(depreciationList: Depreciation[]): Observable<number>;
|
|
30
|
-
calculateDepreciations(depreciationList: Depreciation[]): Observable<number>;
|
|
31
25
|
/**
|
|
32
26
|
* Upload depreciation receipt
|
|
33
27
|
* @param depreciation for which will be uploaded receipt
|