taxtank-core 0.33.46 → 0.33.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) 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/home-office/home-office-claim.collection.mjs +7 -0
  6. package/esm2022/src/lib/collections/home-office/index.mjs +2 -0
  7. package/esm2022/src/lib/collections/index.mjs +3 -1
  8. package/esm2022/src/lib/collections/transaction/transaction.collection.mjs +3 -3
  9. 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
  10. package/esm2022/src/lib/db/Enums/{allocation-rule-condition-field.enum.mjs → bank/allocation-rule/allocation-rule-condition-field.enum.mjs} +1 -1
  11. package/esm2022/src/lib/db/Enums/{allocation-rule-condition-operator.enum.mjs → bank/allocation-rule/allocation-rule-condition-operator.enum.mjs} +1 -1
  12. package/esm2022/src/lib/db/Enums/bank/allocation-rule/allocation-rule-type.enum.mjs +7 -0
  13. package/esm2022/src/lib/db/Enums/bank/allocation-rule/index.mjs +5 -0
  14. package/esm2022/src/lib/db/Enums/bank/index.mjs +2 -1
  15. package/esm2022/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.mjs +48 -0
  16. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.mjs +25 -66
  17. package/esm2022/src/lib/db/Enums/chart-accounts/index.mjs +2 -3
  18. package/esm2022/src/lib/db/Enums/home-office/home-office-claim-method.enum.mjs +7 -0
  19. package/esm2022/src/lib/db/Enums/home-office/index.mjs +2 -0
  20. package/esm2022/src/lib/db/Enums/index.mjs +2 -6
  21. package/esm2022/src/lib/db/Models/bank/bank-transaction.mjs +2 -2
  22. package/esm2022/src/lib/db/Models/depreciation/depreciation.mjs +1 -2
  23. package/esm2022/src/lib/db/Models/sole/sole-business.mjs +2 -1
  24. package/esm2022/src/lib/db/Models/sole/sole-details.mjs +2 -1
  25. package/esm2022/src/lib/db/Models/user/user.mjs +1 -1
  26. package/esm2022/src/lib/db/Models/vehicle/vehicle-claim.mjs +2 -1
  27. package/esm2022/src/lib/forms/abstract.form.mjs +36 -4
  28. package/esm2022/src/lib/forms/address/address.form.mjs +1 -1
  29. package/esm2022/src/lib/forms/home-office/home-office-calculator.form.mjs +25 -0
  30. package/esm2022/src/lib/forms/home-office/home-office-claim.form.mjs +47 -0
  31. package/esm2022/src/lib/forms/home-office/home-office-log.form.mjs +15 -0
  32. package/esm2022/src/lib/forms/home-office/index.mjs +4 -0
  33. package/esm2022/src/lib/forms/index.mjs +2 -1
  34. package/esm2022/src/lib/forms/transaction/work/work-expense.form.mjs +15 -2
  35. package/esm2022/src/lib/models/bank/bank-transaction-chart-data.mjs +2 -3
  36. package/esm2022/src/lib/models/chart-accounts/chart-accounts.mjs +36 -11
  37. package/esm2022/src/lib/models/dictionary/dictionary.mjs +3 -2
  38. package/esm2022/src/lib/models/endpoint/endpoint.mjs +1 -1
  39. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +8 -1
  40. package/esm2022/src/lib/models/home-office/home-office-claim.interface.mjs +2 -0
  41. package/esm2022/src/lib/models/home-office/home-office-claim.mjs +46 -0
  42. package/esm2022/src/lib/models/home-office/home-office-log.interface.mjs +2 -0
  43. package/esm2022/src/lib/models/home-office/home-office-log.mjs +14 -0
  44. package/esm2022/src/lib/models/home-office/index.mjs +5 -0
  45. package/esm2022/src/lib/models/index.mjs +2 -1
  46. package/esm2022/src/lib/models/report/my-tax/my-tax-business-income-or-losses/business-income-or-losses-categories.const.mjs +14 -14
  47. 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
  48. 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
  49. package/esm2022/src/lib/models/sole/sole-invoice-item.mjs +25 -2
  50. package/esm2022/src/lib/models/transaction/transaction.mjs +10 -4
  51. package/esm2022/src/lib/services/data.service.mjs +2 -2
  52. package/esm2022/src/lib/services/http/home-office/home-office-claim-messages.enum.mjs +8 -0
  53. package/esm2022/src/lib/services/http/home-office/home-office-claim.service.mjs +23 -0
  54. package/esm2022/src/lib/services/http/home-office/home-office-log-messages.enum.mjs +8 -0
  55. package/esm2022/src/lib/services/http/home-office/home-office-log.service.mjs +23 -0
  56. package/esm2022/src/lib/services/http/home-office/index.mjs +5 -0
  57. package/esm2022/src/lib/services/http/index.mjs +3 -1
  58. package/esm2022/src/lib/services/http/rest/rest-old.service.mjs +8 -1
  59. package/esm2022/src/lib/services/http/rest/rest.service.mjs +24 -5
  60. package/esm2022/src/lib/services/http/rest-messages.enum.mjs +7 -0
  61. package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +9 -5
  62. package/esm2022/src/lib/services/json/chart-accounts/chart-accounts-value.service.mjs +4 -12
  63. package/esm2022/src/lib/validators/current-fin-year.validator.mjs +3 -2
  64. package/fesm2022/taxtank-core.mjs +485 -170
  65. package/fesm2022/taxtank-core.mjs.map +1 -1
  66. package/package.json +1 -1
  67. package/src/lib/collections/chart-accounts/chart-accounts-value.collection.d.ts +12 -0
  68. package/src/lib/collections/chart-accounts/index.d.ts +1 -0
  69. package/src/lib/collections/collection.d.ts +1 -1
  70. package/src/lib/collections/home-office/home-office-claim.collection.d.ts +5 -0
  71. package/src/lib/collections/home-office/index.d.ts +1 -0
  72. package/src/lib/collections/index.d.ts +2 -0
  73. package/src/lib/db/Enums/bank/allocation-rule/index.d.ts +4 -0
  74. package/src/lib/db/Enums/bank/index.d.ts +1 -0
  75. package/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.d.ts +46 -0
  76. package/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.d.ts +24 -65
  77. package/src/lib/db/Enums/chart-accounts/index.d.ts +1 -2
  78. package/src/lib/db/Enums/home-office/home-office-claim-method.enum.d.ts +5 -0
  79. package/src/lib/db/Enums/home-office/index.d.ts +1 -0
  80. package/src/lib/db/Enums/index.d.ts +1 -4
  81. package/src/lib/db/Models/depreciation/depreciation.d.ts +0 -1
  82. package/src/lib/db/Models/sole/sole-business.d.ts +1 -0
  83. package/src/lib/db/Models/sole/sole-details.d.ts +1 -0
  84. package/src/lib/db/Models/user/user.d.ts +1 -1
  85. package/src/lib/db/Models/vehicle/vehicle-claim.d.ts +1 -0
  86. package/src/lib/forms/abstract.form.d.ts +11 -1
  87. package/src/lib/forms/home-office/home-office-calculator.form.d.ts +8 -0
  88. package/src/lib/forms/home-office/home-office-claim.form.d.ts +12 -0
  89. package/src/lib/forms/home-office/home-office-log.form.d.ts +5 -0
  90. package/src/lib/forms/home-office/index.d.ts +3 -0
  91. package/src/lib/forms/index.d.ts +1 -0
  92. package/src/lib/forms/transaction/work/work-expense.form.d.ts +4 -2
  93. package/src/lib/models/bank/bank-transaction-chart-data.d.ts +2 -2
  94. package/src/lib/models/chart-accounts/chart-accounts.d.ts +5 -1
  95. package/src/lib/models/dictionary/dictionary.d.ts +2 -2
  96. package/src/lib/models/home-office/home-office-claim.d.ts +26 -0
  97. package/src/lib/models/home-office/home-office-claim.interface.d.ts +20 -0
  98. package/src/lib/models/home-office/home-office-log.d.ts +11 -0
  99. package/src/lib/models/home-office/home-office-log.interface.d.ts +9 -0
  100. package/src/lib/models/home-office/index.d.ts +4 -0
  101. package/src/lib/models/index.d.ts +1 -0
  102. package/src/lib/models/sole/sole-invoice-item.d.ts +2 -1
  103. package/src/lib/models/transaction/transaction.d.ts +3 -1
  104. package/src/lib/services/http/home-office/home-office-claim-messages.enum.d.ts +6 -0
  105. package/src/lib/services/http/home-office/home-office-claim.service.d.ts +12 -0
  106. package/src/lib/services/http/home-office/home-office-log-messages.enum.d.ts +6 -0
  107. package/src/lib/services/http/home-office/home-office-log.service.d.ts +12 -0
  108. package/src/lib/services/http/home-office/index.d.ts +4 -0
  109. package/src/lib/services/http/index.d.ts +2 -0
  110. package/src/lib/services/http/rest/rest-old.service.d.ts +4 -0
  111. package/src/lib/services/http/rest/rest.service.d.ts +1 -0
  112. package/src/lib/services/http/rest-messages.enum.d.ts +5 -0
  113. package/src/lib/services/http/transaction/transaction.service.d.ts +1 -0
  114. package/src/lib/services/json/chart-accounts/chart-accounts-value.service.d.ts +3 -7
  115. package/esm2022/src/lib/db/Enums/allocation-rule-type.enum.mjs +0 -7
  116. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-invoice.enum.mjs +0 -25
  117. package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-unallocatable-list.enum.mjs +0 -6
  118. package/esm2022/src/lib/validators/address-corelogic.validator.mjs +0 -19
  119. package/src/lib/db/Enums/chart-accounts/chart-accounts-invoice.enum.d.ts +0 -23
  120. package/src/lib/db/Enums/chart-accounts/chart-accounts-unallocatable-list.enum.d.ts +0 -4
  121. package/src/lib/validators/address-corelogic.validator.d.ts +0 -6
  122. /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
  123. /package/src/lib/db/Enums/{allocation-rule-condition-field.enum.d.ts → bank/allocation-rule/allocation-rule-condition-field.enum.d.ts} +0 -0
  124. /package/src/lib/db/Enums/{allocation-rule-condition-operator.enum.d.ts → bank/allocation-rule/allocation-rule-condition-operator.enum.d.ts} +0 -0
  125. /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.46",
