taxtank-core 0.28.8 → 0.28.11

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 (32) hide show
  1. package/bundles/taxtank-core.umd.js +101 -30
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/bank-transaction.collection.js +2 -2
  4. package/esm2015/lib/collections/transaction/transaction.collection.js +26 -1
  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/report/depreciation/index.js +4 -0
  8. package/esm2015/lib/models/report/index.js +6 -0
  9. package/esm2015/lib/models/report/property/index.js +4 -0
  10. package/esm2015/lib/models/report/sole/index.js +2 -0
  11. package/esm2015/lib/models/report/sole/sole-business/sole-business-loss-report.js +18 -0
  12. package/esm2015/lib/services/bank/bank-account-calculation.service.js +9 -3
  13. package/esm2015/lib/services/bank/bank-transaction-calculation.service.js +2 -2
  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 +86 -25
  19. package/fesm2015/taxtank-core.js.map +1 -1
  20. package/lib/collections/bank-transaction.collection.d.ts +1 -1
  21. package/lib/collections/transaction/transaction.collection.d.ts +7 -0
  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/bank/bank-account-calculation.service.d.ts +2 -1
  28. package/lib/services/bank/bank-transaction-calculation.service.d.ts +1 -1
  29. package/lib/services/http/sole/index.d.ts +1 -0
  30. package/lib/services/http/sole/sole-business-loss/sole-business-loss.service.d.ts +11 -0
  31. package/package.json +1 -1
  32. package/public-api.d.ts +1 -7
@@ -68,5 +68,5 @@ export declare class BankTransactionCollection extends Collection<BankTransactio
68
68
  /**
69
69
  * Get collection of unallocated bankTransactions
70
70
  */
71
- getUnallocatedBankTransactions(allocations: TransactionAllocationCollection): BankTransactionCollection;
71
+ getUnallocated(allocations: TransactionAllocationCollection): BankTransactionCollection;
72
72
  }
@@ -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
  }
@@ -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
+ }
@@ -2,6 +2,7 @@ import { BankAccountCollection } from '../../collections/bank-account.collection
2
2
  import { BankTransactionCollection } from '../../collections/bank-transaction.collection';
3
3
  import { TransactionAllocationCollection } from '../../collections/transaction/transaction-allocation.collection';
4
4
  import { BankTransactionCalculationService } from './bank-transaction-calculation.service';
5
+ import { BankAccount } from '../../models/bank/bank-account';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class BankAccountCalculationService {
7
8
  private bankTransactionCalculationService;
@@ -9,7 +10,7 @@ export declare class BankAccountCalculationService {
9
10
  /**
10
11
  * Sum of bank accounts opening balances and their bank transactions allocated amounts
11
12
  */
12
- getTaxTankBalance(bankAccounts: BankAccountCollection, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): number;
13
+ getTaxTankBalance(bankAccounts: BankAccountCollection | BankAccount, bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): number;
13
14
  /**
14
15
  * get difference between total loans amount and total cash amount
15
16
  */
@@ -27,7 +27,7 @@ export declare class BankTransactionCalculationService {
27
27
  * Get collection of unallocated bank transactions
28
28
  * @TODO Alex: consider to move to collection
29
29
  */
30
- getUnallocatedBankTransactions(bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): BankTransactionCollection;
30
+ getUnallocated(bankTransactions: BankTransactionCollection, allocations: TransactionAllocationCollection): BankTransactionCollection;
31
31
  /**
32
32
  * Allocated sum of credit transactions
33
33
  */
@@ -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.8",
3
+ "version": "0.28.11",
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';