IDEMPIERE-385 Resolve M_Storage locking and data consistency / Improve error message - i.e. for negative inventory disallowed
This commit is contained in:
parent
0ba86d5da4
commit
9a7e649bbc
|
@ -1441,7 +1441,8 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||||
Qty, get_TrxName()))
|
Qty, get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Cannot correct Inventory OnHand";
|
String lastError = CLogger.retrieveErrorString("");
|
||||||
|
m_processMsg = "Cannot correct Inventory OnHand - " + lastError;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
if (reservedDiff.signum() != 0) {
|
if (reservedDiff.signum() != 0) {
|
||||||
|
|
|
@ -494,7 +494,8 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
line.getM_AttributeSetInstance_ID(), 0,
|
line.getM_AttributeSetInstance_ID(), 0,
|
||||||
qtyDiff,get_TrxName()))
|
qtyDiff,get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Cannot correct Inventory (MA)";
|
String lastError = CLogger.retrieveErrorString("");
|
||||||
|
m_processMsg = "Cannot correct Inventory OnHand (MA) - " + lastError;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ import java.util.Properties;
|
||||||
|
|
||||||
import org.compiere.process.DocAction;
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.process.DocumentEngine;
|
import org.compiere.process.DocumentEngine;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
@ -405,7 +406,8 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
ma.getM_AttributeSetInstance_ID(), 0,
|
ma.getM_AttributeSetInstance_ID(), 0,
|
||||||
ma.getMovementQty().negate(), get_TrxName()))
|
ma.getMovementQty().negate(), get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Cannot correct Inventory (MA)";
|
String lastError = CLogger.retrieveErrorString("");
|
||||||
|
m_processMsg = "Cannot correct Inventory OnHand (MA) - " + lastError;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +424,8 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
M_AttributeSetInstanceTo_ID, 0,
|
M_AttributeSetInstanceTo_ID, 0,
|
||||||
ma.getMovementQty(), get_TrxName()))
|
ma.getMovementQty(), get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Cannot correct Inventory (MA)";
|
String lastError = CLogger.retrieveErrorString("");
|
||||||
|
m_processMsg = "Cannot correct Inventory OnHand (MA) - " + lastError;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +464,8 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
line.getM_AttributeSetInstance_ID(), 0,
|
line.getM_AttributeSetInstance_ID(), 0,
|
||||||
line.getMovementQty().negate(), get_TrxName()))
|
line.getMovementQty().negate(), get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Cannot correct Inventory (MA)";
|
String lastError = CLogger.retrieveErrorString("");
|
||||||
|
m_processMsg = "Cannot correct Inventory OnHand (MA) - " + lastError;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,7 +476,8 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
line.getM_AttributeSetInstanceTo_ID(), 0,
|
line.getM_AttributeSetInstanceTo_ID(), 0,
|
||||||
line.getMovementQty(), get_TrxName()))
|
line.getMovementQty(), get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Cannot correct Inventory (MA)";
|
String lastError = CLogger.retrieveErrorString("");
|
||||||
|
m_processMsg = "Cannot correct Inventory OnHand (MA) - " + lastError;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue