taxtank-core 0.28.42 → 0.28.44
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 +155 -60
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/sole/index.js +2 -1
- package/esm2015/lib/collections/sole/sole-business-losses.collection.js +28 -0
- package/esm2015/lib/collections/tax-summary/report-item.collection.js +34 -4
- package/esm2015/lib/collections/tax-summary/tax-return-categories.const.js +7 -2
- package/esm2015/lib/collections/transaction/transaction-base.collection.js +9 -3
- package/esm2015/lib/db/Enums/tax-return-category-list.enum.js +4 -1
- package/esm2015/lib/forms/report/my-tax/my-tax-losses.form.js +6 -5
- package/esm2015/lib/models/report/my-tax/my-tax-losses/my-tax-losses.js +8 -5
- package/esm2015/lib/models/tax-summary/tax-summary.js +7 -5
- package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +3 -3
- package/fesm2015/taxtank-core.js +128 -52
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/sole/index.d.ts +1 -0
- package/lib/collections/sole/sole-business-losses.collection.d.ts +9 -0
- package/lib/collections/tax-summary/report-item.collection.d.ts +12 -1
- package/lib/collections/transaction/transaction-base.collection.d.ts +5 -2
- package/lib/db/Enums/tax-return-category-list.enum.d.ts +4 -1
- package/lib/forms/report/my-tax/my-tax-losses.form.d.ts +0 -3
- package/lib/models/report/my-tax/my-tax-losses/my-tax-losses.d.ts +14 -4
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Collection } from '../collection';
|
|
2
|
+
import { SoleBusinessLoss } from '../../models';
|
|
3
|
+
import { TransactionBaseCollection } from '../transaction';
|
|
4
|
+
export declare class SoleBusinessLossesCollection extends Collection<SoleBusinessLoss> {
|
|
5
|
+
/**
|
|
6
|
+
* Calculate business losses applied to the current year
|
|
7
|
+
*/
|
|
8
|
+
calculateBusinessLossApplied(transactions: TransactionBaseCollection): number;
|
|
9
|
+
}
|
|
@@ -13,12 +13,17 @@ export declare class ReportItemCollection extends Collection<ReportItem> {
|
|
|
13
13
|
* Search items which has details
|
|
14
14
|
*/
|
|
15
15
|
getBySection(section: TaxSummarySectionEnum): ReportItemCollection;
|
|
16
|
+
getByCategory(categoryId: TaxReturnCategoryListEnum): ReportItem[];
|
|
16
17
|
/**
|
|
17
18
|
* Recursively find report item by Tax Return Category ID
|
|
18
19
|
*/
|
|
19
20
|
findByCategory(categoryId: TaxReturnCategoryListEnum): ReportItem;
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* get Collection of report items by Tax Return Categories IDs (one item per category)
|
|
23
|
+
*/
|
|
24
|
+
findByCategories(categories: TaxReturnCategoryListEnum[]): ReportItemCollection;
|
|
25
|
+
/**
|
|
26
|
+
* Get Collection of report items by Tax Return Categories IDs (all items per category)
|
|
22
27
|
*/
|
|
23
28
|
getByCategories(categories: TaxReturnCategoryListEnum[]): ReportItemCollection;
|
|
24
29
|
/**
|
|
@@ -26,6 +31,12 @@ export declare class ReportItemCollection extends Collection<ReportItem> {
|
|
|
26
31
|
* Get total amount of report items by Tax Return categories and Tax Summary Section.
|
|
27
32
|
*/
|
|
28
33
|
sumByCategoriesAndSection(categories: TaxReturnCategoryListEnum[], section: TaxSummarySectionEnum): number;
|
|
34
|
+
/**
|
|
35
|
+
* @TODO vik refactor once Nicole approved
|
|
36
|
+
* unlike sumByCategoriesAndSection, which find just one reportItem per category,
|
|
37
|
+
* this method will search for recursively for all matches
|
|
38
|
+
*/
|
|
39
|
+
sumByCategories(categories: TaxReturnCategoryListEnum[]): number;
|
|
29
40
|
/**
|
|
30
41
|
* Get collection of all report item details related to passed income source
|
|
31
42
|
* @TODO Alex: consider to create and move to ReportItemDetailsCollection
|
|
@@ -1,6 +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
|
export declare class TransactionBaseCollection extends Collection<TransactionBase> {
|
|
5
|
-
|
|
4
|
+
getClaimAmountByBusinessId(businessId: number): number;
|
|
5
|
+
/**
|
|
6
|
+
* Get business related transactions
|
|
7
|
+
*/
|
|
8
|
+
getWithBusiness(): this;
|
|
6
9
|
}
|
|
@@ -57,5 +57,8 @@ export declare enum TaxReturnCategoryListEnum {
|
|
|
57
57
|
TAX_OFFSETS_LOW = 61,
|
|
58
58
|
TAX_OFFSETS_MIDDLE = 62,
|
|
59
59
|
TAX_OFFSETS_SOLE = 63,
|
|
60
|
-
TAX_PAYABLE = 28
|
|
60
|
+
TAX_PAYABLE = 28,
|
|
61
|
+
BUSINESS_INCOME_OR_LOSS = 59,
|
|
62
|
+
DEFERRED_BUSINESS_LOSSES_FROM_PRIOR_YEAR = 64,
|
|
63
|
+
DEFERRED_BUSINESS_LOSSES = 60
|
|
61
64
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { AbstractForm } from '../../abstract.form';
|
|
2
2
|
import { MyTaxLosses } from '../../../models/report/my-tax/my-tax-losses/my-tax-losses';
|
|
3
|
-
/**
|
|
4
|
-
* @Todo waiting for Sole tank implementation
|
|
5
|
-
*/
|
|
6
3
|
export declare class MyTaxLossesForm extends AbstractForm<MyTaxLosses> {
|
|
7
4
|
constructor(losses: MyTaxLosses);
|
|
8
5
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionBaseCollection, SoleBusinessLossesCollection } from '../../../../collections';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Sole business losses report
|
|
4
|
+
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Losses" section)
|
|
4
5
|
*/
|
|
5
6
|
export declare class MyTaxLosses {
|
|
6
|
-
transactions
|
|
7
|
-
|
|
7
|
+
private transactions;
|
|
8
|
+
private businessLosses;
|
|
9
|
+
/**
|
|
10
|
+
* Losses carried forward from earlier income years
|
|
11
|
+
*/
|
|
12
|
+
businessLossDeferred: number;
|
|
13
|
+
/**
|
|
14
|
+
* Losses applied to the current year (until profit gets to $0)
|
|
15
|
+
*/
|
|
16
|
+
businessLossApplied: number;
|
|
17
|
+
constructor(transactions: TransactionBaseCollection, businessLosses: SoleBusinessLossesCollection);
|
|
8
18
|
}
|