3
+ "version": "0.33.48",
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
@@ -0,0 +1,5 @@
1
+ import { HomeOfficeClaim, SoleBusiness } from '../../models';
2
+ import { Collection } from '../collection';
3
+ export declare class HomeOfficeClaimCollection extends Collection<HomeOfficeClaim> {
4
+ findByBusiness(business?: SoleBusiness): HomeOfficeClaim;
5
+ }
@@ -0,0 +1 @@
1
+ export * from './home-office-claim.collection';
@@ -30,3 +30,5 @@ 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';
34
+ export * from './home-office';
@@ -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,46 @@
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
+ ELECTRICITY_AND_GAS = 892,
38
+ HOME_OFFICE_CLEANING = 893,
39
+ INTERNET = 705,
40
+ TELEPHONE = 11860,
41
+ MOBILE_PHONE = 719,
42
+ HOME_OFFICE_RENT = 889,
43
+ HOME_OFFICE_LOAN = 890,
44
+ HOME_OFFICE_RATES = 891,
45
+ HOME_OFFICE_OTHER = 894
46
+ }
@@ -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,26 @@ 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
53
  FHSS = 872,
97
- LOAN_DRAWDOWN = 883,
98
- PROGRESS_PAYMENTS = 884,
99
- LOAN_PAYMENT = 885
54
+ MOBILE_PHONE = 90,
55
+ INTERNET = 94,
56
+ ELECTRICITY_AND_GAS = 234,
57
+ TELEPHONE = 255,
58
+ HOME_OFFICE_CLEANING = 11861
100
59
  }
