taxtank-core 0.28.20 → 0.28.22

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 (28) hide show
  1. package/bundles/taxtank-core.umd.js +225 -180
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/index.js +2 -1
  4. package/esm2015/lib/collections/property/index.js +4 -0
  5. package/esm2015/lib/collections/property/property-category-movement.collection.js +17 -0
  6. package/esm2015/lib/collections/property/property-sale/index.js +3 -0
  7. package/esm2015/lib/db/Enums/property/property-category-list.enum.js +2 -1
  8. package/esm2015/lib/models/chart-accounts/chart-accounts.js +12 -6
  9. package/esm2015/lib/models/depreciation/depreciation-group-item.js +5 -1
  10. package/esm2015/lib/models/depreciation/depreciation-group.js +4 -1
  11. package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
  12. package/esm2015/lib/models/financial-year/financial-year.js +7 -2
  13. package/esm2015/lib/models/property/property-category.js +7 -3
  14. package/esm2015/public-api.js +1 -3
  15. package/fesm2015/taxtank-core.js +181 -143
  16. package/fesm2015/taxtank-core.js.map +1 -1
  17. package/lib/collections/index.d.ts +1 -0
  18. package/lib/collections/property/index.d.ts +3 -0
  19. package/lib/collections/property/property-category-movement.collection.d.ts +11 -0
  20. package/lib/collections/property/property-sale/index.d.ts +2 -0
  21. package/lib/db/Enums/property/property-category-list.enum.d.ts +1 -0
  22. package/lib/models/chart-accounts/chart-accounts.d.ts +6 -1
  23. package/lib/models/depreciation/depreciation-group-item.d.ts +2 -0
  24. package/lib/models/depreciation/depreciation-group.d.ts +1 -0
  25. package/lib/models/financial-year/financial-year.d.ts +1 -1
  26. package/lib/models/property/property-category.d.ts +1 -0
  27. package/package.json +1 -1
  28. package/public-api.d.ts +0 -2
@@ -1,2 +1,3 @@
1
1
  export * from './vehicle';
2
2
  export * from './sole';
3
+ export * from './property';
@@ -0,0 +1,3 @@
1
+ export * from './property-sale';
2
+ export * from './property.collection';
3
+ export * from './property-category-movement.collection';
@@ -0,0 +1,11 @@
1
+ import { Collection } from '../collection';
2
+ import { PropertyCategoryMovement } from '../../models/property/property-category-movement';
3
+ import { PropertyForecast } from '../../models/property/property-forecast';
4
+ import { Property } from '../../models/property/property';
5
+ export declare class PropertyCategoryMovementCollection extends Collection<PropertyCategoryMovement> {
6
+ /**
7
+ * @TODO TT-2355 Alex refactor propertyForecast, use separated api (then I can remove property from param)
8
+ */
9
+ getByForecast(property: Property, forecast: PropertyForecast): this;
10
+ hasCategory(categoryId: number): boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ export * from './property-sale.collection';
2
+ export * from './property-sale-tax-exemption-metadata.collection';
@@ -1,4 +1,5 @@
1
1
  export declare enum PropertyCategoryListEnum {
2
2
  OWNER_OCCUPIED = 3,
3
+ SHARED = 4,
3
4
  VACANT_LAND = 5
4
5
  }
@@ -56,6 +56,7 @@ export declare class ChartAccounts extends ChartAccountsBase {
56
56
  */
57
57
  isOtherIncome(): boolean;
58
58
  isIncome(): boolean;
59
+ isExpense(): boolean;
59
60
  isProperty(): boolean;
60
61
  isWorkExpense(): boolean;
61
62
  isSoleExpense(): boolean;
@@ -69,7 +70,6 @@ export declare class ChartAccounts extends ChartAccountsBase {
69
70
  isPropertyIncome(): boolean;
70
71
  isPersonal(): boolean;
71
72
  isPersonalExpense(): boolean;
72
- isPropertyDepreciation(): boolean;
73
73
  /**
74
74
  * Check if chart accounts category is depreciation
75
75
  */
@@ -86,4 +86,9 @@ export declare class ChartAccounts extends ChartAccountsBase {
86
86
  * Get chart accounts value by financial year
87
87
  */
88
88
  getValueByYear(year: number): ChartAccountsValue;
89
+ /**
90
+ * no way to check how much used for work/sole, so we let user adjust it
91
+ * except vehicle expense, which is equal to vehicleClaim.workUsage and personal, which is equal to 0
92
+ */
93
+ isClaimPercentEditable(): boolean;
89
94
  }
@@ -1,10 +1,12 @@
1
1
  import { DepreciationGroup } from './depreciation-group';
2
2
  import { Depreciation } from './depreciation';
3
3
  /**
4
+ * @TODO Alex useless class, use parent instead
4
5
  * Depreciation Tree node with depreciation details
5
6
  */
6
7
  export declare class DepreciationGroupItem extends DepreciationGroup {
7
8
  depreciation: Depreciation;
8
9
  constructor(depreciation: Depreciation);
9
10
  getClaimAmount(): number;
11
+ getAmount(): number;
10
12
  }
@@ -10,4 +10,5 @@ export declare class DepreciationGroup {
10
10
  openingValue: number;
11
11
  constructor(label: string, description?: string, icon?: string, children?: DepreciationGroup[], totalCost?: number, openingValue?: number);
12
12
  getClaimAmount(): number;
13
+ getAmount(): number;
13
14
  }
@@ -1,5 +1,4 @@
1
1
  export declare class FinancialYear {
2
- constructor(date?: Date);
3
2
  static weeksInYear: number;
4
3
  static startMonthIndex: number;
5
4
  year: number;
@@ -7,6 +6,7 @@ export declare class FinancialYear {
7
6
  endDate: Date;
8
7
  private yearStartDate;
9
8
  private yearEndDate;
9
+ constructor(date?: Date | number);
10
10
  includes(date: Date): boolean;
11
11
  static toFinYear(date: Date): number;
12
12
  get prevFinYear(): FinancialYear;
@@ -2,4 +2,5 @@ import { PropertyCategory as PropertyCategoryBase } from '../../db/Models/proper
2
2
  export declare class PropertyCategory extends PropertyCategoryBase {
3
3
  isOwnerOccupied(): boolean;
4
4
  isVacantLand(): boolean;
5
+ isShared(): boolean;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.20",
3
+ "version": "0.28.22",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -24,8 +24,6 @@ export * from './lib/collections/loan/loan.collection';
24
24
  export * from './lib/collections/loan/loan-payment.collection';
25
25
  export * from './lib/collections/message.collection';
26
26
  export * from './lib/collections/message-document.collection';
27
- export * from './lib/collections/property/property.collection';
28
- export * from './lib/collections/property/property-sale/property-sale.collection';
29
27
  export * from './lib/collections/report/depreciation/depreciation-lvp-report-item.collection';
30
28
  export * from './lib/collections/report/depreciation/depreciation-report-item.collection';
31
29
  export * from './lib/collections/report/property/property-report-item.collection';