taxtank-core 0.30.29 → 0.30.30
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/esm2020/lib/collections/holding.collection.mjs +28 -0
- package/esm2020/lib/collections/index.mjs +2 -1
- package/esm2020/lib/collections/property/property-sale/property-sale.collection.mjs +3 -3
- package/esm2020/lib/db/Enums/holding/holding-type-category.enum.mjs +1 -1
- package/esm2020/lib/db/Enums/index.mjs +2 -1
- package/esm2020/lib/db/Models/client/annual-client-details.mjs +3 -0
- package/esm2020/lib/db/Models/client/client-details.mjs +4 -0
- package/esm2020/lib/db/Models/client/client-income-types.mjs +4 -0
- package/esm2020/lib/db/Models/client/index.mjs +5 -0
- package/esm2020/lib/db/Models/client/occupation.mjs +4 -0
- package/esm2020/lib/db/Models/index.mjs +2 -4
- package/esm2020/lib/db/Models/property/property-sale/property-sale.mjs +1 -1
- package/esm2020/lib/db/Models/user/user.mjs +1 -1
- package/esm2020/lib/forms/client/annual-client-details.form.mjs +37 -0
- package/esm2020/lib/forms/client/index.mjs +3 -0
- package/esm2020/lib/forms/holding/holding-sale.form.mjs +39 -0
- package/esm2020/lib/forms/holding/holding-type.form.mjs +16 -0
- package/esm2020/lib/forms/holding/holding.form.mjs +17 -0
- package/esm2020/lib/forms/holding/index.mjs +4 -0
- package/esm2020/lib/forms/index.mjs +3 -2
- package/esm2020/lib/forms/property/property-sale/property-sale-cost-sale.form.mjs +11 -25
- package/esm2020/lib/forms/property/property-sale/property-sale-exemptions.form.mjs +18 -7
- package/esm2020/lib/forms/report/my-tax/my-tax-cgt.form.mjs +4 -1
- package/esm2020/lib/messages/index.mjs +2 -0
- package/esm2020/lib/messages/messages.enum.mjs +16 -0
- package/esm2020/lib/models/client/annual-client-details.mjs +15 -0
- package/esm2020/lib/models/client/client-details.mjs +2 -2
- package/esm2020/lib/models/client/client-income-types.mjs +2 -2
- package/esm2020/lib/models/client/index.mjs +8 -0
- package/esm2020/lib/models/endpoint/endpoints.const.mjs +17 -1
- package/esm2020/lib/models/holding/holding-sale.mjs +18 -1
- package/esm2020/lib/models/holding/holding-type-exchange.mjs +13 -0
- package/esm2020/lib/models/holding/holding-type.mjs +37 -1
- package/esm2020/lib/models/holding/holding.mjs +32 -1
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/property/property-sale/property-sale.mjs +19 -6
- package/esm2020/lib/models/property/property-sale/tax-exemption.mjs +5 -1
- package/esm2020/lib/models/property/property.mjs +38 -18
- package/esm2020/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.mjs +7 -6
- package/esm2020/lib/models/user/occupation.mjs +2 -2
- package/esm2020/lib/services/http/client/capital-gain/annual-client-details.service.mjs +24 -0
- package/esm2020/lib/services/http/client/index.mjs +3 -0
- package/esm2020/lib/services/http/client/occupation/occupation.service.mjs +45 -0
- package/esm2020/lib/services/http/firm/client-income/client-income-types.service.mjs +1 -1
- package/esm2020/lib/services/http/holding/holding-sale.service.mjs +1 -4
- package/esm2020/lib/services/http/holding/holding-type.service.mjs +1 -4
- package/esm2020/lib/services/http/holding/holding.service.mjs +3 -6
- package/esm2020/lib/services/http/index.mjs +2 -1
- package/esm2020/lib/services/http/user/index.mjs +2 -2
- package/esm2020/lib/services/http/user/user.service.mjs +2 -11
- package/esm2020/public-api.mjs +5 -1
- package/fesm2015/taxtank-core.mjs +559 -254
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +556 -252
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/holding.collection.d.ts +10 -0
- package/lib/collections/index.d.ts +1 -0
- package/lib/collections/property/property-sale/property-sale.collection.d.ts +1 -1
- package/lib/db/Enums/index.d.ts +1 -0
- package/lib/db/Models/client/annual-client-details.d.ts +12 -0
- package/lib/db/Models/{user → client}/client-details.d.ts +1 -2
- package/lib/db/Models/client/index.d.ts +4 -0
- package/lib/db/Models/index.d.ts +1 -3
- package/lib/db/Models/property/property-sale/property-sale.d.ts +2 -3
- package/lib/db/Models/user/user.d.ts +1 -1
- package/lib/forms/client/annual-client-details.form.d.ts +8 -0
- package/lib/forms/client/index.d.ts +2 -0
- package/lib/forms/holding/holding-sale.form.d.ts +11 -0
- package/lib/forms/holding/holding-type.form.d.ts +5 -0
- package/lib/forms/holding/holding.form.d.ts +5 -0
- package/lib/forms/holding/index.d.ts +3 -0
- package/lib/forms/index.d.ts +2 -1
- package/lib/forms/property/property-sale/property-sale-cost-sale.form.d.ts +1 -3
- package/lib/forms/property/property-sale/property-sale-exemptions.form.d.ts +6 -6
- package/lib/forms/report/my-tax/my-tax-cgt.form.d.ts +4 -1
- package/lib/messages/index.d.ts +1 -0
- package/lib/messages/messages.enum.d.ts +14 -0
- package/lib/models/client/annual-client-details.d.ts +12 -0
- package/lib/models/client/client-details.d.ts +1 -1
- package/lib/models/client/client-income-types.d.ts +1 -1
- package/lib/models/client/index.d.ts +7 -0
- package/lib/models/holding/holding-sale.d.ts +6 -1
- package/lib/models/holding/holding-type-exchange.d.ts +11 -0
- package/lib/models/holding/holding-type.d.ts +31 -8
- package/lib/models/holding/holding.d.ts +16 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/property/property-sale/property-sale.d.ts +7 -2
- package/lib/models/property/property-sale/tax-exemption.d.ts +1 -0
- package/lib/models/property/property.d.ts +12 -6
- package/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.d.ts +2 -2
- package/lib/models/user/occupation.d.ts +1 -1
- package/lib/services/http/client/capital-gain/annual-client-details.service.d.ts +14 -0
- package/lib/services/http/client/index.d.ts +2 -0
- package/lib/services/http/firm/client-income/client-income-types.service.d.ts +1 -1
- package/lib/services/http/holding/holding-sale.service.d.ts +0 -3
- package/lib/services/http/holding/holding-type.service.d.ts +0 -3
- package/lib/services/http/holding/holding.service.d.ts +3 -6
- package/lib/services/http/index.d.ts +1 -0
- package/lib/services/http/user/index.d.ts +1 -1
- package/lib/services/http/user/user.service.d.ts +0 -4
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/esm2020/lib/db/Models/user/client-details.mjs +0 -4
- package/esm2020/lib/db/Models/user/client-income-types.mjs +0 -4
- package/esm2020/lib/db/Models/user/occupation.mjs +0 -4
- package/esm2020/lib/services/http/user/occupation/occupation.service.mjs +0 -45
- /package/lib/db/Models/{user → client}/client-income-types.d.ts +0 -0
- /package/lib/db/Models/{user → client}/occupation.d.ts +0 -0
- /package/lib/services/http/{user → client}/occupation/occupation.service.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Collection } from '.';
|
|
2
|
+
import { Dictionary, Holding, HoldingType } from '../models';
|
|
3
|
+
export declare class HoldingCollection extends Collection<Holding> {
|
|
4
|
+
getShares(): this;
|
|
5
|
+
getCryptos(): this;
|
|
6
|
+
getOthers(): this;
|
|
7
|
+
getPurchaseValue(): number;
|
|
8
|
+
getMarketValue(holdingTypesById: Dictionary<HoldingType>): number;
|
|
9
|
+
getGrowthCoefficient(holdingTypesById: Dictionary<HoldingType>): number;
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Collection } from '../../collection';
|
|
2
2
|
import { PropertySale } from '../../../models/property/property-sale/property-sale';
|
|
3
3
|
export declare class PropertySaleCollection extends Collection<PropertySale> {
|
|
4
|
-
get
|
|
4
|
+
get grossCapitalGain(): number;
|
|
5
5
|
/**
|
|
6
6
|
* Property sales are CGT applicable unless it has "Principle place of residence" exemption type
|
|
7
7
|
*/
|
package/lib/db/Enums/index.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientDetails } from './client-details';
|
|
2
|
+
export declare class AnnualClientDetails {
|
|
3
|
+
capitalLoss?: number;
|
|
4
|
+
privateHealthCare?: boolean;
|
|
5
|
+
spouse?: boolean;
|
|
6
|
+
spouseAnnualIncome?: number;
|
|
7
|
+
dependants?: number;
|
|
8
|
+
studentLoanAmount?: number;
|
|
9
|
+
id?: number;
|
|
10
|
+
financialYear?: number;
|
|
11
|
+
clientDetails?: ClientDetails;
|
|
12
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientDetailsWorkDepreciationCalculationEnum } from '../../Enums/client-details-work-depreciation-calculation.enum';
|
|
2
2
|
import { ClientDetailsMedicareExemptionEnum } from '../../Enums/client-details-medicare-exemption.enum';
|
|
3
3
|
import { ClientDetailsWorkingHolidayMakerEnum } from '../../Enums/client-details-working-holiday-maker.enum';
|
|
4
|
-
import { User } from '
|
|
4
|
+
import { User } from '../user/user';
|
|
5
5
|
import { Occupation } from './occupation';
|
|
6
6
|
import { Address } from '../address';
|
|
7
7
|
import { Phone } from '../phone';
|
|
@@ -21,7 +21,6 @@ export declare class ClientDetails extends AbstractModel {
|
|
|
21
21
|
workingHolidayMaker?: ClientDetailsWorkingHolidayMakerEnum;
|
|
22
22
|
dateOfBirth?: Date;
|
|
23
23
|
isGST?: boolean;
|
|
24
|
-
capitalLoss?: number;
|
|
25
24
|
basiqConsentExist?: boolean;
|
|
26
25
|
id?: number;
|
|
27
26
|
deletedAt?: Date;
|
package/lib/db/Models/index.d.ts
CHANGED
|
@@ -77,10 +77,8 @@ export * from './transaction/transaction-base';
|
|
|
77
77
|
export * from './transaction/transaction-meta-field';
|
|
78
78
|
export * from './transaction/transaction-receipt';
|
|
79
79
|
export * from './transaction/transaction';
|
|
80
|
-
export * from './
|
|
81
|
-
export * from './user/client-income-types';
|
|
80
|
+
export * from './client';
|
|
82
81
|
export * from './user/employee-details';
|
|
83
|
-
export * from './user/occupation';
|
|
84
82
|
export * from './user/registration-invite';
|
|
85
83
|
export * from './user/user-event-setting';
|
|
86
84
|
export * from './user/user-event-type-category';
|
|
@@ -13,9 +13,8 @@ export declare class PropertySale extends ObservableModel {
|
|
|
13
13
|
commission?: number;
|
|
14
14
|
legalFees?: number;
|
|
15
15
|
otherCost?: number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
netCGT?: number;
|
|
16
|
+
grossCapitalGain?: number;
|
|
17
|
+
netCapitalGain?: number;
|
|
19
18
|
createdAt?: Date;
|
|
20
19
|
updatedAt?: Date;
|
|
21
20
|
share?: PropertyShare;
|
|
@@ -11,7 +11,7 @@ import { PropertyShare } from '../property/property-share';
|
|
|
11
11
|
import { Address } from '../address';
|
|
12
12
|
import { Phone } from '../phone';
|
|
13
13
|
import { ClientMovement } from '../firm/client-movement';
|
|
14
|
-
import { ClientDetails } from '
|
|
14
|
+
import { ClientDetails } from '../client/client-details';
|
|
15
15
|
import { EmployeeDetails } from './employee-details';
|
|
16
16
|
import { AbstractModel } from '../abstract-model';
|
|
17
17
|
import { SoleDetails } from '../sole/sole-details';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AbstractForm } from '../abstract.form';
|
|
2
|
+
import { AnnualClientDetails } from '../../models';
|
|
3
|
+
export declare class AnnualClientDetailsForm extends AbstractForm<AnnualClientDetails> {
|
|
4
|
+
private annualClientDetails;
|
|
5
|
+
constructor(annualClientDetails?: AnnualClientDetails);
|
|
6
|
+
private watchFieldForToggle;
|
|
7
|
+
private toggleField;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IEventListener } from '../../interfaces';
|
|
2
|
+
import { Holding, HoldingSale, HoldingType } from '../../models';
|
|
3
|
+
import { AbstractForm } from '../abstract.form';
|
|
4
|
+
export declare class HoldingSaleForm extends AbstractForm<HoldingSale> implements IEventListener {
|
|
5
|
+
private holding;
|
|
6
|
+
constructor(sale: HoldingSale, holding: Holding, type: HoldingType);
|
|
7
|
+
listenEvents(): void;
|
|
8
|
+
private listenQuantityChanges;
|
|
9
|
+
private listenPriceChanges;
|
|
10
|
+
private updateGainFields;
|
|
11
|
+
}
|
package/lib/forms/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export * from './bank/bank-account/bank-account-add-manual.form';
|
|
|
7
7
|
export * from './bank/bank-account/bank-account-properties.form';
|
|
8
8
|
export * from './bank/bank-account/bank-accounts-import.form';
|
|
9
9
|
export * from './bank/bank-login.form';
|
|
10
|
-
export * from './client
|
|
10
|
+
export * from './client';
|
|
11
11
|
export * from './login/login.form';
|
|
12
12
|
export * from './phone';
|
|
13
13
|
export * from './register/register-client.form';
|
|
@@ -20,3 +20,4 @@ export * from './vehicle';
|
|
|
20
20
|
export * from './form-validations.enum';
|
|
21
21
|
export * from './transaction';
|
|
22
22
|
export * from './depreciation';
|
|
23
|
+
export * from './holding';
|
|
@@ -16,11 +16,9 @@ export declare class PropertySaleCostSaleForm extends AbstractForm<PropertySale>
|
|
|
16
16
|
*/
|
|
17
17
|
getPropertySale(): PropertySale;
|
|
18
18
|
submit(data?: object): PropertySale;
|
|
19
|
-
private
|
|
19
|
+
private updateGrossCapitalGain;
|
|
20
20
|
private listenCommissionUpdated;
|
|
21
21
|
private listenLegalFeesUpdated;
|
|
22
22
|
private listenOtherCostUpdated;
|
|
23
23
|
private listenPriceUpdated;
|
|
24
|
-
private listenCapitalLossUpdated;
|
|
25
|
-
private listenGrossCGT;
|
|
26
24
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { AbstractForm } from '../../abstract.form';
|
|
2
|
-
import { PropertySale } from '../../../models
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { TaxExemption } from '../../../models/property/property-sale';
|
|
6
|
-
import { IEventListener } from '../../../interfaces/event-listener.interface';
|
|
2
|
+
import { PropertySale, Property, TaxExemption } from '../../../models';
|
|
3
|
+
import { Collection } from '../../../collections';
|
|
4
|
+
import { IEventListener } from '../../../interfaces';
|
|
7
5
|
/**
|
|
8
6
|
* @Todo TT-2143 Create and extend from abstract PropertySale form
|
|
9
7
|
*/
|
|
@@ -17,7 +15,9 @@ export declare class PropertySaleExemptionsForm extends AbstractForm<PropertySal
|
|
|
17
15
|
* @Todo TT-2143 Move to parent abstract PropertySale form
|
|
18
16
|
*/
|
|
19
17
|
getPropertySale(): PropertySale;
|
|
20
|
-
private
|
|
18
|
+
private updateCapitalGains;
|
|
19
|
+
private updateNetCapitalGain;
|
|
20
|
+
private updateGrossCapitalGain;
|
|
21
21
|
private listenTaxExemptionUpdated;
|
|
22
22
|
/**
|
|
23
23
|
* show meta fields related to passed tax exemption or existing property sale meta fields
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AbstractForm } from '../../abstract.form';
|
|
2
|
-
import { MyTaxCgt } from '../../../models/report
|
|
2
|
+
import { MyTaxCgt } from '../../../models/report';
|
|
3
|
+
/**
|
|
4
|
+
* @TODO vik/nicole test
|
|
5
|
+
*/
|
|
3
6
|
export declare class MyTaxCgtForm extends AbstractForm<MyTaxCgt> {
|
|
4
7
|
constructor(gainsOrLosses: MyTaxCgt);
|
|
5
8
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './messages.enum';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum MessagesEnum {
|
|
2
|
+
HOLDING_CREATED = "Holding created",
|
|
3
|
+
HOLDING_UPDATED = "Holding updated",
|
|
4
|
+
HOLDING_CONFIRM_DELETE = "Are you sure you want to delete this holding?",
|
|
5
|
+
HOLDING_DELETED = "Holding deleted",
|
|
6
|
+
HOLDING_SALE_CREATED = "Holding sale created",
|
|
7
|
+
HOLDING_SALE_UPDATED = "Holding sale updated",
|
|
8
|
+
HOLDING_SALE_CONFIRM_DELETE = "Are you sure you want to delete this holding sale?",
|
|
9
|
+
HOLDING_SALE_DELETED = "Holding sale deleted",
|
|
10
|
+
HOLDING_TYPE_CREATED = "Holding type created",
|
|
11
|
+
HOLDING_TYPE_UPDATED = "Holding type updated",
|
|
12
|
+
HOLDING_TYPE_CONFIRM_DELETE = "Are you sure you want to delete this holding type?",
|
|
13
|
+
HOLDING_TYPE_DELETED = "Holding type deleted"
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbstractModel } from '../../db/Models';
|
|
2
|
+
import { ClientDetails } from './client-details';
|
|
3
|
+
export declare class AnnualClientDetails extends AbstractModel {
|
|
4
|
+
capitalLoss: number;
|
|
5
|
+
privateHealthCare: boolean;
|
|
6
|
+
spouse: boolean;
|
|
7
|
+
spouseAnnualIncome?: number;
|
|
8
|
+
dependants?: number;
|
|
9
|
+
studentLoanAmount?: number;
|
|
10
|
+
financialYear: number;
|
|
11
|
+
clientDetails: ClientDetails;
|
|
12
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientIncomeTypes as ClientIncomeTypesBase } from '../../db/Models/
|
|
1
|
+
import { ClientIncomeTypes as ClientIncomeTypesBase } from '../../db/Models/client/client-income-types';
|
|
2
2
|
export declare class ClientIncomeTypes extends ClientIncomeTypesBase {
|
|
3
3
|
/**
|
|
4
4
|
* Get count of selected income types
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './annual-client-details';
|
|
2
|
+
export * from './client-details';
|
|
3
|
+
export * from './client-income-types';
|
|
4
|
+
export * from './client-invite';
|
|
5
|
+
export * from './client-movement';
|
|
6
|
+
export * from './client-portfolio-chart-data';
|
|
7
|
+
export * from './client-portfolio-report';
|
|
@@ -6,7 +6,12 @@ export declare class HoldingSale extends AbstractModel {
|
|
|
6
6
|
price: number;
|
|
7
7
|
fee: number;
|
|
8
8
|
total: number;
|
|
9
|
-
|
|
9
|
+
totalCapitalGain: number;
|
|
10
|
+
grossCapitalGain: number;
|
|
11
|
+
netCapitalGain: number;
|
|
10
12
|
holding?: Holding;
|
|
13
|
+
date: Date;
|
|
11
14
|
file: AppFile;
|
|
15
|
+
getCapitalGain(holding: Holding): number;
|
|
16
|
+
getNetCapitalGain(holding: Holding): number;
|
|
12
17
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractModel } from '../../db/Models';
|
|
2
|
+
import { HoldingType } from './holding-type';
|
|
3
|
+
export declare class HoldingTypeExchange extends AbstractModel {
|
|
4
|
+
code?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
currency?: string;
|
|
7
|
+
closeTime?: string;
|
|
8
|
+
timezone?: string;
|
|
9
|
+
updateDate?: Date;
|
|
10
|
+
holdingTypes?: HoldingType[];
|
|
11
|
+
}
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import { HoldingTypeCategoryEnum } from '../../db/Enums
|
|
1
|
+
import { HoldingTypeCategoryEnum } from '../../db/Enums';
|
|
2
2
|
import { User } from '../user';
|
|
3
3
|
import { AbstractModel } from '../../db/Models';
|
|
4
|
+
import { HoldingTypeExchange } from './holding-type-exchange';
|
|
4
5
|
export declare class HoldingType extends AbstractModel {
|
|
5
|
-
category
|
|
6
|
-
name
|
|
7
|
-
ticker
|
|
8
|
-
description
|
|
9
|
-
price
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
category?: HoldingTypeCategoryEnum;
|
|
7
|
+
name?: string;
|
|
8
|
+
ticker?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
price?: number;
|
|
11
|
+
currency?: string;
|
|
12
|
+
dividendPercent?: number;
|
|
13
|
+
openPrice?: number;
|
|
14
|
+
highPrice?: number;
|
|
15
|
+
lowPrice?: number;
|
|
16
|
+
volume?: number;
|
|
17
|
+
ema50d?: number;
|
|
18
|
+
ema200d?: number;
|
|
19
|
+
hi250d?: number;
|
|
20
|
+
lo250d?: number;
|
|
21
|
+
avgVolume14d?: number;
|
|
22
|
+
avgVolume50d?: number;
|
|
23
|
+
avgVolume200d?: number;
|
|
24
|
+
marketCapitalization?: number;
|
|
25
|
+
beta?: number;
|
|
26
|
+
adjustedClose?: number;
|
|
27
|
+
lastUpdateDateOnExchange?: Date;
|
|
28
|
+
updatedAt?: Date;
|
|
29
|
+
user?: User;
|
|
30
|
+
exchange?: HoldingTypeExchange;
|
|
31
|
+
get categoryLabel(): string;
|
|
32
|
+
isOther(): boolean;
|
|
33
|
+
isShare(): boolean;
|
|
34
|
+
isCrypto(): boolean;
|
|
12
35
|
}
|
|
@@ -6,12 +6,27 @@ import { Collection } from '../../collections';
|
|
|
6
6
|
import { AbstractModel } from '../../db/Models';
|
|
7
7
|
export declare class Holding extends AbstractModel {
|
|
8
8
|
isTaxFree: boolean;
|
|
9
|
-
date: Date;
|
|
10
9
|
quantity: number;
|
|
10
|
+
currentQuantity: number;
|
|
11
|
+
ownershipPercent?: number;
|
|
11
12
|
price: number;
|
|
12
13
|
fee: number;
|
|
14
|
+
date: Date;
|
|
13
15
|
user: User;
|
|
14
16
|
type: HoldingType;
|
|
15
17
|
file: AppFile;
|
|
16
18
|
sales: Collection<HoldingSale>;
|
|
19
|
+
/**
|
|
20
|
+
* Get total purchasing price
|
|
21
|
+
*/
|
|
22
|
+
get purchaseValue(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Get current market price
|
|
25
|
+
*/
|
|
26
|
+
getMarketValue(holdingType: HoldingType): number;
|
|
27
|
+
/**
|
|
28
|
+
* Get percent difference between current and buy price
|
|
29
|
+
*/
|
|
30
|
+
getGrowthCoefficient(holdingType: HoldingType): number;
|
|
31
|
+
heldMoreYear(): boolean;
|
|
17
32
|
}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { PropertySale as BasePropertySale } from '../../../db/Models/property/property-sale/property-sale';
|
|
2
2
|
import { PropertySaleTaxExemptionMetaField } from '../../../db/Models';
|
|
3
|
+
import { TaxExemption } from './tax-exemption';
|
|
3
4
|
export declare class PropertySale extends BasePropertySale {
|
|
5
|
+
holdingCosts: number;
|
|
6
|
+
structuralImprovementsWDV: number;
|
|
7
|
+
buildingAtCostClaimed: number;
|
|
8
|
+
price: number;
|
|
4
9
|
commission: number;
|
|
5
10
|
legalFees: number;
|
|
6
11
|
otherCost: number;
|
|
7
12
|
settlementDate: Date;
|
|
8
13
|
contractDate: Date;
|
|
14
|
+
taxExemption: TaxExemption;
|
|
9
15
|
taxExemptionMetaFields: PropertySaleTaxExemptionMetaField[];
|
|
10
16
|
get saleCostsTotalAmount(): number;
|
|
11
17
|
/**
|
|
@@ -13,6 +19,5 @@ export declare class PropertySale extends BasePropertySale {
|
|
|
13
19
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
|
|
14
20
|
*/
|
|
15
21
|
isCGTApplicable(): boolean;
|
|
16
|
-
get
|
|
17
|
-
get grossCGTAfterLoss(): number;
|
|
22
|
+
get netPrice(): number;
|
|
18
23
|
}
|
|
@@ -21,10 +21,15 @@ export declare class Property extends PropertyBase implements Photoable, Documen
|
|
|
21
21
|
* Any assets acquired before this day are CGT exempt (because the tax didn't exist before this date).
|
|
22
22
|
*/
|
|
23
23
|
static preCGTAssetDate: Date;
|
|
24
|
+
purchasePrice: number;
|
|
25
|
+
growthPercent: number;
|
|
24
26
|
contractDate: Date;
|
|
25
27
|
settlementDate: Date;
|
|
26
28
|
address: Address;
|
|
27
29
|
category: PropertyCategory;
|
|
30
|
+
stampDuty?: number;
|
|
31
|
+
legalFees?: number;
|
|
32
|
+
otherCapitalCosts?: number;
|
|
28
33
|
valuations: PropertyValuation[];
|
|
29
34
|
forecasts: PropertyForecast[];
|
|
30
35
|
categoryMovements: PropertyCategoryMovement[];
|
|
@@ -68,22 +73,23 @@ export declare class Property extends PropertyBase implements Photoable, Documen
|
|
|
68
73
|
* in that case it's equal to market value, when property became an investment property
|
|
69
74
|
*/
|
|
70
75
|
calculateCostBase(sale: PropertySale): number;
|
|
76
|
+
calculateGrossCapitalGain(sale: PropertySale): number;
|
|
71
77
|
/**
|
|
72
|
-
*
|
|
78
|
+
* net capital gain includes tax exemption
|
|
73
79
|
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* net capital gain tax (includes tax exemptions)
|
|
77
|
-
*/
|
|
78
|
-
calculateNetCGT(sale: PropertySale): number;
|
|
80
|
+
calculateNetCapitalGain(sale: PropertySale): number;
|
|
79
81
|
/**
|
|
80
82
|
* guess tax exemption based on property details
|
|
81
83
|
*/
|
|
82
84
|
getCGTExemption(sale: PropertySale): TaxExemptionEnum;
|
|
85
|
+
getPartialCGTExemptionRatio(sale: PropertySale): number;
|
|
83
86
|
/**
|
|
84
87
|
* tax exemption can reduce cgt from 100% to less (up to zero)
|
|
85
88
|
*/
|
|
86
89
|
getCGTExemptionRatio(sale: PropertySale): number;
|
|
90
|
+
/**
|
|
91
|
+
* in cgt report we apply losses, which can reset 1 year rule (in case if there is no profit after loss)
|
|
92
|
+
*/
|
|
87
93
|
isOneYearExemptionApplicable(sale: PropertySale): boolean;
|
|
88
94
|
/**
|
|
89
95
|
* CGT is not applicable for properties acquired before 20.09.1985 (tax didn't exist before this date).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropertyCollection } from '../../../../collections
|
|
2
|
-
import { PropertySaleCollection } from '../../../../collections/property/property-sale/property-sale.collection';
|
|
1
|
+
import { PropertyCollection, PropertySaleCollection } from '../../../../collections';
|
|
3
2
|
/**
|
|
3
|
+
* @TODO vik/nicole test
|
|
4
4
|
* Report related to Property sales CGT details.
|
|
5
5
|
* All fields are about current year, except netCapitalLoss
|
|
6
6
|
*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnnualClientDetails as AnnualClientDetailsBase } from '../../../../db/Models';
|
|
2
|
+
import { AnnualClientDetails } from '../../../../models';
|
|
3
|
+
import { RestService, RestMethod } from '../../rest';
|
|
4
|
+
import { Collection } from '../../../../collections';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AnnualClientDetailsService extends RestService<AnnualClientDetailsBase, AnnualClientDetails, Collection<AnnualClientDetails>> {
|
|
7
|
+
modelClass: typeof AnnualClientDetails;
|
|
8
|
+
collectionClass: typeof Collection;
|
|
9
|
+
endpointUri: string;
|
|
10
|
+
isApiPlatform: boolean;
|
|
11
|
+
disabledMethods: RestMethod[];
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnnualClientDetailsService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnnualClientDetailsService>;
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientIncomeTypes } from '../../../../models/client/client-income-types';
|
|
2
|
-
import { ClientIncomeTypes as ClientIncomeTypesBase } from '../../../../db/Models/
|
|
2
|
+
import { ClientIncomeTypes as ClientIncomeTypesBase } from '../../../../db/Models/client/client-income-types';
|
|
3
3
|
import { RestMethod, RestService } from '../../rest';
|
|
4
4
|
import { Collection } from '../../../../collections';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -3,9 +3,6 @@ import { HoldingSale } from '../../../models';
|
|
|
3
3
|
import { RestService, RestMethod } from '../rest';
|
|
4
4
|
import { Collection } from '../../../collections';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Service that handling banks logic
|
|
8
|
-
*/
|
|
9
6
|
export declare class HoldingSaleService extends RestService<HoldingSaleBase, HoldingSale, Collection<HoldingSale>> {
|
|
10
7
|
modelClass: typeof HoldingSale;
|
|
11
8
|
collectionClass: typeof Collection;
|
|
@@ -3,9 +3,6 @@ import { HoldingType } from '../../../models';
|
|
|
3
3
|
import { RestService, RestMethod } from '../rest';
|
|
4
4
|
import { Collection } from '../../../collections';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Service that handling banks logic
|
|
8
|
-
*/
|
|
9
6
|
export declare class HoldingTypeService extends RestService<HoldingTypeBase, HoldingType, Collection<HoldingType>> {
|
|
10
7
|
modelClass: typeof HoldingType;
|
|
11
8
|
collectionClass: typeof Collection;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { Holding as HoldingBase } from '../../../db/Models';
|
|
2
2
|
import { Holding } from '../../../models';
|
|
3
3
|
import { RestService, RestMethod } from '../rest';
|
|
4
|
-
import {
|
|
4
|
+
import { HoldingCollection } from '../../../collections';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
|
|
7
|
-
* Service that handling banks logic
|
|
8
|
-
*/
|
|
9
|
-
export declare class HoldingService extends RestService<HoldingBase, Holding, Collection<Holding>> {
|
|
6
|
+
export declare class HoldingService extends RestService<HoldingBase, Holding, HoldingCollection> {
|
|
10
7
|
modelClass: typeof Holding;
|
|
11
|
-
collectionClass: typeof
|
|
8
|
+
collectionClass: typeof HoldingCollection;
|
|
12
9
|
endpointUri: string;
|
|
13
10
|
isApiPlatform: boolean;
|
|
14
11
|
disabledMethods: RestMethod[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../client/occupation/occupation.service';
|
|
2
2
|
export * from './user-event-setting/user-event-setting.service';
|
|
3
3
|
export * from './user-event-type/user-event-type.service';
|
|
4
4
|
export * from './users-invite/users-invite.service';
|
|
@@ -79,10 +79,6 @@ export declare class UserService implements IEventListener {
|
|
|
79
79
|
* Update cache when user's service subscription is updated
|
|
80
80
|
*/
|
|
81
81
|
private listenServiceSubscriptionUpdated;
|
|
82
|
-
/**
|
|
83
|
-
* capital losses updates on property sale
|
|
84
|
-
*/
|
|
85
|
-
private listenPropertySale;
|
|
86
82
|
/**
|
|
87
83
|
* @TODO remove when the class refactored on RestService
|
|
88
84
|
* Subscribe to http events and run callback.
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { AbstractModel } from '../abstract-model';
|
|
2
|
-
export class ClientDetails extends AbstractModel {
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LWRldGFpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvTW9kZWxzL3VzZXIvY2xpZW50LWRldGFpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUUEsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBRWhELE1BQU0sT0FBTyxhQUFjLFNBQVEsYUFBYTtDQXlCL0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDbGllbnREZXRhaWxzV29ya0RlcHJlY2lhdGlvbkNhbGN1bGF0aW9uRW51bSB9IGZyb20gJy4uLy4uL0VudW1zL2NsaWVudC1kZXRhaWxzLXdvcmstZGVwcmVjaWF0aW9uLWNhbGN1bGF0aW9uLmVudW0nO1xuaW1wb3J0IHsgQ2xpZW50RGV0YWlsc01lZGljYXJlRXhlbXB0aW9uRW51bSB9IGZyb20gJy4uLy4uL0VudW1zL2NsaWVudC1kZXRhaWxzLW1lZGljYXJlLWV4ZW1wdGlvbi5lbnVtJztcbmltcG9ydCB7IENsaWVudERldGFpbHNXb3JraW5nSG9saWRheU1ha2VyRW51bSB9IGZyb20gJy4uLy4uL0VudW1zL2NsaWVudC1kZXRhaWxzLXdvcmtpbmctaG9saWRheS1tYWtlci5lbnVtJztcbmltcG9ydCB7IFVzZXIgfSBmcm9tICcuL3VzZXInO1xuaW1wb3J0IHsgT2NjdXBhdGlvbiB9IGZyb20gJy4vb2NjdXBhdGlvbic7XG5pbXBvcnQgeyBBZGRyZXNzIH0gZnJvbSAnLi4vYWRkcmVzcyc7XG5pbXBvcnQgeyBQaG9uZSB9IGZyb20gJy4uL3Bob25lJztcbmltcG9ydCB7IENsaWVudEluY29tZVR5cGVzIH0gZnJvbSAnLi9jbGllbnQtaW5jb21lLXR5cGVzJztcbmltcG9ydCB7QWJzdHJhY3RNb2RlbH0gZnJvbSAnLi4vYWJzdHJhY3QtbW9kZWwnO1xuXG5leHBvcnQgY2xhc3MgQ2xpZW50RGV0YWlscyBleHRlbmRzIEFic3RyYWN0TW9kZWwge1xuICBpc0F1c3RyYWxpYW5SZXNpZGVudD86IGJvb2xlYW47XG4gIHRheEZpbGVOdW1iZXI/OiBzdHJpbmc7XG4gIHdvcmtEZXByZWNpYXRpb25DYWxjdWxhdGlvbj86IENsaWVudERldGFpbHNXb3JrRGVwcmVjaWF0aW9uQ2FsY3VsYXRpb25FbnVtO1xuICBwcml2YXRlSGVhbHRoQ2FyZT86IGJvb2xlYW47XG4gIHNwb3VzZT86IGJvb2xlYW47XG4gIHNwb3VzZUFubnVhbEluY29tZT86IG51bWJlcjtcbiAgc3R1ZGVudExvYW5BbW91bnQ/OiBudW1iZXI7XG4gIGRlcGVuZGFudHM/OiBudW1iZXI7XG4gIG1lZGljYXJlRXhlbXB0aW9uPzogQ2xpZW50RGV0YWlsc01lZGljYXJlRXhlbXB0aW9uRW51bTtcbiAgcGVuc2lvbmVyc1RheD86IGJvb2xlYW47XG4gIHdvcmtpbmdIb2xpZGF5TWFrZXI/OiBDbGllbnREZXRhaWxzV29ya2luZ0hvbGlkYXlNYWtlckVudW07XG4gIGRhdGVPZkJpcnRoPzogRGF0ZTtcbiAgaXNHU1Q/OiBib29sZWFuO1xuICBjYXBpdGFsTG9zcz86IG51bWJlcjtcbiAgYmFzaXFDb25zZW50RXhpc3Q/OiBib29sZWFuO1xuICBpZD86IG51bWJlcjtcbiAgZGVsZXRlZEF0PzogRGF0ZTtcbiAgY3JlYXRlZEF0PzogRGF0ZTtcbiAgdXBkYXRlZEF0PzogRGF0ZTtcbiAgdXNlcj86IFVzZXI7XG4gIG9jY3VwYXRpb24/OiBPY2N1cGF0aW9uO1xuICBhZGRyZXNzZXM/OiBBZGRyZXNzW107XG4gIHBob25lcz86IFBob25lW107XG4gIGluY29tZVR5cGVzPzogQ2xpZW50SW5jb21lVHlwZXM7XG59XG4iXX0=
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ObservableModel } from '../observable-model';
|
|
2
|
-
export class ClientIncomeTypes extends ObservableModel {
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpZW50LWluY29tZS10eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9kYi9Nb2RlbHMvdXNlci9jbGllbnQtaW5jb21lLXR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQztBQUVwRCxNQUFNLE9BQU8saUJBQWtCLFNBQVEsZUFBZTtDQVFyRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Q2xpZW50RGV0YWlsc30gZnJvbSAnLi9jbGllbnQtZGV0YWlscyc7XG5pbXBvcnQge09ic2VydmFibGVNb2RlbH0gZnJvbSAnLi4vb2JzZXJ2YWJsZS1tb2RlbCc7XG5cbmV4cG9ydCBjbGFzcyBDbGllbnRJbmNvbWVUeXBlcyBleHRlbmRzIE9ic2VydmFibGVNb2RlbCB7XG4gIGlkPzogbnVtYmVyO1xuICBjbGllbnREZXRhaWxzPzogQ2xpZW50RGV0YWlscztcbiAgd29yaz86IGJvb2xlYW47XG4gIHByb3BlcnR5PzogYm9vbGVhbjtcbiAgc29sZT86IGJvb2xlYW47XG4gIGhvbGRpbmdzPzogYm9vbGVhbjtcbiAgZGVsZXRlZEF0PzogRGF0ZTtcbn1cbiJdfQ==
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { AbstractModel } from '../abstract-model';
|
|
2
|
-
export class Occupation extends AbstractModel {
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2NjdXBhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9kYi9Nb2RlbHMvdXNlci9vY2N1cGF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxhQUFhLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUVoRCxNQUFNLE9BQU8sVUFBVyxTQUFRLGFBQWE7Q0FJNUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0Fic3RyYWN0TW9kZWx9IGZyb20gJy4uL2Fic3RyYWN0LW1vZGVsJztcblxuZXhwb3J0IGNsYXNzIE9jY3VwYXRpb24gZXh0ZW5kcyBBYnN0cmFjdE1vZGVsIHtcblx0aWQ/OiBudW1iZXI7XG5cdG5hbWU/OiBzdHJpbmc7XG5cdGNvZGU/OiBzdHJpbmc7XG59XG4iXX0=
|