ERP 2.50:Developers Guide/Database Model/org.openbravo.model.sales/C CommissionLine
C_CommissionLine
Define the selection criteria for paying the commission. If you do not enter restricting parameters (e.g. for specific Business Partner (Groups) or Product (Categories), etc. all transactions for the period will be used to calculate the commission.
- Name:SalesCommissionLine
- Classname:CommissionLine
This table contains the following columns:
Name | Nullable | Data Type | Description |
C_CommissionLine_ID | N | VARCHAR2(32) | Commission 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 |
C_Commission_ID | N | VARCHAR2(32) | Commission Identifier |
Line | N | NUMBER(10, 0) | A line stating the position of this request in the document. |
Description | Y | NVARCHAR2(255) | A space to write additional related information. |
AmtSubtract | N | NUMBER | Subtract Amount for generating commissions |
AmtMultiplier | N | NUMBER | Multiplier Amount for generating commissions |
QtySubtract | N | NUMBER | Quantity to subtract when generating commissions |
QtyMultiplier | N | NUMBER | Value to multiply quantities by for generating commissions. |
IsPositiveOnly | N | CHAR(1) | Do not generate negative commissions |
CommissionOrders | N | CHAR(1) | Commission only Orders or Invoices, where this Sales Rep is entered |
Org_ID | Y | VARCHAR2(32) | Organizational entity within client |
M_Product_Category_ID | Y | VARCHAR2(32) | A classification of items based on similar characteristics or attributes. |
M_Product_ID | Y | VARCHAR2(32) | An item produced by a process. |
C_BP_Group_ID | Y | VARCHAR2(32) | A classification of business partners based on defined similarities. |
C_BPartner_ID | Y | VARCHAR2(32) | Anyone who takes part in daily business operations by acting as a customer, employee, etc. |
C_SalesRegion_ID | Y | VARCHAR2(32) | A defined section of the world where sales efforts will be focused. |
Other Info
Check constraints
These are the check constraints for this table:
- C_COMMISSIONLINE_COMMISSIO_CHK: COMMISSIONORDERS IN ('Y', 'N')
- C_COMMISSIONLINE_ISPOSITIV_CHK: ISPOSITIVEONLY IN ('Y', 'N')
- C_COMMISSIONLIN_ISACTIVE_CHECK: ISACTIVE 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):
Non Unique
- C_COMMISSIONLINE_COMMISSION
Unique
- C_COMMISSIONLINE_KEY
Columns
Commission Line
The Commission Line is a unique instance of a Commission Run. If the commission run was done in summary mode then there will be a single line representing the selected documents totals. If the commission run was done in detail mode then each document that was included in the run will have its own commission line.
- Physical column name: C_CommissionLine_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)
Commission
- Physical column name: C_Commission_ID
- Property Name: commission
- Reference: TableDir
- This column is part of the table's identifier
- This column is a child for a buisiness object (is Parent)
Foreign key column to C_Commission table, (column: C_Commission_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 C_CommissionLine WHERE C_Commission_ID=@C_Commission_ID@
- 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
Subtract Amount
The Subtract Amount indicates the amount to subtract from the total amount prior to multiplication.
- Physical column name: AmtSubtract
- Property Name: subtractAmount
- Reference: Amount
Multiplier Amount
The Multiplier Amount indicates the amount to multiply the total amount generated by this commission run by.
- Physical column name: AmtMultiplier
- Property Name: multiplierAmount
- Reference: Number
Subtract Quantity
The Quantity Subtract identifies the quantity to be subtracted before multiplication
- Physical column name: QtySubtract
- Property Name: subtractQuantity
- Reference: Quantity
Multiplier Quantity
The Multiplier Quantity field indicates the amount to multiply the quantities accumulated for this commission run.
- Physical column name: QtyMultiplier
- Property Name: multiplierQuantity
- Reference: Number
Positive only
The Positive Only check box indicates that if the result of the subtraction is negative, it is ignored. This would mean that negative commissions would not be generated.
- Physical column name: IsPositiveOnly
- Property Name: positiveOnly
- Reference: YesNo
Commission only specified Orders
Sales Reps are entered in Orders and Invoices. If selected, only Orders and Invoices for this Sales Reps are included in the calculation of the commission.
- Physical column name: CommissionOrders
- Property Name: commissionOnlySpecifiedOrders
- Reference: YesNo
Trx Organization
- Physical column name: Org_ID
- Property Name: trxOrganization
- Reference: Table
Foreign key column to AD_Org table, (column: AD_Org_ID)
Reference Table AD_Org (Trx) With the following where clause:
AD_Org.IsSummary='N' AND AD_Org_ID <> '0'
Product Category
- Physical column name: M_Product_Category_ID
- Property Name: productCategory
- Reference: TableDir
Foreign key column to M_Product_Category table, (column: M_Product_Category_ID)
Product
- Physical column name: M_Product_ID
- Property Name: product
- Reference: Search
Foreign key column to M_Product table, (column: M_Product_ID)
Business Partner Category
- Physical column name: C_BP_Group_ID
- Property Name: businessPartnerCategory
- Reference: TableDir
Foreign key column to C_BP_Group table, (column: C_BP_Group_ID)
Business Partner
- Physical column name: C_BPartner_ID
- Property Name: businessPartner
- Reference: Search
Foreign key column to C_BPartner table, (column: C_BPartner_ID)
Sales Region
- Physical column name: C_SalesRegion_ID
- Property Name: salesRegion
- Reference: TableDir
Foreign key column to C_SalesRegion table, (column: C_SalesRegion_ID)
Related tables
Tables that link this table: