feat:订舱下推寄单放单,欠款金额计算

This commit is contained in:
violet 2025-01-07 20:25:26 +08:00
parent 06e8ec3025
commit b85234b999

View File

@ -83,19 +83,20 @@ public class StorgeTransToExportPresentConvert extends AbstractConvertPlugIn
DynamicObject[] shipBills = getShipBills(saleOrder, dataEntity, "A");//出运 DynamicObject[] shipBills = getShipBills(saleOrder, dataEntity, "A");//出运
DynamicObject[] payBills = getPayBills(saleOrder, dataEntity, "B");//收款单 DynamicObject[] payBills = getPayBills(saleOrder, dataEntity, "B");//收款单
DynamicObject thisShipDetail = null; DynamicObject thisShipDetail = null;
for (DynamicObject shippingDetailObj : shippingDetails) { // for (DynamicObject shippingDetailObj : shippingDetails) {
long pkValue = (long) shippingDetailObj.getPkValue(); // long pkValue = (long) shippingDetailObj.getPkValue();
long sourcebillid = dataEntity.getLong("yem_sourcebillid"); // long sourcebillid = dataEntity.getLong("yem_sourcebillid");
DynamicObject single = BusinessDataServiceHelper.loadSingle(sourcebillid, "yem_es_storagetrans" ,"id, billno, yem_sourcebillid"); // DynamicObject single = BusinessDataServiceHelper.loadSingle(sourcebillid, "yem_es_storagetrans" ,"id, billno, yem_sourcebillid");
if (single == null) continue; // if (single == null) continue;
long shipDetailId = single.getLong("yem_sourcebillid"); // long shipDetailId = single.getLong("yem_sourcebillid");
if (shipDetailId == pkValue) { // if (shipDetailId == pkValue) {
thisShipDetail = shippingDetailObj; // thisShipDetail = shippingDetailObj;
break; // break;
} // }
} // }
if (thisShipDetail == null) continue; // thisShipDetail = BusinessDataServiceHelper.loadSingle()
BigDecimal thisRealityAmt = PaymentControlUtil.getThisRealityAmt(saleOrder, shipBills, payBills, thisShipDetail); // if (shippingDetail == null) continue;
BigDecimal thisRealityAmt = PaymentControlUtil.getThisRealityAmt(saleOrder, shipBills, payBills, shippingDetail);
addNew.set("yem_debtamt", thisRealityAmt.setScale(2, RoundingMode.HALF_UP));//欠款金额 addNew.set("yem_debtamt", thisRealityAmt.setScale(2, RoundingMode.HALF_UP));//欠款金额
} }
} }