taxtank-core 0.23.2 → 0.23.5

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 (118) hide show
  1. package/bundles/taxtank-core.umd.js +467 -343
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/collection-dictionary.js +2 -2
  4. package/esm2015/lib/collections/property/property-sale/property-sale.collection.js +16 -0
  5. package/esm2015/lib/collections/property/property.collection.js +13 -1
  6. package/esm2015/lib/forms/bank/bank-account/bank-account-properties.form.js +11 -3
  7. package/esm2015/lib/forms/report/my-tax/index.js +2 -1
  8. package/esm2015/lib/forms/report/my-tax/my-tax-cgt.form.js +25 -0
  9. package/esm2015/lib/interceptors/basiq.interceptor.js +3 -3
  10. package/esm2015/lib/interceptors/corelogic-interceptor.js +3 -3
  11. package/esm2015/lib/interceptors/financial-year-interceptor.js +3 -3
  12. package/esm2015/lib/interceptors/interceptors.module.js +4 -4
  13. package/esm2015/lib/interceptors/jwt-interceptor.js +3 -3
  14. package/esm2015/lib/interceptors/preloader.interceptor.js +3 -3
  15. package/esm2015/lib/interceptors/user-switcher-interceptor.js +3 -3
  16. package/esm2015/lib/models/property/property-sale/property-sale.js +10 -1
  17. package/esm2015/lib/models/property/property.js +13 -1
  18. package/esm2015/lib/models/report/my-tax/index.js +3 -1
  19. package/esm2015/lib/models/report/my-tax/my-tax-cgt/cgt-exemption-and-rollover-code.enum.js +9 -0
  20. package/esm2015/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.js +26 -0
  21. package/esm2015/lib/services/account-setup/account-setup.service.js +3 -3
  22. package/esm2015/lib/services/asset/assets.service.js +3 -3
  23. package/esm2015/lib/services/auth/auth.service.js +3 -3
  24. package/esm2015/lib/services/auth/jwt.service.js +3 -3
  25. package/esm2015/lib/services/bank/bank-account-calculation.service.js +3 -3
  26. package/esm2015/lib/services/bank/bank-transaction-calculation.service.js +3 -3
  27. package/esm2015/lib/services/event/event-dispatcher.service.js +3 -3
  28. package/esm2015/lib/services/event/sse.service.js +3 -3
  29. package/esm2015/lib/services/export/export-formatter.service.js +3 -3
  30. package/esm2015/lib/services/header-title/header-title.service.js +3 -3
  31. package/esm2015/lib/services/http/address/address.service.js +3 -3
  32. package/esm2015/lib/services/http/bank/bank-account/bank-account.service.js +3 -3
  33. package/esm2015/lib/services/http/bank/bank-connection/bank-connection.service.js +3 -3
  34. package/esm2015/lib/services/http/bank/bank-transaction/bank-transaction.service.js +3 -3
  35. package/esm2015/lib/services/http/bank/bank.service.js +3 -3
  36. package/esm2015/lib/services/http/bank/basiq/basiq-token.service.js +3 -3
  37. package/esm2015/lib/services/http/bank/basiq/basiq.service.js +3 -3
  38. package/esm2015/lib/services/http/chart-accounts/chart-accounts-depreciations/chart-accounts-depreciations.service.js +3 -3
  39. package/esm2015/lib/services/http/chart-accounts/chart-accounts.service.js +3 -3
  40. package/esm2015/lib/services/http/chat/chat.service.js +3 -3
  41. package/esm2015/lib/services/http/chat/message/message.service.js +3 -3
  42. package/esm2015/lib/services/http/chat/message-document/message-document.service.js +3 -3
  43. package/esm2015/lib/services/http/depreciation/depreciation-capital-project/depreciation-capital-project.service.js +3 -3
  44. package/esm2015/lib/services/http/depreciation/depreciation.service.js +3 -3
  45. package/esm2015/lib/services/http/document/document-folder/document-folder.service.js +3 -3
  46. package/esm2015/lib/services/http/facebook/facebook.service.js +3 -3
  47. package/esm2015/lib/services/http/firm/client-income/client-income-types.service.js +3 -3
  48. package/esm2015/lib/services/http/firm/client-invite/client-invite.service.js +3 -3
  49. package/esm2015/lib/services/http/firm/client-movement/client-movement.service.js +3 -3
  50. package/esm2015/lib/services/http/firm/employee/employee.service.js +3 -3
  51. package/esm2015/lib/services/http/firm/employee-invite/employee-invite.service.js +3 -3
  52. package/esm2015/lib/services/http/firm/firm.service.js +3 -3
  53. package/esm2015/lib/services/http/firm/portfolio-report/client-portfolio-report.service.js +3 -3
  54. package/esm2015/lib/services/http/income-source/income-source-forecast/income-source-forecast.service.js +3 -3
  55. package/esm2015/lib/services/http/income-source/income-source.service.js +3 -3
  56. package/esm2015/lib/services/http/income-source/salary-forecast/salary-forecast.service.js +3 -3
  57. package/esm2015/lib/services/http/income-source/sole-forecast/sole-forecast.service.js +3 -3
  58. package/esm2015/lib/services/http/loan/borrowing-expense/borrowing-expense.service.js +3 -3
  59. package/esm2015/lib/services/http/loan/loan.service.js +3 -3
  60. package/esm2015/lib/services/http/property/property-category/property-category.service.js +3 -3
  61. package/esm2015/lib/services/http/property/property-category-movement/property-category-movement.service.js +3 -3
  62. package/esm2015/lib/services/http/property/property-document/property-document.service.js +3 -3
  63. package/esm2015/lib/services/http/property/property-sale/property-sale.service.js +3 -3
  64. package/esm2015/lib/services/http/property/property-sale/tax-exemption/tax-exemption.service.js +3 -3
  65. package/esm2015/lib/services/http/property/property-share/property-share.service.js +3 -3
  66. package/esm2015/lib/services/http/property/property.service.js +3 -3
  67. package/esm2015/lib/services/http/rest/rest.service.js +3 -3
  68. package/esm2015/lib/services/http/service-notification/service-notification.service.js +3 -3
  69. package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +3 -3
  70. package/esm2015/lib/services/http/sole/sole-contact/sole-contact.service.js +3 -3
  71. package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +3 -3
  72. package/esm2015/lib/services/http/subscription/service-price.service.js +3 -3
  73. package/esm2015/lib/services/http/subscription/subscription.service.js +3 -3
  74. package/esm2015/lib/services/http/tax-review/tax-review-history/tax-review-history.service.js +3 -3
  75. package/esm2015/lib/services/http/tax-review/tax-review.service.js +3 -3
  76. package/esm2015/lib/services/http/tax-summary/tax-summary.service.js +3 -3
  77. package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +3 -3
  78. package/esm2015/lib/services/http/transaction/transaction.service.js +3 -3
  79. package/esm2015/lib/services/http/tutorial-video/tutorial-video.service.js +3 -3
  80. package/esm2015/lib/services/http/user/occupation/occupation.service.js +3 -3
  81. package/esm2015/lib/services/http/user/user-event-setting/user-event-setting.service.js +3 -3
  82. package/esm2015/lib/services/http/user/user-event-type/user-event-type.service.js +3 -3
  83. package/esm2015/lib/services/http/user/user.service.js +3 -3
  84. package/esm2015/lib/services/http/vehicle/vehicle-claim.service.js +3 -3
  85. package/esm2015/lib/services/http/vehicle/vehicle-logbook.service.js +3 -3
  86. package/esm2015/lib/services/http/vehicle/vehicle.service.js +3 -3
  87. package/esm2015/lib/services/intercom/intercom.service.js +3 -3
  88. package/esm2015/lib/services/kompassify/kompassify.service.js +3 -3
  89. package/esm2015/lib/services/pdf/pdf-from-dom-element/pdf-from-dom-element.service.js +3 -3
  90. package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-data-table/pdf-from-data-table.service.js +3 -3
  91. package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-html-table/pdf-from-html-table.service.js +3 -3
  92. package/esm2015/lib/services/pdf/pdf-from-table/pdf-from-table.service.js +3 -3
  93. package/esm2015/lib/services/preloader/preloader.service.js +3 -3
  94. package/esm2015/lib/services/property/corelogic/corelogic.service.js +3 -3
  95. package/esm2015/lib/services/property/equity-position-chart/equity-position-chart.service.js +3 -3
  96. package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +3 -3
  97. package/esm2015/lib/services/report/property/property-transaction-report.service.js +3 -3
  98. package/esm2015/lib/services/toast/toast.service.js +3 -3
  99. package/esm2015/lib/services/transaction/transaction-calculation.service.js +3 -3
  100. package/esm2015/lib/services/user/user-switcher.service.js +3 -3
  101. package/esm2015/lib/services/xlsx/xlsx.service.js +3 -3
  102. package/esm2015/lib/tt-core.module.js +4 -4
  103. package/esm2015/public-api.js +2 -1
  104. package/fesm2015/taxtank-core.js +441 -330
  105. package/fesm2015/taxtank-core.js.map +1 -1
  106. package/lib/collections/collection-dictionary.d.ts +1 -1
  107. package/lib/collections/property/property-sale/property-sale.collection.d.ts +10 -0
  108. package/lib/collections/property/property.collection.d.ts +8 -0
  109. package/lib/forms/bank/bank-account/bank-account-properties.form.d.ts +5 -0
  110. package/lib/forms/report/my-tax/index.d.ts +1 -0
  111. package/lib/forms/report/my-tax/my-tax-cgt.form.d.ts +5 -0
  112. package/lib/models/property/property-sale/property-sale.d.ts +5 -0
  113. package/lib/models/property/property.d.ts +10 -0
  114. package/lib/models/report/my-tax/index.d.ts +2 -0
  115. package/lib/models/report/my-tax/my-tax-cgt/cgt-exemption-and-rollover-code.enum.d.ts +7 -0
  116. package/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.d.ts +23 -0
  117. package/package.json +1 -1
  118. package/public-api.d.ts +1 -0
