Search in sources :

Example 6 with I_PP_Order

use of org.eevolution.model.I_PP_Order in project metasfresh-webui-api by metasfresh.

the class PPOrderLineRowTest method canBuildForPPOrder.

@Test
public void canBuildForPPOrder() {
    final I_PP_Order ppOrder = newInstance(I_PP_Order.class);
    save(ppOrder);
    final PPOrderLineRow result = PPOrderLineRow.builderForPPOrder().attributesProvider(viewRowAttributesProvider).includedRows(ImmutableList.of()).packingInfoOrNull("packingInfo").ppOrder(ppOrder).processed(true).build();
    assertThat(result.getPackingInfo()).isEqualTo("packingInfo");
    assertThat(result.isTopLevelHU()).isFalse();
    assertThat(result.isHUStatusActive()).isFalse();
}
Also used : I_PP_Order(org.eevolution.model.I_PP_Order) Test(org.junit.Test)

Example 7 with I_PP_Order

use of org.eevolution.model.I_PP_Order in project metasfresh-webui-api by metasfresh.

the class PPOrderLineRowTest method canBuildForPPOrderBomLine.

@Test
public void canBuildForPPOrderBomLine() {
    final I_PP_Order ppOrder = newInstance(I_PP_Order.class);
    save(ppOrder);
    final I_PP_Order_BOMLine ppOrderBomLine = newInstance(I_PP_Order_BOMLine.class);
    ppOrderBomLine.setPP_Order(ppOrder);
    save(ppOrderBomLine);
    final PPOrderLineRow result = PPOrderLineRow.builderForPPOrderBomLine().attributesProvider(viewRowAttributesProvider).includedRows(ImmutableList.of()).packingInfoOrNull(null).ppOrderBomLine(ppOrderBomLine).qtyPlan(BigDecimal.TEN).type(PPOrderLineType.BOMLine_Component).processed(true).build();
    assertThat(result.getPackingInfo()).isNull();
    assertThat(result.getType()).isEqualTo(PPOrderLineType.BOMLine_Component);
    assertThat(result.isTopLevelHU()).isFalse();
    assertThat(result.isHUStatusActive()).isFalse();
}
Also used : I_PP_Order(org.eevolution.model.I_PP_Order) I_PP_Order_BOMLine(org.eevolution.model.I_PP_Order_BOMLine) Test(org.junit.Test)

Aggregations

I_PP_Order (org.eevolution.model.I_PP_Order)7 BigDecimal (java.math.BigDecimal)4 AdempiereException (org.adempiere.exceptions.AdempiereException)4 MBPartner (org.compiere.model.MBPartner)4 MPPOrder (org.eevolution.model.MPPOrder)4 MPPProductBOM (org.eevolution.model.MPPProductBOM)4 MWorkflow (org.compiere.wf.MWorkflow)2 Test (org.junit.Test)2 MatchingSourceHusQuery (de.metas.handlingunits.sourcehu.SourceHUsService.MatchingSourceHusQuery)1 I_PP_Order_BOMLine (org.eevolution.model.I_PP_Order_BOMLine)1