|
|
|
@@ -146,6 +146,7 @@ public class WxVtwoCashBackGrantAwardServiceImpl extends ServiceImpl<WxVtwoCashB |
|
|
|
BigDecimal taxAmount = BigDecimal.ZERO; |
|
|
|
for (WxVtwoCashBackGrantAward grantAward:grantAwardList){ |
|
|
|
grantAward.setTaxDeductionRules(cashBackActivity.getTaxDeductionRules()); |
|
|
|
grantAward.setTaxAmount(BigDecimal.ZERO); |
|
|
|
WxVtwoActivityTaxDeductionRule taxDeductionRulesObject = cashBackActivity.getTaxDeductionRulesObject(); |
|
|
|
if(taxDeductionRulesObject.getStartingTax() != null && grantAward.getCashBack().compareTo(taxDeductionRulesObject.getStartingTax()) > 0 |
|
|
|
&& taxDeductionRulesObject.getTaxPoints() != null){ |
|
|
|
@@ -157,17 +158,17 @@ public class WxVtwoCashBackGrantAwardServiceImpl extends ServiceImpl<WxVtwoCashB |
|
|
|
activityGrant.setTaxAmount(taxAmount); |
|
|
|
}else{ |
|
|
|
activityGrant.setTaxDeductionRules(cashBackActivity.getTaxDeductionRules()); |
|
|
|
activityGrant.setTaxAmount(BigDecimal.ZERO); |
|
|
|
WxVtwoActivityTaxDeductionRule taxDeductionRulesObject = cashBackActivity.getTaxDeductionRulesObject(); |
|
|
|
if(taxDeductionRulesObject.getStartingTax() != null && activityGrant.getCashBack().compareTo(taxDeductionRulesObject.getStartingTax()) > 0 |
|
|
|
&& taxDeductionRulesObject.getTaxPoints() != null){ |
|
|
|
activityGrant.setTaxAmount(activityGrant.getCashBack().multiply(taxDeductionRulesObject.getTaxPoints()) |
|
|
|
.divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_UP)); |
|
|
|
|
|
|
|
//税点分摊到发奖上面 |
|
|
|
for (WxVtwoCashBackGrantAward grantAward:grantAwardList){ |
|
|
|
BigDecimal taxAmountProp = grantAward.getCashBack().divide(activityGrant.getCashBack(),4,RoundingMode.HALF_UP);; |
|
|
|
grantAward.setTaxAmount(activityGrant.getTaxAmount().multiply(taxAmountProp).setScale(2, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
} |
|
|
|
//税点分摊到发奖上面 |
|
|
|
for (WxVtwoCashBackGrantAward grantAward:grantAwardList){ |
|
|
|
BigDecimal taxAmountProp = grantAward.getCashBack().divide(activityGrant.getCashBack(),4,RoundingMode.HALF_UP);; |
|
|
|
grantAward.setTaxAmount(activityGrant.getTaxAmount().multiply(taxAmountProp).setScale(2, RoundingMode.HALF_UP)); |
|
|
|
} |
|
|
|
} |
|
|
|
activityGrant.setGrantAwardList(grantAwardList); |
|
|
|
|