@@ -40,7 +40,7 @@ export declare class CollectionDictionary<Collection extends BaseCollection<Abst
40
40
  * Create instance of collection
41
41
  */
42
42
  createCollection(items?: object[]): Collection;
43
- length(): number;
43
+ get length(): number;
44
44
  /**
45
45
  * @Todo find a better solution to get list of the sorted keys
46
46
  * Get array of the "keys" by provided order
@@ -0,0 +1,10 @@
1
+ import { Collection } from '../../collection';
2
+ import { PropertySale } from '../../../models/property/property-sale/property-sale';
3
+ export declare class PropertySaleCollection extends Collection<PropertySale> {
4
+ get grossCGT(): number;
5
+ /**
6
+ * Property sales are CGT applicable unless it has "Principle place of residence" exemption type
7
+ */
8
+ getCGTApplicable(): this;
9
+ getByPropertyShareIds(ids: number[]): this;
10
+ }
@@ -18,6 +18,10 @@ export declare class PropertyCollection extends Collection<Property> {
18
18
  * Get new property collection filtered by shared
19
19
  */
20
20
  getSharedProperties(): PropertyCollection;
21
+ /**
22
+ * Properties that are taxed and will be included in reports (Tax summary, My tax report, e.t.c.)
23
+ */
24
+ getTaxInclusive(): this;
21
25
  getUnsold(): this;
22
26
  /**
23
27
  * Get total purchase price for all properties in the collection
@@ -27,6 +31,10 @@ export declare class PropertyCollection extends Collection<Property> {
27
31
  get marketValue(): number;
28
32
  get firstForecastYear(): number;
29
33
  get marketValueGrowth(): number;
34
+ /**
35
+ * list of properties
36
+ */
37
+ getCGTApplicable(): this;
30
38
  getOwnerOccupiedProperties(): PropertyCollection;
31
39
  get earliestContractDate(): Date;
32
40
  /**
@@ -9,4 +9,9 @@ export declare class BankAccountPropertiesForm extends FormArray {
9
9
  add(): void;
10
10
  enablePercent(): void;
11
11
  disablePercent(): void;
12
+ /**
13
+ * Percentage available for adding a new bank account property.
14
+ * Remaining percent can't be more than 100 and less than 0
15
+ */
16
+ private getRemainingPercent;
12
17
  }
