Search in sources :

Example 1 with MPPOrderBOM

use of org.eevolution.model.MPPOrderBOM in project adempiere by adempiere.

the class BOMWrapper method getPP_Order_ID.

public int getPP_Order_ID() {
    int id = 0;
    if (get() instanceof MPPOrderBOM) {
        MPPOrderBOM bom = (MPPOrderBOM) get();
        id = bom.getPP_Order_ID();
    }
    return id;
}
Also used : MPPOrderBOM(org.eevolution.model.MPPOrderBOM)

Example 2 with MPPOrderBOM

use of org.eevolution.model.MPPOrderBOM in project adempiere by adempiere.

the class BOMWrapper method getLines.

public BOMLineWrapper[] getLines() {
    int[] ids = null;
    String type = null;
    if (get() instanceof MPPProductBOM) {
        type = BOM_TYPE_PRODUCT;
    } else if (get() instanceof MPPOrderBOM) {
        type = BOM_TYPE_ORDER;
    }
    StorageReasoner mr = new StorageReasoner();
    ids = mr.getPOIDs(BOMLineWrapper.tableName(type), idColumn(type) + " = " + getID(), null);
    BOMLineWrapper[] lines = new BOMLineWrapper[ids.length];
    for (int i = 0; i < ids.length; i++) {
        lines[i] = new BOMLineWrapper(getCtx(), ids[i], null, type);
    }
    return lines;
}
Also used : MPPOrderBOM(org.eevolution.model.MPPOrderBOM) StorageReasoner(org.eevolution.model.reasoner.StorageReasoner) MPPProductBOM(org.eevolution.model.MPPProductBOM)

Aggregations

MPPOrderBOM (org.eevolution.model.MPPOrderBOM)2 MPPProductBOM (org.eevolution.model.MPPProductBOM)1 StorageReasoner (org.eevolution.model.reasoner.StorageReasoner)1