taxtank-core 0.9.3 → 0.10.1

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 (38) hide show
  1. package/bundles/taxtank-core.umd.js +3265 -3134
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/collection.js +3 -4
  4. package/esm2015/lib/collections/depreciation.collection.js +7 -10
  5. package/esm2015/lib/collections/report/depreciation/depreciation-lvp-report-item.collection.js +12 -0
  6. package/esm2015/lib/collections/report/depreciation/depreciation-report-item.collection.js +14 -0
  7. package/esm2015/lib/collections/transaction.collection.js +2 -2
  8. package/esm2015/lib/db/Models/depreciation-forecast.js +1 -1
  9. package/esm2015/lib/models/depreciation/depreciation-forecast.js +13 -1
  10. package/esm2015/lib/models/depreciation/depreciation-group-item.js +2 -2
  11. package/esm2015/lib/models/depreciation/depreciation.js +7 -32
  12. package/esm2015/lib/models/pdf/pdf-config.js +12 -1
  13. package/esm2015/lib/models/report/depreciation/depreciation-lvp-asset-type.enum.js +10 -0
  14. package/esm2015/lib/models/report/depreciation/depreciation-lvp-report-item.js +21 -0
  15. package/esm2015/lib/models/report/depreciation/depreciation-report-item.js +25 -0
  16. package/esm2015/lib/services/http/depreciation/depreciation.service.js +2 -2
  17. package/esm2015/lib/services/kompassify/kompassify.service.js +30 -0
  18. package/esm2015/lib/services/pdf/pdf.service.js +3 -8
  19. package/esm2015/public-api.js +7 -2
  20. package/fesm2015/taxtank-core.js +2517 -2437
  21. package/fesm2015/taxtank-core.js.map +1 -1
  22. package/lib/collections/collection.d.ts +1 -2
  23. package/lib/collections/depreciation.collection.d.ts +3 -3
  24. package/lib/collections/report/depreciation/depreciation-lvp-report-item.collection.d.ts +8 -0
  25. package/lib/collections/report/depreciation/depreciation-report-item.collection.d.ts +8 -0
  26. package/lib/collections/transaction.collection.d.ts +1 -1
  27. package/lib/db/Models/depreciation-forecast.d.ts +0 -1
  28. package/lib/models/depreciation/depreciation-forecast.d.ts +4 -0
  29. package/lib/models/depreciation/depreciation.d.ts +1 -11
  30. package/lib/models/report/depreciation/depreciation-lvp-asset-type.enum.d.ts +8 -0
  31. package/lib/models/report/depreciation/depreciation-lvp-report-item.d.ts +8 -0
  32. package/lib/models/report/depreciation/depreciation-report-item.d.ts +9 -0
  33. package/lib/services/http/depreciation/depreciation.service.d.ts +1 -1
  34. package/lib/services/kompassify/kompassify.service.d.ts +13 -0
  35. package/package.json +1 -1
  36. package/public-api.d.ts +6 -1
  37. package/esm2015/lib/models/depreciation/depreciation-lvp-rate.enum.js +0 -6
  38. package/lib/models/depreciation/depreciation-lvp-rate.enum.d.ts +0 -4
@@ -29,9 +29,8 @@ export declare class Collection<Model extends object> implements Iterable<Model>
29
29
  getByIds(ids: number[]): Model[];
30
30
  /**
31
31
  * Get total sum of items by field
32
- * @param field Name of the field for sum
33
32
  */
34
- sumBy(field: string): number;
33
+ sumBy(path: string): number;
35
34
  toArray(): Model[];
36
35
  /**
37
36
  * Filter items by specific provided callback
@@ -3,6 +3,7 @@ import { Collection } from './collection';
3
3
  import { Depreciation } from '../models/depreciation/depreciation';
4
4
  import { DepreciationCapitalProject } from '../models/depreciation/depreciation-capital-project';
5
5
  import { TransactionCollection } from './transaction.collection';
6
+ import { ChartAccountsCategoryEnum } from '../db/Enums/chart-accounts-category.enum';
6
7
  export declare class DepreciationCollection extends Collection<Depreciation> {
7
8
  /**
8
9
  * Get total amount of all depreciations in the collection
@@ -12,7 +13,7 @@ export declare class DepreciationCollection extends Collection<Depreciation> {
12
13
  getClaimAmountByYear(year?: number): number;
13
14
  getCloseBalanceByYear(year?: number): number;
14
15
  getCurrentYearForecastAmount(): number;
15
- get assetValue(): number;
16
+ get closeBalance(): number;
16
17
  /**
17
18
  * Get new depreciations collections filtered by tank type
18
19
  */
