taxtank-core 0.28.69 → 0.28.70

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.
@@ -9,13 +9,7 @@ import { VehicleClaim } from '../models';
9
9
  * @TODO extend from TransactionBaseCollection
10
10
  */
11
11
  export declare class DepreciationCollection extends Collection<Depreciation> {
12
- /**
13
- * Get business related transactions
14
- */
15
- getWithBusiness(): this;
16
- /**
17
- * assets purchased in the current financial year
18
- */
12
+ getSoleTransactions(): this;
19
13
  getNew(): this;
20
14
  /**
21
15
  * Get total amount of all depreciations in the collection
@@ -1,16 +1,9 @@
1
1
  import { TransactionBase } from '../../db/Models/transaction/transaction-base';
2
2
  import { Collection } from '../collection';
3
- import { SoleBusiness } from '../../models';
4
3
  /**
5
4
  * used to combine transactions/depreciations
6
5
  */
7
6
  export declare class TransactionBaseCollection extends Collection<TransactionBase> {
8
- filterByBusiness(business: SoleBusiness): this;
9
7
  getClaimAmountByBusinessId(businessId: number): number;
10
- /**
11
- * Get business related transactions
12
- */
13
- getWithBusiness(): this;
14
- getIncomeTransactions(): this;
15
- getExpenseTransactions(): this;
8
+ getSoleTransactions(): this;
16
9
  }
@@ -19,13 +19,7 @@ export declare class TransactionCollection extends ExportableCollection<Transact
19
19
  * we use depreciations as expense transactions a lot
20
20
  */
21
21
  constructor(transactions?: Transaction[], depreciations?: Depreciation[]);
22
- /**
23
- * Get business related transactions
24
- */
25
- getWithBusiness(): this;
26
- /**
27
- * Get total amount of all transactions in the collection
28
- */
22
+ getSoleTransactions(): this;
29
23
  get amount(): number;
30
24
  /**
31
25
  * Difference between allocated amount and total amount
@@ -109,10 +103,9 @@ export declare class TransactionCollection extends ExportableCollection<Transact
109
103
  */
110
104
  getCashPositionChartData(): ChartData[];
111
105
  /**
112
- * user pays GST only from allocated part of income (the rest user didn't get, so don't have to pay)
113
- *
114
- * @param allocations
106
+ * user pays GST only from allocated part (or paid) of income
115
107
  */
108
+ calculateAllocatedClaimAmount(allocations: TransactionAllocationCollection): number;
116
109
  calculateAllocatedGST(allocations: TransactionAllocationCollection): number;
117
110
  getAllocatedAmount(allocations: TransactionAllocationCollection): number;
118
111
  }
@@ -38,6 +38,9 @@ export declare class TransactionBase extends AbstractModel {
38
38
  get amountWithGst(): number;
39
39
  get gstAmount(): number;
40
40
  get gstClaimAmount(): number;
41
+ /**
42
+ * base grossAmount, extends in child classes
43
+ */
41
44
  get grossAmount(): number;
42
45
  get grossClaimAmount(): number;
43
46
  }
@@ -66,7 +66,7 @@ export declare class Depreciation extends DepreciationBase implements Expense, I
66
66
  get claimAmount(): number;
67
67
  get amountWithGst(): number;
68
68
  /**
69
- * @TODO temporary hack, in future backend should return negative numbers
69
+ * assets purchased in the current financial year
70
70
  */
71
- get grossAmount(): number;
71
+ isNew(): boolean;
72
72
  }
@@ -84,10 +84,8 @@ export declare class Transaction extends TransactionBase implements Expense, IRe
84
84
  * Check if transaction is completely allocated
85
85
  */
86
86
  isAllocated(allocations: TransactionAllocationCollection): boolean;
87
- /**
88
- * Get transaction allocated amount
89
- */
90
87
  getAllocatedAmount(allocations: TransactionAllocationCollection): number;
88
+ getAllocatedClaimAmount(allocations: TransactionAllocationCollection): number;
91
89
  /**
92
90
  * Get transaction unallocated amount
93
91
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.69",
3
+ "version": "0.28.70",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",