use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.
the class ZkReportViewerProvider method openViewer.
public void openViewer(ReportEngine report) {
if (report.getPrintInfo().getAD_Process_ID() == 202 && MSysConfig.getBooleanValue("SMART_REPORT", Boolean.FALSE)) {
ProcessInfo processInfo = report.getProcessInfo();
MReport m_report = new MReport(report.getCtx(), processInfo.getRecord_ID(), processInfo.getTransactionName());
ProcessInfoParameter[] pi = processInfo.getParameter();
// Goodwill BF: report title is taken wrongly from other report if report line set is shared
// - passing PA_Report_ID instead of PA_ReportLineSet_ID
Window smjviewer = new SMJReportViewer(processInfo.getAD_PInstance_ID(), processInfo.getTransactionName(), m_report.getPA_Report_ID(), pi[0].getParameterAsInt(), report.getPrintFormat().getAD_PrintFont_ID(), m_report.getColumnSet().getColumns());
smjviewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
smjviewer.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT);
SessionManager.getAppDesktop().showWindow(smjviewer);
} else {
Window viewer = new ZkReportViewer(report, report.getName());
viewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);
viewer.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT);
SessionManager.getAppDesktop().showWindow(viewer);
}
}
use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.
the class CashFlow method prepare.
protected void prepare() {
for (ProcessInfoParameter para : getParameter()) {
log.config("prepare - " + para);
String name = para.getParameterName();
if (para.getParameter() == null)
;
else if (name.equals("DueDate"))
p_DueDate = (Timestamp) para.getParameter();
else if (name.equals("C_Currency_ID"))
p_C_Currency_ID = ((BigDecimal) para.getParameter()).intValue();
else if (name.equals("C_BP_Group_ID"))
p_C_BP_Group_ID = ((BigDecimal) para.getParameter()).intValue();
else if (name.equals("C_BPartner_ID"))
p_C_BPartner_ID = ((BigDecimal) para.getParameter()).intValue();
else if (name.equals("IsIncludeOrders"))
p_IsIncludeOrders = "Y".equals(para.getParameter());
else if (name.equals("IsIncludeCashflows"))
p_IsIncludeCashFlows = "Y".equals(para.getParameter());
else if (name.equals("IsIncludeInvoices"))
p_IsIncludeInvoices = "Y".equals(para.getParameter());
else if (name.equals("IsIncludeBankBalances"))
p_IsIncludeBankBalance = "Y".equals(para.getParameter());
else
log.config("prepare - Unknown Parameter: " + name);
}
if (p_DueDate == null)
p_DueDate = new Timestamp(System.currentTimeMillis());
}
use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.
the class GenerateSalesHistory method prepare.
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare() {
for (ProcessInfoParameter para : getParameter()) {
String name = para.getParameterName();
if (para.getParameter() == null)
;
else if (name.equals(I_C_SalesHistory.COLUMNNAME_AD_Org_ID))
p_AD_Org_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_DateInvoiced)) {
p_DateInvoicedFrom = (Timestamp) para.getParameter();
p_DateInvoicedTo = (Timestamp) para.getParameter_To();
} else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_BPartner_ID))
p_C_BPartner_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_BP_Group_ID))
p_C_BP_Group_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_BPartner_Location_ID))
p_C_BPartner_Location_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_M_Product_ID))
p_M_Product_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_M_Product_Category_ID))
p_M_Product_Category_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_M_Product_Classification_ID))
p_M_Product_Classification_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_M_Product_Class_ID))
p_M_Product_Class_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_M_Product_Group_ID))
p_M_Product_Group_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_M_Warehouse_ID))
p_M_Warehouse_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_Campaign_ID))
p_C_Campaign_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_SalesRegion_ID))
p_C_SalesRegion_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_Project_ID))
p_C_Project_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_C_Activity_ID))
p_C_Activity_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_User1_ID))
p_User1_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_User2_ID))
p_User2_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_User3_ID))
p_User3_ID = para.getParameterAsInt();
else if (name.equals(I_C_SalesHistory.COLUMNNAME_User4_ID))
p_User4_ID = para.getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
}
use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.
the class MRP method prepare.
protected void prepare() {
for (ProcessInfoParameter para : getParameter()) {
String name = para.getParameterName();
if (para.getParameter() == null)
;
else if (name.equals("AD_Org_ID"))
p_AD_Org_ID = para.getParameterAsInt();
else if (name.equals("M_Warehouse_ID"))
p_M_Warehouse_ID = para.getParameterAsInt();
else if (name.equals("S_Resource_ID"))
p_S_Resource_ID = para.getParameterAsInt();
else if (name.equals("Synchronize"))
p_IsSynchronize = para.getParameterAsBoolean();
else if (name.equals("IsMPS"))
p_IsMPS = para.getParameterAsBoolean();
else if (name.equals("IsRequiredMRP"))
p_IsMRP = para.getParameterAsBoolean();
else if (name.equals("IsRequiredDRP"))
p_IsDRP = para.getParameterAsBoolean();
else if (name.equals("IsBOM"))
p_IsMfg = para.getParameterAsBoolean();
else if (name.equals("IsPurchased"))
p_IsPur = para.getParameterAsBoolean();
else if (name.equals("LowLevel"))
p_IsLowLevel = para.getParameterAsBoolean();
else if (name.equals("Planner_ID"))
p_Planner_ID = para.getParameterAsInt();
else if (name.equals("C_BPartner_ID"))
p_C_BPartner_ID = para.getParameterAsInt();
else if (name.equals("M_Product_ID"))
p_M_Product_ID = para.getParameterAsInt();
else if (name.equals("M_Produc_Category_ID"))
p_M_Product_Category_ID = para.getParameterAsInt();
else if (name.equals("Version"))
p_Version = (String) para.getParameter();
else
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
}
//Regenerative Material Plan process
int AD_Process_ID = getProcessInfo().getAD_Process_ID();
if (AD_Process_ID == 53016) {
EXECUTION_MODE = MRP_Regenerative;
p_IsMRP = false;
if (isSynchronize())
p_IsDRP = false;
}
//Net Change Material Plan
if (AD_Process_ID == 53320) {
EXECUTION_MODE = MRP_Net_Change;
p_IsMRP = true;
if (isSynchronize())
p_IsDRP = true;
}
//Selective Material Plan process
if (AD_Process_ID == 53313)
EXECUTION_MODE = MRP_Selective;
// DRP Distribution Plan
if (AD_Process_ID == 53022) {
EXECUTION_MODE = MPR_DRP;
p_IsSynchronize = true;
p_IsDRP = true;
}
}
use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.
the class CompletePrintOrder method prepare.
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare() {
for (ProcessInfoParameter para : getParameter()) {
String name = para.getParameterName();
if (para.getParameter() == null)
;
else if (name.equals("PP_Order_ID"))
p_PP_Order_ID = para.getParameterAsInt();
else if (name.equals("IsPrintPickList"))
p_IsPrintPickList = para.getParameterAsBoolean();
else if (name.equals("IsPrintWorkflow"))
p_IsPrintWorkflow = para.getParameterAsBoolean();
else if (name.equals("IsPrintPackingList"))
p_IsPrintPackList = para.getParameterAsBoolean();
else if (name.equals("IsComplete"))
p_IsComplete = para.getParameterAsBoolean();
else
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
}
}
Aggregations