fix code related with MStorage.add() method
This commit is contained in:
parent
2a4b62f683
commit
5732700f46
|
@ -160,8 +160,6 @@ public class M_Production_Run extends SvrProcess {
|
|||
pline.getM_Product_ID(),
|
||||
pline.getM_AttributeSetInstance_ID(), 0 ,
|
||||
MovementQty,
|
||||
Env.ZERO,
|
||||
Env.ZERO,
|
||||
get_TrxName()))
|
||||
{
|
||||
raiseError("Cannot correct Inventory", "");
|
||||
|
|
|
@ -221,12 +221,12 @@ public class StorageCleanup extends SvrProcess
|
|||
if (MStorageOnHand.add(getCtx(), target.getM_Warehouse_ID(), target.getM_Locator_ID(),
|
||||
target.getM_Product_ID(),
|
||||
target.getM_AttributeSetInstance_ID(), target.getM_AttributeSetInstance_ID(),
|
||||
Env.ZERO, reserved.negate(), ordered.negate(), get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
{
|
||||
if (MStorageOnHand.add(getCtx(), storage0.getM_Warehouse_ID(), storage0.getM_Locator_ID(),
|
||||
storage0.getM_Product_ID(),
|
||||
storage0.getM_AttributeSetInstance_ID(), storage0.getM_AttributeSetInstance_ID(),
|
||||
Env.ZERO, reserved, ordered, get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
log.info("Reserved=" + reserved + ",Ordered=" + ordered);
|
||||
else
|
||||
log.warning("Failed Storage0 Update");
|
||||
|
|
|
@ -1358,8 +1358,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
sLine.getM_Product_ID(),
|
||||
ma.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||
QtyMA,
|
||||
sameWarehouse ? reservedDiff : Env.ZERO,
|
||||
sameWarehouse ? orderedDiff : Env.ZERO,
|
||||
get_TrxName()))
|
||||
{
|
||||
String lastError = CLogger.retrieveErrorString("");
|
||||
|
@ -1373,7 +1371,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
wh.getDefaultLocator().getM_Locator_ID(),
|
||||
sLine.getM_Product_ID(),
|
||||
ma.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||
Env.ZERO, reservedDiff, orderedDiff, get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory (MA) in order warehouse";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
@ -1403,7 +1401,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
sLine.getM_Locator_ID(),
|
||||
sLine.getM_Product_ID(),
|
||||
sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||
Qty, reservedDiff, orderedDiff, get_TrxName()))
|
||||
Qty, get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
@ -1415,7 +1413,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
wh.getDefaultLocator().getM_Locator_ID(),
|
||||
sLine.getM_Product_ID(),
|
||||
sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID,
|
||||
Env.ZERO, QtySO.negate(), QtyPO.negate(), get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
|
|
@ -441,7 +441,7 @@ public class MInventory extends X_M_Inventory implements DocAction
|
|||
line.getM_Locator_ID(),
|
||||
line.getM_Product_ID(),
|
||||
ma.getM_AttributeSetInstance_ID(), 0,
|
||||
QtyMA.negate(), Env.ZERO, Env.ZERO, get_TrxName()))
|
||||
QtyMA.negate(), get_TrxName()))
|
||||
{
|
||||
String lastError = CLogger.retrieveErrorString("");
|
||||
m_processMsg = "Cannot correct Inventory (MA) - " + lastError;
|
||||
|
@ -492,7 +492,7 @@ public class MInventory extends X_M_Inventory implements DocAction
|
|||
line.getM_Locator_ID(),
|
||||
line.getM_Product_ID(),
|
||||
line.getM_AttributeSetInstance_ID(), 0,
|
||||
qtyDiff, Env.ZERO, Env.ZERO, get_TrxName()))
|
||||
qtyDiff,get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory (MA)";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
|
|
@ -403,7 +403,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
line.getM_Locator_ID(),
|
||||
line.getM_Product_ID(),
|
||||
ma.getM_AttributeSetInstance_ID(), 0,
|
||||
ma.getMovementQty().negate(), Env.ZERO , Env.ZERO , get_TrxName()))
|
||||
ma.getMovementQty().negate(), get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory (MA)";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
@ -420,7 +420,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
line.getM_LocatorTo_ID(),
|
||||
line.getM_Product_ID(),
|
||||
M_AttributeSetInstanceTo_ID, 0,
|
||||
ma.getMovementQty(), Env.ZERO , Env.ZERO , get_TrxName()))
|
||||
ma.getMovementQty(), get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory (MA)";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
@ -459,7 +459,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
line.getM_Locator_ID(),
|
||||
line.getM_Product_ID(),
|
||||
line.getM_AttributeSetInstance_ID(), 0,
|
||||
line.getMovementQty().negate(), Env.ZERO , Env.ZERO , get_TrxName()))
|
||||
line.getMovementQty().negate(), get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory (MA)";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
@ -470,7 +470,7 @@ public class MMovement extends X_M_Movement implements DocAction
|
|||
line.getM_LocatorTo_ID(),
|
||||
line.getM_Product_ID(),
|
||||
line.getM_AttributeSetInstanceTo_ID(), 0,
|
||||
line.getMovementQty(), Env.ZERO , Env.ZERO , get_TrxName()))
|
||||
line.getMovementQty(), get_TrxName()))
|
||||
{
|
||||
m_processMsg = "Cannot correct Inventory (MA)";
|
||||
return DocAction.STATUS_Invalid;
|
||||
|
|
|
@ -1595,7 +1595,7 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
if (!MStorageOnHand.add(getCtx(), line.getM_Warehouse_ID(), M_Locator_ID,
|
||||
line.getM_Product_ID(),
|
||||
line.getM_AttributeSetInstance_ID(), line.getM_AttributeSetInstance_ID(),
|
||||
Env.ZERO, reserved, ordered, get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
return false;
|
||||
} // stockec
|
||||
// update line
|
||||
|
|
|
@ -165,7 +165,7 @@ public class MProjectIssue extends X_C_ProjectIssue
|
|||
MLocator loc = MLocator.get(getCtx(), getM_Locator_ID());
|
||||
if (MStorageOnHand.add(getCtx(), loc.getM_Warehouse_ID(), getM_Locator_ID(),
|
||||
getM_Product_ID(), getM_AttributeSetInstance_ID(), getM_AttributeSetInstance_ID(),
|
||||
getMovementQty().negate(), null, null, get_TrxName()))
|
||||
getMovementQty().negate(), get_TrxName()))
|
||||
{
|
||||
if (mTrx.save(get_TrxName()))
|
||||
{
|
||||
|
|
|
@ -886,7 +886,7 @@ public class MDDOrder extends X_DD_Order implements DocAction
|
|||
if (!MStorageOnHand.add(getCtx(), locator_to.getM_Warehouse_ID(), locator_to.getM_Locator_ID(),
|
||||
line.getM_Product_ID(),
|
||||
line.getM_AttributeSetInstance_ID(), line.getM_AttributeSetInstance_ID(),
|
||||
Env.ZERO, Env.ZERO , reserved_ordered , get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
{
|
||||
throw new AdempiereException();
|
||||
}
|
||||
|
@ -894,7 +894,7 @@ public class MDDOrder extends X_DD_Order implements DocAction
|
|||
if (!MStorageOnHand.add(getCtx(), locator_from.getM_Warehouse_ID(), locator_from.getM_Locator_ID(),
|
||||
line.getM_Product_ID(),
|
||||
line.getM_AttributeSetInstanceTo_ID(), line.getM_AttributeSetInstance_ID(),
|
||||
Env.ZERO, reserved_ordered, Env.ZERO , get_TrxName()))
|
||||
Env.ZERO, get_TrxName()))
|
||||
{
|
||||
throw new AdempiereException();
|
||||
}
|
||||
|
|
|
@ -495,7 +495,7 @@ public class Match
|
|||
sLine.getM_Locator_ID(),
|
||||
sLine.getM_Product_ID(),
|
||||
sLine.getM_AttributeSetInstance_ID(), oLine.getM_AttributeSetInstance_ID(),
|
||||
null, null, qty.negate(), trxName);
|
||||
null, trxName);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue