taxtank-core 1.0.53 → 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() {
@@ -8812,7 +8816,7 @@ const TAX_RETURN_CATEGORIES = {
8812
8816
  interest: [],
8813
8817
  taxWithheld: [
8814
8818
  TaxReturnCategoryListEnum.TAX_WITHHELD
8815
- ]
8819
+ ],
8816
8820
  },
8817
8821
  property: {
8818
8822
  income: [
@@ -8860,11 +8864,12 @@ const TAX_RETURN_CATEGORIES = {
8860
8864
  },
8861
8865
  sole: {
8862
8866
  income: [
8867
+ TaxReturnCategoryListEnum.PSI_SBE_INCOME,
8863
8868
  TaxReturnCategoryListEnum.GROSS_PAYMENTS_NO_ABN_GIVEN,
8864
8869
  TaxReturnCategoryListEnum.GROSS_PAYMENTS_VOLUNTARY_AGREEMENT,
8865
8870
  TaxReturnCategoryListEnum.GROSS_PAYMENTS_LABOUR_HIRE_OR_OTHER,
8866
8871
  TaxReturnCategoryListEnum.ASSESSABLE_GOVERNMENT_PAYMENTS,
8867
- TaxReturnCategoryListEnum.OTHER_BUSINESS_INCOME
8872
+ TaxReturnCategoryListEnum.OTHER_BUSINESS_INCOME,
8868
8873
  ],
8869
8874
  expenses: [
8870
8875
  TaxReturnCategoryListEnum.PURCHASES_AND_OTHER_COSTS,
@@ -8876,7 +8881,7 @@ const TAX_RETURN_CATEGORIES = {
8876
8881
  TaxReturnCategoryListEnum.INTEREST_EXPENSES_WITHIN_AUSTRALIA,
8877
8882
  TaxReturnCategoryListEnum.INTEREST_EXPENSES_OVERSEAS,
8878
8883
  TaxReturnCategoryListEnum.MOTOR_VEHICLE_EXPENSES,
8879
- TaxReturnCategoryListEnum.ALL_OTHER_EXPENSES
8884
+ TaxReturnCategoryListEnum.ALL_OTHER_EXPENSES,
8880
8885
  ],
8881
8886
  depreciation: [
8882
8887
  TaxReturnCategoryListEnum.DEPRECIATION_EXPENSES,
@@ -12718,7 +12723,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
12718
12723
  * Service for work with messages
12719
12724
  */
12720
12725
  class MessageService extends RestService$1 {
12721
- // mercureTopic = 'messages';
12722
12726
  constructor(environment) {
12723
12727
  super(environment);
12724
12728
  this.environment = environment;
@@ -12726,6 +12730,7 @@ class MessageService extends RestService$1 {
12726
12730
  this.collectionClass = MessageCollection;
12727
12731
  this.endpointUri = 'messages';
12728
12732
  this.disabledMethods = ['postBatch', 'putBatch'];
12733
+ this.mercureTopic = 'messages';
12729
12734
  this.listenEvents();
12730
12735
  }
12731
12736
  listenEvents() {
@@ -12841,6 +12846,7 @@ class DepreciationService extends RestService$1 {
12841
12846
  this.listenToUpdatedBankAccount();
12842
12847
  this.listenSoleDepreciationMethodChanges();
12843
12848
  this.listenPropertyDepreciationCalculationChanges();
12849
+ this.listenCSE(DepreciationCapitalProject, this.refreshCache, ['put']);
12844
12850
  }
12845
12851
  getOpenBalance(depreciation) {
12846
12852
  return this.http.post(`${this.apiUrl}/opening-balance?financialYear=${new FinancialYear().year}`, depreciation)
@@ -13287,7 +13293,6 @@ var ClientInviteMessages;
13287
13293
  })(ClientInviteMessages || (ClientInviteMessages = {}));
13288
13294
 
13289
13295
  class ClientMovementService extends RestService$1 {
13290
- // mercureTopic = 'clientMovements';
13291
13296
  constructor(environment) {
13292
13297
  super(environment);
13293
13298
  this.environment = environment;
@@ -13295,6 +13300,7 @@ class ClientMovementService extends RestService$1 {
13295
13300
  this.collectionClass = ClientMovementCollection;
13296
13301
  this.modelClass = ClientMovement;
13297
13302
  this.disabledMethods = ['postBatch', 'delete', 'deleteBatch'];
13303
+ this.mercureTopic = 'clientMovements';
13298
13304
  this.listenEvents();
13299
13305
  }
13300
13306
  listenEvents() {
@@ -15647,6 +15653,12 @@ class TaxSummary {
15647
15653
  const taxWithheld = this.summary.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.work.taxWithheld, TaxSummarySectionEnum.WORK_TANK);
15648
15654
  return this.workNetTotal - Math.abs(taxWithheld);
15649
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
+ }
15650
15662
  get income() {
15651
15663
  return this.getReportItems([this.work, this.property, this.sole, this.holdings]).sumByCategories([
15652
15664
  ...TAX_RETURN_CATEGORIES.work.income,
@@ -16697,6 +16709,8 @@ class UserService extends RestService$1 {
16697
16709
  // @TODO vik use separated service to handle global user storage
16698
16710
  localStorage.setItem('userId', user.id.toString());
16699
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));
16700
16714
  return users;
16701
16715
  }));
16702
16716
  }