IDEMPIERE-386 IDEMPIERE-1770 minor - drop unused code and improve order by

This commit is contained in:
Carlos Ruiz 2015-01-28 09:19:37 -05:00
parent 3caf738eae
commit 1eae9f71bc
2 changed files with 1 additions and 8 deletions

View File

@ -617,8 +617,6 @@ public class MInventory extends X_M_Inventory implements DocAction
if(qtyDiff.compareTo(Env.ZERO)==0)
return;
// Check Line
boolean needSave = false;
// Attribute Set Instance
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);
}
} // outgoing Trx
if (needSave)
{
line.saveEx();
}
} // for all lines
} // checkMaterialPolicy

View File

@ -375,7 +375,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
MProduct product = MProduct.get(Env.getCtx(), M_Product_ID);
if(product.isUseGuaranteeDateForMPolicy()){
sql += "ORDER BY l.PriorityNo DESC, asi.GuaranteeDate";
sql += "ORDER BY l.PriorityNo DESC, COALESCE(asi.GuaranteeDate,s.DateMaterialPolicy)";
if (!FiFo)
sql += " DESC";
}