Revert revision 8251 because it was a bad merge.
Manual merge is needed.
This commit is contained in:
parent
301684d5c0
commit
3fc69673b4
|
@ -1695,11 +1695,10 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
String MMPolicy = product.getMMPolicy();
|
String MMPolicy = product.getMMPolicy();
|
||||||
Timestamp minGuaranteeDate = getMovementDate();
|
Timestamp minGuaranteeDate = getMovementDate();
|
||||||
MStorage[] storages = MStorage.getWarehouse(getCtx(), getM_Warehouse_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
|
MStorage[] storages = MStorage.getWarehouse(getCtx(), getM_Warehouse_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
|
||||||
minGuaranteeDate, MClient.MMPOLICY_FiFo.equals(MMPolicy), false, line.getM_Locator_ID(), get_TrxName());
|
minGuaranteeDate, MClient.MMPOLICY_FiFo.equals(MMPolicy), true, line.getM_Locator_ID(), get_TrxName());
|
||||||
BigDecimal qtyToDeliver = line.getMovementQty();
|
BigDecimal qtyToDeliver = line.getMovementQty();
|
||||||
for (MStorage storage: storages)
|
for (MStorage storage: storages)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0)
|
if (storage.getQtyOnHand().compareTo(qtyToDeliver) >= 0)
|
||||||
{
|
{
|
||||||
MInOutLineMA ma = new MInOutLineMA (line,
|
MInOutLineMA ma = new MInOutLineMA (line,
|
||||||
|
@ -1710,7 +1709,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
throw new IllegalStateException("Error try create ASI Reservation");
|
throw new IllegalStateException("Error try create ASI Reservation");
|
||||||
}
|
}
|
||||||
qtyToDeliver = Env.ZERO;
|
qtyToDeliver = Env.ZERO;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -596,7 +596,7 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
{
|
{
|
||||||
String MMPolicy = product.getMMPolicy();
|
String MMPolicy = product.getMMPolicy();
|
||||||
MStorage[] storages = MStorage.getWarehouse(getCtx(), getM_Warehouse_ID(), line.getM_Product_ID(), 0,
|
MStorage[] storages = MStorage.getWarehouse(getCtx(), getM_Warehouse_ID(), line.getM_Product_ID(), 0,
|
||||||
null, MClient.MMPOLICY_FiFo.equals(MMPolicy), false, line.getM_Locator_ID(), get_TrxName());
|
null, MClient.MMPOLICY_FiFo.equals(MMPolicy), true, line.getM_Locator_ID(), get_TrxName());
|
||||||
BigDecimal qtyToDeliver = qtyDiff.negate();
|
BigDecimal qtyToDeliver = qtyDiff.negate();
|
||||||
|
|
||||||
for (MStorage storage: storages)
|
for (MStorage storage: storages)
|
||||||
|
@ -612,7 +612,7 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
}
|
}
|
||||||
qtyToDeliver = Env.ZERO;
|
qtyToDeliver = Env.ZERO;
|
||||||
log.fine( ma + ", QtyToDeliver=" + qtyToDeliver);
|
log.fine( ma + ", QtyToDeliver=" + qtyToDeliver);
|
||||||
break;
|
//return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -665,7 +665,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
MProduct product = MProduct.get(getCtx(), line.getM_Product_ID());
|
MProduct product = MProduct.get(getCtx(), line.getM_Product_ID());
|
||||||
String MMPolicy = product.getMMPolicy();
|
String MMPolicy = product.getMMPolicy();
|
||||||
MStorage[] storages = MStorage.getWarehouse(getCtx(), 0, line.getM_Product_ID(), 0,
|
MStorage[] storages = MStorage.getWarehouse(getCtx(), 0, line.getM_Product_ID(), 0,
|
||||||
null, MClient.MMPOLICY_FiFo.equals(MMPolicy), false, line.getM_Locator_ID(), get_TrxName());
|
null, MClient.MMPOLICY_FiFo.equals(MMPolicy), true, line.getM_Locator_ID(), get_TrxName());
|
||||||
|
|
||||||
BigDecimal qtyToDeliver = line.getMovementQty();
|
BigDecimal qtyToDeliver = line.getMovementQty();
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
}
|
}
|
||||||
qtyToDeliver = Env.ZERO;
|
qtyToDeliver = Env.ZERO;
|
||||||
log.fine( ma + ", QtyToDeliver=" + qtyToDeliver);
|
log.fine( ma + ", QtyToDeliver=" + qtyToDeliver);
|
||||||
break;
|
//return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -332,10 +332,7 @@ public class MStorage extends X_M_Storage
|
||||||
}
|
}
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
|
||||||
if(rs.getBigDecimal(11).signum() != 0)
|
|
||||||
list.add (new MStorage (ctx, rs, trxName));
|
list.add (new MStorage (ctx, rs, trxName));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -542,7 +542,7 @@ public class InOutGenerate extends SvrProcess
|
||||||
{
|
{
|
||||||
m_lastStorages = MStorage.getWarehouse(getCtx(),
|
m_lastStorages = MStorage.getWarehouse(getCtx(),
|
||||||
M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID,
|
M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID,
|
||||||
minGuaranteeDate, FiFo, false, 0 , get_TrxName());
|
minGuaranteeDate, FiFo, true, 0 , get_TrxName());
|
||||||
m_map.put(m_lastPP, m_lastStorages);
|
m_map.put(m_lastPP, m_lastStorages);
|
||||||
}
|
}
|
||||||
return m_lastStorages;
|
return m_lastStorages;
|
||||||
|
|
Loading…
Reference in New Issue