ERP 2.50:Developers Guide/Database Model/org.openbravo.model.timeandexpense/S TimeExpenseLine
S_TimeExpenseLine
Contains all the expense items and billable or non-billable hours
- Name:TimeAndExpenseSheetLine
- Classname:SheetLine
This table contains the following columns:
Name | Nullable | Data Type | Description |
S_TimeExpenseLine_ID | N | VARCHAR2(32) | Time and Expense Report Line |
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 |
S_TimeExpense_ID | N | VARCHAR2(32) | A list of billable expenses related to time, travel, and basis business conduct. |
Line | N | NUMBER(10, 0) | A line stating the position of this request in the document. |
IsTimeReport | N | CHAR(1) | An indication that the charge is due to time, not typically justifiable by receipt. |
DateExpense | Y | DATE | Date of expense |
M_Product_ID | Y | VARCHAR2(32) | An item produced by a process. |
Qty | Y | NUMBER | The number of a certain item. |
ExpenseAmt | Y | NUMBER | Amount for this expense |
C_Currency_ID | Y | VARCHAR2(32) | An accepted medium of monetary exchange that may vary across countries. |
ConvertedAmt | Y | NUMBER | The monetary sum at which one unit of measure is changed to another. |
S_ResourceAssignment_ID | Y | VARCHAR2(32) | x not implemented |
Description | Y | NVARCHAR2(255) | A space to write additional related information. |
Note | Y | NVARCHAR2(255) | A space to write additional related information. |
IsInvoiced | N | CHAR(1) | An indication that a transaction may be invoiced to a business partner. |
C_BPartner_ID | Y | VARCHAR2(32) | Anyone who takes part in daily business operations by acting as a customer, employee, etc. |
C_Project_ID | Y | VARCHAR2(32) | Identifier of a project defined within the Project & Service Management module. |
C_Activity_ID | Y | VARCHAR2(32) | A distinct activity defined and used in activity based management. |
C_Campaign_ID | Y | VARCHAR2(32) | An advertising effort aimed at increasing sales. |
C_InvoiceLine_ID | Y | VARCHAR2(32) | A statement displaying one item or charge in an invoice. |
InvoicePrice | Y | NUMBER | The price at which something may be invoiced, shown in the currency of the invoiced business partner. |
C_UOM_ID | Y | VARCHAR2(32) | A non monetary unit of measure. |
C_OrderLine_ID | Y | VARCHAR2(32) | A unique and often automatically generated identifier for a sales order line. |
C_ProjectPhase_ID | Y | VARCHAR2(32) | A defined section of a project. |
C_ProjectTask_ID | Y | VARCHAR2(32) | A job to be carried out during the phase of a project. |
S_TimeType_ID | Y | VARCHAR2(32) | Type of time recorded |
Other Info
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')
Indexes
These are the indexes for this table (for each index there is a list of all the columns included within it):
Unique
- S_TIMEEXPENSELINE_KEY
Columns
Expense Line
The ID identifies a unique record
- Physical column name: S_TimeExpenseLine_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)
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
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)
Expense Sheet
- Physical column name: S_TimeExpense_ID
- Property Name: expenseSheet
- Reference: Search
- This column is a child for a buisiness object (is Parent)
Foreign key column to S_TimeExpense table, (column: S_TimeExpense_ID)
Line No.
Indicates the unique line for a document. It will also control the display order of the lines within a document.
- Physical column name: Line
- Property Name: lineNo
- Reference: Integer
- Default value: @SQL=SELECT COALESCE(MAX(Line),0)+10 AS DefaultValue FROM S_TimeExpenseLine WHERE S_TimeExpense_ID=@S_TimeExpense_ID@
- This column is part of the table's identifier
Time Sheet
The line contains only time information
- Physical column name: IsTimeReport
- Property Name: timeSheet
- Reference: YesNo
Expense Date
Date of expense
- Physical column name: DateExpense
- Property Name: expenseDate
- Reference: Date
- Default value: @DateReport@
Callout: SE_Expense_Amount
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_Amount Java class.
Product
- Physical column name: M_Product_ID
- Property Name: product
- Reference: TableDir
Foreign key column to M_Product table, (column: M_Product_ID)
Validation Rule S_Expense product type: null. With the following code:
PRODUCTTYPE = (CASE WHEN @ISTIMEREPORT@ IS NULL THEN 'E' WHEN @ISTIMEREPORT@='Y' THEN 'S' ELSE 'E' END)
Callout: SE_Expense_Product
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_Product Java class.
Quantity
The Quantity indicates the number of a specific product or item for this document.
- Physical column name: Qty
- Property Name: quantity
- Reference: Quantity
- Default value: 1
Callout: SE_Expense_Product
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_Product Java class.
Expense Amount
Expense amount in currency
- Physical column name: ExpenseAmt
- Property Name: expenseAmount
- Reference: Amount
Callout: SE_Expense_Amount
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_Amount Java class.
Currency
- Physical column name: C_Currency_ID
- Property Name: currency
- Reference: TableDir
- Default value: @$C_Currency_ID@
Foreign key column to C_Currency table, (column: C_Currency_ID)
Callout: SE_Expense_Amount
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_Amount Java class.
Converted Amount
The Converted Amount is the result of multiplying the Source Amount by the Conversion Rate for this target currency.
- Physical column name: ConvertedAmt
- Property Name: convertedAmount
- Reference: Amount
Resource Assignment
The ID identifies a unique record
- Physical column name: S_ResourceAssignment_ID
- Property Name: resourceAssignment
- Reference: Assignment
Description
A description is limited to 255 characters.
- Physical column name: Description
- Property Name: description
- Reference: String
Comments
The Note field allows for optional entry of user defined information regarding this record
- Physical column name: Note
- Property Name: comments
- Reference: Text
Reinvoicing
Indicator if invoiced
- Physical column name: IsInvoiced
- Property Name: reinvoice
- Reference: YesNo
Business Partner
- Physical column name: C_BPartner_ID
- Property Name: businessPartner
- Reference: Search
- This column is a child for a buisiness object (is Parent)
Foreign key column to C_BPartner table, (column: C_BPartner_ID)
Callout: SE_Expense_BP_Project
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_BP_Project Java class.
Project
- Physical column name: C_Project_ID
- Property Name: project
- Reference: TableDir
Foreign key column to C_Project table, (column: C_Project_ID)
Callout: SE_Expense_BP_Project
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_BP_Project Java class.
Activity
- Physical column name: C_Activity_ID
- Property Name: activity
- Reference: TableDir
Foreign key column to C_Activity table, (column: C_Activity_ID)
Sales Campaign
- Physical column name: C_Campaign_ID
- Property Name: salesCampaign
- Reference: TableDir
Foreign key column to C_Campaign table, (column: C_Campaign_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
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.
- Physical column name: InvoicePrice
- Property Name: invoicePrice
- Reference: Price
Callout: SE_Expense_Product
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Expense_Product Java class.
UOM
- Physical column name: C_UOM_ID
- Property Name: uOM
- Reference: TableDir
Foreign key column to C_UOM table, (column: C_UOM_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)
Project Phase
- Physical column name: C_ProjectPhase_ID
- Property Name: projectPhase
- Reference: TableDir
Foreign key column to C_ProjectPhase table, (column: C_ProjectPhase_ID)
Validation Rule C_ProjectPhase of Project: null. 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)
Validation Rule C_ProjectTask of ProjectPhase: null. With the following code:
C_ProjectTask.C_ProjectPhase_ID=@C_ProjectPhase_ID@
Time Type
- Physical column name: S_TimeType_ID
- Property Name: timeType
- Reference: TableDir
Foreign key column to S_TimeType table, (column: S_TimeType_ID)
Related tables
Tables that link this table: