taxtank-core 3.0.30 → 3.0.31
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.
|
@@ -7556,12 +7556,6 @@ class Transaction extends Transaction$1 {
|
|
|
7556
7556
|
&& rule.property?.id === this.property?.id
|
|
7557
7557
|
&& rule.business?.id === this.business?.id;
|
|
7558
7558
|
}
|
|
7559
|
-
/**
|
|
7560
|
-
* @TODO claimAmount from backend shouldn't include share%(sharedClaimAmount should), the method is workaround
|
|
7561
|
-
*/
|
|
7562
|
-
get grossClaim() {
|
|
7563
|
-
return this.grossAmount * (this.claimPercent / 100);
|
|
7564
|
-
}
|
|
7565
7559
|
}
|
|
7566
7560
|
__decorate([
|
|
7567
7561
|
Type(() => Transaction)
|
|
@@ -9135,7 +9129,7 @@ class PropertyReportItem extends AbstractModel {
|
|
|
9135
9129
|
this.description = chartAccounts.name;
|
|
9136
9130
|
}
|
|
9137
9131
|
get shareClaimAmount() {
|
|
9138
|
-
return this.claimAmount * (this.sharePercent /
|
|
9132
|
+
return this.claimAmount * (this.claimPercent * this.sharePercent / 10000);
|
|
9139
9133
|
}
|
|
9140
9134
|
isIncome() {
|
|
9141
9135
|
return CHART_ACCOUNTS_CATEGORIES.income.includes(this.chartAccounts.category);
|
|
@@ -9174,11 +9168,15 @@ class PropertyReportItemTransaction extends PropertyReportItem {
|
|
|
9174
9168
|
constructor(transactions, property, chartAccounts) {
|
|
9175
9169
|
super(property, chartAccounts);
|
|
9176
9170
|
this.transactions = transactions;
|
|
9171
|
+
this.property = property;
|
|
9177
9172
|
this.amount = Math.abs(transactions.sumBy('grossAmount'));
|
|
9178
9173
|
this.description = chartAccounts.name;
|
|
9179
9174
|
}
|
|
9175
|
+
/**
|
|
9176
|
+
* @TODO claimAmount from backend shouldn't include share%(sharedClaimAmount should), the method is workaround
|
|
9177
|
+
*/
|
|
9180
9178
|
get claimAmount() {
|
|
9181
|
-
return Math.abs(this.transactions.
|
|
9179
|
+
return Math.abs(this.transactions.reduce((sum, transaction) => sum + transaction.grossAmount * (transaction.chartAccounts.taxablePercent / 100)));
|
|
9182
9180
|
}
|
|
9183
9181
|
}
|
|
9184
9182
|
|