taxtank-core 0.28.51 → 0.28.53
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.
- package/bundles/taxtank-core.umd.js +27 -22
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/abstract.form.js +1 -1
- package/esm2015/lib/forms/report/my-tax/my-tax-business-income-or-losses/my-tax-business-details/my-tax-business-details.form.js +4 -5
- package/esm2015/lib/forms/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.form.js +5 -1
- package/esm2015/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-details/my-tax-business-details.js +2 -1
- package/esm2015/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.js +22 -19
- package/fesm2015/taxtank-core.js +27 -22
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/forms/abstract.form.d.ts +1 -1
- package/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.d.ts +5 -3
- package/package.json +1 -1
|
@@ -11200,6 +11200,7 @@
|
|
|
11200
11200
|
this.businessActivities = uniqBy__default["default"](businesses.mapBy('activity'), 'id');
|
|
11201
11201
|
this.businessABN = soleDetails === null || soleDetails === void 0 ? void 0 : soleDetails.abn;
|
|
11202
11202
|
this.businessAddress = (_a = user.address) === null || _a === void 0 ? void 0 : _a.name;
|
|
11203
|
+
this.businesses = businesses;
|
|
11203
11204
|
this.vehicleClaimDetails = vehicleClaimDetails;
|
|
11204
11205
|
}
|
|
11205
11206
|
return MyTaxBusinessDetails;
|
|
@@ -11310,7 +11311,7 @@
|
|
|
11310
11311
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form (section "Business income or losses")
|
|
11311
11312
|
*/
|
|
11312
11313
|
var MyTaxBusinessLosses = /** @class */ (function () {
|
|
11313
|
-
function MyTaxBusinessLosses(transactions, depreciations, businessLosses, currentLoss) {
|
|
11314
|
+
function MyTaxBusinessLosses(transactions, depreciations, businessLosses, currentLoss, taxSummary) {
|
|
11314
11315
|
this.currentLoss = currentLoss;
|
|
11315
11316
|
this.purchasesAndOtherCostsAmount = Math.abs(transactions.getExpenseTransactions()
|
|
11316
11317
|
.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.PURCHASES_STOCK_INVENTORY)
|
|
@@ -11337,14 +11338,22 @@
|
|
|
11337
11338
|
.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.INTEREST_EXPENSES_OVERSEAS)
|
|
11338
11339
|
.sumBy('claimAmount'));
|
|
11339
11340
|
this.kmsTravelledExpensesAmount = Math.abs(transactions
|
|
11340
|
-
.filterBy('chartAccounts.
|
|
11341
|
-
.sumBy('claimAmount')
|
|
11341
|
+
.filterBy('chartAccounts.category', [exports.ChartAccountsListEnum.KLMS_TRAVELLED])
|
|
11342
|
+
.sumBy('claimAmount') +
|
|
11343
|
+
depreciations
|
|
11344
|
+
.filterBy('chartAccounts.category', [exports.ChartAccountsListEnum.KLMS_TRAVELLED])
|
|
11345
|
+
.sumBy('claimAmount'));
|
|
11346
|
+
this.logbookExpensesAmount = Math.abs(transactions.getVehicleTransactions().sumBy('claimAmount')) +
|
|
11347
|
+
depreciations.getVehicleDepreciations().sumBy('claimAmount');
|
|
11342
11348
|
this.otherExpensesAmount = Math.abs(transactions
|
|
11343
11349
|
.filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingListEnum.OTHER_EXPENSES)
|
|
11344
11350
|
.sumBy('claimAmount'));
|
|
11345
11351
|
this.totalNonPrimaryProductionExpensesAmount = Math.abs(transactions
|
|
11346
|
-
.filterBy('chartAccounts.category', [exports.ChartAccountsCategoryEnum.SOLE_EXPENSE
|
|
11347
|
-
.sumBy('claimAmount'))
|
|
11352
|
+
.filterBy('chartAccounts.category', [exports.ChartAccountsCategoryEnum.SOLE_EXPENSE])
|
|
11353
|
+
.sumBy('claimAmount')) +
|
|
11354
|
+
depreciations
|
|
11355
|
+
.filterBy('chartAccounts.category', [exports.ChartAccountsCategoryEnum.SOLE_DEPRECIATION])
|
|
11356
|
+
.sumBy('claimAmount');
|
|
11348
11357
|
// depreciations
|
|
11349
11358
|
this.depreciationExpensesAmount = depreciations
|
|
11350
11359
|
.filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingListEnum.DEPRECIATION_EXPENSES)
|
|
@@ -11355,21 +11364,14 @@
|
|
|
11355
11364
|
this.deductionsForGeneralSmallBusinessPoolAmount = depreciations
|
|
11356
11365
|
.getSBPDepreciations()
|
|
11357
11366
|
.sumBy('claimAmount');
|
|
11358
|
-
this.currentYearNetNonPrimaryIncomeOrLossesAmount = transactions.
|
|
11359
|
-
.
|
|
11360
|
-
.
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
.sumBy('claimAmount'));
|
|
11364
|
-
this.priorYearsNonPrimaryLossesAmount = this.calculatePriorYearsOpenBalance(businessLosses);
|
|
11365
|
-
this.netNonPrimaryIncomeOrLossesAmount = transactions.getIncomeTransactions()
|
|
11366
|
-
.filterBy('chartAccounts.category', exports.ChartAccountsCategoryEnum.SOLE_INCOME)
|
|
11367
|
-
.amount -
|
|
11367
|
+
this.currentYearNetNonPrimaryIncomeOrLossesAmount = +(transactions.sumBy('claimAmount') -
|
|
11368
|
+
depreciations.sumBy('claimAmount'))
|
|
11369
|
+
.toFixed(2);
|
|
11370
|
+
this.priorYearsNonPrimaryLossesAmount = businessLosses.sumBy('openBalance');
|
|
11371
|
+
this.netNonPrimaryIncomeOrLossesAmount = this.currentYearNetNonPrimaryIncomeOrLossesAmount -
|
|
11368
11372
|
this.priorYearsNonPrimaryLossesAmount;
|
|
11373
|
+
this.deferredLossesAmount = taxSummary.sole.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.sole.lossCurrent, exports.TaxSummarySectionEnum.SOLE_TANK);
|
|
11369
11374
|
}
|
|
11370
|
-
MyTaxBusinessLosses.prototype.calculatePriorYearsOpenBalance = function (businessLosses) {
|
|
11371
|
-
return businessLosses ? businessLosses.sumBy('openBalance') : 0;
|
|
11372
|
-
};
|
|
11373
11375
|
return MyTaxBusinessLosses;
|
|
11374
11376
|
}());
|
|
11375
11377
|
|
|
@@ -19386,7 +19388,7 @@
|
|
|
19386
19388
|
__extends(MyTaxBusinessDetailsForm, _super);
|
|
19387
19389
|
function MyTaxBusinessDetailsForm(businessDetails) {
|
|
19388
19390
|
var _this = this;
|
|
19389
|
-
var _a
|
|
19391
|
+
var _a;
|
|
19390
19392
|
_this = _super.call(this, {
|
|
19391
19393
|
vehicleClaimMethod: new forms.FormControl({
|
|
19392
19394
|
value: (_a = businessDetails.vehicleClaimDetails) === null || _a === void 0 ? void 0 : _a.method,
|
|
@@ -19395,11 +19397,10 @@
|
|
|
19395
19397
|
businessType: new forms.FormControl({ value: exports.BusinessTypeEnum.SOLE_TRADER, disabled: true }),
|
|
19396
19398
|
// business details
|
|
19397
19399
|
mainBusinessActivity: new forms.FormControl(businessDetails.businessActivities[0]),
|
|
19398
|
-
mainBusinessName: new forms.FormControl({ value:
|
|
19400
|
+
mainBusinessName: new forms.FormControl({ value: businessDetails.businesses.first.name, disabled: true }),
|
|
19399
19401
|
mainBusinessABN: new forms.FormControl({ value: businessDetails.businessABN, disabled: true }),
|
|
19400
19402
|
mainBusinessAddress: new forms.FormControl({ value: businessDetails.businessAddress, disabled: true }),
|
|
19401
|
-
|
|
19402
|
-
numberOfBusinessActivities: new forms.FormControl(1)
|
|
19403
|
+
numberOfBusinessActivities: new forms.FormControl(businessDetails.businessActivities.length)
|
|
19403
19404
|
}) || this;
|
|
19404
19405
|
_this.businessDetails = businessDetails;
|
|
19405
19406
|
_this.listenEvents();
|
|
@@ -19540,6 +19541,10 @@
|
|
|
19540
19541
|
value: businessLosses.kmsTravelledExpensesAmount,
|
|
19541
19542
|
disabled: true
|
|
19542
19543
|
}),
|
|
19544
|
+
logbookExpensesAmount: new forms.FormControl({
|
|
19545
|
+
value: businessLosses.logbookExpensesAmount,
|
|
19546
|
+
disabled: true
|
|
19547
|
+
}),
|
|
19543
19548
|
otherExpensesAmount: new forms.FormControl({
|
|
19544
19549
|
value: businessLosses.otherExpensesAmount,
|
|
19545
19550
|
disabled: true
|