taxtank-core 0.33.45 → 0.33.47

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/esm2022/src/lib/collections/chart-accounts/chart-accounts-value.collection.mjs +20 -0
  2. package/esm2022/src/lib/collections/chart-accounts/index.mjs +2 -0
  3. package/esm2022/src/lib/collections/chart-accounts.collection.mjs +2 -2
  4. package/esm2022/src/lib/collections/collection.mjs +2 -2
  5. package/esm2022/src/lib/collections/index.mjs +2 -1
  6. package/esm2022/src/lib/collections/transaction/transaction.collection.mjs +3 -3
  7. package/esm2022/src/lib/db/Enums/{allocation-rule-condition-comparison-operator.enum.mjs → bank/allocation-rule/allocation-rule-condition-comparison-operator.enum.mjs} +1 -1
  8. package/esm2022/src/lib/db/Enums/{allocation-rule-condition-field.enum.mjs → bank/allocation-rule/allocation-rule-condition-field.enum.mjs} +1 -1
  9. package/esm2022/src/lib/db/Enums/{allocation-rule-condition-operator.enum.mjs → bank/allocation-rule/allocation-rule-condition-operator.enum.mjs} +1 -1
  10. package/esm2022/src/lib/db/Enums/bank/allocation-rule/allocation-rule-type.enum.mjs +7 -0
  11. package/esm2022/src/lib/db/Enums/bank/allocation-rule/index.mjs +5 -0
  12. package/esm2022/src/lib/db/Enums/bank/index.mjs +2 -1
  13. package/esm2022/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.mjs +39 -0
  14. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.mjs +20 -66
  15. package/esm2022/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.mjs +18 -0
  16. package/esm2022/src/lib/db/Enums/chart-accounts/index.mjs +3 -3
  17. package/esm2022/src/lib/db/Enums/home-office/home-office-claim-method.enum.mjs +7 -0
  18. package/esm2022/src/lib/db/Enums/home-office/index.mjs +2 -0
  19. package/esm2022/src/lib/db/Enums/index.mjs +2 -6
  20. package/esm2022/src/lib/db/Models/bank/bank-transaction.mjs +2 -2
  21. package/esm2022/src/lib/db/Models/depreciation/depreciation.mjs +1 -2
  22. package/esm2022/src/lib/db/Models/sole/sole-business.mjs +2 -1
  23. package/esm2022/src/lib/db/Models/sole/sole-details.mjs +2 -1
  24. package/esm2022/src/lib/db/Models/user/user.mjs +1 -1
  25. package/esm2022/src/lib/db/Models/vehicle/vehicle-claim.mjs +2 -1
  26. package/esm2022/src/lib/forms/abstract.form.mjs +34 -2
  27. package/esm2022/src/lib/forms/address/address.form.mjs +1 -1
  28. package/esm2022/src/lib/forms/firm/employee-invite.form.mjs +1 -1
  29. package/esm2022/src/lib/forms/home-office/home-office-claim.form.mjs +47 -0
  30. package/esm2022/src/lib/forms/home-office/home-office-log.form.mjs +15 -0
  31. package/esm2022/src/lib/forms/home-office/index.mjs +3 -0
  32. package/esm2022/src/lib/forms/index.mjs +2 -1
  33. package/esm2022/src/lib/forms/transaction/allocation-rule-transaction.form.mjs +4 -2
  34. package/esm2022/src/lib/forms/transaction/allocation-rule.form.mjs +13 -13
  35. package/esm2022/src/lib/models/chart-accounts/chart-accounts.mjs +17 -11
  36. package/esm2022/src/lib/models/endpoint/endpoint.mjs +1 -1
  37. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +4 -1
  38. package/esm2022/src/lib/models/home-office/home-office-claim.interface.mjs +2 -0
  39. package/esm2022/src/lib/models/home-office/home-office-claim.mjs +26 -0
  40. package/esm2022/src/lib/models/home-office/home-office-log.interface.mjs +2 -0
  41. package/esm2022/src/lib/models/home-office/home-office-log.mjs +14 -0
  42. package/esm2022/src/lib/models/home-office/index.mjs +5 -0
  43. package/esm2022/src/lib/models/index.mjs +2 -1
  44. package/esm2022/src/lib/models/report/my-tax/my-tax-business-income-or-losses/business-income-or-losses-categories.const.mjs +14 -14
  45. package/esm2022/src/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-income/my-tax-business-income.mjs +18 -18
  46. package/esm2022/src/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.mjs +12 -12
  47. package/esm2022/src/lib/models/sole/sole-invoice-item.mjs +25 -2
  48. package/esm2022/src/lib/models/transaction/transaction.mjs +6 -3
  49. package/esm2022/src/lib/services/http/home-office/home-office-claim-messages.enum.mjs +8 -0
  50. package/esm2022/src/lib/services/http/home-office/home-office-claim.service.mjs +23 -0
  51. package/esm2022/src/lib/services/http/home-office/home-office-log-messages.enum.mjs +8 -0
  52. package/esm2022/src/lib/services/http/home-office/home-office-log.service.mjs +23 -0
  53. package/esm2022/src/lib/services/http/home-office/index.mjs +5 -0
  54. package/esm2022/src/lib/services/http/index.mjs +3 -1
  55. package/esm2022/src/lib/services/http/rest-messages.enum.mjs +7 -0
  56. package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +11 -7
  57. package/esm2022/src/lib/services/json/chart-accounts/chart-accounts-value.service.mjs +4 -12
  58. package/fesm2022/taxtank-core.mjs +383 -175
  59. package/fesm2022/taxtank-core.mjs.map +1 -1
  60. package/package.json +1 -1
  61. package/src/lib/collections/chart-accounts/chart-accounts-value.collection.d.ts +12 -0
  62. package/src/lib/collections/chart-accounts/index.d.ts +1 -0
  63. package/src/lib/collections/collection.d.ts +1 -1
  64. package/src/lib/collections/index.d.ts +1 -0
  65. package/src/lib/db/Enums/bank/allocation-rule/index.d.ts +4 -0
  66. package/src/lib/db/Enums/bank/index.d.ts +1 -0
  67. package/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.d.ts +37 -0
  68. package/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.d.ts +20 -66
  69. package/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.d.ts +16 -0
  70. package/src/lib/db/Enums/chart-accounts/index.d.ts +2 -2
  71. package/src/lib/db/Enums/home-office/home-office-claim-method.enum.d.ts +5 -0
  72. package/src/lib/db/Enums/home-office/index.d.ts +1 -0
  73. package/src/lib/db/Enums/index.d.ts +1 -4
  74. package/src/lib/db/Models/depreciation/depreciation.d.ts +0 -1
  75. package/src/lib/db/Models/sole/sole-business.d.ts +1 -0
  76. package/src/lib/db/Models/sole/sole-details.d.ts +1 -0
  77. package/src/lib/db/Models/user/user.d.ts +1 -1
  78. package/src/lib/db/Models/vehicle/vehicle-claim.d.ts +1 -0
  79. package/src/lib/forms/abstract.form.d.ts +10 -0
  80. package/src/lib/forms/home-office/home-office-claim.form.d.ts +12 -0
  81. package/src/lib/forms/home-office/home-office-log.form.d.ts +5 -0
  82. package/src/lib/forms/home-office/index.d.ts +2 -0
  83. package/src/lib/forms/index.d.ts +1 -0
  84. package/src/lib/forms/transaction/allocation-rule.form.d.ts +5 -4
  85. package/src/lib/models/chart-accounts/chart-accounts.d.ts +3 -1
  86. package/src/lib/models/home-office/home-office-claim.d.ts +22 -0
  87. package/src/lib/models/home-office/home-office-claim.interface.d.ts +17 -0
  88. package/src/lib/models/home-office/home-office-log.d.ts +11 -0
  89. package/src/lib/models/home-office/home-office-log.interface.d.ts +9 -0
  90. package/src/lib/models/home-office/index.d.ts +4 -0
  91. package/src/lib/models/index.d.ts +1 -0
  92. package/src/lib/models/sole/sole-invoice-item.d.ts +2 -1
  93. package/src/lib/models/transaction/transaction.d.ts +1 -0
  94. package/src/lib/services/http/home-office/home-office-claim-messages.enum.d.ts +6 -0
  95. package/src/lib/services/http/home-office/home-office-claim.service.d.ts +12 -0
  96. package/src/lib/services/http/home-office/home-office-log-messages.enum.d.ts +6 -0
  97. package/src/lib/services/http/home-office/home-office-log.service.d.ts +12 -0
  98. package/src/lib/services/http/home-office/index.d.ts +4 -0
  99. package/src/lib/services/http/index.d.ts +2 -0
  100. package/src/lib/services/http/rest-messages.enum.d.ts +5 -0
  101. package/src/lib/services/http/transaction/transaction.service.d.ts +2 -1
  102. package/src/lib/services/json/chart-accounts/chart-accounts-value.service.d.ts +3 -7
  103. package/esm2022/src/lib/db/Enums/allocation-rule-type.enum.mjs +0 -7
  104. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-invoice.enum.mjs +0 -25
  105. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-unallocatable-list.enum.mjs +0 -6
  106. package/esm2022/src/lib/validators/address-corelogic.validator.mjs +0 -19
  107. package/src/lib/db/Enums/chart-accounts/chart-accounts-invoice.enum.d.ts +0 -23
  108. package/src/lib/db/Enums/chart-accounts/chart-accounts-unallocatable-list.enum.d.ts +0 -4
  109. package/src/lib/validators/address-corelogic.validator.d.ts +0 -6
  110. /package/src/lib/db/Enums/{allocation-rule-condition-comparison-operator.enum.d.ts → bank/allocation-rule/allocation-rule-condition-comparison-operator.enum.d.ts} +0 -0
  111. /package/src/lib/db/Enums/{allocation-rule-condition-field.enum.d.ts → bank/allocation-rule/allocation-rule-condition-field.enum.d.ts} +0 -0
  112. /package/src/lib/db/Enums/{allocation-rule-condition-operator.enum.d.ts → bank/allocation-rule/allocation-rule-condition-operator.enum.d.ts} +0 -0
  113. /package/src/lib/db/Enums/{allocation-rule-type.enum.d.ts → bank/allocation-rule/allocation-rule-type.enum.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.33.45",
3
+ "version": "0.33.47",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^17.0.0",
@@ -0,0 +1,12 @@
1
+ import { Collection } from '../collection';
2
+ import { ChartAccountsValue } from '../../models';
3
+ export declare class ChartAccountsValueCollection extends Collection<ChartAccountsValue> {
4
+ /**
5
+ * $ amount u can claim per 1km
6
+ */
7
+ getKmsRate(isSole: boolean): number;
8
+ /**
9
+ * $ amount u can claim per 1hour
10
+ */
11
+ getHoursRate(isSole: boolean): number;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './chart-accounts-value.collection';
@@ -40,7 +40,7 @@ export declare class Collection<Model extends object> implements Iterable<Model>
40
40
  filterByFinancialYear(pathFrom: string, pathTo?: string, financialYear?: FinancialYear): this;
41
41
  find(callback: (item: Model) => boolean): Model | null;
42
42
  findBy(path: string, value: any): Model | null;
43
- findIndexBy(path: string, value: any): number;
43
+ findIndexBy(path: string, value: any): number | null;
44
44
  push(...items: Model[]): this;
45
45
  /**
46
46
  * @TODO performance check this.create performance and why we do it instead of changing collection
@@ -30,3 +30,4 @@ export * from './user-event-type-collection';
30
30
  export * from './holding';
31
31
  export * from './asset-sale.collection';
32
32
  export * from './user/user.collection';
33
+ export * from './chart-accounts';
@@ -0,0 +1,4 @@
1
+ export * from './allocation-rule-condition-comparison-operator.enum';
2
+ export * from './allocation-rule-condition-field.enum';
3
+ export * from './allocation-rule-condition-operator.enum';
4
+ export * from './allocation-rule-type.enum';
@@ -1,3 +1,4 @@
1
+ export * from './allocation-rule';
1
2
  export * from './bank-account-status.enum';
2
3
  export * from './bank-account-type.enum';
3
4
  export * from './bank-connection-status.enum';
@@ -0,0 +1,37 @@
1
+ export declare enum BusinessChartAccountsEnum {
2
+ PSI_ABN_NOT_QUOTED = 294,
3
+ PSI_LABOUR_HIRE_OR_OTHER = 295,
4
+ PSI_VOLUNTARY_AGREEMENT = 296,
5
+ SALES = 665,
6
+ LABOUR = 666,
7
+ UBER_INCOME = 667,
8
+ COMMISSION = 668,
9
+ PARTS_CONSUMABLES = 669,
10
+ OTHER_BUSINESS_INCOME = 670,
11
+ ASSESSIBLE_GOVERNMENT_PAYMENTS = 671,
12
+ GROSS_PAYMENTS_NO_ABN_GIVEN = 672,
13
+ GROSS_PAYMENTS_VOLUNTARY_AGREEMENT = 673,
14
+ GROSS_PAYMENTS_LABOUR_HIRE_OR_OTHER_SPECIFIED_PAYMENTS = 674,
15
+ PURCHASES_STOCK_INVENTORY = 675,
16
+ CONTRACTORS_AND_COMMISSION = 676,
17
+ SUPERANNUATION = 677,
18
+ BAD_DEBT = 678,
19
+ LEASE_EXPENSES_COMMERCIAL = 679,
20
+ RENT_EXPENSES_COMMERCIAL_PREMISES = 680,
21
+ INTEREST_EXPENSES_AUSTRALIA = 681,
22
+ INTEREST_EXPENSES_OVERSEAS = 682,
23
+ KMS_TRAVELLED = 683,
24
+ VEHICLE_LOAN_INTEREST = 688,
25
+ ENTERTAINMENT = 698,
26
+ VEHICLES = 721,
27
+ VEHICLE_LOAN_PRINCIPAL = 855,
28
+ PSI_OTHER = 858,
29
+ PSI_DEDUCTION_ASSOCIATES = 859,
30
+ PSI_DEDUCTION_OTHER = 860,
31
+ OTHER_ASSESSABLE_PAYMENTS = 861,
32
+ JOBKEEPER = 862,
33
+ GST_REFUND = 864,
34
+ PAYG_INSTALLMENTS = 878,
35
+ INTEREST_EARNED = 879,
36
+ HOME_OFFICE_HOURS = 888
37
+ }
@@ -1,5 +1,16 @@
1
1
  export declare enum ChartAccountsListEnum {
2
- HOME_OFFICE_WORK_HOURS = 103,
2
+ SALARY_OR_WAGES = 2,
3
+ LUMP_SUM_A_GENUINE_REDUNDANCY = 9,
4
+ LUMP_SUM_A_ALL_OTHER_PAYMENTS = 10,
5
+ LUMP_SUM_B = 11,
6
+ ATTRIBUTABLE_PSI = 20,
7
+ INTEREST_EARNED = 22,
8
+ KMS_TRAVELLED = 24,
9
+ VEHICLES = 25,
10
+ COMMERCIAL_VEHICLES = 26,
11
+ VEHICLE_LOAN_INTEREST = 37,
12
+ VEHICLE_LOAN_PRINCIPAL = 38,
13
+ HOME_OFFICE_HOURS = 103,
3
14
  PARTNERSHIP_EXPENSES = 156,
4
15
  TRUST_EXPENSES = 157,
5
16
  INTEREST_CHARGED_BY_ATO = 278,
@@ -9,35 +20,12 @@ export declare enum ChartAccountsListEnum {
9
20
  ACCOUNTING_SOFTWARE_FEES = 285,
10
21
  ADVISOR_FEES = 286,
11
22
  INCOME_TAX_VARIATION = 292,
12
- PSI_ABN_NOT_QUOTED = 294,
13
- PSI_LABOUR_HIRE_OR_OTHER = 294,
14
- PSI_VOLUNTARY_AGREEMENT = 296,
15
23
  RENTAL_INCOME = 298,
16
24
  OTHER_RENTAL_INCOME = 300,
17
25
  INTEREST_ON_LOAN = 302,
18
- BORROWING_EXPENSES = 315,
19
- DIVIDENDS = 542,
20
- TRANSFER = 615,
21
26
  BUILDING_AT_COST = 304,
22
- KLMS_TRAVELLED_FOR_WORK = 24,
23
- DIRECTOR_FEES = 6,
24
- SALARY_OR_WAGES = 2,
25
- WORK_VEHICLES = 25,
26
- SOLE_VEHICLES = 721,
27
- COMMERCIAL_VEHICLES = 26,
28
- VEHICLE_LOAN_INTEREST = 37,
29
- VEHICLE_LOAN_PRINCIPAL = 38,
30
- TAX_INSTALMENTS = 662,
31
- INTEREST_EARNED = 22,
32
- PARTNERSHIP_INCOME = 566,
33
- TRUST_INCOME = 567,
34
- TAX_OFFSETS_N_R_A_S = 571,
35
- LUMP_SUM_A_GENUINE_REDUNDANCY = 9,
36
- LUMP_SUM_A_ALL_OTHER_PAYMENTS = 10,
37
- LUMP_SUM_B = 11,
38
- ATTRIBUTABLE_PSI = 20,
39
27
  LUMP_SUM_PAYMENTS_IN_ARREARS = 519,
40
- JURY_ATTENDANCE_FEES = 519,
28
+ JURY_ATTENDANCE_FEES = 521,
41
29
  FOREIGN_EXCHANGE_GAINS_NON_BUSINESS = 523,
42
30
  ROYALTIES = 525,
43
31
  TAXABLE_SCHOLARSHIPS_BURSARIES_GRANTS = 527,
@@ -46,55 +34,21 @@ export declare enum ChartAccountsListEnum {
46
34
  ATO_INTEREST_PAID = 533,
47
35
  PERSONAL_SUPER_CONTRIBUTIONS_DEDUCTIBLE = 536,
48
36
  SOFTWARE_FEES_TAXTANK = 541,
37
+ DIVIDENDS = 542,
38
+ CODE_B_SUPERANNUATION_INCOME_STREAMS_DISABILITY = 558,
49
39
  AUSTRALIAN_ANNUITY_PAYMENTS = 559,
50
- CODE_M_SUPERANNUATION_LUMP_SUM = 561,
51
40
  EMPLOYEE_SHARE_SCHEME_INCOME = 564,
41
+ PARTNERSHIP_INCOME = 566,
42
+ TRUST_INCOME = 567,
43
+ TAX_OFFSETS_N_R_A_S = 571,
52
44
  FORESTRY_MANAGED_INVESTMENT_SCHEMES_INCOME = 590,
53
45
  FORESTRY_MANAGED_INVESTMENT_SCHEMES_DEDUCTION = 593,
54
46
  ASSESSABLE_AMOUNT_CAPPED_DEFINED_BENEFIT = 639,
55
- CODE_B_SUPERANNUATION_INCOME_STREAMS_DISABILITY = 558,
56
47
  CODE_A_SUPERANNUATION_INCOME_STREAMS_DEATH = 640,
57
- SALES = 665,
58
- LABOUR = 666,
59
- UBER_INCOME = 667,
60
- COMMISSION = 668,
61
- PARTS_CONSUMABLES = 669,
62
- OTHER_BUSINESS_INCOME = 670,
63
- ASSESSIBLE_GOVERNMENT_PAYMENTS = 671,
64
- GROSS_PAYMENTS_NO_ABN_GIVEN = 672,
65
- GROSS_PAYMENTS_VOLUNTARY_AGREEMENT = 673,
66
- GROSS_PAYMENTS_LABOUR_HIRE_OR_OTHER_SPECIFIED_PAYMENTS = 674,
67
- PURCHASES_STOCK_INVENTORY = 675,
68
- CONTRACTORS_AND_COMMISSION = 676,
69
- SUPERANNUATION = 677,
70
- BAD_DEBT = 678,
71
- LEASE_EXPENSES_COMMERCIAL = 679,
72
- RENT_EXPENSES_COMMERCIAL_PREMISES = 680,
73
- INTEREST_EXPENSES_AUSTRALIA = 681,
74
- INTEREST_EXPENSES_OVERSEAS = 682,
75
- KLMS_TRAVELLED = 683,
76
- FUEL_OIL = 684,
77
- SERVICES_MAINTENANCE = 685,
78
- REGISTRATION = 686,
79
- LEASE_INTEREST_PAYMENTS = 687,
80
- SOLE_VEHICLE_LOAN_INTEREST = 688,
81
- SOLE_VEHICLE_LOAN_PRINCIPAL = 855,
82
- INSURANCE = 689,
83
- TYRES = 690,
84
- BATTERIES = 691,
85
- CAR_WASH = 692,
86
- PARKING_TOLLS = 693,
87
- OTHER_SOLE_EXPENSES = 694,
88
- SOLE_ENTERTAINMENT = 698,
48
+ TRANSFER = 615,
89
49
  PERSONAL_EXPENSES = 628,
90
50
  PERSONAL_INCOME = 630,
91
51
  PLATFORM_FEES = 857,
92
- PSI_OTHER = 858,
93
- PSI_DEDUCTION_ASSOCIATES = 859,
94
- PSI_DEDUCTION_OTHER = 860,
95
52
  AUSTRALIAN_GOVERNMENT_SPECIAL_PAYMENTS = 871,
96
- FHSS = 872,
97
- LOAN_DRAWDOWN = 883,
98
- PROGRESS_PAYMENTS = 884,
99
- LOAN_PAYMENT = 885
53
+ FHSS = 872
100
54
  }
@@ -0,0 +1,16 @@
1
+ export declare enum HomeOfficeChartAccountsEnum {
2
+ MOBILE_PHONE = 90,
3
+ INTERNET = 94,
4
+ ELECTRICITY_AND_GAS = 234,
5
+ TELEPHONE = 255,
6
+ HOME_OFFICE_CLEANING = 11861,
7
+ BUSINESS_ELECTRICITY_AND_GAS = 892,
8
+ BUSINESS_HOME_OFFICE_CLEANING = 893,
9
+ BUSINESS_INTERNET = 705,
10
+ BUSINESS_TELEPHONE = 11860,
11
+ BUSINESS_MOBILE_PHONE = 719,
12
+ HOME_OFFICE_RENT = 889,
13
+ HOME_OFFICE_LOAN = 890,
14
+ HOME_OFFICE_RATES = 891,
15
+ HOME_OFFICE_OTHER = 894
16
+ }
@@ -5,7 +5,7 @@ export * from './chart-accounts-heading-tax-deductible.enum';
5
5
  export * from './chart-accounts-heading-taxable.enum';
6
6
  export * from './chart-accounts-heading-vehicle-list.enum';
7
7
  export * from './chart-accounts-list.enum';
8
- export * from './chart-accounts-unallocatable-list.enum';
8
+ export * from './business-chart-accounts.enum';
9
9
  export * from './chart-accounts-meta-field-list.enum';
10
10
  export * from './chart-accounts-meta-field-type.enum';
11
11
  export * from './chart-accounts-salary-adjustments-list.enum';
@@ -13,5 +13,5 @@ export * from './chart-accounts-adjustment-included-list.enum';
13
13
  export * from './chart-accounts-type.enum';
14
14
  export * from './chart-accounts-keep-sign.enum';
15
15
  export * from './chart-accounts-holding-untaxed-income-list.enum';
16
- export * from './chart-accounts-invoice.enum';
17
16
  export * from './chart-accounts-property-adjustments-list.enum';
17
+ export * from './home-office-chart-accounts.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum HomeOfficeClaimMethodEnum {
2
+ FIXED = 1,
3
+ ACTUAL = 2,
4
+ OCCUPANCY = 3
5
+ }
@@ -0,0 +1 @@
1
+ export * from './home-office-claim-method.enum';
@@ -1,7 +1,3 @@
1
- export * from './allocation-rule-condition-comparison-operator.enum';
2
- export * from './allocation-rule-condition-field.enum';
3
- export * from './allocation-rule-condition-operator.enum';
4
- export * from './allocation-rule-type.enum';
5
1
  export * from './bank';
6
2
  export * from './firm';
7
3
  export * from './client';
@@ -13,3 +9,4 @@ export * from './tax-return';
13
9
  export * from './subscription';
14
10
  export * from './user';
15
11
  export * from './sole';
12
+ export * from './home-office';
@@ -11,7 +11,6 @@ import { Loan } from '../loan/loan';
11
11
  import { TransactionBase } from '../transaction/transaction-base';
12
12
  import { SoleBusiness } from '../sole/sole-business';
13
13
  export declare class Depreciation extends TransactionBase {
14
- static className: string;
15
14
  createdAt?: Date;
16
15
  updatedAt?: Date;
17
16
  date?: Date;
@@ -12,6 +12,7 @@ import { IncomeSource } from '../incomeSource/income-source';
12
12
  import { File } from '../file';
13
13
  import { ObservableModel } from '../observable-model';
14
14
  export declare class SoleBusiness extends ObservableModel {
15
+ static className: string;
15
16
  name?: string;
16
17
  description?: string;
17
18
  website?: string;
@@ -2,6 +2,7 @@ import { User } from '../user/user';
2
2
  import { AnnualFrequencyEnum } from '../../Enums';
3
3
  import { ObservableModel } from '../observable-model';
4
4
  export declare class SoleDetails extends ObservableModel {
5
+ static className: string;
5
6
  abn?: string;
6
7
  isGST?: boolean;
7
8
  createdAt?: Date;
@@ -17,7 +17,7 @@ import { SoleDetails } from '../sole/sole-details';
17
17
  import { File } from '../file';
18
18
  import { ObservableModel } from '../observable-model';
19
19
  import { SetupItem } from '../setup-item';
20
- import { GenderEnum } from '../../Enums/user/gender.enum';
20
+ import { GenderEnum } from '../../Enums';
21
21
  export declare class User extends ObservableModel {
22
22
  static className: string;
23
23
  intercomId?: number;
@@ -3,6 +3,7 @@ import { SoleBusiness } from '../sole/sole-business';
3
3
  import { VehicleClaimDetails } from './vehicle-claim-details';
4
4
  import { ObservableModel } from '../observable-model';
5
5
  export declare class VehicleClaim extends ObservableModel {
6
+ static className: string;
6
7
  kilometers?: number;
7
8
  workUsage?: number;
8
9
  details?: VehicleClaimDetails;
@@ -60,4 +60,14 @@ export declare abstract class AbstractForm<Model, Controls extends ControlsInter
60
60
  */
61
61
  patchField(name: string, value: any): void;
62
62
  fieldChanged(name: string): boolean;
63
+ addValidators(validators: ValidatorFn | ValidatorFn[], controls?: AbstractControl[]): void;
64
+ removeValidators(validators: ValidatorFn | ValidatorFn[], controls?: AbstractControl[]): void;
65
+ disable(opts?: {
66
+ onlySelf?: boolean;
67
+ emitEvent?: boolean;
68
+ }, controls?: AbstractControl[]): void;
69
+ enable(opts?: {
70
+ onlySelf?: boolean;
71
+ emitEvent?: boolean;
72
+ }, controls?: AbstractControl[]): void;
63
73
  }
@@ -0,0 +1,12 @@
1
+ import { AbstractControl } from '@angular/forms';
2
+ import { AbstractForm } from '../abstract.form';
3
+ import { HomeOfficeClaim } from '../../models';
4
+ import { IEventListener } from '../../interfaces';
5
+ import { HomeOfficeClaimMethodEnum } from '../../db/Enums';
6
+ export declare class HomeOfficeClaimForm extends AbstractForm<HomeOfficeClaim> implements IEventListener {
7
+ constructor(claim?: HomeOfficeClaim);
8
+ listenEvents(): void;
9
+ switchMethod(method: HomeOfficeClaimMethodEnum): void;
10
+ get actualControls(): AbstractControl[];
11
+ get occupancyControls(): AbstractControl[];
12
+ }
@@ -0,0 +1,5 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { HomeOfficeLog } from '../../models/home-office';
3
+ export declare class HomeOfficeLogForm extends AbstractForm<HomeOfficeLog> {
4
+ constructor(log?: HomeOfficeLog);
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './home-office-claim.form';
2
+ export * from './home-office-log.form';
@@ -27,3 +27,4 @@ export * from './holding';
27
27
  export * from './chart-accounts';
28
28
  export * from './tax-review';
29
29
  export * from './chat';
30
+ export * from './home-office';
@@ -1,18 +1,19 @@
1
1
  import { AbstractForm } from '../abstract.form';
2
2
  import { AllocationRule } from '../../models';
3
- import { UntypedFormArray } from '@angular/forms';
3
+ import { FormArray } from '@angular/forms';
4
4
  import { AllocationRuleTransactionForm } from './allocation-rule-transaction.form';
5
5
  import { ChartAccountsCategoryEnum } from '../../db/Enums';
6
6
  import { IEventListener } from '../../interfaces';
7
+ import { AllocationRuleCollection } from '../../collections';
7
8
  /**
8
9
  * @TODO move aux methods like isSplittable/isTaxFieldHidden/etc (used in view with ngIf) to properties to improve perf
9
10
  */
10
11
  export declare class AllocationRuleForm extends AbstractForm<AllocationRule> implements IEventListener {
11
12
  private isGST;
12
13
  chartAccountsCategories: ChartAccountsCategoryEnum[];
13
- constructor(rule: AllocationRule, isGST: boolean);
14
- get conditionsArray(): UntypedFormArray;
15
- get childTransactionsArray(): UntypedFormArray;
14
+ constructor(rule: AllocationRule, rules: AllocationRuleCollection, isGST: boolean);
15
+ get conditionsArray(): FormArray;
16
+ get childTransactionsArray(): FormArray;
16
17
  get transactionFormGroup(): AllocationRuleTransactionForm;
17
18
  addConditionForm(): void;
18
19
  isTaxFieldHidden(): boolean;
@@ -1,6 +1,7 @@
1
1
  import { ChartAccounts as ChartAccountsBase } from '../../db/Models/chart-accounts/chart-accounts';
2
2
  import { ChartAccountsHeading } from './chart-accounts-heading';
3
3
  import { ChartAccountsMetaField } from './chart-accounts-meta-field';
4
+ import { BusinessChartAccountsEnum, ChartAccountsListEnum } from '../../db/Enums';
4
5
  import { ChartAccountsValue } from './chart-accounts-value';
5
6
  import { ChartAccountsTaxLabelsEnum } from './chart-accounts-tax-labels.enum';
6
7
  export declare class ChartAccounts extends ChartAccountsBase {
@@ -10,6 +11,7 @@ export declare class ChartAccounts extends ChartAccountsBase {
10
11
  static GSTRatio: number;
11
12
  static GSTCoefficient: number;
12
13
  static GSTPercent: number;
14
+ static systemList: (ChartAccountsListEnum | BusinessChartAccountsEnum)[];
13
15
  heading: ChartAccountsHeading;
14
16
  metaFields: ChartAccountsMetaField[];
15
17
  values: ChartAccountsValue[];
@@ -97,7 +99,7 @@ export declare class ChartAccounts extends ChartAccountsBase {
97
99
  /**
98
100
  * no way to check how much used for work/sole, so we let user adjust it
99
101
  * except vehicle expense, which is equal to vehicleClaim.workUsage
100
- * except when taxablePercent=0, but not SOLE_ENTERTAINMENT
102
+ * except when taxablePercent=0, but not ENTERTAINMENT
101
103
  */
102
104
  isClaimPercentEditable(): boolean;
103
105
  /**
@@ -0,0 +1,22 @@
1
+ import { HomeOfficeClaimMethodEnum } from '../../db/Enums';
2
+ import { User } from '../user';
3
+ import { SoleBusiness } from '../sole';
4
+ import { ObservableModel } from '../../db/Models';
5
+ import { HomeOfficeClaimInterface } from './home-office-claim.interface';
6
+ import { TransactionCollection } from '../../collections';
7
+ export declare class HomeOfficeClaim extends ObservableModel implements HomeOfficeClaimInterface {
8
+ static className: string;
9
+ id: number;
10
+ user: User;
11
+ method: HomeOfficeClaimMethodEnum;
12
+ financialYear: number;
13
+ hours?: number;
14
+ electricityAndGas?: number;
15
+ cleaning?: number;
16
+ internet?: number;
17
+ telephone?: number;
18
+ mobile?: number;
19
+ area?: number;
20
+ business?: SoleBusiness;
21
+ getExpenses(transactions: TransactionCollection): number;
22
+ }
@@ -0,0 +1,17 @@
1
+ import { HomeOfficeClaimMethodEnum } from '../../db/Enums/home-office/home-office-claim-method.enum';
2
+ import { User } from '../user';
3
+ import { SoleBusiness } from '../sole';
4
+ export interface HomeOfficeClaimInterface {
5
+ id: number;
6
+ user: User;
7
+ method: HomeOfficeClaimMethodEnum;
8
+ financialYear: number;
9
+ hours?: number;
10
+ electricityAndGas?: number;
11
+ cleaning?: number;
12
+ internet?: number;
13
+ telephone?: number;
14
+ mobile?: number;
15
+ area?: number;
16
+ business?: SoleBusiness;
17
+ }
@@ -0,0 +1,11 @@
1
+ import { HomeOfficeClaim } from './home-office-claim';
2
+ import { SoleBusiness } from '../sole';
3
+ import { AbstractModel } from '../../db/Models';
4
+ import { HomeOfficeLogInterface } from './home-office-log.interface';
5
+ export declare class HomeOfficeLog extends AbstractModel implements HomeOfficeLogInterface {
6
+ claim: HomeOfficeClaim;
7
+ date: Date;
8
+ hours: number;
9
+ description: string;
10
+ business?: SoleBusiness;
11
+ }
@@ -0,0 +1,9 @@
1
+ import { HomeOfficeClaim } from './home-office-claim';
2
+ import { SoleBusiness } from '../sole';
3
+ export interface HomeOfficeLogInterface {
4
+ claim: HomeOfficeClaim;
5
+ date: Date;
6
+ hours: number;
7
+ description: string;
8
+ business?: SoleBusiness;
9
+ }
@@ -0,0 +1,4 @@
1
+ export * from './home-office-claim.interface';
2
+ export * from './home-office-claim';
3
+ export * from './home-office-log.interface';
4
+ export * from './home-office-log';
@@ -24,3 +24,4 @@ export * from './asset-sale';
24
24
  export * from './budget';
25
25
  export * from './tax-return';
26
26
  export * from './firm';
27
+ export * from './home-office';
@@ -2,8 +2,9 @@ import { SoleInvoiceItem as SoleInvoiceItemBase } from '../../db/Models/sole/sol
2
2
  import { SoleInvoice } from './sole-invoice';
3
3
  import { ChartAccounts } from '../chart-accounts';
4
4
  import { Transaction } from '../transaction';
5
- import { SoleInvoiceTaxTypeEnum } from '../../db/Enums';
5
+ import { BusinessChartAccountsEnum, SoleInvoiceTaxTypeEnum } from '../../db/Enums';
6
6
  export declare class SoleInvoiceItem extends SoleInvoiceItemBase {
7
+ static chartAccounts: BusinessChartAccountsEnum[];
7
8
  invoice: SoleInvoice;
8
9
  chartAccounts: ChartAccounts;
9
10
  transactions: Transaction[];
@@ -95,4 +95,5 @@ export declare class Transaction extends TransactionBase implements Expense {
95
95
  */
96
96
  ignoreSign(): boolean;
97
97
  setParent(transaction: Transaction): void;
98
+ isEditable(): boolean;
98
99
  }
@@ -0,0 +1,6 @@
1
+ export declare enum HomeOfficeClaimMessagesEnum {
2
+ CREATED = "Claim created",
3
+ UPDATED = "Claim updated",
4
+ DELETED = "Claim deleted",
5
+ CONFIRM_DELETE = "Are you sure you want to delete this claim?"
6
+ }
@@ -0,0 +1,12 @@
1
+ import { RestMethod, RestService } from '../rest';
2
+ import { Collection } from '../../../collections';
3
+ import { HomeOfficeClaim, HomeOfficeClaimInterface } from '../../../models/home-office';
4
+ import * as i0 from "@angular/core";
5
+ export declare class HomeOfficeClaimService extends RestService<HomeOfficeClaimInterface, HomeOfficeClaim, Collection<HomeOfficeClaim>> {
6
+ protected endpointUri: string;
7
+ modelClass: typeof HomeOfficeClaim;
8
+ collectionClass: typeof Collection<HomeOfficeClaim>;
9
+ disabledMethods: RestMethod[];
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<HomeOfficeClaimService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<HomeOfficeClaimService>;
12
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum HomeOfficeLogMessagesEnum {
2
+ CREATED = "Log created",
3
+ UPDATED = "Log updated",
4
+ DELETED = "Log deleted",
5
+ CONFIRM_DELETE = "Are you sure you want to delete this Log?"
6
+ }
@@ -0,0 +1,12 @@
1
+ import { RestMethod, RestService } from '../rest';
2
+ import { Collection } from '../../../collections';
3
+ import { HomeOfficeClaim, HomeOfficeLog, HomeOfficeLogInterface } from '../../../models/home-office';
4
+ import * as i0 from "@angular/core";
5
+ export declare class HomeOfficeLogService extends RestService<HomeOfficeLogInterface, HomeOfficeLog, Collection<HomeOfficeLog>> {
6
+ protected endpointUri: string;
7
+ modelClass: typeof HomeOfficeClaim;
8
+ collectionClass: typeof Collection<HomeOfficeClaim>;
9
+ disabledMethods: RestMethod[];
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<HomeOfficeLogService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<HomeOfficeLogService>;
12
+ }
@@ -0,0 +1,4 @@
1
+ export * from './home-office-claim.service';
2
+ export * from './home-office-claim-messages.enum';
3
+ export * from './home-office-log.service';
4
+ export * from './home-office-log-messages.enum';
@@ -26,3 +26,5 @@ export * from './client';
26
26
  export * from './user';
27
27
  export * from './document';
28
28
  export * from './holding';
29
+ export * from './home-office';
30
+ export * from './rest-messages.enum';
@@ -0,0 +1,5 @@
1
+ export declare enum RestMessagesEnum {
2
+ POST = "Created",
3
+ PUT = "Updated",
4
+ DELETE = "Deleted"
5
+ }
@@ -22,7 +22,7 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
22
22
  * Listen events from Event Dispatcher services
23
23
  */
24
24
  listenEvents(): void;
25
- protected fetch(path?: string, cache?: boolean): Observable<Transaction[]>;
25
+ get(path?: string): Observable<Transaction[]>;
26
26
  getCurrentYear(): Observable<Transaction[]>;
27
27
  /**
28
28
  * Add single new transaction
@@ -72,6 +72,7 @@ export declare class TransactionService extends RestService<TransactionBase, Tra
72
72
  */
73
73
  private listenDepreciationChange;
74
74
  private listenVehicleClaimChanges;
75
+ private listenHomeOfficeClaim;
75
76
  /**
76
77
  * property forecast includes claimPercent which affects property related expenses
77
78
  * @TODO Alex move to forecast api instead of property
@@ -1,16 +1,12 @@
1
1
  import { ChartAccountsValue as ChartAccountsValueBase } from '../../../db/Models';
2
- import { Collection } from '../../../collections';
2
+ import { ChartAccountsValueCollection } from '../../../collections';
3
3
  import { ChartAccountsValue } from '../../../models';
4
4
  import { DataService } from '../../data.service';
5
5
  import * as i0 from "@angular/core";
6
- export declare class ChartAccountsValueService extends DataService<ChartAccountsValueBase, ChartAccountsValue, Collection<ChartAccountsValue>> {
6
+ export declare class ChartAccountsValueService extends DataService<ChartAccountsValueBase, ChartAccountsValue, ChartAccountsValueCollection> {
7
7
  modelClass: typeof ChartAccountsValue;
8
- collectionClass: typeof Collection;
8
+ collectionClass: typeof ChartAccountsValueCollection;
9
9
  constructor();
10
- /**
11
- * $ amount u can claim per 1km
12
- */
13
- getKmsRate(isSole: boolean): number;
14
10
  static ɵfac: i0.ɵɵFactoryDeclaration<ChartAccountsValueService, never>;
15
11
  static ɵprov: i0.ɵɵInjectableDeclaration<ChartAccountsValueService>;
16
12
  }
@@ -1,7 +0,0 @@
1
- export var AllocationRuleTypeEnum;
2
- (function (AllocationRuleTypeEnum) {
3
- AllocationRuleTypeEnum[AllocationRuleTypeEnum["EXPENSE"] = 1] = "EXPENSE";
4
- AllocationRuleTypeEnum[AllocationRuleTypeEnum["INCOME"] = 2] = "INCOME";
5
- AllocationRuleTypeEnum[AllocationRuleTypeEnum["TRANSFER"] = 3] = "TRANSFER";
6
- })(AllocationRuleTypeEnum || (AllocationRuleTypeEnum = {}));
7
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsb2NhdGlvbi1ydWxlLXR5cGUuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9kYi9FbnVtcy9hbGxvY2F0aW9uLXJ1bGUtdHlwZS5lbnVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLHNCQUlYO0FBSkQsV0FBWSxzQkFBc0I7SUFDakMseUVBQVcsQ0FBQTtJQUNYLHVFQUFVLENBQUE7SUFDViwyRUFBWSxDQUFBO0FBQ2IsQ0FBQyxFQUpXLHNCQUFzQixLQUF0QixzQkFBc0IsUUFJakMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBBbGxvY2F0aW9uUnVsZVR5cGVFbnVtIHtcblx0RVhQRU5TRSA9IDEsXG5cdElOQ09NRSA9IDIsXG5cdFRSQU5TRkVSID0gMyxcbn1cbiJdfQ==