taxtank-core 0.21.7 → 0.21.10

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.
Files changed (36) hide show
  1. package/bundles/taxtank-core.umd.js +149 -38
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/collection.js +7 -1
  4. package/esm2015/lib/db/Enums/chart-accounts-heading-list.enum.js +8 -1
  5. package/esm2015/lib/db/Enums/income-source-forecast-trust-type.enum.js +15 -0
  6. package/esm2015/lib/db/Enums/income-source-type-list-other.enum.js +3 -2
  7. package/esm2015/lib/db/Models/incomeSource/income-source-forecast.js +1 -1
  8. package/esm2015/lib/forms/report/my-tax/my-tax-deductions.form.js +9 -3
  9. package/esm2015/lib/forms/report/my-tax/my-tax-partnerships-and-trusts.form.js +5 -2
  10. package/esm2015/lib/interfaces/income-source-forecast.interface.js +1 -1
  11. package/esm2015/lib/models/income-source/income-source-type.js +3 -3
  12. package/esm2015/lib/models/report/my-tax/my-tax-deductions/deduction-fields.const.js +9 -2
  13. package/esm2015/lib/models/report/my-tax/my-tax-deductions/my-tax-deductions.js +16 -16
  14. package/esm2015/lib/models/report/my-tax/my-tax-estimate/my-tax-estimate.js +3 -3
  15. package/esm2015/lib/models/report/my-tax/my-tax-interest/my-tax-interest.js +2 -2
  16. package/esm2015/lib/models/report/my-tax/my-tax-partnerships-and-trusts/my-tax-partnerships-and-trusts.js +20 -2
  17. package/esm2015/lib/models/report/my-tax/my-tax-rent/my-tax-rent.js +35 -9
  18. package/esm2015/lib/validators/conditional.validator.js +26 -0
  19. package/esm2015/lib/validators/index.js +2 -1
  20. package/esm2015/public-api.js +2 -1
  21. package/fesm2015/taxtank-core.js +150 -40
  22. package/fesm2015/taxtank-core.js.map +1 -1
  23. package/lib/collections/collection.d.ts +2 -0
  24. package/lib/db/Enums/chart-accounts-heading-list.enum.d.ts +7 -0
  25. package/lib/db/Enums/income-source-forecast-trust-type.enum.d.ts +13 -0
  26. package/lib/db/Enums/income-source-type-list-other.enum.d.ts +3 -2
  27. package/lib/db/Models/incomeSource/income-source-forecast.d.ts +3 -1
  28. package/lib/forms/report/my-tax/my-tax-deductions.form.d.ts +1 -1
  29. package/lib/forms/report/my-tax/my-tax-partnerships-and-trusts.form.d.ts +1 -1
  30. package/lib/interfaces/income-source-forecast.interface.d.ts +2 -0
  31. package/lib/models/report/my-tax/my-tax-partnerships-and-trusts/my-tax-partnerships-and-trusts.d.ts +9 -1
  32. package/lib/models/report/my-tax/my-tax-rent/my-tax-rent.d.ts +11 -1
  33. package/lib/validators/conditional.validator.d.ts +2 -0
  34. package/lib/validators/index.d.ts +1 -0
  35. package/package.json +1 -1
  36. package/public-api.d.ts +1 -0
@@ -34,4 +34,6 @@ export declare class Collection<Model extends AbstractModel> implements Iterable
34
34
  replaceBy(path: string, value: any, item: Model): this;
35
35
  remove(items: Model[]): this;
36
36
  removeBy(path: string, values: any): this;
37
+ minBy(path: string): Model;
38
+ maxBy(path: string): Model;
37
39
  }
@@ -12,6 +12,13 @@ export declare enum ChartAccountsHeadingListEnum {
12
12
  HOME_OFFICE_RUNNING = 17,
13
13
  TOOLS_EQUIPMENT = 18,
14
14
  HOME_OFFICE_OCCUPANCY = 19,
15
+ AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE = 20,
16
+ NEWSPAPER = 21,
17
+ PRINTING_POSTAGE_STATIONERY = 22,
18
+ SEMINARS_ETC = 23,
19
+ TELEPHONE = 24,
20
+ UNION_FEES = 25,
21
+ OTHER = 26,
15
22
  DONATIONS = 27,
16
23
  PSI = 30,
17
24
  BONUSES = 34,
@@ -0,0 +1,13 @@
1
+ export declare enum IncomeSourceForecastTrustTypeEnum {
2
+ SPECIAL_DISABILITY_TRUST = 1,
3
+ DECEASED_ESTATE = 2,
4
+ FIXED_TRUST = 3,
5
+ HYBRID_TRUST = 4,
6
+ DISCRETIONARY_SERVICE_TRUST = 5,
7
+ DISCRETIONARY_TRADING_TRUST = 6,
8
+ DISCRETIONARY_INVESTMENT_TRUST = 7,
9
+ CASH_MANAGEMENT_UNIT_TRUST = 8,
10
+ PUBLIC_UNIT_TRUST_LISTED = 9,
11
+ PUBLIC_UNIT_TRUST_UNLISTED = 10,
12
+ TESTAMENTARY_TRUST = 11
13
+ }
@@ -1,6 +1,7 @@
1
1
  export declare enum IncomeSourceTypeListOtherEnum {
2
2
  PSI = 6,
3
3
  SOLE_TRADER = 7,
4
- PARTNERSHIPS_AND_TRUSTS = 9,
5
- OTHER_INCOME = 10
4
+ TRUSTS = 9,
5
+ OTHER_INCOME = 10,
6
+ PARTNERSHIPS = 12
6
7
  }
@@ -1,13 +1,15 @@
1
+ import { IncomeSourceForecastTrustTypeEnum } from '../../Enums/income-source-forecast-trust-type.enum';
1
2
  import { IncomeSource } from './income-source';
2
3
  import { IncomeSourceType } from './income-source-type';
3
4
  import { AbstractModel } from '../abstract-model';
4
5
  export declare class IncomeSourceForecast extends AbstractModel {
5
- id?: number;
6
6
  financialYear?: number;
7
7
  amount?: number;
8
8
  tax?: number;
9
9
  taxInstalments?: number;
10
10
  frankingCredits?: number;
11
+ trustType?: IncomeSourceForecastTrustTypeEnum;
12
+ id?: number;
11
13
  incomeSource?: IncomeSource;
12
14
  incomeSourceType?: IncomeSourceType;
13
15
  }
@@ -1,5 +1,5 @@
1
1
  import { AbstractForm } from '../../abstract.form';
2
- import { MyTaxDeductions } from '../../../models/report/my-tax/my-tax-deductions/my-tax-deductions';
2
+ import { MyTaxDeductions } from '../../../models/report/my-tax';
3
3
  export declare class MyTaxDeductionsForm extends AbstractForm<MyTaxDeductions> {
4
4
  constructor(deductions: MyTaxDeductions);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { AbstractForm } from '../../abstract.form';
2
- import { MyTaxPartnershipsAndTrusts } from '../../../models/report/my-tax/my-tax-partnerships-and-trusts/my-tax-partnerships-and-trusts';
2
+ import { MyTaxPartnershipsAndTrusts } from '../../../models/report/my-tax';
3
3
  export declare class MyTaxPartnershipsAndTrustsForm extends AbstractForm<MyTaxPartnershipsAndTrusts> {
4
4
  constructor(partnershipsAndTrusts: MyTaxPartnershipsAndTrusts);
5
5
  }
@@ -1,4 +1,5 @@
1
1
  import { IncomeSource } from "../models/income-source/income-source";
2
+ import { IncomeSourceForecastTrustTypeEnum } from '../db/Enums/income-source-forecast-trust-type.enum';
2
3
  /**
3
4
  * Interface for income source forecasts
4
5
  */
@@ -7,4 +8,5 @@ export interface IIncomeSourceForecast {
7
8
  financialYear?: number;
8
9
  incomeSource?: IncomeSource;
9
10
  netPay?: number;
11
+ trustType?: IncomeSourceForecastTrustTypeEnum;
10
12
  }
@@ -1,10 +1,14 @@
1
1
  import { TransactionCollection } from '../../../../collections/transaction/transaction.collection';
2
+ import { IncomeSourceForecastTrustTypeEnum } from '../../../../db/Enums/income-source-forecast-trust-type.enum';
3
+ import { IncomeSourceCollection } from '../../../../collections/income-source.collection';
2
4
  export declare class MyTaxPartnershipsAndTrusts {
3
5
  transactions: TransactionCollection;
6
+ incomeSources: IncomeSourceCollection;
4
7
  partnershipIncomes: TransactionCollection;
5
8
  partnershipExpenses: TransactionCollection;
6
9
  trustsIncomes: TransactionCollection;
7
10
  trustsExpenses: TransactionCollection;
11
+ trustType: IncomeSourceForecastTrustTypeEnum;
8
12
  netNonPrimaryProductionAmount: number;
9
13
  partnershipsNetIncome: number;
10
14
  trustsNetIncome: number;
@@ -13,5 +17,9 @@ export declare class MyTaxPartnershipsAndTrusts {
13
17
  taxPaidTotal: number;
14
18
  frankingCreditsTotal: number;
15
19
  taxOffsetNRASTotalAmount: number;
16
- constructor(transactions: TransactionCollection);
20
+ constructor(transactions: TransactionCollection, incomeSources: IncomeSourceCollection);
21
+ /**
22
+ * Get Income source forecast trust type, related to trust income with max amount
23
+ */
24
+ private getTrustType;
17
25
  }
@@ -1,11 +1,21 @@
1
1
  import { TransactionCollection } from '../../../../collections/transaction/transaction.collection';
2
2
  import { DepreciationCollection } from '../../../../collections/depreciation.collection';
3
+ import { TaxSummary } from '../../../tax-summary/tax-summary';
4
+ import { TaxSummarySection } from '../../../tax-summary/tax-summary-section';
3
5
  export declare class MyTaxRent {
4
6
  propertyExpenses: TransactionCollection;
7
+ taxSummaryPropertySection: TaxSummarySection;
5
8
  grossRentAmount: number;
6
9
  interestDeductionsAmount: number;
7
10
  capitalWorksDeductionsAmount: number;
8
11
  otherRentalDeductionsAmount: number;
9
12
  netRent: number;
10
- constructor(transactions: TransactionCollection, depreciations: DepreciationCollection);
13
+ constructor(transactions: TransactionCollection, depreciations: DepreciationCollection, taxSummary: TaxSummary);
14
+ /**
15
+ * @Todo Vik remove when TT-2009 will be implemented.
16
+ * We use tax summary data here because claim amount from depreciation is different
17
+ * from the claim amount that we get from tax summary (depreciation claim amount is not affected by property share,
18
+ * property contract date, e.t.c.). Details in the TT-2009 task
19
+ */
20
+ private calculateOtherRentalDeductionsAmount;
11
21
  }
@@ -0,0 +1,2 @@
1
+ import { AbstractControl, ValidatorFn } from '@angular/forms';
2
+ export declare function conditionalValidator(condition: (control: AbstractControl) => boolean, validator: (control: AbstractControl) => object | null): ValidatorFn;
@@ -1,4 +1,5 @@
1
1
  export * from './at-least-one.validator';
2
2
  export * from './autocomplete.validator';
3
+ export * from './conditional.validator';
3
4
  export * from './password.validator';
4
5
  export * from './password-match.validator';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.21.7",
3
+ "version": "0.21.10",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -74,6 +74,7 @@ export * from './lib/db/Enums/depreciation-calculation-percent.enum';
74
74
  export * from './lib/db/Enums/depreciation-type.enum';
75
75
  export * from './lib/db/Enums/depreciation-write-off-amount.enum';
76
76
  export * from './lib/db/Enums/firm-type.enum';
77
+ export * from './lib/db/Enums/income-source-forecast-trust-type.enum';
77
78
  export * from './lib/db/Enums/income-source-type.enum';
78
79
  export * from './lib/db/Enums/income-source-type-list-other.enum';
79
80
  export * from './lib/db/Enums/income-source-type-list-sole.enum';