fix 编辑来款时金额处理错误
This commit is contained in:
+16
-11
@@ -1018,13 +1018,15 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
|
||||
receivableAmount = payCommonProject.getReceivableAmount();//应收
|
||||
paidAmount=payCommonProject.getPaidAmount().subtract(oldRecord.getAmountReceived()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
noTaxAmount=payCommonProject.getPaidNoTaxAmount().subtract(oldRecord.getNoTaxAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
tax=payCommonProject.getPaidTax().subtract(oldRecord.getTax()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
//是否还能再添加来款
|
||||
isAdd(receivableAmount,paidAmount, payPaymentRecord.getAmountReceived());
|
||||
|
||||
newPaidAmount =addPaidAmount(paidAmount,payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = getInAccount(receivableAmount, newPaidAmount);//到账状态
|
||||
tax = addPaidAmount(payCommonProject.getPaidTax(),payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(payCommonProject.getPaidNoTaxAmount(),payPaymentRecord.getNoTaxAmount());
|
||||
tax = addPaidAmount(tax,payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(noTaxAmount,payPaymentRecord.getNoTaxAmount());
|
||||
payCommonProject.setPaidTax(tax);
|
||||
payCommonProject.setPaidNoTaxAmount(noTaxAmount);
|
||||
//更新主列表
|
||||
@@ -1039,14 +1041,15 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
|
||||
receivableAmount = payWorking.getReceivableAmount();//应收
|
||||
paidAmount=payWorking.getPaidAmount().subtract(oldRecord.getAmountReceived()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
|
||||
noTaxAmount=payWorking.getPaidNoTaxAmount().subtract(oldRecord.getNoTaxAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
tax=payWorking.getPaidTax().subtract(oldRecord.getTax()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
//是否还能再添加来款
|
||||
isAdd(receivableAmount,paidAmount, payPaymentRecord.getAmountReceived());
|
||||
|
||||
newPaidAmount =addPaidAmount(paidAmount,payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = getInAccount(receivableAmount, newPaidAmount);//到账状态
|
||||
tax = addPaidAmount(payWorking.getPaidTax(),payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(payWorking.getPaidNoTaxAmount(),payPaymentRecord.getNoTaxAmount());
|
||||
tax = addPaidAmount(tax,payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(noTaxAmount,payPaymentRecord.getNoTaxAmount());
|
||||
payWorking.setPaidTax(tax);
|
||||
payWorking.setPaidNoTaxAmount(noTaxAmount);
|
||||
//更新主列表
|
||||
@@ -1064,14 +1067,15 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
}
|
||||
receivableAmount = meeting.getAmountReceivable();//应收
|
||||
paidAmount=meeting.getPaidAmount().subtract(oldRecord.getAmountReceived()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
|
||||
noTaxAmount=meeting.getPaidNoTaxAmount().subtract(oldRecord.getNoTaxAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
tax=meeting.getPaidTax().subtract(oldRecord.getTax()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
//是否还能再添加来款
|
||||
isAdd(receivableAmount,paidAmount, payPaymentRecord.getAmountReceived());
|
||||
|
||||
newPaidAmount =addPaidAmount(paidAmount,payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = getInAccount(receivableAmount, newPaidAmount);//到账状态
|
||||
tax = addPaidAmount(meeting.getPaidTax(),payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(meeting.getPaidNoTaxAmount(),payPaymentRecord.getNoTaxAmount());
|
||||
tax = addPaidAmount(tax,payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(noTaxAmount,payPaymentRecord.getNoTaxAmount());
|
||||
meeting.setPaidTax(tax);
|
||||
meeting.setPaidNoTaxAmount(noTaxAmount);
|
||||
//更新主列表
|
||||
@@ -1086,14 +1090,15 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
|
||||
|
||||
receivableAmount = member.getAmountReceivable();//应收
|
||||
paidAmount=member.getPaidAmount().subtract(oldRecord.getAmountReceived()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
|
||||
noTaxAmount=member.getPaidNoTaxAmount().subtract(oldRecord.getNoTaxAmount()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
tax=member.getPaidTax().subtract(oldRecord.getTax()).setScale(2, BigDecimal.ROUND_HALF_UP);//实收-上次来款
|
||||
//是否还能再添加来款
|
||||
isAdd(receivableAmount, paidAmount,payPaymentRecord.getAmountReceived());
|
||||
|
||||
newPaidAmount =addPaidAmount(paidAmount,payPaymentRecord.getAmountReceived());//累加实收
|
||||
inAccount = getInAccount(receivableAmount, newPaidAmount);//到账状态
|
||||
tax = addPaidAmount(member.getPaidTax(),payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(member.getPaidNoTaxAmount(),payPaymentRecord.getNoTaxAmount());
|
||||
tax = addPaidAmount(tax,payPaymentRecord.getTax());
|
||||
noTaxAmount = addPaidAmount(noTaxAmount,payPaymentRecord.getNoTaxAmount());
|
||||
member.setPaidTax(tax);
|
||||
member.setPaidNoTaxAmount(noTaxAmount);
|
||||
//更新主列表
|
||||
|
||||
Reference in New Issue
Block a user