taxtank-core 0.30.92 → 0.30.94
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/esm2020/lib/models/report/sole/sole-business/sole-business-loss-report.mjs +2 -2
- package/esm2020/lib/services/http/property/property-sale/property-sale.service.mjs +1 -1
- package/esm2020/lib/validators/transactions-meta-fields.validator.mjs +3 -3
- package/fesm2015/taxtank-core.mjs +3 -3
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +3 -3
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -11836,7 +11836,7 @@ class SoleBusinessLossReport extends AbstractModel {
|
|
|
11836
11836
|
const claimAmount = new TransactionCollection(transactions.toArray(), depreciations.toArray())
|
|
11837
11837
|
.getBusinessClaimAmount(new TransactionAllocationCollection(allocations), loss.business.id);
|
|
11838
11838
|
this.netIncome = claimAmount;
|
|
11839
|
-
this.closeBalance = loss.offsetRule ? 0 : claimAmount - this.openBalance;
|
|
11839
|
+
this.closeBalance = loss.offsetRule ? 0 : Math.min(0, claimAmount - this.openBalance);
|
|
11840
11840
|
}
|
|
11841
11841
|
}
|
|
11842
11842
|
|
|
@@ -20366,12 +20366,12 @@ function checkDividends(metaFields, formGroup) {
|
|
|
20366
20366
|
const amount = Math.abs(formGroup.get('amount').value);
|
|
20367
20367
|
const frankedAndUnfrankedControls = formGroup.get('metaFields').controls
|
|
20368
20368
|
.filter((control) => frankedAndUnfrankedIds.includes(control.get('chartAccountsMetaField').value.id));
|
|
20369
|
-
// no need to validate when one or both fields are empty
|
|
20369
|
+
// no need to validate when one or both fields are empty
|
|
20370
20370
|
if (frankedAndUnfrankedControls.find((group) => group.get('value').value === null)) {
|
|
20371
20371
|
return null;
|
|
20372
20372
|
}
|
|
20373
20373
|
const frankedAndUnfrankedAmount = frankedAndUnfrankedControls.reduce((sum, group) => sum + (+group.get('value').value), 0);
|
|
20374
|
-
return amount === frankedAndUnfrankedAmount ? null : { wrongAmountsSum: 'The total Franked and Unfranked amounts must
|
|
20374
|
+
return amount === frankedAndUnfrankedAmount ? null : { wrongAmountsSum: 'The total Franked and Unfranked amounts must equal the Total Payment received.' };
|
|
20375
20375
|
}
|
|
20376
20376
|
|
|
20377
20377
|
class WorkTransactionForm extends TransactionForm {
|