taxtank-core 3.0.35 → 3.0.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.
|
@@ -7497,25 +7497,28 @@ class Transaction extends Transaction$1 {
|
|
|
7497
7497
|
return this.grossAmount - untaxableAdjustment;
|
|
7498
7498
|
}
|
|
7499
7499
|
get grossAmountWithoutGst() {
|
|
7500
|
-
|
|
7500
|
+
return this.calculateGrossAmountWithoutGst(this.amount);
|
|
7501
|
+
}
|
|
7502
|
+
get grossClaimAmountWithoutGst() {
|
|
7503
|
+
return this.calculateGrossAmountWithoutGst(this.claimAmount);
|
|
7504
|
+
}
|
|
7505
|
+
calculateGrossAmountWithoutGst(amount) {
|
|
7506
|
+
let grossAmount = amount + this.tax;
|
|
7501
7507
|
if (this.isExpense()) {
|
|
7502
7508
|
return grossAmount;
|
|
7503
7509
|
}
|
|
7504
|
-
//
|
|
7510
|
+
// Included transactions already affect the parent amount.
|
|
7505
7511
|
const adjustments = new Collection(this.transactions)
|
|
7506
7512
|
.filter(transaction => !transaction.chartAccounts?.isAdjustmentIncluded());
|
|
7507
7513
|
const income = adjustments.filter(transaction => transaction.isIncome()).sumBy('amount');
|
|
7508
7514
|
const expense = adjustments.filter(transaction => transaction.isExpense()).sumBy('amount', true);
|
|
7509
|
-
//
|
|
7515
|
+
// All adjustments except property income increase gross income.
|
|
7510
7516
|
grossAmount += expense + (this.isPropertyTank() ? -income : income);
|
|
7511
7517
|
if (this.isWorkTank() || this.isHoldingTank()) {
|
|
7512
7518
|
grossAmount += this.frankingCredit - this.taxFreeComponent - this.eligibleForReduction;
|
|
7513
7519
|
}
|
|
7514
7520
|
return grossAmount;
|
|
7515
7521
|
}
|
|
7516
|
-
get grossClaimAmountWithoutGst() {
|
|
7517
|
-
return this.grossAmountWithoutGst * this.claimRatio;
|
|
7518
|
-
}
|
|
7519
7522
|
/**
|
|
7520
7523
|
* @TODO vik confusing logic demanded by Nicole, we need a better ux to fix it
|
|
7521
7524
|
* netAmount matches received payment (bankTransaction amount), includes gst and salary included adjustments
|
|
@@ -9176,7 +9179,7 @@ class PropertyReportItemTransaction extends PropertyReportItem {
|
|
|
9176
9179
|
this.description = chartAccounts.name;
|
|
9177
9180
|
}
|
|
9178
9181
|
get shareClaimAmount() {
|
|
9179
|
-
return this.transactions.
|
|
9182
|
+
return this.transactions.sumBy('grossClaimAmountWithoutGst');
|
|
9180
9183
|
}
|
|
9181
9184
|
}
|
|
9182
9185
|
|