taxtank-core 0.31.35 → 0.31.37
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/db/Models/transaction/allocation-rule-transaction.mjs +1 -1
- package/esm2020/lib/forms/transaction/allocation-rule-transaction.form.mjs +4 -3
- package/esm2020/lib/forms/transaction/allocation-rule.form.mjs +4 -4
- package/esm2020/lib/models/account-setup/account-setup-item.mjs +1 -1
- package/esm2020/lib/models/income-source/salary-forecast.mjs +5 -6
- package/esm2020/lib/models/transaction/allocation-rule-transaction.mjs +3 -3
- package/fesm2015/taxtank-core.mjs +11 -11
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +11 -11
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/db/Models/transaction/allocation-rule-transaction.d.ts +1 -0
- package/lib/models/account-setup/account-setup-item.d.ts +3 -0
- package/lib/models/income-source/salary-forecast.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3348,6 +3348,9 @@ var SalaryForecastFrequencyEnum;
|
|
|
3348
3348
|
})(SalaryForecastFrequencyEnum || (SalaryForecastFrequencyEnum = {}));
|
|
3349
3349
|
|
|
3350
3350
|
class SalaryForecast extends SalaryForecast$1 {
|
|
3351
|
+
get grossAmount() {
|
|
3352
|
+
return this.netPay + this.tax;
|
|
3353
|
+
}
|
|
3351
3354
|
get taxWithheld() {
|
|
3352
3355
|
return this.grossAmount - this.netPay;
|
|
3353
3356
|
}
|
|
@@ -3370,10 +3373,6 @@ __decorate([
|
|
|
3370
3373
|
__decorate([
|
|
3371
3374
|
Type(() => Number)
|
|
3372
3375
|
], SalaryForecast.prototype, "netPay", void 0);
|
|
3373
|
-
__decorate([
|
|
3374
|
-
Transform(({ obj }) => obj.netPay + obj.tax),
|
|
3375
|
-
Expose()
|
|
3376
|
-
], SalaryForecast.prototype, "grossAmount", void 0);
|
|
3377
3376
|
__decorate([
|
|
3378
3377
|
Type(() => IncomeSource)
|
|
3379
3378
|
], SalaryForecast.prototype, "incomeSource", void 0);
|
|
@@ -3597,14 +3596,14 @@ class AllocationRuleTransaction extends AllocationRuleTransaction$1 {
|
|
|
3597
3596
|
* If rule transaction has amount then split enabled. There is 0 when split disabled
|
|
3598
3597
|
*/
|
|
3599
3598
|
isSplit() {
|
|
3600
|
-
return !!this.
|
|
3599
|
+
return !!this.amountPercent;
|
|
3601
3600
|
}
|
|
3602
3601
|
/**
|
|
3603
3602
|
* Create Transaction instance based on passed bank transaction and rule transaction
|
|
3604
3603
|
*/
|
|
3605
3604
|
toTransaction(bankTransaction) {
|
|
3606
3605
|
const transaction = merge(bankTransaction.toTransaction(this.isGST), {
|
|
3607
|
-
amount:
|
|
3606
|
+
amount: bankTransaction.amount * (this.amountPercent ? (this.amountPercent / 100) : 1),
|
|
3608
3607
|
tax: this.tax,
|
|
3609
3608
|
claimPercent: this.claimPercent,
|
|
3610
3609
|
chartAccounts: this.chartAccounts,
|
|
@@ -22780,7 +22779,8 @@ class AllocationRuleTransactionForm extends AbstractForm {
|
|
|
22780
22779
|
// Flag to enable transaction GST field
|
|
22781
22780
|
isGST) {
|
|
22782
22781
|
super({
|
|
22783
|
-
amount: new UntypedFormControl(transaction.amount
|
|
22782
|
+
amount: new UntypedFormControl(transaction.amount),
|
|
22783
|
+
amountPercent: new UntypedFormControl(transaction.amountPercent, Validators.required),
|
|
22784
22784
|
tax: new UntypedFormControl(transaction.tax, Validators.required),
|
|
22785
22785
|
claimPercent: new UntypedFormControl(transaction.claimPercent, [Validators.required, Validators.min(0), Validators.max(100)]),
|
|
22786
22786
|
chartAccounts: new UntypedFormControl(transaction.chartAccounts, Validators.required),
|
|
@@ -22809,7 +22809,7 @@ class AllocationRuleTransactionForm extends AbstractForm {
|
|
|
22809
22809
|
return this.get('childTransactions');
|
|
22810
22810
|
}
|
|
22811
22811
|
get isSplit() {
|
|
22812
|
-
return this.get('
|
|
22812
|
+
return this.get('amountPercent').enabled;
|
|
22813
22813
|
}
|
|
22814
22814
|
addChildTransactionForm() {
|
|
22815
22815
|
this.childTransactionsArray.push(new UntypedFormGroup({
|
|
@@ -22920,7 +22920,7 @@ class AllocationRuleForm extends AbstractForm {
|
|
|
22920
22920
|
}
|
|
22921
22921
|
// Disable transaction amount field when transaction has no amount (non-split)
|
|
22922
22922
|
if (!rule.transaction?.isSplit()) {
|
|
22923
|
-
this.transactionFormGroup.get(['
|
|
22923
|
+
this.transactionFormGroup.get(['amountPercent']).disable();
|
|
22924
22924
|
}
|
|
22925
22925
|
}
|
|
22926
22926
|
get conditionsArray() {
|
|
@@ -23008,8 +23008,8 @@ class AllocationRuleForm extends AbstractForm {
|
|
|
23008
23008
|
this.get('transferBankAccount').disable({ emitEvent: false });
|
|
23009
23009
|
// disable transaction amount field when value is empty
|
|
23010
23010
|
// disable manually because code above enables this field
|
|
23011
|
-
if (!this.transactionFormGroup.get(['
|
|
23012
|
-
this.transactionFormGroup.get(['
|
|
23011
|
+
if (!this.transactionFormGroup.get(['amountPercent']).value) {
|
|
23012
|
+
this.transactionFormGroup.get(['amountPercent']).disable();
|
|
23013
23013
|
}
|
|
23014
23014
|
break;
|
|
23015
23015
|
case AllocationRuleTypeEnum.TRANSFER:
|