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.
- package/bundles/taxtank-core.umd.js +36 -63
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/depreciation.collection.js +4 -11
- package/esm2015/lib/collections/transaction/transaction-base.collection.js +3 -15
- package/esm2015/lib/collections/transaction/transaction.collection.js +12 -18
- package/esm2015/lib/db/Models/sole/sole-details.js +1 -1
- package/esm2015/lib/db/Models/transaction/transaction-base.js +7 -4
- package/esm2015/lib/models/depreciation/depreciation.js +9 -11
- package/esm2015/lib/models/transaction/transaction.js +4 -4
- package/fesm2015/taxtank-core.js +33 -56
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/depreciation.collection.d.ts +1 -7
- package/lib/collections/transaction/transaction-base.collection.d.ts +1 -8
- package/lib/collections/transaction/transaction.collection.d.ts +3 -10
- package/lib/db/Models/transaction/transaction-base.d.ts +3 -0
- package/lib/models/depreciation/depreciation.d.ts +2 -2
- package/lib/models/transaction/transaction.d.ts +1 -3
- package/package.json +1 -1
|
@@ -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
|
|
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
|
-
*
|
|
69
|
+
* assets purchased in the current financial year
|
|
70
70
|
*/
|
|
71
|
-
|
|
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
|
*/
|