银行利息费=(【(基础机型+选配)销售单价(合同币别)】+海运费+国际陆运费+空运费+保险费+港杂费+内陆运输费+单证及报关费+其他费用+费用包干)*收款计划中的是否信保为是的收汇百分比%*利息率/100/360*利息天数
This commit is contained in:
25655 2025-03-05 18:30:32 +08:00
parent a81fa76d96
commit eb2fcbbe13

View File

@ -1501,22 +1501,39 @@ public class ClientUtils {
private static void doCalculateBankInterestCharges(int rowIdx, IDataModel model) {
BigDecimal safobprice = (BigDecimal) model.getValue("yem_safobprice", rowIdx);//销售FOB单价
BigDecimal seafreight = (BigDecimal) model.getValue("yem_e_seafreight", rowIdx);//海运费
BigDecimal yemELandcarrycost = (BigDecimal) model.getValue("yem_e_landcarrycost", rowIdx);//国际陆运费
BigDecimal yemEAirliftcost = (BigDecimal) model.getValue("yem_e_airliftcost", rowIdx);//空运费
BigDecimal yemPortamt = (BigDecimal) model.getValue("yem_portamt", rowIdx);//港杂费
BigDecimal yemInlandtransportation = (BigDecimal) model.getValue("yem_inlandtransportation", rowIdx);//内陆运输费
BigDecimal yemEBankcost = (BigDecimal) model.getValue("yem_e_bankcost", rowIdx);//报关费
BigDecimal yemEElsecost = (BigDecimal) model.getValue("yem_e_elsecost", rowIdx);//其他费用
BigDecimal yemCostsinclude = (BigDecimal) model.getValue("yem_costsinclude", rowIdx);//费用包干
BigDecimal marinsupreamt = (BigDecimal) model.getValue("yem_e_marinsupreamt", rowIdx);//保险费
BigDecimal interestrate = (BigDecimal) model.getValue("yem_e_interestrate", rowIdx);//利息率%
interestrate = BigDecimalUtils.div(interestrate, new BigDecimal("100"), 10);
BigDecimal calculate = BigDecimal.ZERO;
BigDecimal interestdays = BigDecimal.ZERO;
int rowCount = model.getEntryRowCount("yem_es_salescontrac_s");
for (int i = 0; i < rowCount; i++) {
String issinosure = (String) model.getValue("yem_issinosure", i);
if ("A".equals(issinosure)) {
BigDecimal raprate = (BigDecimal) model.getValue("yem_raprate", i);//收汇百分比%
BigDecimal interestdays = (BigDecimal) model.getValue("yem_interestdays", i);//利息天数
raprate = BigDecimalUtils.div(raprate, new BigDecimal("100"), 10);
BigDecimal multiply = BigDecimalUtils.div(safobprice.add(seafreight).add(marinsupreamt).multiply(raprate).multiply(interestrate), new BigDecimal("360"), 10).multiply(interestdays);
calculate = calculate.add(multiply);
interestdays = interestdays.add((BigDecimal) model.getValue("yem_interestdays", i));//利息天数
// raprate = BigDecimalUtils.div(raprate, new BigDecimal("100"), 10);
// BigDecimal multiply = BigDecimalUtils.div(safobprice.add(seafreight).add(marinsupreamt).multiply(raprate).multiply(interestrate), new BigDecimal("360"), 10).multiply(interestdays);
calculate = calculate.add(raprate);
}
}
model.setValue("yem_e_interestamt", calculate.setScale(0, RoundingMode.UP), rowIdx);
BigDecimal yem_e_interestamt = seafreight.add(yemELandcarrycost).add(yemEAirliftcost).add(yemPortamt)
.add(yemInlandtransportation).add(yemEBankcost).add(yemEElsecost).add(yemCostsinclude).add(marinsupreamt);
// yem_e_interestamt = yem_e_interestamt.multiply(calculate).multiply(interestdays).multiply(interestrate.divide(new BigDecimal("100"),10).divide(new BigDecimal("360"),10));
BigDecimal multiply = BigDecimalUtils.multiply(yem_e_interestamt, calculate, 10);
multiply = BigDecimalUtils.multiply(multiply, interestdays, 10);
multiply = BigDecimalUtils.multiply(multiply, interestrate, 10);
multiply = BigDecimalUtils.div(multiply, 100, 10);
multiply = BigDecimalUtils.div(multiply, 360, 10);
// BigDecimalUtils.div(yem_e_interestamt, new BigDecimal("100"), 10);
model.setValue("yem_e_interestamt", multiply.setScale(0, RoundingMode.UP), rowIdx);
}
/**