ERP/3.0/Developers Guide/Database Model/org.openbravo.model.timeandexpense/S TimeExpenseLine
S_TimeExpenseLine
- Name:S_TimeExpenseLine
- Classname:TimeAndExpenseSheetLine
This table contains the following columns:
Name | Nullable | Data Type | Description
|
User1_ID | Yes | VARCHAR (32) | The user defined element displays the optional elements that have been defined for this account combination. |
User2_ID | Yes | VARCHAR (32) | The user defined element displays the optional elements that have been defined for this account combination. |
IsActive | No | CHAR (1) | 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. |
C_Activity_ID | Yes | VARCHAR (32) | Activities indicate tasks that are performed and used to utilize Activity based Costing |
A_Asset_ID | Yes | VARCHAR (32) | Any item of economic value owned by the corporation, especially that which could be converted to cash. |
C_BPartner_ID | Yes | VARCHAR (32) | A Business Partner is anyone with whom you transact. This can include a customer, vendor, employee or any combination of these. |
AD_Client_ID | No | VARCHAR (32) | A Client is a company or a legal entity. You cannot share data between Clients. |
Note | Yes | NVARCHAR (255) | The Note field allows for optional entry of user defined information regarding this record |
ConvertedAmt | Yes | DECIMAL | The Converted Amount is the result of multiplying the Source Amount by the Conversion Rate for this target currency. |
C_Costcenter_ID | Yes | VARCHAR (32) | Division that adds to the cost of an organization. Internal structure for cost allocation. |
CreatedBy | No | VARCHAR (32) | The Created By field indicates the user who created this record. |
Created | No | TIMESTAMP (7) | The Created field indicates the date that this record was created. |
C_Currency_ID | No | VARCHAR (32) | Indicates the currency to be used when processing this document. |
Description | Yes | NVARCHAR (255) | A description is limited to 255 characters. |
ExpenseAmt | Yes | DECIMAL | Expense amount in currency |
DateExpense | Yes | TIMESTAMP (7) | Date of expense |
S_TimeExpenseLine_ID | No | VARCHAR (32) | The ID identifies a unique record |
S_TimeExpense_ID | No | VARCHAR (32) | The ID identifies a unique record for the expense report |
C_InvoiceLine_ID | Yes | VARCHAR (32) | The Invoice Line uniquely identifies a single line of an Invoice. |
InvoicePrice | Yes | DECIMAL | Unit Price in the currency of the business partner! If it is 0, the standard price of the sales price list of the business partner (customer) is used. |
Line | No | DECIMAL (10,0) | Indicates the unique line for a document. It will also control the display order of the lines within a document. |
AD_Org_ID | No | VARCHAR (32) | An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations. |
M_Product_ID | No | VARCHAR (32) | Identifies an item which is either purchased or sold in this organization. |
C_Project_ID | Yes | VARCHAR (32) | Identifier of a project defined within the Project & Service Management module. |
C_ProjectPhase_ID | Yes | VARCHAR (32) | Identifies a phase for a particular project. |
C_ProjectTask_ID | Yes | VARCHAR (32) | A Project Task in a Project Phase represents the actual work. |
Qty | No | DECIMAL | The Quantity indicates the number of a specific product or item for this document. |
IsInvoiced | No | CHAR (1) | Indicator if invoiced |
S_ResourceAssignment_ID | Yes | VARCHAR (32) | The ID identifies a unique record |
C_Campaign_ID | Yes | VARCHAR (32) | The Campaign defines a unique marketing program. Projects can be associated with a pre defined Marketing Campaign. You can then report based on a specific Campaign. |
C_OrderLine_ID | Yes | VARCHAR (32) | A unique identifier and a reference to a sales order line (product). |
IsTimeReport | No | CHAR (1) | The line contains only time information |
S_TimeType_ID | Yes | VARCHAR (32) | Differentiate time types for reporting purposes (In parallel to Activities) |
C_UOM_ID | No | VARCHAR (32) | The UOM defines a unique non monetary unit of measure |
Updated | No | TIMESTAMP (7) | The Updated field indicates the date that this record was updated. |
UpdatedBy | No | VARCHAR (32) | The Updated By field indicates the user who updated this record. |
Columns
1st Dimension
- Physical column name: User1_ID
- Property Name: stDimension
- Reference: OBUISEL_Selector Reference
Foreign key column to User1 table, (column: User1_ID)
2nd Dimension
- Physical column name: User2_ID
- Property Name: ndDimension
- Reference: OBUISEL_Selector Reference
Foreign key column to User2 table, (column: User2_ID)
Active
- Physical column name: IsActive
- Property Name: active
- Reference: YesNo
- Default value: Y
Activity
- Physical column name: C_Activity_ID
- Property Name: activity
- Reference: OBUISEL_Selector Reference
Foreign key column to C_Activity table, (column: C_Activity_ID)
Asset
- Physical column name: A_Asset_ID
- Property Name: asset
- Reference: OBUISEL_Selector Reference
Foreign key column to A_Asset table, (column: A_Asset_ID)
Business Partner
- Physical column name: C_BPartner_ID
- Property Name: businessPartner
- Reference: Search
- This column is a child for a business object (is Parent)
Foreign key column to C_BPartner table, (column: C_BPartner_ID)
Callout: SE_Expense_BP_Project
This column has a callout associated.
It is implemented by [1] Java Class.
Client
- Physical column name: AD_Client_ID
- Property Name: client
- Reference: TableDir
Foreign key column to AD_Client table, (column: AD_Client_ID)
Comments
- Physical column name: Note
- Property Name: comments
- Reference: Text
Converted Amount
- Physical column name: ConvertedAmt
- Property Name: convertedAmount
- Reference: Amount
- Default value: 0
Cost Center
- Physical column name: C_Costcenter_ID
- Property Name: costCenter
- Reference: OBUISEL_Selector Reference
Foreign key column to C_Costcenter table, (column: C_Costcenter_ID)
Created By
- Physical column name: CreatedBy
- Property Name: createdBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Creation Date
- Physical column name: Created
- Property Name: creationDate
- Reference: DateTime
- Default value: SYSDATE
Currency
- Physical column name: C_Currency_ID
- Property Name: currency
- Reference: TableDir
Foreign key column to C_Currency table, (column: C_Currency_ID)
Callout: SE_Expense_Amount
This column has a callout associated.
It is implemented by [2] Java Class.
Description
- Physical column name: Description
- Property Name: description
- Reference: String
Expense Amount
- Physical column name: ExpenseAmt
- Property Name: expenseAmount
- Reference: Amount
- Default value: 0
Callout: SE_Expense_Amount
This column has a callout associated.
It is implemented by [3] Java Class.
Expense Date
- Physical column name: DateExpense
- Property Name: expenseDate
- Reference: Date
Callout: SE_Expense_Amount
This column has a callout associated.
It is implemented by [4] Java Class.
Expense Line
- Physical column name: S_TimeExpenseLine_ID
- Property Name: id
- Reference: ID
Expense Sheet
- Physical column name: S_TimeExpense_ID
- Property Name: expenseSheet
- Reference: Search
- This column is a child for a business object (is Parent)
Foreign key column to S_TimeExpense table, (column: S_TimeExpense_ID)
Invoice Line
- Physical column name: C_InvoiceLine_ID
- Property Name: invoiceLine
- Reference: Search
Foreign key column to C_InvoiceLine table, (column: C_InvoiceLine_ID)
Invoice Price
- Physical column name: InvoicePrice
- Property Name: invoicePrice
- Reference: Price
- Default value: 0
Callout: SE_Expense_Product
This column has a callout associated.
It is implemented by [5] Java Class.
Line No.
- Physical column name: Line
- Property Name: lineNo
- Reference: Integer
- This column is part of the table's identifier
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
Foreign key column to AD_Org table, (column: AD_Org_ID)
Product
- Physical column name: M_Product_ID
- Property Name: product
- Reference: TableDir
Foreign key column to M_Product table, (column: M_Product_ID)
It has a validation "S_Expense product type", with the following code
PRODUCTTYPE = (CASE WHEN @ISTIMEREPORT@ IS NULL THEN 'E' WHEN @ISTIMEREPORT@='Y' THEN 'S' ELSE 'E' END) AND isgeneric = 'N'
Callout: SE_Expense_Product
This column has a callout associated.
It is implemented by [6] Java Class.
Project
- Physical column name: C_Project_ID
- Property Name: project
- Reference: Search
Foreign key column to C_Project table, (column: C_Project_ID)
Callout: SE_Expense_BP_Project
This column has a callout associated.
It is implemented by [7] Java Class.
Project Phase
- Physical column name: C_ProjectPhase_ID
- Property Name: projectPhase
- Reference: TableDir
Foreign key column to C_ProjectPhase table, (column: C_ProjectPhase_ID)
It has a validation "C_ProjectPhase of Project", with the following code
C_ProjectPhase.C_Project_ID=@C_Project_ID@
Project Task
- Physical column name: C_ProjectTask_ID
- Property Name: projectTask
- Reference: TableDir
Foreign key column to C_ProjectTask table, (column: C_ProjectTask_ID)
It has a validation "C_ProjectTask of ProjectPhase", with the following code
C_ProjectTask.C_ProjectPhase_ID=@C_ProjectPhase_ID@
Quantity
- Physical column name: Qty
- Property Name: quantity
- Reference: Quantity
- Default value: 0
Callout: SE_Expense_Product
This column has a callout associated.
It is implemented by [8] Java Class.
Re-invoice
- Physical column name: IsInvoiced
- Property Name: reinvoice
- Reference: YesNo
- Default value: N
Resource Assignment
- Physical column name: S_ResourceAssignment_ID
- Property Name: resourceAssignment
- Reference: Assignment
Foreign key column to S_ResourceAssignment table, (column: S_ResourceAssignment_ID)
Sales Campaign
- Physical column name: C_Campaign_ID
- Property Name: salesCampaign
- Reference: OBUISEL_Selector Reference
Foreign key column to C_Campaign table, (column: C_Campaign_ID)
Sales Order Line
- Physical column name: C_OrderLine_ID
- Property Name: salesOrderLine
- Reference: Search
Foreign key column to C_OrderLine table, (column: C_OrderLine_ID)
Time Sheet
- Physical column name: IsTimeReport
- Property Name: timeSheet
- Reference: YesNo
- Default value: N
Time Type
- Physical column name: S_TimeType_ID
- Property Name: timeType
- Reference: TableDir
Foreign key column to S_TimeType table, (column: S_TimeType_ID)
UOM
- Physical column name: C_UOM_ID
- Property Name: uOM
- Reference: TableDir
Foreign key column to C_UOM table, (column: C_UOM_ID)
Updated
- Physical column name: Updated
- Property Name: updated
- Reference: DateTime
- Default value: SYSDATE
Updated By
- Physical column name: UpdatedBy
- Property Name: updatedBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Other Info
Indices
These are the indices for this table (for each index there is a list of all the columns included within it):
- S_TIMEEXPENSELINE_BPARTNER_IDX Not Unique. Columns:
- C_BPARTNER_ID
- S_TIMEEXPENSELN_TIMEEXPESE_IDX Not Unique. Columns:
- S_TIMEEXPENSE_ID
Check Constraints
These are the check constraints for this table:
- S_TIMEEXPENSELINE_CHECK1: ISINVOICED = 'N' OR C_BPARTNER_ID IS NOT NULL
- S_TIMEEXPENSELINE_ISACTIVE_CHK: ISACTIVE IN ('Y', 'N')
- S_TIMEEXPENSELINE_ISINVOIC_CHK: ISINVOICED IN ('Y', 'N')
- S_TIMEEXPENSELINE_ISTIMERE_CHK: ISTIMEREPORT IN ('Y', 'N')