Skip to content

Commit

Permalink
minor (codacy)
Browse files Browse the repository at this point in the history
Material Dispo wrong Quantities after Material receipt #3935
  • Loading branch information
metas-ts committed Apr 27, 2018
1 parent 8374cb0 commit eb3a463
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Expand Up @@ -53,13 +53,11 @@

public class M_Transaction_HuDescriptorTest
{

private static final BigDecimal THIRTY_IFCOS_PER_PALET = new BigDecimal("30");
private static final BigDecimal FOURTY_TOMATOES_PER_IFCO = new BigDecimal("40");
private static final BigDecimal TOTAL_CU_QTY = FOURTY_TOMATOES_PER_IFCO.multiply(THIRTY_IFCOS_PER_PALET);

private I_M_HU_PI huDefPalet;
private I_M_HU_PI huDefIFCO;

private HUTestHelper helper;

Expand All @@ -69,7 +67,7 @@ public void init()
helper = new HUTestHelper();

// HU PI: IFCO
huDefIFCO = helper.createHUDefinition(HUTestHelper.NAME_IFCO_Product, X_M_HU_PI_Version.HU_UNITTYPE_TransportUnit);
final I_M_HU_PI huDefIFCO = helper.createHUDefinition(HUTestHelper.NAME_IFCO_Product, X_M_HU_PI_Version.HU_UNITTYPE_TransportUnit);
final I_M_HU_PI_Item itemMA = helper.createHU_PI_Item_Material(huDefIFCO);
helper.assignProduct(itemMA, helper.pTomato, FOURTY_TOMATOES_PER_IFCO, helper.uomEach);
helper.createHU_PI_Item_PackingMaterial(huDefIFCO, helper.pmIFCO);
Expand Down
@@ -1,5 +1,6 @@
package de.metas.handlingunits.material.interceptor;

import static java.math.BigDecimal.ONE;
import static java.math.BigDecimal.TEN;
import static org.adempiere.model.InterfaceWrapperHelper.newInstance;
import static org.adempiere.model.InterfaceWrapperHelper.save;
Expand Down Expand Up @@ -78,11 +79,10 @@ public class M_Transaction_TransactionEventCreatorTest
private static final BigDecimal SEVEN = new BigDecimal("7");;
private static final BigDecimal THREE = new BigDecimal("3");
private static final BigDecimal TWO = new BigDecimal("2");
private static final BigDecimal ONE = BigDecimal.ONE;
private static final BigDecimal MINUS_ONE = ONE.negate();
private static final BigDecimal MINUS_ONE = new BigDecimal("-1");
private static final BigDecimal MINUS_TWO = new BigDecimal("-2");
private static final BigDecimal MINUS_SEVEN = new BigDecimal("-7");
private static final BigDecimal MINUS_TEN = BigDecimal.TEN.negate();
private static final BigDecimal MINUS_TEN = TEN.negate();

private static final int SOME_OTHER_INOUT_LINE_ID = 30;

Expand Down Expand Up @@ -143,7 +143,7 @@ public void createEventsForTransaction_single_shipmentSchedule()
final I_M_ShipmentSchedule_QtyPicked shipmentScheduleQtyPicked = newInstance(I_M_ShipmentSchedule_QtyPicked.class);
shipmentScheduleQtyPicked.setM_ShipmentSchedule_ID(20);
shipmentScheduleQtyPicked.setM_InOutLine(inoutLine);
shipmentScheduleQtyPicked.setQtyPicked(BigDecimal.TEN);
shipmentScheduleQtyPicked.setQtyPicked(TEN);
save(shipmentScheduleQtyPicked);

final I_M_Transaction transaction = createShipmentTransaction();
Expand Down

0 comments on commit eb3a463

Please sign in to comment.