Minor refactoring
This commit is contained in:
parent
2e34345ccb
commit
8d9f866d7f
|
@ -16,14 +16,28 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.print;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.*;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.sql.RowSet;
|
||||
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.*;
|
||||
import org.compiere.model.MQuery;
|
||||
import org.compiere.model.MRole;
|
||||
import org.compiere.model.X_AD_PrintFormat;
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.CPreparedStatement;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* AD_PrintFormat - Print Format Model.
|
||||
|
@ -864,8 +878,8 @@ public class MPrintFormat extends X_AD_PrintFormat
|
|||
*/
|
||||
public static int getPrintFormat_ID(String formatName, int AD_Table_ID, int AD_Client_ID) {
|
||||
final String sql = "SELECT AD_PrintFormat_ID FROM AD_PrintFormat"
|
||||
+" WHERE Name = ? AND AD_Table_ID = ? AND AD_Client_ID IN(0, ?)"
|
||||
+" ORDER BY AD_Client_ID DESC";
|
||||
+ " WHERE Name = ? AND AD_Table_ID = ? AND AD_Client_ID IN (0, ?)"
|
||||
+ " ORDER BY AD_Client_ID DESC";
|
||||
return DB.getSQLValue(null, sql, formatName, AD_Table_ID, AD_Client_ID);
|
||||
}
|
||||
//end vpj-cd e-evolution
|
||||
|
|
|
@ -15,15 +15,19 @@
|
|||
*****************************************************************************/
|
||||
package org.eevolution.process;
|
||||
|
||||
import java.util.logging.*;
|
||||
import java.math.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.process.*;
|
||||
import org.compiere.print.*;
|
||||
import org.compiere.util.*;
|
||||
import org.compiere.model.MQuery;
|
||||
import org.compiere.model.PrintInfo;
|
||||
import org.compiere.print.MPrintFormat;
|
||||
import org.compiere.print.ReportEngine;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Msg;
|
||||
import org.eevolution.model.MPPOrder;
|
||||
import org.eevolution.model.*;
|
||||
|
||||
/**
|
||||
* CompletePrintOrder
|
||||
|
@ -36,7 +40,7 @@ public class CompletePrintOrder extends SvrProcess {
|
|||
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_IsPrintPackList = false; // for future use
|
||||
private boolean p_IsComplete = false;
|
||||
|
||||
boolean IsDirectPrint = true; // TODO - Trifon we must check(ask Victor)
|
||||
|
@ -100,7 +104,7 @@ public class CompletePrintOrder extends SvrProcess {
|
|||
// Get Format & Data
|
||||
|
||||
format = MPrintFormat.get(getCtx(), MPrintFormat.getPrintFormat_ID(
|
||||
"Manufacturing Order", 53027, getAD_Client_ID()), false);
|
||||
"Manufacturing Order", MPPOrder.Table_ID, getAD_Client_ID()), false);
|
||||
format.setLanguage(language);
|
||||
format.setTranslationLanguage(language);
|
||||
// query
|
||||
|
@ -109,7 +113,7 @@ public class CompletePrintOrder extends SvrProcess {
|
|||
p_PP_Order_ID));
|
||||
|
||||
// Engine
|
||||
PrintInfo info = new PrintInfo("PP_Order", X_PP_Order.Table_ID,
|
||||
PrintInfo info = new PrintInfo("PP_Order", MPPOrder.Table_ID,
|
||||
getRecord_ID());
|
||||
ReportEngine re = new ReportEngine(getCtx(), format, query, info);
|
||||
// new Viewer(re);
|
||||
|
@ -126,7 +130,7 @@ public class CompletePrintOrder extends SvrProcess {
|
|||
// Get Format & Data
|
||||
|
||||
format = MPrintFormat.get(getCtx(), MPrintFormat.getPrintFormat_ID(
|
||||
"Manufacturing Order Workflow", 53027, getAD_Client_ID()),
|
||||
"Manufacturing Order Workflow", MPPOrder.Table_ID, getAD_Client_ID()),
|
||||
false);
|
||||
|
||||
format.setLanguage(language);
|
||||
|
@ -137,7 +141,7 @@ public class CompletePrintOrder extends SvrProcess {
|
|||
p_PP_Order_ID));
|
||||
|
||||
// Engine
|
||||
PrintInfo info = new PrintInfo("PP_Order", X_PP_Order.Table_ID,
|
||||
PrintInfo info = new PrintInfo("PP_Order", MPPOrder.Table_ID,
|
||||
getRecord_ID());
|
||||
ReportEngine re = new ReportEngine(getCtx(), format, query, info);
|
||||
// new Viewer(re);
|
||||
|
|
Loading…
Reference in New Issue