[ adempiere-Feature Requests-2065395 ] Implement New Document when create a new Client

https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2065395&group_id=176962
This commit is contained in:
vpj-cd 2008-08-21 18:43:27 +00:00
parent 4a362a08c6
commit dd0a3bdce7
7 changed files with 263 additions and 137 deletions

View File

@ -80,19 +80,6 @@ public interface I_C_DocType
*/
public int getC_DocTypeDifference_ID();
/** Column name C_DocType_ID */
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
/** Set Document Type.
* Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID);
/** Get Document Type.
* Document type or rules
*/
public int getC_DocType_ID();
/** Column name C_DocTypeInvoice_ID */
public static final String COLUMNNAME_C_DocTypeInvoice_ID = "C_DocTypeInvoice_ID";
@ -132,6 +119,19 @@ public interface I_C_DocType
*/
public int getC_DocTypeShipment_ID();
/** Column name C_DocType_ID */
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
/** Set Document Type.
* Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID);
/** Get Document Type.
* Document type or rules
*/
public int getC_DocType_ID();
/** Column name DefiniteSequence_ID */
public static final String COLUMNNAME_DefiniteSequence_ID = "DefiniteSequence_ID";
@ -312,19 +312,6 @@ public interface I_C_DocType
*/
public boolean isDocNoControlled();
/** Column name IsIndexed */
public static final String COLUMNNAME_IsIndexed = "IsIndexed";
/** Set Indexed.
* Index the document for the internal search engine
*/
public void setIsIndexed (boolean IsIndexed);
/** Get Indexed.
* Index the document for the internal search engine
*/
public boolean isIndexed();
/** Column name IsInTransit */
public static final String COLUMNNAME_IsInTransit = "IsInTransit";
@ -338,6 +325,19 @@ public interface I_C_DocType
*/
public boolean isInTransit();
/** Column name IsIndexed */
public static final String COLUMNNAME_IsIndexed = "IsIndexed";
/** Set Indexed.
* Index the document for the internal search engine
*/
public void setIsIndexed (boolean IsIndexed);
/** Get Indexed.
* Index the document for the internal search engine
*/
public boolean isIndexed();
/** Column name IsOverwriteDateOnComplete */
public static final String COLUMNNAME_IsOverwriteDateOnComplete = "IsOverwriteDateOnComplete";
@ -369,19 +369,6 @@ public interface I_C_DocType
*/
public boolean isPickQAConfirm();
/** Column name IsShipConfirm */
public static final String COLUMNNAME_IsShipConfirm = "IsShipConfirm";
/** Set Ship/Receipt Confirmation.
* Require Ship or Receipt Confirmation before processing
*/
public void setIsShipConfirm (boolean IsShipConfirm);
/** Get Ship/Receipt Confirmation.
* Require Ship or Receipt Confirmation before processing
*/
public boolean isShipConfirm();
/** Column name IsSOTrx */
public static final String COLUMNNAME_IsSOTrx = "IsSOTrx";
@ -395,6 +382,19 @@ public interface I_C_DocType
*/
public boolean isSOTrx();
/** Column name IsShipConfirm */
public static final String COLUMNNAME_IsShipConfirm = "IsShipConfirm";
/** Set Ship/Receipt Confirmation.
* Require Ship or Receipt Confirmation before processing
*/
public void setIsShipConfirm (boolean IsShipConfirm);
/** Get Ship/Receipt Confirmation.
* Require Ship or Receipt Confirmation before processing
*/
public boolean isShipConfirm();
/** Column name IsSplitWhenDifference */
public static final String COLUMNNAME_IsSplitWhenDifference = "IsSplitWhenDifference";

View File

