taxtank-core 0.17.0 → 0.17.1

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.
@@ -1,68 +1,34 @@
1
1
  import { Collection } from '../collection';
2
2
  import { ReportItem } from '../../models/tax-summary/report-item';
3
- import { TaxReturnCategorySectionEnum } from '../../db/Enums/tax-return-category-section.enum';
3
+ import { TaxReturnCategoryListEnum } from '../../db/Enums/tax-return-category-list.enum';
4
+ import { ReportItemDetails } from '../../models/tax-summary/report-item-details';
5
+ import { TaxSummarySectionEnum } from '../../db/Enums/tax-summary-section.enum';
6
+ import { IncomeSource } from '../../models/income-source/income-source';
4
7
  /**
5
8
  * collection for tax return category items
6
9
  */
7
10
  export declare class ReportItemCollection extends Collection<ReportItem> {
8
11
  /**
9
- * Work income
12
+ * Recursively get collection of report items by Tax Summary Section.
13
+ * Search items which has details
10
14
  */
11
- get salary(): number;
15
+ getBySection(section: TaxSummarySectionEnum): ReportItemCollection;
12
16
  /**
13
- * Work expenses
17
+ * Recursively find report item by Tax Return Category ID
14
18
  */
15
- get workExpenses(): number;
19
+ findByCategory(categoryId: TaxReturnCategoryListEnum): ReportItem;
16
20
  /**
17
- * Property income
21
+ * Get Collection of report items by Tax Return Categories IDs
18
22
  */
19
- get rentalIncome(): number;
23
+ getByCategories(categories: TaxReturnCategoryListEnum[]): ReportItemCollection;
20
24
  /**
21
- * Property rental deductions
25
+ * A short call to a chain of methods that we often use.
26
+ * Get total amount of report items by Tax Return categories and Tax Summary Section.
22
27
  */
23
- get rentalDeductions(): number;
28
+ sumByCategoriesAndSection(categories: TaxReturnCategoryListEnum[], section: TaxSummarySectionEnum): number;
24
29
  /**
25
- * Property expenses
30
+ * Get collection of all report item details related to passed income source
31
+ * @TODO Alex: consider to create and move to ReportItemDetailsCollection
26
32
  */
27
- get propertyExpenses(): number;
28
- /**
29
- * Property interest
30
- */
31
- get interestDeductions(): number;
32
- /**
33
- * Property capital works depreciations
34
- */
35
- get capitalWorks(): number;
36
- /**
37
- * Property plant & equipment depreciations
38
- */
39
- get plantEquipment(): number;
40
- /**
41
- * Total property depreciaions
42
- */
43
- get propertyDepreciations(): number;
44
- get partnershipsAndTrusts(): number;
45
- get pciAndSbeIncome(): number;
46
- get capitalGains(): number;
47
- get foreignSourceIncome(): number;
48
- /**
49
- * Other income
50
- */
51
- get otherIncome(): number;
52
- /**
53
- * Other expenses
54
- */
55
- get otherDeductions(): number;
56
- get taxInstalments(): number;
57
- get frankingCredits(): number;
58
- get taxOffsets(): number;
59
- get borrowingExpenses(): number;
60
- get grossTaxPayable(): number;
61
- /**
62
- * taxWithheld by section (work or other)
63
- */
64
- getTaxWithheld(section?: TaxReturnCategorySectionEnum): number;
65
- getTaxCreditsCollection(): ReportItemCollection;
66
- getTotalAmountByIncomeSourceName(name: string): number;
67
- private getByCategory;
33
+ getDetailsByIncomeSource(incomeSource: IncomeSource): Collection<ReportItemDetails>;
68
34
  }
@@ -0,0 +1,6 @@
1
+ import { TaxReturnCategoryListEnum } from '../../db/Enums/tax-return-category-list.enum';
2
+ export declare const TAX_RETURN_CATEGORIES: {
3
+ [key: string]: {
4
+ [key: string]: TaxReturnCategoryListEnum[];
5
+ };
6
+ };
@@ -1,26 +1,40 @@
1
1
  export declare enum TaxReturnCategoryListEnum {
2
2
  SALARY = 1,
3
+ ALLOWANCES_EARNINGS_TIPS_DIRECTOR_FEES = 30,
4
+ EMPLOYER_LUMP_SUM_PAYMENTS = 31,
5
+ ETP = 32,
6
+ GOVERNMENT_ALLOWANCES = 2,
7
+ GOVERNMENT_PENSIONS = 33,
8
+ ANNUITIES_SUPER_INCOME_STREAMS = 3,
9
+ SUPERANNUATION_LUMP_SUM_PAYMENTS = 34,
10
+ ATTRIBUTED_PSI_INCOME = 4,
3
11
  WORK_EXPENSES = 7,
4
12
  GROSS_RENT = 8,
13
+ OTHER_RENTAL_DEDUCTIONS = 12,
5
14
  INTEREST_DEDUCTIONS = 9,
6
15
  CAPITAL_WORKS = 10,
7
16
  DEPRECIATION = 11,
8
- OTHER_RENTAL_DEDUCTIONS = 12,
9
- BORROWING_EXPENSES = 29,
17
+ GROSS_INTEREST = 5,
18
+ DIVIDENDS = 6,
19
+ SHARE_SCHEMES = 35,
10
20
  PARTNERSHIPS_TRUSTS = 13,
11
- PCI_SBE_INCOME = 14,
21
+ PSI_SBE_INCOME = 14,
22
+ SOLE_TRADER_BUSINESS_INCOME = 38,
12
23
  CAPITAL_GAINS = 15,
13
24
  FOREIGN_SOURCE_INCOME = 16,
14
- OTHER_INCOME = 17,
25
+ BONUSES_FROM_LIFE_INSURANCE = 17,
26
+ FORESTRY_MANAGED_INVESTMENT_SCHEMES = 39,
27
+ OTHER_INCOME = 40,
28
+ TAX_CREDITS = 23,
15
29
  OTHER_DEDUCTIONS = 18,
30
+ TAX_OFFSETS = 27,
31
+ BORROWING_EXPENSES = 29,
16
32
  GROSS_TAX_PAYABLE = 19,
17
33
  TAX_ON_TAXABLE_INCOME = 20,
18
34
  MEDICARE = 21,
19
35
  STUDENT_LOAN_REPAYMENT = 22,
20
- TAX_CREDITS = 23,
21
36
  TAX_WITHHELD = 24,
22
37
  TAX_INSTALMENTS = 25,
23
38
  FRANKING_CREDITS = 26,
24
- TAX_OFFSETS = 27,
25
39
  TAX_PAYABLE = 28
26
40
  }
@@ -1,5 +1,6 @@
1
1
  import { TaxReturnCategory } from '../../db/Models/tax-return/tax-return-category';
2
2
  import { ReportItemDetails } from './report-item-details';
3
+ import { ReportItemCollection } from '../../collections/tax-summary/report-item.collection';
3
4
  /**
4
5
  * Used in tax summary reports to show amounts relating to a tax return category entity and details of what this
5
6
  * amount is comprised of. Example here shows an amount of $951.96 and also details of what this amount is comprised of:
@@ -7,9 +8,9 @@ import { ReportItemDetails } from './report-item-details';
7
8
  export declare class ReportItem {
8
9
  amount: number;
9
10
  details: ReportItemDetails[];
10
- items: ReportItem[];
11
11
  taxReturnCategory: TaxReturnCategory;
12
- taxWithheld: number;
12
+ title: string;
13
+ items: ReportItemCollection;
13
14
  /**
14
15
  * Get amount for one income source
15
16
  * @param name Name of income source for filter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -27,6 +27,7 @@ export * from './lib/collections/report/property/property-report-item-depreciati
27
27
  export * from './lib/collections/report/vehicle-expense/vehicle-expense.collection';
28
28
  export * from './lib/collections/subscription/service-subscription.collection';
29
29
  export * from './lib/collections/tax-summary/report-item.collection';
30
+ export * from './lib/collections/tax-summary/tax-return-categories.const';
30
31
  export * from './lib/collections/tax-review.collection';
31
32
  export * from './lib/collections/transaction/transaction-allocation.collection';
32
33
  export * from './lib/collections/transaction/transaction.collection';