Search in sources :

Example 1 with ProcessInfoParameter

use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.

the class CreateViewColumn method prepare.

/**
	 * Get Parameters
	 */
protected void prepare() {
    p_Record_ID = getRecord_ID();
    ProcessInfoParameter[] parameters = getParameter();
    for (ProcessInfoParameter para : parameters) {
        String name = para.getParameterName();
        if (para.getParameter() == null)
            ;
        else
            log.log(Level.SEVERE, "Unknown Parameter: " + name);
    }
}
Also used : ProcessInfoParameter(org.compiere.process.ProcessInfoParameter)

Example 2 with ProcessInfoParameter

use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.

the class BrowseCopyFrom method prepare.

/**
	 * Get Parameters
	 */
protected void prepare() {
    p_Record_ID = getRecord_ID();
    ProcessInfoParameter[] parameters = getParameter();
    for (ProcessInfoParameter para : parameters) {
        String name = para.getParameterName();
        if (para.getParameter() == null)
            ;
        if (MBrowse.COLUMNNAME_AD_Browse_ID.equals(para.getParameterName()))
            p_AD_Browse_ID = para.getParameterAsInt();
        else
            log.log(Level.SEVERE, "Unknown Parameter: " + name);
    }
}
Also used : ProcessInfoParameter(org.compiere.process.ProcessInfoParameter)

Example 3 with ProcessInfoParameter

use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.

the class CreatePeriods method prepare.

/**
	 * Prepare
	 */
protected void prepare() {
    for (ProcessInfoParameter para : getParameter()) {
        String name = para.getParameterName();
        if (para.getParameter() == null)
            ;
        else if (name.equals("StartDate"))
            p_StartDate = (Timestamp) para.getParameter();
        else if (name.equals("NoPeriods"))
            p_NoPeriods = para.getParameterAsInt();
        else if (name.equals("DateFormat"))
            p_DateFormat = (String) para.getParameter();
        else
            log.log(Level.SEVERE, "Unknown Parameter: " + name);
    }
    p_M_PeriodDefinition_ID = getRecord_ID();
}
Also used : ProcessInfoParameter(org.compiere.process.ProcessInfoParameter)

Example 4 with ProcessInfoParameter

use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.

the class CreateProductPlanning method prepare.

/**
	 * Prepare - e.g., get Parameters.
	 */
protected void prepare() {
    for (ProcessInfoParameter para : getParameter()) {
        String name = para.getParameterName();
        if (para.getParameter() == null)
            ;
        else if (MProduct.COLUMNNAME_M_Product_Category_ID.equals(name))
            productCategoryId = para.getParameterAsInt();
        else if (MPPProductPlanning.COLUMNNAME_M_Warehouse_ID.equals(name))
            warehouseId = para.getParameterAsInt();
        else if (MPPProductPlanning.COLUMNNAME_S_Resource_ID.equals(name))
            resourceId = para.getParameterAsInt();
        else if (MPPProductPlanning.COLUMNNAME_IsCreatePlan.equals(name))
            createPlan = para.getParameterAsBoolean();
        else if (MPPProductPlanning.COLUMNNAME_IsMPS.equals(name))
            isMPS = para.getParameterAsBoolean();
        else if (MPPProductPlanning.COLUMNNAME_DD_NetworkDistribution_ID.equals(name))
            networkDistributionId = para.getParameterAsInt();
        else if (MPPProductPlanning.COLUMNNAME_AD_Workflow_ID.equals(name))
            workflowId = para.getParameterAsInt();
        else if (MPPProductPlanning.COLUMNNAME_TimeFence.equals(name))
            timeFence = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_TransferTime.equals(name))
            transferTime = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_SafetyStock.equals(name))
            safetyStock = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Order_Min.equals(name))
            orderMin = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Order_Max.equals(name))
            orderMax = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Order_Pack.equals(name))
            orderPack = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Order_Qty.equals(name))
            orderQty = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_WorkingTime.equals(name))
            workingTime = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Yield.equals(name))
            yield = para.getParameterAsInt();
        else if (MPPProductPlanning.COLUMNNAME_DeliveryTime_Promised.equals(name))
            deliveryTimePromised = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Order_Period.equals(name))
            orderPeriod = para.getParameterAsBigDecimal();
        else if (MPPProductPlanning.COLUMNNAME_Order_Policy.equals(name))
            orderPolicy = para.getParameterAsString();
        else if (MPPProductPlanning.COLUMNNAME_Planner_ID.equals(name))
            plannerId = para.getParameterAsInt();
        else
            log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
    }
    clientId = Env.getAD_Client_ID(getCtx());
    if (warehouseId > 0) {
        MWarehouse warehouse = MWarehouse.get(getCtx(), warehouseId);
        orgId = warehouse.getAD_Org_ID();
    }
}
Also used : ProcessInfoParameter(org.compiere.process.ProcessInfoParameter) MWarehouse(org.compiere.model.MWarehouse)

Example 5 with ProcessInfoParameter

use of org.compiere.process.ProcessInfoParameter in project adempiere by adempiere.

the class InvoicePrint method prepare.

/**
	 *  Prepare - e.g., get Parameters.
	 */
protected void prepare() {
    ProcessInfoParameter[] para = getParameter();
    for (int i = 0; i < para.length; i++) {
        String name = para[i].getParameterName();
        if (para[i].getParameter() == null)
            ;
        else if (name.equals("DateInvoiced")) {
            m_dateInvoiced_From = ((Timestamp) para[i].getParameter());
            m_dateInvoiced_To = ((Timestamp) para[i].getParameter_To());
        } else if (name.equals("EMailPDF"))
            p_EMailPDF = "Y".equals(para[i].getParameter());
        else if (name.equals("R_MailText_ID"))
            p_R_MailText_ID = para[i].getParameterAsInt();
        else if (name.equals("C_BPartner_ID"))
            m_C_BPartner_ID = para[i].getParameterAsInt();
        else if (name.equals("C_Invoice_ID"))
            m_C_Invoice_ID = para[i].getParameterAsInt();
        else if (name.equals("DocumentNo")) {
            m_DocumentNo_From = (String) para[i].getParameter();
            m_DocumentNo_To = (String) para[i].getParameter_To();
        } else
            log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
    }
    if (m_DocumentNo_From != null && m_DocumentNo_From.length() == 0)
        m_DocumentNo_From = null;
    if (m_DocumentNo_To != null && m_DocumentNo_To.length() == 0)
        m_DocumentNo_To = null;
}
Also used : ProcessInfoParameter(org.compiere.process.ProcessInfoParameter) org.compiere.print(org.compiere.print)

Aggregations

ProcessInfoParameter (org.compiere.process.ProcessInfoParameter)26 Timestamp (java.sql.Timestamp)4 ProcessInfo (org.compiere.process.ProcessInfo)3 BigDecimal (java.math.BigDecimal)2 AdempiereException (org.adempiere.exceptions.AdempiereException)2 Trx (org.compiere.util.Trx)2 PrinterJob (java.awt.print.PrinterJob)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1 Field (java.lang.reflect.Field)1 MalformedURLException (java.net.MalformedURLException)1 CallableStatement (java.sql.CallableStatement)1 Connection (java.sql.Connection)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Locale (java.util.Locale)1 PropertyResourceBundle (java.util.PropertyResourceBundle)1 Vector (java.util.Vector)1