update 提取默认税率

This commit is contained in:
lijiarao
2022-11-08 17:53:37 +08:00
parent 5fbb3ce850
commit 1bc45f6c4d
7 changed files with 23 additions and 11 deletions
@@ -23,6 +23,7 @@ import com.jero.company.entity.PayContactsManagement;
import com.jero.company.mapper.PayContactsManagementMapper;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.mail.PayMailBillVO;
import com.jero.mail.entity.BillingInfo;
@@ -802,7 +803,7 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
BigDecimal noTaxAmount = payMailBillProject.getNoTaxAmount();
BigDecimal tax = payMailBillProject.getTax();
if (noTaxAmount == null || tax == null){
noTaxAmount = invoiceAmount.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = invoiceAmount.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = invoiceAmount.subtract(noTaxAmount);
}
payPaymentRecordService.isTax(noTaxAmount,tax,invoiceAmount);
@@ -1138,7 +1139,7 @@ public class PayMailBillServiceImpl extends ServiceImpl<PayMailBillMapper, PayMa
BigDecimal noTaxAmount = bm.getNoTaxAmount();
BigDecimal tax = bm.getTax();
if (noTaxAmount == null || tax == null){
noTaxAmount = thisInvoiceAmount.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = thisInvoiceAmount.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = thisInvoiceAmount.subtract(noTaxAmount);
bm.setNoTaxAmount(noTaxAmount);
bm.setTax(tax);
@@ -1,6 +1,7 @@
package com.jero.payment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.meeting.mapper.PayMeetingSituationMapper;
@@ -55,7 +56,7 @@ public class PayConfirmPaymentRecordService extends ServiceImpl<PayConfirmPaymen
BigDecimal tax = payConfirmPaymentRecord.getTax();
BigDecimal amountReceived = payConfirmPaymentRecord.getAmountReceived();
if (noTaxAmount == null || tax == null){
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
payConfirmPaymentRecord.setNoTaxAmount(noTaxAmount);
payConfirmPaymentRecord.setTax(tax);
@@ -19,6 +19,7 @@ import com.jero.common.util.AuthenticationUtils;
import com.jero.common.util.PasswordUtil;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.meeting.mapper.PayMeetingSituationMapper;
import com.jero.member.entity.*;
@@ -564,7 +565,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
payPaymentRecord.setTax(tax);
@@ -641,7 +642,7 @@ public class PayPaymentCheckServiceImpl extends ServiceImpl<PayPaymentCheckMappe
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
payPaymentRecord.setTax(tax);
@@ -25,6 +25,7 @@ import com.jero.company.entity.PayCompanyManagement;
import com.jero.company.entity.PayContactsManagement;
import com.jero.company.service.IPayCompanyManagementService;
import com.jero.company.service.IPayContactsManagementService;
import com.jero.config.StaticConfig;
import com.jero.contract.common.PayIncomeContractCommon;
import com.jero.meeting.common.MeetingSubitemCommon;
import com.jero.meeting.entity.PayMeeting;
@@ -212,7 +213,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
BigDecimal tax1 = payPaymentRecord.getTax();
if (noTaxAmount1 == null || tax1 == null){
BigDecimal amountReceived = payPaymentRecord.getAmountReceived();
BigDecimal noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
BigDecimal noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
BigDecimal tax = amountReceived.subtract(noTaxAmount);
payPaymentRecord.setNoTaxAmount(noTaxAmount);
payPaymentRecord.setTax(tax);
@@ -366,7 +367,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
BigDecimal noTaxAmount;
List<PayContactsManagementTemporary> listId = new ArrayList<>();
BigDecimal divide = payPaymentRecord.getAmountReceived().divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
BigDecimal divide = payPaymentRecord.getAmountReceived().divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
//累加主列表实收金额
//来款条件校验
amountReceivedVerification( payPaymentRecord, flag);
@@ -641,7 +642,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
//保存税额
@@ -695,7 +696,7 @@ public class PayPaymentRecordServiceImpl extends ServiceImpl<PayPaymentRecordMap
noTaxAmount = amountReceived;
tax = BigDecimal.ZERO;
}else {
noTaxAmount = amountReceived.divide(new BigDecimal("1.06"), 2, RoundingMode.HALF_UP);
noTaxAmount = amountReceived.divide(new BigDecimal(StaticConfig.TAX_RATE), 2, RoundingMode.HALF_UP);
tax = amountReceived.subtract(noTaxAmount);
}
//保存税额