taxtank-core 1.0.52 → 1.0.55

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.
@@ -255,7 +255,8 @@ let ChartAccountsValue$1 = class ChartAccountsValue extends AbstractModel {
255
255
  let ChartAccounts$1 = class ChartAccounts extends AbstractModel {
256
256
  };
257
257
 
258
- let DepreciationCapitalProject$1 = class DepreciationCapitalProject extends AbstractModel {
258
+ let DepreciationCapitalProject$1 = class DepreciationCapitalProject extends ObservableModel {
259
+ static { this.className = 'DepreciationCapitalProject'; }
259
260
  };
260
261
 
261
262
  let DepreciationForecast$1 = class DepreciationForecast extends AbstractModel {
@@ -1342,20 +1343,15 @@ var TaxReturnCategoryListEnum;
1342
1343
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["HOLDING_PARTNERSHIPS"] = 79] = "HOLDING_PARTNERSHIPS";
1343
1344
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["HOLDING_TRUSTS"] = 80] = "HOLDING_TRUSTS";
1344
1345
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["GROSS_RENT"] = 8] = "GROSS_RENT";
1345
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["PSI_SBE_INCOME"] = 14] = "PSI_SBE_INCOME";
1346
1346
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["CAPITAL_GAINS"] = 15] = "CAPITAL_GAINS";
1347
+ // sole income
1348
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["PSI_SBE_INCOME"] = 14] = "PSI_SBE_INCOME";
1347
1349
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["GROSS_PAYMENTS_NO_ABN_GIVEN"] = 42] = "GROSS_PAYMENTS_NO_ABN_GIVEN";
1348
1350
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["GROSS_PAYMENTS_VOLUNTARY_AGREEMENT"] = 43] = "GROSS_PAYMENTS_VOLUNTARY_AGREEMENT";
1349
1351
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["GROSS_PAYMENTS_LABOUR_HIRE_OR_OTHER"] = 44] = "GROSS_PAYMENTS_LABOUR_HIRE_OR_OTHER";
1350
1352
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["ASSESSABLE_GOVERNMENT_PAYMENTS"] = 45] = "ASSESSABLE_GOVERNMENT_PAYMENTS";
1351
1353
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["OTHER_BUSINESS_INCOME"] = 46] = "OTHER_BUSINESS_INCOME";
1352
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["WORK_EXPENSES"] = 7] = "WORK_EXPENSES";
1353
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["INTEREST_DEDUCTIONS"] = 9] = "INTEREST_DEDUCTIONS";
1354
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["CAPITAL_WORKS"] = 10] = "CAPITAL_WORKS";
1355
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["PLANT_AND_EQUIPMENT"] = 11] = "PLANT_AND_EQUIPMENT";
1356
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["BORROWING_EXPENSES"] = 29] = "BORROWING_EXPENSES";
1357
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["OTHER_RENTAL_DEDUCTIONS"] = 12] = "OTHER_RENTAL_DEDUCTIONS";
1358
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["OTHER_DEDUCTIONS"] = 18] = "OTHER_DEDUCTIONS";
1354
+ // sole expenses
1359
1355
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["PURCHASES_AND_OTHER_COSTS"] = 48] = "PURCHASES_AND_OTHER_COSTS";
1360
1356
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["CONTRACTORS_SUBCONTRACTORS_COMMISSION_EXPENSES"] = 49] = "CONTRACTORS_SUBCONTRACTORS_COMMISSION_EXPENSES";
1361
1357
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["SUPERANNUATION_EXPENSES"] = 50] = "SUPERANNUATION_EXPENSES";
@@ -1364,9 +1360,16 @@ var TaxReturnCategoryListEnum;
1364
1360
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["RENT_EXPENSES"] = 53] = "RENT_EXPENSES";
1365
1361
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["INTEREST_EXPENSES_WITHIN_AUSTRALIA"] = 54] = "INTEREST_EXPENSES_WITHIN_AUSTRALIA";
1366
1362
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["INTEREST_EXPENSES_OVERSEAS"] = 55] = "INTEREST_EXPENSES_OVERSEAS";
1367
- TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["DEPRECIATION_EXPENSES"] = 56] = "DEPRECIATION_EXPENSES";
1368
1363
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["MOTOR_VEHICLE_EXPENSES"] = 57] = "MOTOR_VEHICLE_EXPENSES";
1369
1364
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["ALL_OTHER_EXPENSES"] = 58] = "ALL_OTHER_EXPENSES";
1365
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["WORK_EXPENSES"] = 7] = "WORK_EXPENSES";
1366
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["INTEREST_DEDUCTIONS"] = 9] = "INTEREST_DEDUCTIONS";
1367
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["CAPITAL_WORKS"] = 10] = "CAPITAL_WORKS";
1368
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["PLANT_AND_EQUIPMENT"] = 11] = "PLANT_AND_EQUIPMENT";
1369
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["BORROWING_EXPENSES"] = 29] = "BORROWING_EXPENSES";
1370
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["OTHER_RENTAL_DEDUCTIONS"] = 12] = "OTHER_RENTAL_DEDUCTIONS";
1371
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["OTHER_DEDUCTIONS"] = 18] = "OTHER_DEDUCTIONS";
1372
+ TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["DEPRECIATION_EXPENSES"] = 56] = "DEPRECIATION_EXPENSES";
1370
1373
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["WORK_RELATED_DEPRECIATION"] = 69] = "WORK_RELATED_DEPRECIATION";
1371
1374
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["GROSS_TAX_PAYABLE"] = 19] = "GROSS_TAX_PAYABLE";
1372
1375
  TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["TAX_ON_TAXABLE_INCOME"] = 20] = "TAX_ON_TAXABLE_INCOME";
