IDEMPIERE-6335 - Create parameter to specify document type in material receipt (#2581)

* IDEMPIERE-6335 - Create parameter to specify document type in material receipt

* IDEMPIERE-6335 - Adjust to use centralized ID management

* IDEMPIERE-6335 - apply the patch
This commit is contained in:
Vitor Villa 2024-12-11 18:45:23 -03:00 committed by Carlos Ruiz
parent aebedaee28
commit 2ea4730458
3 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,10 @@
-- IDEMPIERE-6335
SELECT register_migration_script('202412101102_IDEMPIERE-6335.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Dec 10, 2024, 11:06:45 AM BRT
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,AD_Val_Rule_ID,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete,DateRangeOption,IsShowNegateButton) VALUES (200484,0,0,'Y',TO_TIMESTAMP('2024-12-10 11:06:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2024-12-10 11:06:44','YYYY-MM-DD HH24:MI:SS'),100,'Document Type','Document type or rules','The Document Type determines document sequence and processing rules',142,20,19,'N',52054,0,'N','C_DocType_ID','Y','D',196,'2b9ac743-0893-474a-aa96-c1eafe8fba86','N','N','D','N')
;

View File

@ -0,0 +1,7 @@
-- IDEMPIERE-6335
SELECT register_migration_script('202412101102_IDEMPIERE-6335.sql') FROM dual;
-- Dec 10, 2024, 11:06:45 AM BRT
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,AD_Val_Rule_ID,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete,DateRangeOption,IsShowNegateButton) VALUES (200484,0,0,'Y',TO_TIMESTAMP('2024-12-10 11:06:44','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2024-12-10 11:06:44','YYYY-MM-DD HH24:MI:SS'),100,'Document Type','Document type or rules','The Document Type determines document sequence and processing rules',142,20,19,'N',52054,0,'N','C_DocType_ID','Y','D',196,'2b9ac743-0893-474a-aa96-c1eafe8fba86','N','N','D','N')
;

View File

@ -42,6 +42,7 @@ import org.compiere.util.Env;
public class InvoiceCreateInOut extends SvrProcess
{
public static final String PARAM_M_Warehouse_ID = MInOut.COLUMNNAME_M_Warehouse_ID;
public static final String PARAM_C_DocType_ID = MInOut.COLUMNNAME_C_DocType_ID;
/** Warehouse */
private int p_M_Warehouse_ID = 0;
@ -49,7 +50,9 @@ public class InvoiceCreateInOut extends SvrProcess
private int p_C_Invoice_ID = 0;
/** Receipt */
private MInOut m_inout = null;
/** Document Type */
private int p_C_DocType_ID = 0;
/**
* Prepare - e.g., get Parameters.
*/
@ -62,6 +65,8 @@ public class InvoiceCreateInOut extends SvrProcess
;
else if (name.equals(PARAM_M_Warehouse_ID))
p_M_Warehouse_ID = para.getParameterAsInt();
else if (name.equals(PARAM_C_DocType_ID))
p_C_DocType_ID = para.getParameterAsInt();
else
MProcessPara.validateUnknownParameter(getProcessInfo().getAD_Process_ID(), para);
}
@ -110,6 +115,8 @@ public class InvoiceCreateInOut extends SvrProcess
if (m_inout != null)
return m_inout;
m_inout = new MInOut (invoice, 0, null, p_M_Warehouse_ID);
if (p_C_DocType_ID != 0)
m_inout.setC_DocType_ID(p_C_DocType_ID);
m_inout.saveEx();
return m_inout;
}