IDEMPIERE-2042 Don't reserved stock if c_orderline.qtyordered is -ve.
This commit is contained in:
parent
f94deb552a
commit
b08aebfab8
|
@ -1407,7 +1407,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
m_processMsg = "Cannot correct Inventory OnHand (MA) [" + product.getValue() + "] - " + lastError;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
if (reservedDiff.signum() != 0) {
|
||||
if (reservedDiff.signum() != 0 && oLine.getQtyOrdered().signum() > 0) {
|
||||
if (!MStorageReservation.add(getCtx(), reservationWarehouse_ID,
|
||||
sLine.getM_Product_ID(),
|
||||
ma.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||
|
@ -1460,7 +1460,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
m_processMsg = "Cannot correct Inventory OnHand [" + product.getValue() + "] - " + lastError;
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
if (reservedDiff.signum() != 0) {
|
||||
if (reservedDiff.signum() != 0 && oLine.getQtyOrdered().signum() > 0) {
|
||||
if (!MStorageReservation.add(getCtx(), reservationWarehouse_ID,
|
||||
sLine.getM_Product_ID(),
|
||||
sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||
|
|
|
@ -1722,7 +1722,7 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
BigDecimal difference = target
|
||||
.subtract(line.getQtyReserved())
|
||||
.subtract(line.getQtyDelivered());
|
||||
if (difference.signum() == 0)
|
||||
if (difference.signum() <= 0)
|
||||
{
|
||||
MProduct product = line.getProduct();
|
||||
if (product != null)
|
||||
|
|
Loading…
Reference in New Issue