IDEMPIERE-386 IDEMPIERE-1770 minor - drop unused code and improve order by
This commit is contained in:
parent
3caf738eae
commit
1eae9f71bc
|
@ -617,8 +617,6 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
if(qtyDiff.compareTo(Env.ZERO)==0)
|
if(qtyDiff.compareTo(Env.ZERO)==0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Check Line
|
|
||||||
boolean needSave = false;
|
|
||||||
// Attribute Set Instance
|
// Attribute Set Instance
|
||||||
if (line.getM_AttributeSetInstance_ID() == 0)
|
if (line.getM_AttributeSetInstance_ID() == 0)
|
||||||
{
|
{
|
||||||
|
@ -693,11 +691,6 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("##: " + lineMA);
|
if (log.isLoggable(Level.FINE)) log.fine("##: " + lineMA);
|
||||||
}
|
}
|
||||||
} // outgoing Trx
|
} // outgoing Trx
|
||||||
|
|
||||||
if (needSave)
|
|
||||||
{
|
|
||||||
line.saveEx();
|
|
||||||
}
|
|
||||||
} // for all lines
|
} // for all lines
|
||||||
|
|
||||||
} // checkMaterialPolicy
|
} // checkMaterialPolicy
|
||||||
|
|
|
@ -375,7 +375,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
||||||
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
|
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
|
||||||
|
|
||||||
if(product.isUseGuaranteeDateForMPolicy()){
|
if(product.isUseGuaranteeDateForMPolicy()){
|
||||||
sql += "ORDER BY l.PriorityNo DESC, asi.GuaranteeDate";
|
sql += "ORDER BY l.PriorityNo DESC, COALESCE(asi.GuaranteeDate,s.DateMaterialPolicy)";
|
||||||
if (!FiFo)
|
if (!FiFo)
|
||||||
sql += " DESC";
|
sql += " DESC";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue