Package org.compiere.model
Class MDocType
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_C_DocType
org.compiere.model.MDocType
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_C_DocType
,I_Persistent
,Evaluatee
,ImmutablePOSupport
Document Type Model
- Version:
- $Id: MDocType.java,v 1.3 2006/07/30 00:54:54 jjanke Exp $
- Author:
- Jorg Janke, Karsten Thiemann FR [ 1782412 ], Teo Sarca, www.arhipac.ro
- BF [ 2476824 ] MDocType.getOfDocBaseType should return ONLY active records
- BF [ - ] MDocType.getOfClient should return ONLY active records. See https://sourceforge.net/forum/message.php?msg_id=6499893
- See Also:
-
Field Summary
Fields inherited from class org.compiere.model.X_C_DocType
DOCBASETYPE_AD_Reference_ID, DOCBASETYPE_APCreditMemo, DOCBASETYPE_APInvoice, DOCBASETYPE_APPayment, DOCBASETYPE_ARCreditMemo, DOCBASETYPE_ARInvoice, DOCBASETYPE_ARProFormaInvoice, DOCBASETYPE_ARReceipt, DOCBASETYPE_BankStatement, DOCBASETYPE_CashJournal, DOCBASETYPE_DistributionOrder, DOCBASETYPE_FixedAssetsAddition, DOCBASETYPE_FixedAssetsDepreciation, DOCBASETYPE_FixedAssetsDisposal, DOCBASETYPE_GLDocument, DOCBASETYPE_GLJournal, DOCBASETYPE_MaintenanceOrder, DOCBASETYPE_ManufacturingCostCollector, DOCBASETYPE_ManufacturingOrder, DOCBASETYPE_MatchInvoice, DOCBASETYPE_MatchPO, DOCBASETYPE_MaterialDelivery, DOCBASETYPE_MaterialMovement, DOCBASETYPE_MaterialPhysicalInventory, DOCBASETYPE_MaterialProduction, DOCBASETYPE_MaterialReceipt, DOCBASETYPE_PaymentAllocation, DOCBASETYPE_Payroll, DOCBASETYPE_ProjectIssue, DOCBASETYPE_PurchaseOrder, DOCBASETYPE_PurchaseRequisition, DOCBASETYPE_QualityOrder, DOCBASETYPE_SalesOrder, DOCSUBTYPEINV_AD_Reference_ID, DOCSUBTYPEINV_CostAdjustment, DOCSUBTYPEINV_InternalUseInventory, DOCSUBTYPEINV_PhysicalInventory, DOCSUBTYPESO_AD_Reference_ID, DOCSUBTYPESO_OnCreditOrder, DOCSUBTYPESO_POSOrder, DOCSUBTYPESO_PrepayOrder, DOCSUBTYPESO_Proposal, DOCSUBTYPESO_Quotation, DOCSUBTYPESO_ReturnMaterial, DOCSUBTYPESO_StandardOrder, DOCSUBTYPESO_WarehouseOrder
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.compiere.model.I_C_DocType
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_PrintFormat_ID, COLUMNNAME_C_DocType_ID, COLUMNNAME_C_DocType_UU, COLUMNNAME_C_DocTypeDifference_ID, COLUMNNAME_C_DocTypeInvoice_ID, COLUMNNAME_C_DocTypeProforma_ID, COLUMNNAME_C_DocTypeShipment_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DefiniteSequence_ID, COLUMNNAME_Description, COLUMNNAME_DocBaseType, COLUMNNAME_DocNoSequence_ID, COLUMNNAME_DocSubTypeInv, COLUMNNAME_DocSubTypeSO, COLUMNNAME_DocumentCopies, COLUMNNAME_DocumentNote, COLUMNNAME_GL_Category_ID, COLUMNNAME_HasCharges, COLUMNNAME_HasProforma, COLUMNNAME_IsActive, COLUMNNAME_IsChargeOrProductMandatory, COLUMNNAME_IsCreateCounter, COLUMNNAME_IsDefault, COLUMNNAME_IsDefaultCounterDoc, COLUMNNAME_IsDocNoControlled, COLUMNNAME_IsIndexed, COLUMNNAME_IsInTransit, COLUMNNAME_IsNoPriceListCheck, COLUMNNAME_IsOverwriteDateOnComplete, COLUMNNAME_IsOverwriteSeqOnComplete, COLUMNNAME_IsPickQAConfirm, COLUMNNAME_IsPrepareSplitDocument, COLUMNNAME_IsShipConfirm, COLUMNNAME_IsSOTrx, COLUMNNAME_IsSplitWhenDifference, COLUMNNAME_Name, COLUMNNAME_PrintName, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMDocType
(Properties ctx, int C_DocType_ID, String trxName) Standard ConstructorMDocType
(Properties ctx, String C_DocType_UU, String trxName) UUID based ConstructorMDocType
(Properties ctx, String DocBaseType, String Name, String trxName) New MDocType ConstructorMDocType
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMDocType
(Properties ctx, MDocType copy) Copy constructorMDocType
(Properties ctx, MDocType copy, String trxName) Copy constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterSave
(boolean newRecord, boolean success) After Saveprotected boolean
Executed before Delete operation.protected boolean
beforeSave
(boolean newRecord) Before Savestatic MDocType
get
(int C_DocType_ID) Get Document Type (cached) (immutable)static MDocType
get
(Properties ctx, int C_DocType_ID) Get Document Type (cached) (immutable)static int
getDocType
(String DocBaseType) Return the first Doc Type for this BaseTypeGet translated doctype namestatic MDocType[]
getOfClient
(Properties ctx) Get Client Document Typesstatic MDocType[]
getOfDocBaseType
(Properties ctx, String DocBaseType) Get Client Document Type with DocBaseTypegetPrintName
(String AD_Language) Get Print Namestatic int
getShipmentReceiptDocType
(int docTypeId) Get shipment/receipt document type based on document type (docTypeId) providedboolean
isOffer()
Is this a Proposal or Quotationboolean
Is this a Proposal (Not binding)boolean
Is this a Quotation (Binding)mark PO as immutablevoid
Set Default GL Categoryvoid
Set IsSOTrx based on document base typetoString()
String RepresentationMethods inherited from class org.compiere.model.X_C_DocType
get_AccessLevel, getAD_PrintFormat, getAD_PrintFormat_ID, getC_DocType_ID, getC_DocType_UU, getC_DocTypeDifference, getC_DocTypeDifference_ID, getC_DocTypeInvoice, getC_DocTypeInvoice_ID, getC_DocTypeProforma, getC_DocTypeProforma_ID, getC_DocTypeShipment, getC_DocTypeShipment_ID, getDefiniteSequence, getDefiniteSequence_ID, getDescription, getDocBaseType, getDocNoSequence, getDocNoSequence_ID, getDocSubTypeInv, getDocSubTypeSO, getDocumentCopies, getDocumentNote, getGL_Category, getGL_Category_ID, getKeyNamePair, getName, getPrintName, initPO, isChargeOrProductMandatory, isCreateCounter, isDefault, isDefaultCounterDoc, isDocNoControlled, isHasCharges, isHasProforma, isIndexed, isInTransit, isNoPriceListCheck, isOverwriteDateOnComplete, isOverwriteSeqOnComplete, isPickQAConfirm, isPrepareSplitDocument, isShipConfirm, isSOTrx, isSplitWhenDifference, setAD_PrintFormat_ID, setC_DocType_ID, setC_DocType_UU, setC_DocTypeDifference_ID, setC_DocTypeInvoice_ID, setC_DocTypeProforma_ID, setC_DocTypeShipment_ID, setDefiniteSequence_ID, setDescription, setDocBaseType, setDocNoSequence_ID, setDocSubTypeInv, setDocSubTypeSO, setDocumentCopies, setDocumentNote, setGL_Category_ID, setHasCharges, setHasProforma, setIsChargeOrProductMandatory, setIsCreateCounter, setIsDefault, setIsDefaultCounterDoc, setIsDocNoControlled, setIsIndexed, setIsInTransit, setIsNoPriceListCheck, setIsOverwriteDateOnComplete, setIsOverwriteSeqOnComplete, setIsPickQAConfirm, setIsPrepareSplitDocument, setIsShipConfirm, setIsSOTrx, setIsSplitWhenDifference, setName, setPrintName
Methods inherited from class org.compiere.model.PO
afterDelete, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface org.compiere.model.I_C_DocType
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
Methods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MDocType
UUID based Constructor- Parameters:
ctx
- ContextC_DocType_UU
- UUID keytrxName
- Transaction
-
MDocType
Standard Constructor- Parameters:
ctx
- contextC_DocType_ID
- idtrxName
- transaction
-
MDocType
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MDocType
New MDocType Constructor- Parameters:
ctx
- contextDocBaseType
- document base typeName
- nametrxName
- transaction
-
MDocType
Copy constructor- Parameters:
copy
-
-
MDocType
Copy constructor- Parameters:
ctx
-copy
-
-
MDocType
Copy constructor- Parameters:
ctx
-copy
-trxName
-
-
-
Method Details
-
getDocType
Return the first Doc Type for this BaseType- Parameters:
DocBaseType
-- Returns:
- C_DocType_ID
-
getOfDocBaseType
Get Client Document Type with DocBaseType- Parameters:
ctx
- contextDocBaseType
- base document type- Returns:
- array of doc types
-
getOfClient
Get Client Document Types- Parameters:
ctx
- context- Returns:
- array of doc types
-
get
Get Document Type (cached) (immutable)- Parameters:
C_DocType_ID
- id- Returns:
- document type
-
get
Get Document Type (cached) (immutable)- Parameters:
ctx
- contextC_DocType_ID
- id- Returns:
- document type
-
setGL_Category_ID
public void setGL_Category_ID()Set Default GL Category -
setIsSOTrx
public void setIsSOTrx()Set IsSOTrx based on document base type -
toString
String Representation- Overrides:
toString
in classX_C_DocType
- Returns:
- info
-
isQuotation
public boolean isQuotation()Is this a Quotation (Binding)- Returns:
- true if Quotation
-
isProposal
public boolean isProposal()Is this a Proposal (Not binding)- Returns:
- true if proposal
-
isOffer
public boolean isOffer()Is this a Proposal or Quotation- Returns:
- true if proposal or quotation
-
getPrintName
Get Print Name- Parameters:
AD_Language
- language- Returns:
- print name if available translated
-
beforeSave
protected boolean beforeSave(boolean newRecord) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) After Save -
beforeDelete
protected boolean beforeDelete()Executed before Delete operation.- Overrides:
beforeDelete
in classPO
- Returns:
- true if delete is a success
-
getShipmentReceiptDocType
public static int getShipmentReceiptDocType(int docTypeId) Get shipment/receipt document type based on document type (docTypeId) provided- Parameters:
docTypeId
- order/rma/vendor return/return material- Returns:
- shipment/receipt doctype id
-
getNameTrl
Get translated doctype name- Returns:
- Name if available translated
-
markImmutable
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-