Commit 92d49812 by kangxiaoshan

最后一日分摊金调整

parent 6ea18db0
......@@ -174,10 +174,12 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
contract.setStatus(ContractStatusEnum.LATE.getKey());
}
boolean isLater = true;
if (!isLateContract || betweenMonth < 1) {
//非合同晚录
contract.setAdjustmentFund(0L);
contract.setIncomeShareAll(contract.getIntervaIncomeShare());
isLater = false;
} else if (selected[1].isBefore(creatPoints[1])) {
//录入月1号之前 调整金为 0 分摊为 0
......@@ -205,8 +207,15 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
if (checkTwoTime(contractPart[1], selected[1])) {
//最后一日分摊金计算处理
Long lastDay = contract.getIncomeExcludingTax() - adjustmentFund
Long lastDay;
if (isLater) {
lastDay = contract.getIncomeExcludingTax() - adjustmentFund
- dayShareIncome * getDayRange(creatPoints[1], contractPart[1]);
}else{
lastDay = contract.getIncomeExcludingTax() - adjustmentFund
- dayShareIncome * getDayRange(contractPart[0], contractPart[1]);
}
//最后一日 或 包含最后一日 时
contract.setIntervaIncomeShare(contract.getIntervaIncomeShare() - dayShareIncome + lastDay);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment