Skip to content

Commit

Permalink
Do not use stock with active storage order for replenish order genera…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
Matthias Krane committed Jan 15, 2021
1 parent 801171a commit d9b0358
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,32 @@ Release 2.5
- The InventoryJournal has changed. The datatype of the recordtype column is changed from varchar to integer. Manually update the values based on the defined values in InventoryJournalRecordType



Release 2.6
-----------

Main topics
-------------------------------------------------------------------------------
- Added support for wildfly-21


Functional changes (for details and complete list have a look to the git repository)
-------------------------------------------------------------------------------
- Spanish translation


Technical changes (for details and complete list have a look to the git repository)
-------------------------------------------------------------------------------


Bugfixes (for details and complete list have a look to the git repository)
-------------------------------------------------------------------------------
Do not use stock with active storage order for replenish order generation
StackOverflow in UnitLoadType.toUniqueString() method
Some fixes in translation of stocktaking


Switch to Release 2.6
-------------------------------------------------------------------------------
- Upgrade existing database structures manually. Automatic upgrade of the structure of existing databases may not work.

Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ License, or (at your option) any later version.
import de.wms2.mywms.strategy.FixAssignment;
import de.wms2.mywms.strategy.LocationReserver;
import de.wms2.mywms.strategy.OrderState;
import de.wms2.mywms.transport.TransportOrder;
import de.wms2.mywms.user.UserBusiness;
import de.wms2.mywms.util.Wms2BundleResolver;
import de.wms2.mywms.util.Wms2Properties;
Expand Down Expand Up @@ -656,6 +657,8 @@ private StockUnit findReplenishStockForPicking(ItemData itemData, Collection<Str
if (lotsOnLocation != null && lotsOnLocation.size() > 0) {
jpql += " AND stock.lotNumber in (:lots) ";
}
jpql += " AND not exists( select 1 from " + TransportOrder.class.getName() + " transport ";
jpql += " where transport.unitLoad=stock.unitLoad and transport.state<" + OrderState.FINISHED + ")";
jpql += " ORDER BY stock.strategyDate, stock.amount, stock.created, stock.id ";
Query query = manager.createQuery(jpql);

Expand Down Expand Up @@ -698,6 +701,8 @@ private StockUnit findReplenishStockForPicking(ItemData itemData, Collection<Str
if (lotsOnLocation != null && lotsOnLocation.size() > 0) {
jpql += " AND stock.lotNumber in (:lots) ";
}
jpql += " AND not exists( select 1 from " + TransportOrder.class.getName() + " transport ";
jpql += " where transport.unitLoad=stock.unitLoad and transport.state<" + OrderState.FINISHED + ")";
jpql += " ORDER BY stock.strategyDate, stock.amount, stock.created, stock.id ";
query = manager.createQuery(jpql);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public List<ReplenishOrder> readList(ItemData itemData, StorageLocation destinat
if (maxState != null) {
queryStr += " and entity.state<=:maxState ";
}
queryStr += " ORDER by entity.state, entity.orderNumber";

Query query = manager.createQuery(queryStr);
if (itemData != null) {
query.setParameter("itemData", itemData);
Expand Down

0 comments on commit d9b0358

Please sign in to comment.