コード例 #1
0
  @Override
  protected IAllocationRequest createAllocationRequest(final IHUContext huContext) {
    final I_PP_Cost_Collector cc = getPP_Cost_Collector();
    final I_C_UOM uom = cc.getC_UOM();

    final BigDecimal qtyReceived =
        Services.get(IPPOrderBOMBL.class).adjustCoProductQty(cc.getMovementQty());

    final Timestamp date = cc.getMovementDate();
    final I_M_Product product = cc.getM_Product();

    final IAllocationRequest allocationRequest =
        AllocationUtils.createQtyRequest(
            huContext,
            product, // product
            qtyReceived, // the quantity we received
            uom,
            date, // transaction date
            cc.getPP_Order() // referenced model
            );

    return allocationRequest;
  }