IDEMPIERE-385 Resolve M_Storage locking and data consistency / Improve error message - i.e. for negative inventory disallowed

This commit is contained in:
Carlos Ruiz 2012-11-21 17:20:12 -05:00
parent 0ba86d5da4
commit 9a7e649bbc
3 changed files with 13 additions and 6 deletions

View File

@ -1441,7 +1441,8 @@ public class MInOut extends X_M_InOut implements DocAction
sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
Qty, get_TrxName()))
{
m_processMsg = "Cannot correct Inventory OnHand";
String lastError = CLogger.retrieveErrorString("");
m_processMsg = "Cannot correct Inventory OnHand - " + lastError;
return DocAction.STATUS_Invalid;
}
if (reservedDiff.signum() != 0) {

View File

@ -494,7 +494,8 @@ public class MInventory extends X_M_Inventory implements DocAction
line.getM_AttributeSetInstance_ID(), 0,
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;
}

View File

@ -25,6 +25,7 @@ import java.util.Properties;
import org.compiere.process.DocAction;
import org.compiere.process.DocumentEngine;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
@ -405,7 +406,8 @@ public class MMovement extends X_M_Movement implements DocAction
ma.getM_AttributeSetInstance_ID(), 0,
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;
}
@ -422,7 +424,8 @@ public class MMovement extends X_M_Movement implements DocAction
M_AttributeSetInstanceTo_ID, 0,
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;
}
@ -461,7 +464,8 @@ public class MMovement extends X_M_Movement implements DocAction
line.getM_AttributeSetInstance_ID(), 0,
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;
}
@ -472,7 +476,8 @@ public class MMovement extends X_M_Movement implements DocAction
line.getM_AttributeSetInstanceTo_ID(), 0,
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;
}