taxtank-core 0.28.9 → 0.28.12

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 (30) hide show
  1. package/bundles/taxtank-core.umd.js +117 -29
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/transaction/transaction.collection.js +26 -1
  4. package/esm2015/lib/forms/sole/sole-business.form.js +21 -2
  5. package/esm2015/lib/models/depreciation/depreciation.js +2 -2
  6. package/esm2015/lib/models/endpoint/endpoints.const.js +2 -1
  7. package/esm2015/lib/models/income-source/income-source.js +3 -3
  8. package/esm2015/lib/models/report/depreciation/index.js +4 -0
  9. package/esm2015/lib/models/report/index.js +6 -0
  10. package/esm2015/lib/models/report/property/index.js +4 -0
  11. package/esm2015/lib/models/report/sole/index.js +2 -0
  12. package/esm2015/lib/models/report/sole/sole-business/sole-business-loss-report.js +18 -0
  13. package/esm2015/lib/services/http/income-source/income-source.service.js +2 -1
  14. package/esm2015/lib/services/http/sole/index.js +2 -1
  15. package/esm2015/lib/services/http/sole/sole-business-loss/sole-business-loss.service.js +21 -0
  16. package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +1 -1
  17. package/esm2015/public-api.js +2 -8
  18. package/fesm2015/taxtank-core.js +101 -24
  19. package/fesm2015/taxtank-core.js.map +1 -1
  20. package/lib/collections/transaction/transaction.collection.d.ts +7 -0
  21. package/lib/forms/sole/sole-business.form.d.ts +10 -1
  22. package/lib/models/report/depreciation/index.d.ts +3 -0
  23. package/lib/models/report/index.d.ts +5 -0
  24. package/lib/models/report/property/index.d.ts +3 -0
  25. package/lib/models/report/sole/index.d.ts +1 -0
  26. package/lib/models/report/sole/sole-business/sole-business-loss-report.d.ts +25 -0
  27. package/lib/services/http/sole/index.d.ts +1 -0
  28. package/lib/services/http/sole/sole-business-loss/sole-business-loss.service.d.ts +11 -0
  29. package/package.json +1 -1
  30. package/public-api.d.ts +1 -7
@@ -7,6 +7,7 @@ import { ExportCell } from '../../models/export/export-cell';
7
7
  import { Collection } from '../collection';
8
8
  import { TransactionMetadata } from '../../models/transaction/transaction-metadata';
9
9
  import { VehicleClaim } from '../../models';
10
+ import { ChartData } from '../../models/chart/chart-data';
10
11
  /**
11
12
  * Collection of transactions
12
13
  */
@@ -91,4 +92,10 @@ export declare class TransactionCollection extends ExportableCollection<Transact
91
92
  * Get list of vehicle transactions except KMS transactions
92
93
  */
93
94
  getLogbookTransactions(): this;
95
+ /**
96
+ * Build chart data with transactions cash position.
97
+ * Cash position = Income - Expenses (include depreciations)
98
+ * Chart data for each month from fin year start till current month
99
+ */
100
+ getCashPositionChartData(): ChartData[];
94
101
  }
@@ -1,8 +1,17 @@
1
1
  import { AbstractForm } from '../abstract.form';
2
2
  import { SoleBusiness } from '../../models';
3
3
  import { FormGroup } from '@angular/forms';
4
- export declare class SoleBusinessForm extends AbstractForm<SoleBusiness> {
4
+ import { IEventListener } from '../../interfaces/event-listener.interface';
5
+ export declare class SoleBusinessForm extends AbstractForm<SoleBusiness> implements IEventListener {
5
6
  constructor(business?: SoleBusiness);
7
+ listenEvents(): void;
8
+ /**
9
+ * We take the first forecast because income sources available only for new business, so we have only one forecast
10
+ */
6
11
  get forecastFormGroup(): FormGroup;
12
+ /**
13
+ * We take the first loss because losses available only for new business, so we have only one loss
14
+ */
7
15
  get lossFormGroup(): FormGroup;
16
+ private listenNameChanges;
8
17
  }
@@ -0,0 +1,3 @@
1
+ export * from './depreciation-lvp-asset-type.enum';
2
+ export * from './depreciation-lvp-report-item';
3
+ export * from './depreciation-report-item';
@@ -0,0 +1,5 @@
1
+ export * from './depreciation';
2
+ export * from './my-tax';
3
+ export * from './property';
4
+ export * from './sole';
5
+ export * from './vehicle-expense/vehicle-expense';
@@ -0,0 +1,3 @@
1
+ export * from './property-report-item';
2
+ export * from './property-report-item-depreciation';
3
+ export * from './property-report-item-transaction';
@@ -0,0 +1 @@
1
+ export * from './sole-business/sole-business-loss-report';
@@ -0,0 +1,25 @@
1
+ import { SoleBusinessLoss } from '../../../sole';
2
+ import { TransactionCollection } from '../../../../collections/transaction/transaction.collection';
3
+ import { DepreciationCollection } from '../../../../collections/depreciation.collection';
4
+ import { AbstractModel } from '../../../../db/Models/abstract-model';
5
+ /**
6
+ * Class with business loss details
7
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4641357930/Rules+when+a+business+makes+a+loss+Tax+Summary
8
+ */
9
+ export declare class SoleBusinessLossReport extends AbstractModel {
10
+ /**
11
+ * Business prior year losses
12
+ */
13
+ openBalance: number;
14
+ /**
15
+ * Net income reduced by the opening balance amount, that will be carried over to the next year, if it is positive
16
+ */
17
+ closeBalance: number;
18
+ /**
19
+ * Net income reduced by the opening balance amount
20
+ */
21
+ taxableIncome: number;
22
+ netIncome: number;
23
+ constructor(loss: SoleBusinessLoss, transactions: TransactionCollection, depreciations: DepreciationCollection);
24
+ calculateTaxableIncome(): number;
25
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './sole-business/sole-business.service';
2
2
  export * from './sole-business-activity/sole-business-activity.service';
3
+ export * from './sole-business-loss/sole-business-loss.service';
3
4
  export * from './sole-contact/sole-contact.service';
4
5
  export * from './sole-depreciation-method/sole-depreciation-method.service';
5
6
  export * from './sole-details/sole-details.service';
@@ -0,0 +1,11 @@
1
+ import { RestService } from '../../rest/rest.service';
2
+ import { SoleBusinessLoss as SoleBusinessLossBase } from '../../../../db/Models/sole/sole-business-loss';
3
+ import { SoleBusinessLoss } from '../../../../models';
4
+ import * as i0 from "@angular/core";
5
+ export declare class SoleBusinessLossService extends RestService<SoleBusinessLossBase, SoleBusinessLoss> {
6
+ modelClass: typeof SoleBusinessLoss;
7
+ url: string;
8
+ isHydra: boolean;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessLossService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessLossService>;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.9",
3
+ "version": "0.28.12",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -245,13 +245,7 @@ export * from './lib/models/property/property-sale';
245
245
  export * from './lib/models/property/property-subscription';
246
246
  export * from './lib/models/property/property-valuation';
247
247
  export * from './lib/models/registration-invite/registration-invite';
248
- export * from './lib/models/report/depreciation/depreciation-lvp-report-item';
249
- export * from './lib/models/report/depreciation/depreciation-report-item';
250
- export * from './lib/models/report/depreciation/depreciation-lvp-asset-type.enum';
251
- export * from './lib/models/report/my-tax';
252
- export * from './lib/models/report/property/property-report-item';
253
- export * from './lib/models/report/property/property-report-item-transaction';
254
- export * from './lib/models/report/vehicle-expense/vehicle-expense';
248
+ export * from './lib/models/report';
255
249
  export * from './lib/models/service-subscription/module-url-list.const';
256
250
  export * from './lib/models/service-subscription/service-payment';
257
251
  export * from './lib/models/service-subscription/service-price';