fix 83172 申请入会后--预估到账日期要默认当天,税率默认6%

This commit is contained in:
lijiarao
2024-03-28 16:18:41 +08:00
parent 43de17cea9
commit 1c1f3c524b
@@ -138,7 +138,8 @@ public class ITbMemberProjectSubitemService extends ServiceImpl<TbMemberProjectS
if (count > 0) {
throw new JeroBootException("会员单位已经存在");
}
if (Objects.isNull(tbMemberProjectSubitem.getAmountReceivable())) {
BigDecimal amountReceivable = tbMemberProjectSubitem.getAmountReceivable();
if (Objects.isNull(amountReceivable)) {
throw new JeroBootException("待确收金额不能为空");
}
if (Objects.equals(tbMemberProjectSubitem.getPaymentMethod(), PayProjectCommon.CHARGE_WAY2)) {
@@ -151,7 +152,21 @@ public class ITbMemberProjectSubitemService extends ServiceImpl<TbMemberProjectS
throw new JeroBootException("收费通知号不能为空");
}
}
//预估到账日期
Date estimatedArrivalDate = tbMemberProjectSubitem.getEstimatedArrivalDate();
if (estimatedArrivalDate == null){
tbMemberProjectSubitem.setEstimatedArrivalDate(DateUtil.date());
}
BigDecimal taxRate = tbMemberProjectSubitem.getTaxRate();
if (taxRate == null){
tbMemberProjectSubitem.setTaxRate(StaticConfig.TAX_RATE);
BigDecimal noTaxAmount = amountReceivable.divide(StaticConfig.TAX_RATE_CALCULATE, 2, RoundingMode.HALF_UP);
BigDecimal tax = amountReceivable.subtract(noTaxAmount);
tbMemberProjectSubitem.setNoTaxAmount(noTaxAmount);
tbMemberProjectSubitem.setTax(tax);
}
//赋值会员编号
TbMemberProjectSubitem takeEffectInfo = getTakeEffectInfo(companyId);
if (takeEffectInfo!=null){