identation of source code.

This commit is contained in:
trifonnt 2008-08-14 14:44:33 +00:00
parent 1686f3a321
commit 37aa47f47c
2 changed files with 126 additions and 123 deletions

View File

@ -15,17 +15,24 @@
*****************************************************************************/
package org.eevolution.model;
import java.math.*;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.logging.Level;
import java.util.*;
import java.util.List;
import org.compiere.model.*;
import org.compiere.util.*;
import org.compiere.wf.MWFNode;
import org.compiere.wf.MWFNodeNext;
import org.compiere.wf.MWorkflow;
import org.compiere.model.MClient;
import org.compiere.model.MOrder;
import org.compiere.model.MOrderLine;
import org.compiere.model.MProject;
import org.compiere.model.MProjectPhase;
import org.compiere.model.MProjectTask;
import org.compiere.model.MRequisitionLine;
import org.compiere.model.MTable;
import org.compiere.model.ModelValidationEngine;
import org.compiere.model.ModelValidator;
import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.model.X_C_Phase;
import org.compiere.model.X_C_Task;
import org.compiere.model.X_M_ForecastLine;
import org.compiere.util.CLogger;
/**
@ -38,7 +45,7 @@ public class LiberoValidator implements ModelValidator
{
/**
* Constructor.
* The class is instanciated when logging in and client is selected/known
* The class is instantiated when logging in and client is selected/known
*/
public LiberoValidator ()
{

View File

@ -18,8 +18,6 @@ package org.eevolution.process;
import java.util.logging.*;
import java.math.*;
import org.compiere.model.*;
import org.compiere.process.*;
import org.compiere.print.*;
@ -28,133 +26,131 @@ import org.eevolution.model.MPPOrder;
import org.eevolution.model.*;
/**
* CompletePrintOrder
*
* @author Victor Pèrez
* @version $Id: CompletePrintOrder.java,v 1.4 2004/05/07 05:52:14 vpj-cd Exp $
* CompletePrintOrder
*
* @author Victor Pèrez
* @version $Id: CompletePrintOrder.java,v 1.4 2004/05/07 05:52:14 vpj-cd Exp $
*/
public class CompletePrintOrder extends SvrProcess
{
/** The Order */
private int p_PP_Order_ID = 0;
private boolean p_IsPrintPickList = false;
private boolean p_IsPrintWorkflow = false;
private boolean p_IsPrintPackList = false;
private boolean p_IsComplete = false;
boolean IsDirectPrint = true; // TODO - Trifon we must check(ask Victor) why it is false by default?
public class CompletePrintOrder extends SvrProcess {
/** The Order */
private int p_PP_Order_ID = 0;
private boolean p_IsPrintPickList = false;
private boolean p_IsPrintWorkflow = false;
private boolean p_IsPrintPackList = false;
private boolean p_IsComplete = false;
boolean IsDirectPrint = true; // TODO - Trifon we must check(ask Victor)
// why it is false by default?
/**
* Prepare - e.g., get Parameters.
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
protected void prepare() {
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
for (int i = 0; i < para.length; i++) {
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("PP_Order_ID"))
p_PP_Order_ID = ((BigDecimal)para[i].getParameter()).intValue();
else if (name.equals("IsPrintPickList"))
p_IsPrintPickList = "Y".equals(para[i].getParameter());
else if (name.equals("IsPrintWorkflow"))
p_PP_Order_ID = ((BigDecimal) para[i].getParameter())
.intValue();
else if (name.equals("IsPrintPickList"))
p_IsPrintPickList = "Y".equals(para[i].getParameter());
else if (name.equals("IsPrintWorkflow"))
p_IsPrintWorkflow = "Y".equals(para[i].getParameter());
else if (name.equals("IsPrintPackingList"))
else if (name.equals("IsPrintPackingList"))
p_IsPrintPackList = "Y".equals(para[i].getParameter());
else if (name.equals("IsComplete"))
else if (name.equals("IsComplete"))
p_IsComplete = "Y".equals(para[i].getParameter());
else
log.log(Level.SEVERE,"prepare - Unknown Parameter: " + name);
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
}
} // prepare
} // prepare
/**
* Perrform process.
* @return Message (clear text)
* @throws Exception if not successful
* Perform process.
*
* @return Message (clear text)
* @throws Exception
* if not successful
*/
protected String doIt() throws Exception
{
MPrintFormat format = null;
Language language = Language.getLoginLanguage(); // Base Language
if (p_PP_Order_ID == 0)
throw new IllegalArgumentException("Manufacturing Order == 0");
if (p_IsComplete)
{
MPPOrder order = new MPPOrder (getCtx(), p_PP_Order_ID,null);
if (order.isAvailable())
{
order.completeIt();
order.setDocStatus(MPPOrder.DOCACTION_Complete);
order.setDocAction(MPPOrder.ACTION_Close);
order.save(get_TrxName());
}
else
{
return Msg.translate(Env.getCtx(), "NoQtyAvailable");
}
}
if (p_IsPrintPickList)
{
// Get Format & Data
format = MPrintFormat.get(getCtx(), MPrintFormat.getPrintFormat_ID("Manufacturing Order", 53027, getAD_Client_ID()), false);
format.setLanguage(language);
format.setTranslationLanguage(language);
// query
MQuery query = new MQuery("PP_Order");
query.addRestriction("PP_Order_ID", MQuery.EQUAL, new Integer(p_PP_Order_ID));
// Engine
PrintInfo info = new PrintInfo("PP_Order",X_PP_Order.Table_ID, getRecord_ID());
ReportEngine re = new ReportEngine(getCtx(), format, query, info);
//new Viewer(re);
if (IsDirectPrint)
{
re.print();
//ReportEngine.printConfirm ( 1000282 , Record_ID);
}
//else
//new Viewer(re);
}
if (p_IsPrintWorkflow)
{
// Get Format & Data
format = MPrintFormat.get(getCtx(), MPrintFormat.getPrintFormat_ID("Manufacturing Order Workflow", 53027, getAD_Client_ID()), false);
protected String doIt() throws Exception {
format.setLanguage(language);
format.setTranslationLanguage(language);
// query
MQuery query = new MQuery("PP_Order");
query.addRestriction("PP_Order_ID", MQuery.EQUAL, new Integer(p_PP_Order_ID));
// Engine
PrintInfo info = new PrintInfo("PP_Order",X_PP_Order.Table_ID, getRecord_ID());
ReportEngine re = new ReportEngine(getCtx(), format, query, info);
//new Viewer(re);
if (IsDirectPrint)
{
re.print (); // prints only original
}
//else
//new Viewer(re);
}
return Msg.translate(Env.getCtx(), "Ok");
MPrintFormat format = null;
Language language = Language.getLoginLanguage(); // Base Language
} // doIt
if (p_PP_Order_ID == 0)
throw new IllegalArgumentException("Manufacturing Order == 0");
} // CompletePrintOrder
if (p_IsComplete) {
MPPOrder order = new MPPOrder(getCtx(), p_PP_Order_ID, null);
if (order.isAvailable()) {
order.completeIt();
order.setDocStatus(MPPOrder.DOCACTION_Complete);
order.setDocAction(MPPOrder.ACTION_Close);
order.save(get_TrxName());
} else {
return Msg.translate(Env.getCtx(), "NoQtyAvailable");
}
}
if (p_IsPrintPickList) {
// Get Format & Data
format = MPrintFormat.get(getCtx(), MPrintFormat.getPrintFormat_ID(
"Manufacturing Order", 53027, getAD_Client_ID()), false);
format.setLanguage(language);
format.setTranslationLanguage(language);
// query
MQuery query = new MQuery("PP_Order");
query.addRestriction("PP_Order_ID", MQuery.EQUAL, new Integer(
p_PP_Order_ID));
// Engine
PrintInfo info = new PrintInfo("PP_Order", X_PP_Order.Table_ID,
getRecord_ID());
ReportEngine re = new ReportEngine(getCtx(), format, query, info);
// new Viewer(re);
if (IsDirectPrint) {
re.print();
// ReportEngine.printConfirm ( 1000282 , getRecord_ID() );
}
// else
// new Viewer(re);
}
if (p_IsPrintWorkflow) {
// Get Format & Data
format = MPrintFormat.get(getCtx(), MPrintFormat.getPrintFormat_ID(
"Manufacturing Order Workflow", 53027, getAD_Client_ID()),
false);
format.setLanguage(language);
format.setTranslationLanguage(language);
// query
MQuery query = new MQuery("PP_Order");
query.addRestriction("PP_Order_ID", MQuery.EQUAL, new Integer(
p_PP_Order_ID));
// Engine
PrintInfo info = new PrintInfo("PP_Order", X_PP_Order.Table_ID,
getRecord_ID());
ReportEngine re = new ReportEngine(getCtx(), format, query, info);
// new Viewer(re);
if (IsDirectPrint) {
re.print(); // prints only original
}
// else
// new Viewer(re);
}
return Msg.translate(Env.getCtx(), "Ok");
} // doIt
} // CompletePrintOrder