minor change - keep indentation

This commit is contained in:
Carlos Ruiz 2007-03-28 04:05:32 +00:00
parent 29deb767b1
commit 3077a6b135
1 changed files with 32 additions and 32 deletions

View File

@ -316,40 +316,40 @@ public class ReplenishReport extends SvrProcess
String className = wh.getReplenishmentClass(); String className = wh.getReplenishmentClass();
if (className != null && className.length() > 0) if (className != null && className.length() > 0)
{ {
// Get Replenishment Class // Get Replenishment Class
ReplenishInterface custom = null; ReplenishInterface custom = null;
try try
{
Class clazz = Class.forName(className);
custom = (ReplenishInterface)clazz.newInstance();
}
catch (Exception e)
{
throw new AdempiereUserError("No custom Replenishment class "
+ className + " - " + e.toString());
}
X_T_Replenish[] replenishs = getReplenish("ReplenishType='9'");
for (int i = 0; i < replenishs.length; i++)
{
X_T_Replenish replenish = replenishs[i];
if (replenish.getReplenishType().equals(X_T_Replenish.REPLENISHTYPE_Custom))
{ {
BigDecimal qto = null; Class clazz = Class.forName(className);
try custom = (ReplenishInterface)clazz.newInstance();
{ }
qto = custom.getQtyToOrder(wh, replenish); catch (Exception e)
} {
catch (Exception e) throw new AdempiereUserError("No custom Replenishment class "
{ + className + " - " + e.toString());
log.log(Level.SEVERE, custom.toString(), e); }
}
if (qto == null) X_T_Replenish[] replenishs = getReplenish("ReplenishType='9'");
qto = Env.ZERO; for (int i = 0; i < replenishs.length; i++)
replenish.setQtyToOrder(qto); {
replenish.save(); X_T_Replenish replenish = replenishs[i];
if (replenish.getReplenishType().equals(X_T_Replenish.REPLENISHTYPE_Custom))
{
BigDecimal qto = null;
try
{
qto = custom.getQtyToOrder(wh, replenish);
}
catch (Exception e)
{
log.log(Level.SEVERE, custom.toString(), e);
}
if (qto == null)
qto = Env.ZERO;
replenish.setQtyToOrder(qto);
replenish.save();
}
} }
}
} }
// Delete rows where nothing to order // Delete rows where nothing to order
sql = "DELETE T_Replenish " sql = "DELETE T_Replenish "