@@ -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,4 @@ 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';
@@ -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;
@@ -32,7 +32,7 @@ export declare abstract class AbstractForm<Model, Controls extends ControlsInter
32
32
  protected constructor(controls: Controls, model?: Model, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null);
33
33
  get saved(): boolean;
34
34
  get currentValue(): Model;
35
- toggleEnabledState(): void;
35
+ toggleEnabledState(control: AbstractControl): void;
36
36
  /**
37
37
  * Check validation and return a new instance of generic model.
38
38
  * Merge form value to initial object
@@ -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,8 @@
1
+ import { AbstractForm } from '../abstract.form';
2
+ import { HomeOfficeClaim } from '../../models';
3
+ import { IEventListener } from '../../interfaces';
4
+ export declare class HomeOfficeCalculatorForm extends AbstractForm<HomeOfficeClaim> implements IEventListener {
5
+ constructor(claim?: HomeOfficeClaim);
6
+ listenEvents(): void;
7
+ submit(): HomeOfficeClaim;
8
+ }
@@ -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';
3
+ export declare class HomeOfficeLogForm extends AbstractForm<HomeOfficeLog> {
4
+ constructor(log?: HomeOfficeLog);
5
+ }
@@ -0,0 +1,3 @@
1
+ export * from './home-office-claim.form';
2
+ export * from './home-office-log.form';
3
+ export * from './home-office-calculator.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,11 +1,13 @@
1
1
  import { IEventListener } from '../../../interfaces';
2
- import { Transaction, TransactionAllocation } from '../../../models';
2
+ import { HomeOfficeClaim, Transaction, TransactionAllocation } from '../../../models';
3
3
  import { WorkTransactionForm } from './work-transaction.form';
4
4
  import { AbstractControl } from '@angular/forms';
5
5
  export declare class WorkExpenseForm extends WorkTransactionForm implements IEventListener {
6
- constructor(transaction: Transaction, registeredForGst: boolean, allocations: TransactionAllocation[], controls?: {
6
+ private homeOfficeClaim;
7
+ constructor(transaction: Transaction, registeredForGst: boolean, allocations: TransactionAllocation[], homeOfficeClaim: HomeOfficeClaim, controls?: {
7
8
  [key: string]: AbstractControl;
8
9
  });
9
10
  listenEvents(): void;
10
11
  watchChartAccountsMetaFields(): void;
12
+ watchChartAccounts(): void;
11
13
  }
@@ -1,6 +1,6 @@
1
1
  import { BankTransaction } from './bank-transaction';
2
- import { IChartData } from '../../interfaces/chart-data.interface';
3
- import { MonthNumberEnum } from '../financial-year/month-number.enum';
2
+ import { IChartData } from '../../interfaces';
3
+ import { MonthNumberEnum } from '../financial-year';
4
4
  /**
5
5
  * bank transactions collection UI class with frontend specific data
6
6
  */