@@ -7204,6 +7207,7 @@ class TransactionCollection extends TransactionBaseCollection {
7204
7207
  .flat()
7205
7208
  .filter(metaField => [4].includes(metaField.chartAccountsMetaField.id)));
7206
7209
  const instalments = this.filterBy('chartAccounts.id', 911).amount;
7210
+ console.log(transactions.sumBy('claimableTax'), instalments);
7207
7211
  return -transactions.sumBy('claimableTax') - metaFields.sumBy('value') + instalments;
7208
7212
  }
7209
7213
  getHoldingTaxCredits() {
@@ -7842,8 +7846,9 @@ class MyTaxDeductions {
7842
7846
  setOtherWorkRelatedExpensesTotalAmount() {
7843
7847
  const otherIncomeRelatedExpenses = this.transactions
7844
7848
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.otherIncomeRelatedExpenses);
7845
- this.otherWorkRelatedExpensesTotalAmount = -Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount')) -
7846
- this.depreciations.filterBy('chartAccounts.heading.id', ChartAccountsHeadingListEnum.TOOLS_EQUIPMENT).sumBy('claimAmount');
7849
+ this.otherWorkRelatedExpensesTotalAmount = -Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount'))
7850
+ - this.depreciations.filterBy('chartAccounts.heading.id', ChartAccountsHeadingListEnum.TOOLS_EQUIPMENT).sumBy('claimAmount')
7851
+ + this.depreciations.getByTankType(TankTypeEnum.WORK).getLVPDepreciations().sumBy('claimAmount');
7847
7852
  }
7848
7853
  calculateWorkRelatedSelfEducationTotalAmount() {
7849
7854
  return this.workRelatedSelfEducationExpenses ? this.workRelatedSelfEducationExpenses.sumBy('claimAmount') - MyTaxDeductions.selfEducationNotDeductibleAmount : 0;
@@ -8097,11 +8102,7 @@ class MyTaxRent {
8097
8102
  constructor(transactions, depreciations, taxSummary) {
8098
8103
  this.propertyExpenses = transactions.getPropertyTransactions().getExpenseTransactions();
8099
8104
  this.taxSummaryPropertySection = taxSummary.property;
8100
- this.grossRentAmount = transactions
8101
- .getPropertyTransactions()
8102
- .getIncomeTransactions()
8103
- .filterBy('chartAccounts.id', [ChartAccountsListEnum.RENTAL_INCOME, ChartAccountsListEnum.OTHER_RENTAL_INCOME])
8104
- .getGrossClaimAmountWithoutGst();
8105
+ this.grossRentAmount = this.taxSummaryPropertySection.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.property.income, TaxSummarySectionEnum.PROPERTY_TANK);
8105
8106
  this.interestDeductionsAmount = transactions.getInterestTransactions().sumBy('claimAmount');
8106
8107
  this.capitalWorksDeductionsAmount = -depreciations.getCapitalDepreciations().sumBy('claimAmount');
8107
8108
  this.otherRentalDeductionsAmount = this.calculateOtherRentalDeductionsAmount();
@@ -8815,7 +8816,7 @@ const TAX_RETURN_CATEGORIES = {
8815
8816
  interest: [],
8816
8817
  taxWithheld: [
8817
8818
  TaxReturnCategoryListEnum.TAX_WITHHELD
8818
- ]
8819
+ ],
8819
8820
  },
8820
8821
  property: {
8821
8822
  income: [
@@ -8863,11 +8864,12 @@ const TAX_RETURN_CATEGORIES = {
8863
8864
  },
8864
8865
  sole: {
8865
8866
  income: [
8867
+ TaxReturnCategoryListEnum.PSI_SBE_INCOME,
8866
8868
  TaxReturnCategoryListEnum.GROSS_PAYMENTS_NO_ABN_GIVEN,
8867
8869
  TaxReturnCategoryListEnum.GROSS_PAYMENTS_VOLUNTARY_AGREEMENT,
8868
8870
  TaxReturnCategoryListEnum.GROSS_PAYMENTS_LABOUR_HIRE_OR_OTHER,
8869
8871
  TaxReturnCategoryListEnum.ASSESSABLE_GOVERNMENT_PAYMENTS,
8870
- TaxReturnCategoryListEnum.OTHER_BUSINESS_INCOME
8872
+ TaxReturnCategoryListEnum.OTHER_BUSINESS_INCOME,
8871
8873
  ],
8872
8874
  expenses: [
8873
8875
  TaxReturnCategoryListEnum.PURCHASES_AND_OTHER_COSTS,
@@ -8879,7 +8881,7 @@ const TAX_RETURN_CATEGORIES = {
8879
8881
  TaxReturnCategoryListEnum.INTEREST_EXPENSES_WITHIN_AUSTRALIA,
8880
8882
  TaxReturnCategoryListEnum.INTEREST_EXPENSES_OVERSEAS,
8881
8883
  TaxReturnCategoryListEnum.MOTOR_VEHICLE_EXPENSES,
8882
- TaxReturnCategoryListEnum.ALL_OTHER_EXPENSES
8884
+ TaxReturnCategoryListEnum.ALL_OTHER_EXPENSES,
8883
8885
  ],
8884
8886
  depreciation: [
8885
8887
  TaxReturnCategoryListEnum.DEPRECIATION_EXPENSES,
@@ -11979,6 +11981,7 @@ let RestService$1 = class RestService extends DataService {
11979
11981
  return;
11980
11982
  }
11981
11983
  this.sseService.on(this.mercureTopic).pipe(map((response) => {
11984
+ console.log(response);
11982
11985
  let model = this.createModelInstance(response);
11983
11986
  let method;
11984
11987
  if (model.id) {
@@ -11991,6 +11994,7 @@ let RestService$1 = class RestService extends DataService {
11991
11994
  }
11992
11995
  return { method, model };
11993
11996
  })).subscribe((change) => {
11997
+ console.log(change);
11994
11998
  this.handleResponse([change.model], change.method);
11995
11999
  });
11996
12000
  }
@@ -12842,6 +12846,7 @@ class DepreciationService extends RestService$1 {
12842
12846
  this.listenToUpdatedBankAccount();
12843
12847
  this.listenSoleDepreciationMethodChanges();
12844
12848
  this.listenPropertyDepreciationCalculationChanges();
12849
+ this.listenCSE(DepreciationCapitalProject, this.refreshCache, ['put']);
12845
12850
  }
12846
12851
  getOpenBalance(depreciation) {
12847
12852
  return this.http.post(`${this.apiUrl}/opening-balance?financialYear=${new FinancialYear().year}`, depreciation)
@@ -15648,6 +15653,12 @@ class TaxSummary {
15648
15653
  const taxWithheld = this.summary.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.work.taxWithheld, TaxSummarySectionEnum.WORK_TANK);
15649
15654
  return this.workNetTotal - Math.abs(taxWithheld);
15650
15655
  }
15656
+ get workTaxCredits() {
15657
+ const taxWithheld = this.summary.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.work.taxWithheld, TaxSummarySectionEnum.WORK_TANK);
15658
+ const taxInstallments = this.summary.items.sumByCategoriesAndSection([TaxReturnCategoryListEnum.TAX_INSTALMENTS], TaxSummarySectionEnum.WORK_TANK);
15659
+ console.log(taxWithheld, taxInstallments);
15660
+ return 0;
15661
+ }
15651
15662
  get income() {
15652
15663
  return this.getReportItems([this.work, this.property, this.sole, this.holdings]).sumByCategories([
15653
15664
  ...TAX_RETURN_CATEGORIES.work.income,
@@ -15682,8 +15693,8 @@ class TaxSummary {
15682
15693
  }
15683
15694
  get workDepreciations() {
15684
15695
  return this.work.items
15685
- .findByCategory(TaxReturnCategoryListEnum.WORK_OTHER_EXPENSES).details.items
15686
- .find(item => item.name === 'Depreciation')?.amount;
15696
+ .findByCategory(TaxReturnCategoryListEnum.WORK_OTHER_EXPENSES)?.details?.items
15697
+ .find(item => item.name === 'Depreciation')?.amount ?? 0;
15687
15698
  }
15688
15699
  /**
15689
15700
  * Property Net Cash (Cash Position) = Rental Income - expenses - interest
@@ -16698,6 +16709,8 @@ class UserService extends RestService$1 {
16698
16709
  // @TODO vik use separated service to handle global user storage
16699
16710
  localStorage.setItem('userId', user.id.toString());
16700
16711
  localStorage.setItem('financialYear', user.financialYear.toString());
16712
+ // for firm area (client roles updated in subscriptionService)
16713
+ localStorage.setItem('roles', JSON.stringify(this.getCacheFirst().roles));
16701
16714
  return users;
16702
16715
  }));
16703
16716
  }
@@ -24176,6 +24189,14 @@ class MyTaxIncomeStatementsForm extends AbstractForm {
24176
24189
  value: incomeStatements.australianSpecialPaymentsTotalTax,
24177
24190
  disabled: true
24178
24191
  }),
24192
+ foreignIncome: new UntypedFormControl({
24193
+ value: incomeStatements.foreignIncome,
24194
+ disabled: true
24195
+ }),
24196
+ foreignTaxWithheld: new UntypedFormControl({
24197
+ value: incomeStatements.foreignTaxWithheld,
24198
+ disabled: true
24199
+ }),
24179
24200
  });
24180
24201
  this.incomeStatements = incomeStatements;
24181
24202
  }