@@ -1,4 +1,5 @@
1
1
  export * from './my-tax-business-or-losses.form';
2
+ export * from './my-tax-cgt.form';
2
3
  export * from './my-tax-deductions.form';
3
4
  export * from './my-tax-dividends.form';
4
5
  export * from './my-tax-employee-share-schemes.form';
@@ -0,0 +1,5 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { MyTaxCgt } from '../../../models/report/my-tax';
3
+ export declare class MyTaxCgtForm extends AbstractForm<MyTaxCgt> {
4
+ constructor(gainsOrLosses: MyTaxCgt);
5
+ }
@@ -8,4 +8,9 @@ export declare class PropertySale extends BasePropertySale {
8
8
  contractDate: Date;
9
9
  taxExemptionMetadata: PropertySaleTaxExemptionMetadata[];
10
10
  get saleCostsTotalAmount(): number;
11
+ /**
12
+ * CGT is not applicable for sales with "Principle place of residence" exemption type.
13
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
14
+ */
15
+ isCGTApplicable(): boolean;
11
16
  }
@@ -18,6 +18,11 @@ import { DepreciationCollection } from '../../collections/depreciation.collectio
18
18
  * propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
19
19
  */
20
20
  export declare class Property extends PropertyBase implements Photoable, Documentable {
21
+ /**
22
+ * Property acquired before 20 September 1985 will generally be treated as pre-Capital Gains Tax (CGT) assets.
23
+ * Any assets acquired before this day are CGT exempt (because the tax didn't exist before this date).
24
+ */
25
+ static preCGTAssetDate: Date;
21
26
  contractDate: Date;
22
27
  settlementDate: Date;
23
28
  address: Address;
@@ -84,6 +89,11 @@ export declare class Property extends PropertyBase implements Photoable, Documen
84
89
  */
85
90
  getCGTExemptionRatio(sale: PropertySale): number;
86
91
  isOneYearExemptionApplicable(sale: PropertySale): boolean;
92
+ /**
93
+ * CGT is not applicable for properties acquired before 20.09.1985 (tax didn't exist before this date).
94
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
95
+ */
96
+ isCGTApplicable(): boolean;
87
97
  /**
88
98
  * ownership duration from purchase till sale
89
99
  */
@@ -2,6 +2,8 @@
2
2
  * 'My Tax' report related data (classes, enums, const, e.t.c)
3
3
  */
4
4
  export * from './my-tax-business-or-losses/my-tax-business-or-losses';
5
+ export * from './my-tax-cgt/my-tax-cgt';
6
+ export * from './my-tax-cgt/cgt-exemption-and-rollover-code.enum';
5
7
  export * from './my-tax-deductions/my-tax-deductions';
6
8
  export * from './my-tax-deductions/deduction-fields.const';
7
9
  export * from './my-tax-deductions/deduction-self-education-type.enum';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
3
+ */
4
+ export declare enum CgtExemptionAndRolloverCodeEnum {
5
+ MAIN_RESIDENT_EXEMPTION_I = 0,
6
+ PRE_CGT_ASSET_J = 1
7
+ }
@@ -0,0 +1,23 @@
1
+ import { PropertyCollection } from '../../../../collections/property/property.collection';
2
+ import { PropertySaleCollection } from '../../../../collections/property/property-sale/property-sale.collection';
3
+ /**
4
+ * Report related to Property sales CGT details.
5
+ * All fields are about current year, except netCapitalLoss
6
+ *
7
+ */
8
+ export declare class MyTaxCgt {
9
+ hasCapitalGain: boolean;
10
+ hasExemption: boolean;
11
+ netCapitalGain: number;
12
+ grossCapitalGain: number;
13
+ /**
14
+ * Loss collected over the years
15
+ */
16
+ netCapitalLoss: number;
17
+ static createFrom(propertySales: PropertySaleCollection, properties: PropertyCollection, clientCapitalLoss: number): MyTaxCgt;
18
+ /**
19
+ * Exemption is applicable for PPR sales and properties acquired before Property.preCGTAssetDate
20
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
21
+ */
22
+ static isCGTApplicable(sales: PropertySaleCollection, properties: PropertyCollection): boolean;
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.23.2",
3
+ "version": "0.23.5",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -23,6 +23,7 @@ export * from './lib/collections/loan/loan-payment.collection';
23
23
  export * from './lib/collections/message.collection';
24
24
  export * from './lib/collections/message-document.collection';
25
25
  export * from './lib/collections/property/property.collection';
26
+ export * from './lib/collections/property/property-sale/property-sale.collection';
26
27
  export * from './lib/collections/report/depreciation/depreciation-lvp-report-item.collection';
27
28
  export * from './lib/collections/report/depreciation/depreciation-report-item.collection';
28
29
  export * from './lib/collections/report/property/property-report-item.collection';