@@ -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,8 @@ 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)[];
15
+ static homeOfficeList: (ChartAccountsListEnum | BusinessChartAccountsEnum)[];
13
16
  heading: ChartAccountsHeading;
14
17
  metaFields: ChartAccountsMetaField[];
15
18
  values: ChartAccountsValue[];
@@ -97,7 +100,7 @@ export declare class ChartAccounts extends ChartAccountsBase {
97
100
  /**
98
101
  * no way to check how much used for work/sole, so we let user adjust it
99
102
  * except vehicle expense, which is equal to vehicleClaim.workUsage
100
- * except when taxablePercent=0, but not SOLE_ENTERTAINMENT
103
+ * except when taxablePercent=0, but not ENTERTAINMENT
101
104
  */
102
105
  isClaimPercentEditable(): boolean;
103
106
  /**
@@ -116,6 +119,7 @@ export declare class ChartAccounts extends ChartAccountsBase {
116
119
  isTaxable(): boolean;
117
120
  isTransfer(): boolean;
118
121
  isDividends(): boolean;
122
+ isHomeOfficeExpense(): boolean;
119
123
  isHomeOfficeWorkHours(): boolean;
120
124
  /**
121
125
  * income requiring extra data like adjustments/payer/etc
@@ -6,8 +6,8 @@ export declare class Dictionary<Model> {
6
6
  items: {
7
7
  [key: string]: Model;
8
8
  };
9
- constructor(items: Model[], path?: string);
10
- add(key: string | number, value: Model): void;
9
+ constructor(items?: Model[], path?: string);
10
+ add(key: string | number, value: Model): Dictionary<Model>;
11
11
  get(key: string | number): Model;
12
12
  merge(dictionary: Dictionary<Model>): this;
13
13
  toArray(): Model[];
@@ -0,0 +1,26 @@
1
+ import { BusinessChartAccountsEnum, ChartAccountsListEnum, 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 { Dictionary } from '../dictionary';
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
+ officePercent?: number;
20
+ homeArea?: number;
21
+ officeArea?: number;
22
+ dedicatedOffice?: boolean;
23
+ business?: SoleBusiness;
24
+ getChartAccountsList(): typeof ChartAccountsListEnum | typeof BusinessChartAccountsEnum;
25
+ getChartAccountsClaims(): Dictionary<number>;
26
+ }
@@ -0,0 +1,20 @@
1
+ import { HomeOfficeClaimMethodEnum } from '../../db/Enums';
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
+ officePercent?: number;
16
+ homeArea?: number;
17
+ officeArea?: number;
18
+ dedicatedOffice?: boolean;
19
+ business?: SoleBusiness;
20
+ }
@@ -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[];
@@ -10,7 +10,7 @@ import { TransactionAllocation } from './transaction-allocation';
10
10
  import { TransactionAllocationCollection } from '../../collections';
11
11
  import { Depreciation } from '../depreciation';
12
12
  import { Expense } from '../../interfaces';
13
- import { SoleInvoiceItem } from '../sole';
13
+ import { SoleBusiness, SoleInvoiceItem } from '../sole';
14
14
  export declare class Transaction extends TransactionBase implements Expense {
15
15
  static className: string;
16
16
  /**
@@ -26,6 +26,7 @@ export declare class Transaction extends TransactionBase implements Expense {
26
26
  date: Date;
27
27
  allocations: TransactionAllocation[];
28
28
  invoiceItem: SoleInvoiceItem;
29
+ business: SoleBusiness;
29
30
  tax: number;
30
31
  operation: TransactionOperationEnum;
31
32
  claimPercent: number;
@@ -95,4 +96,5 @@ export declare class Transaction extends TransactionBase implements Expense {
95
96
  */
96
97
  ignoreSign(): boolean;
97
98
  setParent(transaction: Transaction): void;
99
+ isEditable(): boolean;
98
100
  }
@@ -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 { HomeOfficeClaimCollection } from '../../../collections';
3
+ import { HomeOfficeClaim, HomeOfficeClaimInterface } from '../../../models';
4
+ import * as i0 from "@angular/core";
5
+ export declare class HomeOfficeClaimService extends RestService<HomeOfficeClaimInterface, HomeOfficeClaim, HomeOfficeClaimCollection> {
6
+ protected endpointUri: string;
7
+ modelClass: typeof HomeOfficeClaim;
8
+ collectionClass: typeof HomeOfficeClaimCollection;
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';
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';