feat:订舱下推寄单放单,欠款金额计算
This commit is contained in:
parent
06e8ec3025
commit
b85234b999
@ -83,19 +83,20 @@ public class StorgeTransToExportPresentConvert extends AbstractConvertPlugIn
|
||||
DynamicObject[] shipBills = getShipBills(saleOrder, dataEntity, "A");//出运
|
||||
DynamicObject[] payBills = getPayBills(saleOrder, dataEntity, "B");//收款单
|
||||
DynamicObject thisShipDetail = null;
|
||||
for (DynamicObject shippingDetailObj : shippingDetails) {
|
||||
long pkValue = (long) shippingDetailObj.getPkValue();
|
||||
long sourcebillid = dataEntity.getLong("yem_sourcebillid");
|
||||
DynamicObject single = BusinessDataServiceHelper.loadSingle(sourcebillid, "yem_es_storagetrans" ,"id, billno, yem_sourcebillid");
|
||||
if (single == null) continue;
|
||||
long shipDetailId = single.getLong("yem_sourcebillid");
|
||||
if (shipDetailId == pkValue) {
|
||||
thisShipDetail = shippingDetailObj;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (thisShipDetail == null) continue;
|
||||
BigDecimal thisRealityAmt = PaymentControlUtil.getThisRealityAmt(saleOrder, shipBills, payBills, thisShipDetail);
|
||||
// for (DynamicObject shippingDetailObj : shippingDetails) {
|
||||
// long pkValue = (long) shippingDetailObj.getPkValue();
|
||||
// long sourcebillid = dataEntity.getLong("yem_sourcebillid");
|
||||
// DynamicObject single = BusinessDataServiceHelper.loadSingle(sourcebillid, "yem_es_storagetrans" ,"id, billno, yem_sourcebillid");
|
||||
// if (single == null) continue;
|
||||
// long shipDetailId = single.getLong("yem_sourcebillid");
|
||||
// if (shipDetailId == pkValue) {
|
||||
// thisShipDetail = shippingDetailObj;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// thisShipDetail = BusinessDataServiceHelper.loadSingle()
|
||||
// if (shippingDetail == null) continue;
|
||||
BigDecimal thisRealityAmt = PaymentControlUtil.getThisRealityAmt(saleOrder, shipBills, payBills, shippingDetail);
|
||||
addNew.set("yem_debtamt", thisRealityAmt.setScale(2, RoundingMode.HALF_UP));//欠款金额
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user