ERP/2.50/Developers Guide/Database Model/org.openbravo.model.common.enterprise/C DocType
C_DocType
The Document Definition Tab defines the processing parameters and controls for the document.
- Name:DocumentType
- Classname:DocumentType
This table contains the following columns:
Name | Nullable | Data Type | Description |
C_DocType_ID | N | VARCHAR2(32) | A value defining what sequence and process setup are used to handle this document. |
AD_Client_ID | N | VARCHAR2(32) | Client for this installation. |
AD_Org_ID | N | VARCHAR2(32) | Organizational entity within client |
IsActive | N | CHAR(1) | A flag indicating whether this record is available for use or de-activated. |
Created | N | DATE | The date that this record is completed. |
CreatedBy | N | VARCHAR2(32) | User who created this records |
Updated | N | DATE | x not implemented |
UpdatedBy | N | VARCHAR2(32) | User who updated this records |
Name | N | NVARCHAR2(60) | A non-unique identifier for a record/document often used as a search tool. |
PrintName | N | NVARCHAR2(60) | The displayed text of an element. |
Description | Y | NVARCHAR2(255) | A space to write additional related information. |
DocBaseType | N | VARCHAR2(60) | A classification of document types that are shown and processed in the same window. |
IsSOTrx | N | CHAR(1) | An indication that a transfer of goods and money between business partners is occurring. |
DocSubTypeSO | Y | VARCHAR2(60) | Sales Order Sub Type |
C_DocTypeShipment_ID | Y | VARCHAR2(32) | Document type used for shipments generated from this sales document |
C_DocTypeInvoice_ID | Y | VARCHAR2(32) | Document type used for invoices generated from this sales document |
IsDocNoControlled | N | CHAR(1) | The document has a document sequence |
DocNoSequence_ID | Y | VARCHAR2(32) | Document sequence determines the numbering of documents |
GL_Category_ID | N | VARCHAR2(32) | A classification used to group lines in the general ledger. |
DocumentNote | Y | NVARCHAR2(2000) | A space to write additional related information. |
IsDefault | N | CHAR(1) | A value that is shown whenever a record is created. |
DocumentCopies | N | NUMBER(10, 0) | The number of copies of each document that will be printed. |
AD_Table_ID | Y | VARCHAR2(32) | A dictionary table used for this tab that points to the database table. |
Orgfiltered | N | CHAR(1) | Filters by organization. This is used to calculate the document number by document type. |
C_Doctype_Reversed_ID | Y | VARCHAR2(32) | null |
IsExpense | N | CHAR(1) | A flag indicating whether this document type is for expenses or not. |
Isreversal | N | CHAR(1) | This is a reversing transaction |
Other Info
Check constraints
These are the check constraints for this table:
- C_DOCTYPE_ISACTIVE_CHECK: ISACTIVE IN ('Y', 'N')
- C_DOCTYPE_ISDOCNOCONTROLLE_CHK: ISDOCNOCONTROLLED IN ('Y', 'N')
- C_DOCTYPE_ISREVERSAL_CHECK: ISREVERSAL IN ('Y', 'N')
- C_DOCTYPE_ISSOTRX_CHECK: ISSOTRX IN ('Y', 'N')
- C_DOCTYPE_ORGFILTERED_CHECK: ORGFILTERED IN ('Y', 'N')
Indexes
These are the indexes for this table (for each index there is a list of all the columns included within it):
Unique
- C_DOCTYPE_KEY
- C_DOCTYPE_NAME
Columns
Document Type
The Document Type determines document sequence and processing rules
- Physical column name: C_DocType_ID
- Property Name: id
- Reference: ID
Client
- Physical column name: AD_Client_ID
- Property Name: client
- Reference: TableDir
- Default value: @AD_CLIENT_ID@
Foreign key column to AD_Client table, (column: AD_Client_ID)
Validation Rule AD_Client Security validation: Clients with user access rights. With the following code:
AD_Client.AD_Client_ID IN (@#User_Client@)
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
- Default value: @AD_Org_ID@
Foreign key column to AD_Org table, (column: AD_Org_ID)
Active
There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records:
(1) The system requires the record for auditing purposes.
(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.
- Physical column name: IsActive
- Property Name: active
- Reference: YesNo
- Default value: Y
Creation Date
The Created field indicates the date that this record was created.
- Physical column name: Created
- Property Name: creationDate
- Reference: DateTime
Created By
- Physical column name: CreatedBy
- Property Name: createdBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Updated
The Updated field indicates the date that this record was updated.
- Physical column name: Updated
- Property Name: updated
- Reference: DateTime
Updated By
- Physical column name: UpdatedBy
- Property Name: updatedBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Name
A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length.
- Physical column name: Name
- Property Name: name
- Reference: String
- This column is part of the table's identifier
Print Text
The Label to be printed indicates the name that will be printed on a document or correspondence. The max length is 2000 characters.
- Physical column name: PrintName
- Property Name: printText
- Reference: String
Description
A description is limited to 255 characters.
- Physical column name: Description
- Property Name: description
- Reference: String
Document Category
The Document Base Type identifies the base or starting point for a document. Multiple document types may share a single document base type.
- Physical column name: DocBaseType
- Property Name: documentCategory
- Reference: List
List values: C_DocType DocBaseType
The allowed values for this list are:
- --- (** New **)
- AMZ (Amortization)
- APC (AP Credit Memo)
- API (AP Invoice)
- APP (AP Payment)
- APPP (AP Payment Proposal)
- ARC (AR Credit Memo)
- ARF (AR Pro Forma Invoice)
- ARI (AR Invoice)
- ARR (AR Receipt)
- ARRP (AR Receivable Proposal)
- BSF (Bank Statement File)
- CMA (Payment Allocation)
- CMB (Bank Statement)
- CMC (Cash Journal)
- DPM (Debt Payment Management)
- FAT (Financial Account Transaction)
- GLD (GL Document)
- GLJ (GL Journal)
- MMI (Material Physical Inventory)
- MMM (Material Movement)
- MMP (Material Production)
- MMR (Material Receipt)
- MMS (Material Delivery)
- MXI (Match Invoice)
- MXP (Match PO)
- PJI (Project Issue)
- POO (Purchase Order)
- POR (Purchase Requisition)
- PPR (Payment proposal)
- REC (Reconciliation): Reconciliation
- SOO (Sales Order)
- STM (Settlement manual)
- STT (Settlement): Settlement of debt-payments
Sales Transaction
The Sales Transaction checkbox indicates if this item is a Sales Transaction.
- Physical column name: IsSOTrx
- Property Name: salesTransaction
- Reference: YesNo
SO Sub Type
The SO Sub Type indicates the type of sales order this document refers to. This field only appears when the Document Base Type is Sales Order. The selection made here will determine which documents will be generated when an order is processed and which documents must be generated manually or in batches.
The following outlines this process.
SO Sub Type of Standard Order will generate just the Order document when the order is processed.
The Delivery Note, Invoice and Receipt must be generated via other processes.
SO Sub Type of Warehouse Order will generate the Order and Delivery Note.
The Invoice and Receipt must be generated via other processes.
SO Sub Type of Credit Order will generate the Order, Delivery Note and Invoice.
The Reciept must be generated via other processes.
SO Sub Type of POS (Point of Sale) will generate all document
- Physical column name: DocSubTypeSO
- Property Name: sOSubType
- Reference: List
List values: C_DocType SubTypeSO
The allowed values for this list are:
- OB (Quotation)
- ON (Proposal)
- PR (Prepay Order)
- RM (Return Material **): ** not fully implemented **
- SO (Standard Order)
- WI (On Credit Order)
- WP (Warehouse Order)
- WR (POS Order)
Document Type for Shipment
- Physical column name: C_DocTypeShipment_ID
- Property Name: documentTypeForShipment
- Reference: Table
Foreign key column to C_DocType table, (column: C_DocType_ID)
Reference Table C_DocType With the following where clause:
C_DocType.AD_Client_ID=@#AD_Client_ID@
Validation Rule C_DocType Material Shipments/Receipts: Document Type Material Shipments and Receipts. With the following code:
C_DocType.DocBaseType IN ('MMR', 'MMS') AND C_DocType.IsSOTrx='@IsSOTrx@' AND AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1'
Document Type for Invoice
- Physical column name: C_DocTypeInvoice_ID
- Property Name: documentTypeForInvoice
- Reference: Table
Foreign key column to C_DocType table, (column: C_DocType_ID)
Reference Table C_DocType With the following where clause:
C_DocType.AD_Client_ID=@#AD_Client_ID@
Validation Rule C_DocType AR/AP Invoices and Credit Memos: Document Type AR/AP Invoice and Credit Memos. With the following code:
C_DocType.DocBaseType IN ('ARI', 'API','ARC','APC') AND C_DocType.IsSOTrx='@IsSOTrx@' AND (AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1' OR COALESCE(@AD_Org_ID@,'-1')='-1')
Sequenced Document
The Document Number Controlled checkbox indicates if this document type will have a sequence number.
- Physical column name: IsDocNoControlled
- Property Name: sequencedDocument
- Reference: YesNo
- Default value: Y
Document Sequence
- Physical column name: DocNoSequence_ID
- Property Name: documentSequence
- Reference: Table
Foreign key column to AD_Sequence table, (column: AD_Sequence_ID)
Reference Table AD_Sequence for Documents With the following where clause:
AD_Sequence.IsTableID='N'
G/L Category
- Physical column name: GL_Category_ID
- Property Name: gLCategory
- Reference: TableDir
Foreign key column to GL_Category table, (column: GL_Category_ID)
Comments
The Document Note is used for recording any additional information regarding this product.
- Physical column name: DocumentNote
- Property Name: comments
- Reference: Text
Default
The Default Checkbox indicates if this record will be used as a default value.
- Physical column name: IsDefault
- Property Name: default
- Reference: YesNo
Number of Copies
The Document Copies indicates the number of copies of each document that will be generated.
- Physical column name: DocumentCopies
- Property Name: numberOfCopies
- Reference: Integer
- Default value: 1
Table
- Physical column name: AD_Table_ID
- Property Name: table
- Reference: TableDir
Foreign key column to AD_Table table, (column: AD_Table_ID)
Filter by Organization
Filters by organization. This is used to calculate the document number by document type.
- Physical column name: Orgfiltered
- Property Name: filterByOrganization
- Reference: YesNo
- Default value: N
Document Cancelled
- Physical column name: C_Doctype_Reversed_ID
- Property Name: documentCancelled
- Reference: Table
Foreign key column to C_DocType table, (column: C_DocType_ID)
Reference Table C_DocType With the following where clause:
C_DocType.AD_Client_ID=@#AD_Client_ID@
Validation Rule DocType Not A Credit Memo: DocType that is not a Credit Memo. With the following code:
C_DocType.DocBaseType NOT IN ('APC','ARC')
Expense
Invoices in the Create AP Invoices process will be created preferably with a document type with this flag activated. This way invoices related to expenses will not appear in the Invoice Register Book.
- Physical column name: IsExpense
- Property Name: expense
- Reference: YesNo
- Default value: N
Reversal
The Reversal check box indicates if this is a reversal of a prior transaction.
- Physical column name: Isreversal
- Property Name: reversal
- Reference: YesNo
- Default value: N
Related tables
Tables that link this table:
- DataImportGLJournal.Document Type
- DataImportInvoice.Document Type
- DataImportOrder.Document Type
- DocumentTemplate.Document Type
- DocumentType.Document Cancelled
- DocumentType.Document Type for Invoice
- DocumentType.Document Type for Shipment
- DocumentTypeTrl.Document Type
- ExternalPOS.Document Type
- FIN_BankStatement.Document Type
- FIN_Payment.Document Type
- FIN_Payment_Proposal.Document Type
- FIN_Reconciliation.Document Type
- FinancialMgmtAccountingFact.Document Type
- FinancialMgmtDPManagement.Document Type
- FinancialMgmtGLJournal.Document Type
- FinancialMgmtSettlement.Document Type
- FinancialMgmtTaxRegisterTypeLines.Document Type
- Invoice.Document Type
- Invoice.Transaction Document
- InvoiceV2.Document Type
- InvoiceV2.Transaction Document
- MaterialMgmtShipmentInOut.Document Type
- Order.Document Type
- Order.Transaction Document
- OrderOpen.Document Type