@Test public void shouldInitStockMovementFromStockCard() throws Exception { StockCard stockCard = StockCardBuilder.buildStockCard(); stockCard.setStockOnHand(200); StockMovementItem stockMovementItem = stockCard.generateInitialStockMovementItem(); assertThat(stockMovementItem.getMovementQuantity(), is(200L)); assertThat(stockMovementItem.getStockOnHand(), is(200L)); assertThat(stockMovementItem.getReason(), is(MovementReasonManager.INVENTORY)); assertThat(stockMovementItem.getMovementType(), is(MovementReasonManager.MovementType.PHYSICAL_INVENTORY)); assertThat(stockMovementItem.getStockCard(), is(stockCard)); }
public StockMovementItem generateInitialStockMovementItem() { StockMovementItem initInventory = new StockMovementItem(this); initInventory.setReason(MovementReasonManager.INVENTORY); initInventory.setMovementType(MovementReasonManager.MovementType.PHYSICAL_INVENTORY); initInventory.setMovementQuantity(stockOnHand); return initInventory; }
StockCard extends BaseModel implements Comparable<StockCard> { public StockMovementItem generateInitialStockMovementItem() { StockMovementItem initInventory = new StockMovementItem(this); initInventory.setReason(MovementReasonManager.INVENTORY); initInventory.setMovementType(MovementReasonManager.MovementType.PHYSICAL_INVENTORY); initInventory.setMovementQuantity(stockOnHand); return initInventory; } }
StockCard extends BaseModel implements Comparable<StockCard> { public StockMovementItem generateInitialStockMovementItem() { StockMovementItem initInventory = new StockMovementItem(this); initInventory.setReason(MovementReasonManager.INVENTORY); initInventory.setMovementType(MovementReasonManager.MovementType.PHYSICAL_INVENTORY); initInventory.setMovementQuantity(stockOnHand); return initInventory; }  }
StockCard extends BaseModel implements Comparable<StockCard> { public StockMovementItem generateInitialStockMovementItem() { StockMovementItem initInventory = new StockMovementItem(this); initInventory.setReason(MovementReasonManager.INVENTORY); initInventory.setMovementType(MovementReasonManager.MovementType.PHYSICAL_INVENTORY); initInventory.setMovementQuantity(stockOnHand); return initInventory; }  @Override int compareTo(@NonNull StockCard another); @Override boolean equals(Object o); @Override int hashCode(); StockMovementItem generateInitialStockMovementItem(); List<StockMovementItem> getStockMovementItemsWrapper(); float getCMM(); boolean isOverStock(); boolean isLowStock(); long calculateSOHFromLots(); List<LotOnHand> getLotOnHandListWrapper(); Date getEarliestLotExpiryDate(); Date getLastStockMovementDate(); Date getLastStockMovementCreatedTime(); List<LotOnHand> getNonEmptyLotOnHandList(); List<LotOnHand> getNoneExpiredLotOnHandList(); @Override String toString(); }
StockCard extends BaseModel implements Comparable<StockCard> { public StockMovementItem generateInitialStockMovementItem() { StockMovementItem initInventory = new StockMovementItem(this); initInventory.setReason(MovementReasonManager.INVENTORY); initInventory.setMovementType(MovementReasonManager.MovementType.PHYSICAL_INVENTORY); initInventory.setMovementQuantity(stockOnHand); return initInventory; }  @Override int compareTo(@NonNull StockCard another); @Override boolean equals(Object o); @Override int hashCode(); StockMovementItem generateInitialStockMovementItem(); List<StockMovementItem> getStockMovementItemsWrapper(); float getCMM(); boolean isOverStock(); boolean isLowStock(); long calculateSOHFromLots(); List<LotOnHand> getLotOnHandListWrapper(); Date getEarliestLotExpiryDate(); Date getLastStockMovementDate(); Date getLastStockMovementCreatedTime(); List<LotOnHand> getNonEmptyLotOnHandList(); List<LotOnHand> getNoneExpiredLotOnHandList(); @Override String toString(); static final String DIVIDER; }