use of org.eevolution.model.I_DD_Order in project adempiere by adempiere.
the class GenerateShipmentOutBound method processingMovements.
public void processingMovements() {
distributionOrders.entrySet().stream().forEach(entry -> {
I_DD_Order distributionOrder = entry.getValue();
List<Integer> orderIds = new ArrayList<Integer>();
orderIds.add(distributionOrder.getDD_Order_ID());
ProcessInfo processInfo = ProcessBuilder.create(getCtx()).process(MovementGenerate.getProcessId()).withSelectedRecordsIds(orderIds).withParameter(MWMInOutBound.COLUMNNAME_M_Warehouse_ID, distributionOrder.getM_Warehouse_ID()).withParameter(MMovement.COLUMNNAME_MovementDate, getMovementDate()).withoutTransactionClose().execute(get_TrxName());
if (processInfo.isError())
throw new AdempiereException(processInfo.getSummary());
addLog(processInfo.getSummary());
Arrays.stream(processInfo.getIDs()).forEach(recordId -> {
MMovement movement = new MMovement(getCtx(), recordId, get_TrxName());
if (movement != null && movement.get_ID() > 0)
GenerateMovement.printDocument(movement, "Inventory Move Hdr (Example)", processInfo.getWindowNo());
else
throw new AdempiereException("@M_Movement_ID@ @NotFound@");
});
});
}
Aggregations