Search in sources :

Example 1 with I_DD_Order

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@");
        });
    });
}
Also used : AdempiereException(org.adempiere.exceptions.AdempiereException) ArrayList(java.util.ArrayList) ProcessInfo(org.compiere.process.ProcessInfo) I_DD_Order(org.eevolution.model.I_DD_Order) MMovement(org.compiere.model.MMovement)

Aggregations

ArrayList (java.util.ArrayList)1 AdempiereException (org.adempiere.exceptions.AdempiereException)1 MMovement (org.compiere.model.MMovement)1 ProcessInfo (org.compiere.process.ProcessInfo)1 I_DD_Order (org.eevolution.model.I_DD_Order)1