@ -571,6 +571,9 @@ public final class MSetup
int GL_API = createGLCategory("AP Invoice", MGLCategory.CATEGORYTYPE_Document, false);
int GL_APP = createGLCategory("AP Payment", MGLCategory.CATEGORYTYPE_Document, false);
int GL_CASH = createGLCategory("Cash/Payments", MGLCategory.CATEGORYTYPE_Document, false);
int GL_Manufacturing = createGLCategory("Manufactuing", MGLCategory.CATEGORYTYPE_Document, false);
int GL_Distribution = createGLCategory("Distribution", MGLCategory.CATEGORYTYPE_Document, false);
int GL_Payroll = createGLCategory("Payroll", MGLCategory.CATEGORYTYPE_Document, false);
// Base DocumentTypes
int ii = createDocType("GL Journal", Msg.getElement(m_ctx, "GL_Journal_ID"),
@ -667,6 +670,46 @@ public final class MSetup
createDocType("Warehouse Order", "Order Confirmation",
MDocType.DOCBASETYPE_SalesOrder, MDocType.DOCSUBTYPESO_WarehouseOrder,
DT_S, DT_I, 70000, GL_None); // LS
//Manufacturing Document
createDocType("Manufacturing Order", "Manufacturing Order",
MDocType.DOCBASETYPE_ManufacturingOrder, null,
0, 0, 80000, GL_Manufacturing);
createDocType("Manufacturing Order Planning","Order Planning",
MDocType.DOCBASETYPE_ManufacturingOrder, null,
0, 0, 81000, GL_Manufacturing);
createDocType("Manufacturing Order Receipt", "Order Receipt",
MDocType.DOCBASETYPE_ManufacturingOrderReceipt, null,
0, 0, 82000, GL_Manufacturing);
createDocType("Manufacturing Order Issue","Order Issue",
MDocType.DOCBASETYPE_ManufacturingOrderIssue, null,
0, 0, 83000, GL_Manufacturing);
createDocType("Manufacturing Order Method Variance", "Method Variance",
MDocType.DOCBASETYPE_ManufacturingOrderMethodVariance, null,
0, 0, 84000, GL_Manufacturing);
createDocType("Manufacturing Order Use Variance", "Use Variance",
MDocType.DOCBASETYPE_ManufacturingOrderUseVariance, null,
0, 0, 84100, GL_Manufacturing);
createDocType("Manufaturing Order Rate Variance","Rate Variance",
MDocType.DOCBASETYPE_ManufacturingOrderRateVariance, null,
0, 0, 84200, GL_Manufacturing);
createDocType("Manufaturing Order Rate Variance","Rate Variance",
MDocType.DOCBASETYPE_ManufacturingOperationActivity, null,
0, 0, 85000, GL_Manufacturing);
createDocType("Maintenance Order","Maintenance Order",
MDocType.DOCBASETYPE_MaintenanceOrder, null,
0, 0, 86000, GL_Manufacturing);
createDocType("Quality Order","Quality Order",
MDocType.DOCBASETYPE_QualityOrder, null,
0, 0, 87000, GL_Manufacturing);
createDocType("Distribution Order","Distribution Orde",
MDocType.DOCBASETYPE_DistributionOrder, null,
0, 0, 88000, GL_Distribution);
//Payroll
createDocType("Payroll","Payroll",
MDocType.DOCBASETYPE_Payroll, null,
0, 0, 90000, GL_Payroll);
int DT = createDocType("POS Order", "Order Confirmation",
MDocType.DOCBASETYPE_SalesOrder, MDocType.DOCSUBTYPESO_POSOrder,
DT_SI, DT_II, 80000, GL_None); // Bar

View File

@ -52,11 +52,11 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
setIsDefaultCounterDoc (false);
setIsDocNoControlled (true);
// Y
setIsIndexed (false);
setIsInTransit (false);
setIsIndexed (false);
setIsPickQAConfirm (false);
setIsShipConfirm (false);
setIsSOTrx (false);
setIsShipConfirm (false);
setIsSplitWhenDifference (false);
// N
setName (null);
@ -156,28 +156,6 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
return ii.intValue();
}
/** Set Document Type.
@param C_DocType_ID
Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID)
{
if (C_DocType_ID < 0)
throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
}
/** Get Document Type.
@return Document type or rules
*/
public int getC_DocType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** C_DocTypeInvoice_ID AD_Reference_ID=170 */
public static final int C_DOCTYPEINVOICE_ID_AD_Reference_ID=170;
/** Set Document Type for Invoice.
@ -253,6 +231,28 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
return ii.intValue();
}
/** Set Document Type.
@param C_DocType_ID
Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID)
{
if (C_DocType_ID < 0)
throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
}
/** Get Document Type.
@return Document type or rules
*/
public int getC_DocType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** DefiniteSequence_ID AD_Reference_ID=128 */
public static final int DEFINITESEQUENCE_ID_AD_Reference_ID=128;
/** Set Definite Sequence.
@ -346,16 +346,16 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
public static final String DOCBASETYPE_MaintenanceOrder = "MOF";
/** Manufacturing Order Issue = MOI */
public static final String DOCBASETYPE_ManufacturingOrderIssue = "MOI";
/** Manufacturing Order Method Variation = MOM */
public static final String DOCBASETYPE_ManufacturingOrderMethodVariation = "MOM";
/** Manufacturing Order Method Variance = MOM */
public static final String DOCBASETYPE_ManufacturingOrderMethodVariance = "MOM";
/** Manufacturing Order = MOP */
public static final String DOCBASETYPE_ManufacturingOrder = "MOP";
/** Manufacturing Order Receipt = MOR */
public static final String DOCBASETYPE_ManufacturingOrderReceipt = "MOR";
/** Manufacturing Order Use Variation = MOU */
public static final String DOCBASETYPE_ManufacturingOrderUseVariation = "MOU";
/** Manufacturing Order Rate Variation = MOV */
public static final String DOCBASETYPE_ManufacturingOrderRateVariation = "MOV";
/** Manufacturing Order Use Variance = MOU */
public static final String DOCBASETYPE_ManufacturingOrderUseVariance = "MOU";
/** Manufacturing Order Rate Variance = MOV */
public static final String DOCBASETYPE_ManufacturingOrderRateVariance = "MOV";
/** Quality Order = MQO */
public static final String DOCBASETYPE_QualityOrder = "MQO";
/** Payroll = HRP */
@ -660,30 +660,6 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
return false;
}
/** Set Indexed.
@param IsIndexed
Index the document for the internal search engine
*/
public void setIsIndexed (boolean IsIndexed)
{
set_Value (COLUMNNAME_IsIndexed, Boolean.valueOf(IsIndexed));
}
/** Get Indexed.
@return Index the document for the internal search engine
*/
public boolean isIndexed ()
{
Object oo = get_Value(COLUMNNAME_IsIndexed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set In Transit.
@param IsInTransit
Movement is in transit
@ -708,6 +684,30 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
return false;
}
/** Set Indexed.
@param IsIndexed
Index the document for the internal search engine
*/
public void setIsIndexed (boolean IsIndexed)
{
set_Value (COLUMNNAME_IsIndexed, Boolean.valueOf(IsIndexed));
}
/** Get Indexed.
@return Index the document for the internal search engine
*/
public boolean isIndexed ()
{
Object oo = get_Value(COLUMNNAME_IsIndexed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite Date on Complete.
@param IsOverwriteDateOnComplete Overwrite Date on Complete */
public void setIsOverwriteDateOnComplete (boolean IsOverwriteDateOnComplete)
@ -774,30 +774,6 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
return false;
}
/** Set Ship/Receipt Confirmation.
@param IsShipConfirm
Require Ship or Receipt Confirmation before processing
*/
public void setIsShipConfirm (boolean IsShipConfirm)
{
set_Value (COLUMNNAME_IsShipConfirm, Boolean.valueOf(IsShipConfirm));
}
/** Get Ship/Receipt Confirmation.
@return Require Ship or Receipt Confirmation before processing
*/
public boolean isShipConfirm ()
{
Object oo = get_Value(COLUMNNAME_IsShipConfirm);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Sales Transaction.
@param IsSOTrx
This is a Sales Transaction
@ -822,6 +798,30 @@ public class X_C_DocType extends PO implements I_C_DocType, I_Persistent
return false;
}
/** Set Ship/Receipt Confirmation.
@param IsShipConfirm
Require Ship or Receipt Confirmation before processing
*/
public void setIsShipConfirm (boolean IsShipConfirm)
{
set_Value (COLUMNNAME_IsShipConfirm, Boolean.valueOf(IsShipConfirm));
}
/** Get Ship/Receipt Confirmation.
@return Require Ship or Receipt Confirmation before processing
*/
public boolean isShipConfirm ()
{
Object oo = get_Value(COLUMNNAME_IsShipConfirm);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Split when Difference.
@param IsSplitWhenDifference
Split document when there is a difference

View File

@ -42,25 +42,48 @@ public class CreateDocType extends SvrProcess
//MClient c = (MClient)po;
Properties m_ctx = Env.getCtx();
trxname = get_TrxName();
int GL_M = createGLCategory("Manufactuing ", MGLCategory.CATEGORYTYPE_Document, false);
createDocType("Maintenacne Order", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_MaintenanceOrder, null, 0, 0, 910000, GL_M);
createDocType("Manufacturing Order Issue", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrderIssue, null, 0, 0, 920000, GL_M);
createDocType("Manufacturing Order Method Variation", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrderMethodVariation, null, 0, 0, 930000, GL_M);
createDocType("Manufacturing Order", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrder, null, 0, 0, 940000, GL_M);
createDocType("Manufacturing Order Planning", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrder, null, 0, 0, 950000, GL_M);
createDocType("Manufacturing Order Receipt", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrderReceipt, null, 0, 0, 960000, GL_M);
createDocType("Manufacturing Order Use Variation", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrderUseVariation, null, 0, 0, 970000, GL_M);
createDocType("Manufaturing Order Rate Variation", Msg.getElement(m_ctx, "MPC_Order_ID", false),
X_C_DocType.DOCBASETYPE_ManufacturingOrderRateVariation, null, 0, 0, 980000, GL_M);
createDocType("Distribution Order", Msg.getElement(m_ctx, "DD_Order_ID", false),
X_C_DocType.DOCBASETYPE_DistributionOrder, null, 0, 0, 990000, GL_M);
//Manufacturing Document
int GL_Manufacturing = createGLCategory("Manufactuing", MGLCategory.CATEGORYTYPE_Document, false);
int GL_Distribution = createGLCategory("Distribution", MGLCategory.CATEGORYTYPE_Document, false);
int GL_Payroll = createGLCategory("Payroll", MGLCategory.CATEGORYTYPE_Document, false);
createDocType("Manufacturing Order", "Manufacturing Order",
MDocType.DOCBASETYPE_ManufacturingOrder, null,
0, 0, 80000, GL_Manufacturing);
createDocType("Manufacturing Order Planning","Order Planning",
MDocType.DOCBASETYPE_ManufacturingOrder, null,
0, 0, 81000, GL_Manufacturing);
createDocType("Manufacturing Order Receipt", "Order Receipt",
MDocType.DOCBASETYPE_ManufacturingOrderReceipt, null,
0, 0, 82000, GL_Manufacturing);
createDocType("Manufacturing Order Issue","Order Issue",
MDocType.DOCBASETYPE_ManufacturingOrderIssue, null,
0, 0, 83000, GL_Manufacturing);
createDocType("Manufacturing Order Method Variance", "Method Variance",
MDocType.DOCBASETYPE_ManufacturingOrderMethodVariance, null,
0, 0, 84000, GL_Manufacturing);
createDocType("Manufacturing Order Use Variance", "Use Variance",
MDocType.DOCBASETYPE_ManufacturingOrderUseVariance, null,
0, 0, 84100, GL_Manufacturing);
createDocType("Manufaturing Order Rate Variance","Rate Variance",
MDocType.DOCBASETYPE_ManufacturingOrderRateVariance, null,
0, 0, 84200, GL_Manufacturing);
createDocType("Manufaturing Order Rate Variance","Rate Variance",
MDocType.DOCBASETYPE_ManufacturingOperationActivity, null,
0, 0, 85000, GL_Manufacturing);
createDocType("Maintenance Order","Maintenance Order",
MDocType.DOCBASETYPE_MaintenanceOrder, null,
0, 0, 86000, GL_Manufacturing);
createDocType("Quality Order","Quality Order",
MDocType.DOCBASETYPE_QualityOrder, null,
0, 0, 87000, GL_Manufacturing);
createDocType("Distribution Order","Distribution Orde",
MDocType.DOCBASETYPE_DistributionOrder, null,
0, 0, 88000, GL_Distribution);
//Payroll
createDocType("Payroll","Payroll",
MDocType.DOCBASETYPE_Payroll, null,
0, 0, 90000, GL_Payroll);
return "ok";
}

View File

@ -1230,7 +1230,7 @@ public class VOrderReceiptIssue extends CPanel implements FormPanel,
if (PP_orderbomLine.getQtyBatch().compareTo(Env.ZERO) == 0
&& PP_orderbomLine.getQtyBOM().compareTo(Env.ZERO) == 0) {
// Method Variance
int C_DocType_ID = getDocType(X_C_DocType.DOCBASETYPE_ManufacturingOrderMethodVariation);
int C_DocType_ID = getDocType(X_C_DocType.DOCBASETYPE_ManufacturingOrderMethodVariance);
if (issue.compareTo(Env.ZERO) > 0
|| qtyscrap.compareTo(Env.ZERO) > 0
|| qtyreject.compareTo(Env.ZERO) > 0)

View File

@ -0,0 +1,30 @@
-- Aug 21, 2008 12:18:36 PM CDT
-- Implementing new document
UPDATE AD_Ref_List SET Name='Manufacturing Order Method Variance ',Updated=TO_DATE('2008-08-21 12:18:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53234
;
-- Aug 21, 2008 12:18:36 PM CDT
-- Implementing new document
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53234
;
-- Aug 21, 2008 12:18:46 PM CDT
-- Implementing new document
UPDATE AD_Ref_List SET Name='Manufacturing Order Use Variance ',Updated=TO_DATE('2008-08-21 12:18:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53237
;
-- Aug 21, 2008 12:18:46 PM CDT
-- Implementing new document
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53237
;
-- Aug 21, 2008 12:18:54 PM CDT
-- Implementing new document
UPDATE AD_Ref_List SET Name='Manufacturing Order Rate Variance',Updated=TO_DATE('2008-08-21 12:18:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53238
;
-- Aug 21, 2008 12:18:54 PM CDT
-- Implementing new document
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53238
;

View File

@ -0,0 +1,30 @@
-- Aug 21, 2008 12:18:36 PM CDT
-- Implementing new document
UPDATE AD_Ref_List SET Name='Manufacturing Order Method Variance ',Updated=TO_TIMESTAMP('2008-08-21 12:18:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53234
;
-- Aug 21, 2008 12:18:36 PM CDT
-- Implementing new document
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53234
;
-- Aug 21, 2008 12:18:46 PM CDT
-- Implementing new document
UPDATE AD_Ref_List SET Name='Manufacturing Order Use Variance ',Updated=TO_TIMESTAMP('2008-08-21 12:18:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53237
;
-- Aug 21, 2008 12:18:46 PM CDT
-- Implementing new document
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53237
;
-- Aug 21, 2008 12:18:54 PM CDT
-- Implementing new document
UPDATE AD_Ref_List SET Name='Manufacturing Order Rate Variance',Updated=TO_TIMESTAMP('2008-08-21 12:18:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53238
;
-- Aug 21, 2008 12:18:54 PM CDT
-- Implementing new document
UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53238
;