@@ -21,8 +22,7 @@ export declare class DepreciationCollection extends Collection<Depreciation> {
21
22
  getWithCapitalProject(): DepreciationCollection;
22
23
  getWithoutCapitalProject(): DepreciationCollection;
23
24
  getWithoutBorrowingExpenses(): DepreciationCollection;
24
- getWorkDepreciations(): DepreciationCollection;
25
- getPropertyDepreciations(): DepreciationCollection;
25
+ getByChartAccountsCategories(categories: ChartAccountsCategoryEnum[]): this;
26
26
  getPlantEquipment(): DepreciationCollection;
27
27
  getCapitalDepreciations(): DepreciationCollection;
28
28
  getBorrowingExpenseDepreciations(): DepreciationCollection;
@@ -0,0 +1,8 @@
1
+ import { Depreciation } from '../../../models/depreciation/depreciation';
2
+ import { DepreciationCollection } from '../../depreciation.collection';
3
+ /**
4
+ * Collection of depreciation Low Value Pool report items
5
+ */
6
+ export declare class DepreciationLvpReportItemCollection extends DepreciationCollection {
7
+ static fromDepreciations(deprectiations: Depreciation[]): DepreciationLvpReportItemCollection;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { Depreciation } from '../../../models/depreciation/depreciation';
2
+ import { DepreciationCollection } from '../../depreciation.collection';
3
+ export declare class DepreciationReportItemCollection extends DepreciationCollection {
4
+ /**
5
+ * Create new collection from provided depreciations list
6
+ */
7
+ static fromDepreciations(deprectiations: Depreciation[]): DepreciationReportItemCollection;
8
+ }
@@ -29,7 +29,7 @@ export declare class TransactionCollection extends Collection<Transaction> {
29
29
  */
30
30
  get claimAmount(): number;
31
31
  get grossAmount(): number;
32
- getByCategories(categories: ChartAccountsCategoryEnum[]): TransactionCollection;
32
+ getByChartAccountsCategories(categories: ChartAccountsCategoryEnum[]): TransactionCollection;
33
33
  /**
34
34
  * Get transactions by month
35
35
  * @param monthIndex by which desired month should be taken
@@ -7,7 +7,6 @@ export declare class DepreciationForecast {
7
7
  openBalance?: number;
8
8
  closeBalance?: number;
9
9
  amount?: number;
10
- claimAmount?: number;
11
10
  id?: number;
12
11
  claimPercent?: number;
13
12
  createdAt?: Date;
@@ -4,5 +4,9 @@ export declare class DepreciationForecast extends DepreciationForecastBase {
4
4
  get dailyClaimAmount(): number;
5
5
  get daysApplied(): number;
6
6
  getDaysByMonth(month: number): number;
7
+ get claimOpenBalance(): number;
8
+ get claimCloseBalance(): number;
9
+ get claimAmount(): number;
10
+ get claimRate(): number;
7
11
  getClaimAmountByMonth(month: number): number;
8
12
  }
@@ -41,8 +41,6 @@ export declare class Depreciation extends DepreciationBase implements ITank, IRe
41
41
  * @TODO new FinancialYear(this.writeOffDate) === new FinancialYear()
42
42
  */
43
43
  isLowValuePool(): boolean;
44
- isPropertyTank(): boolean;
45
- isWorkTank(): boolean;
46
44
  isPrimeCost(): boolean;
47
45
  isDiminishing(): boolean;
48
46
  /**
@@ -58,20 +56,12 @@ export declare class Depreciation extends DepreciationBase implements ITank, IRe
58
56
  */
59
57
  get currentYearForecast(): DepreciationForecast;
60
58
  getForecastByYear(year: number): DepreciationForecast;
61
- /**
62
- * get depreciation's closing balance for current financial year
63
- * open balance here because closing balance in POST actually saves to previous financial year forecast
64
- */
65
- getCloseBalance(): number;
66
- get claimAmount(): number;
67
59
  getClaimAmountByYear(year: number): number;
68
60
  getCloseBalanceByYear(year: number): number;
69
- get assetValue(): number;
70
- getClaimPercent(): number;
71
- getCurrentYearForecastAmount(): number;
72
61
  isBuildingAtCost(): boolean;
73
62
  /**
74
63
  * Create a new transaction from current depreciation
75
64
  */
76
65
  toTransaction(): Transaction;
66
+ get claimAmount(): number;
77
67
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Enum with symbols based on depreciation LVP asset type
3
+ */
4
+ export declare enum DepreciationLvpAssetTypeEnum {
5
+ PRIOR_YEARS = "A",
6
+ FIRST_YEAR = "L",
7
+ WRITTEN_OFF = "W"
8
+ }
@@ -0,0 +1,8 @@
1
+ import { DepreciationLvpAssetTypeEnum } from './depreciation-lvp-asset-type.enum';
2
+ import { Depreciation } from '../../depreciation/depreciation';
3
+ export declare class DepreciationLvpReportItem extends Depreciation {
4
+ /**
5
+ * Asset type symbol based on write off manual date / low value pool date
6
+ */
7
+ assetType: DepreciationLvpAssetTypeEnum;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { Depreciation } from '../../depreciation/depreciation';
2
+ /**
3
+ * Class for depreciation report item
4
+ */
5
+ export declare class DepreciationReportItem extends Depreciation {
6
+ get primeCost(): number;
7
+ get diminishingValue(): number;
8
+ get categoryTitle(): string;
9
+ }
@@ -30,7 +30,7 @@ export declare class DepreciationService extends RestService<DepreciationBase, D
30
30
  * Get depreciations related to Vehicle category
31
31
  */
32
32
  getVehicleDepreciations(): Observable<Depreciation[]>;
33
- getCloseBalance(depreciation: Depreciation): Observable<number>;
33
+ getOpenBalance(depreciation: Depreciation): Observable<number>;
34
34
  /**
35
35
  * @TODO wrong place, move to collection model
36
36
  */
@@ -0,0 +1,13 @@
1
+ import { Router } from '@angular/router';
2
+ import { IEventListener } from '../../interfaces/event-listener.interface';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Service listen and handle kompassify events
6
+ */
7
+ export declare class KompassifyService implements IEventListener {
8
+ private router;
9
+ constructor(router: Router);
10
+ listenEvents(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<KompassifyService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<KompassifyService>;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.9.3",
3
+ "version": "0.10.1",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -21,6 +21,8 @@ export * from './lib/collections/logbook.collection';
21
21
  export * from './lib/collections/message.collection';
22
22
  export * from './lib/collections/message-document.collection';
23
23
  export * from './lib/collections/property/property.collection';
24
+ export * from './lib/collections/report/depreciation/depreciation-lvp-report-item.collection';
25
+ export * from './lib/collections/report/depreciation/depreciation-report-item.collection';
24
26
  export * from './lib/collections/service-price.collection';
25
27
  export * from './lib/collections/service-subscription.collection';
26
28
  export * from './lib/collections/tax-summary/report-item.collection';
@@ -155,7 +157,6 @@ export * from './lib/models/client/client-portfolio-chart-data';
155
157
  export * from './lib/models/client/client-portfolio-report';
156
158
  export * from './lib/models/color/alphabet-colors.enum';
157
159
  export * from './lib/models/depreciation/depreciation';
158
- export * from './lib/models/depreciation/depreciation-lvp-rate.enum';
159
160
  export * from './lib/models/depreciation/depreciation-capital-project';
160
161
  export * from './lib/models/depreciation/depreciation-forecast';
161
162
  export * from './lib/models/depreciation/depreciation-group.enum';
@@ -219,6 +220,9 @@ export * from './lib/models/property/property-sale/property-sale-tax-exemption-m
219
220
  export * from './lib/models/property/property-subscription';
220
221
  export * from './lib/models/property/property-valuation';
221
222
  export * from './lib/models/registration-invite/registration-invite';
223
+ export * from './lib/models/report/depreciation/depreciation-lvp-report-item';
224
+ export * from './lib/models/report/depreciation/depreciation-report-item';
225
+ export * from './lib/models/report/depreciation/depreciation-lvp-asset-type.enum';
222
226
  export * from './lib/models/service-subscription/module-url-list.const';
223
227
  export * from './lib/models/service-subscription/service-payment';
224
228
  export * from './lib/models/service-subscription/service-price';
@@ -291,6 +295,7 @@ export * from './lib/services/http/income-source/income-source-forecast/income-s
291
295
  export * from './lib/services/http/income-source/salary-forecast/salary-forecast.service';
292
296
  export * from './lib/services/http/income-source/sole-forecast/sole-forecast.service';
293
297
  export * from './lib/services/intercom/intercom.service';
298
+ export * from './lib/services/kompassify/kompassify.service';
294
299
  export * from './lib/services/http/loan/loan.service';
295
300
  export * from './lib/services/http/service-notification/service-notification.service';
296
301
  export * from './lib/services/pdf/pdf.service';
@@ -1,6 +0,0 @@
1
- export var DepreciationLvpRateEnum;
2
- (function (DepreciationLvpRateEnum) {
3
- DepreciationLvpRateEnum[DepreciationLvpRateEnum["FIRST_YEAR"] = 0.1875] = "FIRST_YEAR";
4
- DepreciationLvpRateEnum[DepreciationLvpRateEnum["DEFAULT"] = 0.375] = "DEFAULT";
5
- })(DepreciationLvpRateEnum || (DepreciationLvpRateEnum = {}));
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwcmVjaWF0aW9uLWx2cC1yYXRlLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvbW9kZWxzL2RlcHJlY2lhdGlvbi9kZXByZWNpYXRpb24tbHZwLXJhdGUuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSx1QkFHWDtBQUhELFdBQVksdUJBQXVCO0lBQ2pDLHNGQUFtQixDQUFBO0lBQ25CLCtFQUFlLENBQUE7QUFDakIsQ0FBQyxFQUhXLHVCQUF1QixLQUF2Qix1QkFBdUIsUUFHbEMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBEZXByZWNpYXRpb25MdnBSYXRlRW51bSB7XG4gIEZJUlNUX1lFQVIgPSAwLjE4NzUsXG4gIERFRkFVTFQgPSAwLjM3NSxcbn1cbiJdfQ==
@@ -1,4 +0,0 @@
1
- export declare enum DepreciationLvpRateEnum {
2
- FIRST_YEAR = 0.1875,
3
- DEFAULT = 0.375
4
- }