ERP/2.50/Developers Guide/Database Model/org.openbravo.model.sales/C Commission
C_Commission
Contains all the commissions and when to pay a commission to whom. For each period, you start the calculation of the commission after the transaction for that period are completed or closed.
- Name:SalesCommission
- Classname:Commission
This table contains the following columns:
Name | Nullable | Data Type | Description |
C_Commission_ID | N | VARCHAR2(32) | Commission Identifier |
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. |
Description | Y | NVARCHAR2(255) | A space to write additional related information. |
C_BPartner_ID | N | VARCHAR2(32) | Identifies a Business Partner (Sales Rep) receiving the Commission |
C_Currency_ID | N | VARCHAR2(32) | An accepted medium of monetary exchange that may vary across countries. |
FrequencyType | N | VARCHAR2(60) | Frequency of event |
DocBasisType | N | VARCHAR2(60) | Basis for the calculation the commission |
ListDetails | N | CHAR(1) | List document details |
DateLastRun | Y | DATE | The last specific time the process or task was run. |
CreateFrom | Y | CHAR(1) | An addition of statements from pre-existing documents. |
Processing | Y | CHAR(1) | A request to process the respective document or task. |
M_Product_ID | Y | VARCHAR2(32) | Product, Service, Item |
Other Info
Check constraints
These are the check constraints for this table:
- C_COMMISSION_CREATEFROM_CHK: CREATEFROM IN ('Y', 'N')
- C_COMMISSION_ISACTIVE_CHECK: ISACTIVE IN ('Y', 'N')
- C_COMMISSION_LISTDETAILS_CHK: LISTDETAILS 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_COMMISSION_KEY
Columns
Commission
The Commission ID is a unique identifier of a set of commission rules.
- Physical column name: C_Commission_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)
Validation Rule AD_Org (without *): Organization selection without *. With the following code:
AD_ORG_ID <> '0'
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)
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
Description
A description is limited to 255 characters.
- Physical column name: Description
- Property Name: description
- Reference: String
Business Partner / Sales Rep
The Business Partner should be a vendor and may be a Sales Representative
- Physical column name: C_BPartner_ID
- Property Name: businessPartner
- Reference: Table
Foreign key column to C_BPartner table, (column: C_BPartner_ID)
Reference Table C_BPartner SalesRep : SalesRep_ID is synonym of AD_User_ID. With the following where clause:
C_BPartner.IsSalesRep='Y'
Currency
- Physical column name: C_Currency_ID
- Property Name: currency
- Reference: TableDir
Foreign key column to C_Currency table, (column: C_Currency_ID)
Frequency Type
The frequency type is used for calculating the date of the next event.
- Physical column name: FrequencyType
- Property Name: frequencyType
- Reference: List
- Default value: M
List values: C_Commission Frequency
The allowed values for this list are:
- M (Monthly)
- Q (Quarterly)
- W (Weekly)
Calculation Basis
The Calculation Basis indicates the basis to be used for the commission calculation.
- Physical column name: DocBasisType
- Property Name: calculationBasis
- Reference: List
- Default value: I
List values: C_Commission DocBasis
The allowed values for this list are:
- I (Invoice)
- O (Order)
- R (Receipt)
List Details
The List Details checkbox indicates that the details for each document line will be displayed.
- Physical column name: ListDetails
- Property Name: listDetails
- Reference: YesNo
Last Run Date
The Date Last Run indicates the last time that a process was run.
- Physical column name: DateLastRun
- Property Name: lastRunDate
- Reference: Date
Create Lines From
A process that allows the user to copy lines (products) from an existing document different from the one being copied into. For example, in case of entering a new Goods Shipment, the user can copy lines (products) from an existing Sales Order or Sales Invoice.
- Physical column name: CreateFrom
- Property Name: createLinesFrom
- Reference: Button
Process Now
When this field is set as 'Y' a process is being performed on this record.
- Physical column name: Processing
- Property Name: processNow
- Reference: Button
Invoice Product
- Physical column name: M_Product_ID
- Property Name: product
- Reference: Search
Foreign key column to M_Product table, (column: M_Product_ID)
Related tables
Tables that link this table: