ERP/3.0/Developers Guide/Database Model/org.openbravo.model.materialmgmt.cost/M Costing Rule
M_Costing_Rule
- Name:M_Costing_Rule
- Classname:CostingRule
This table contains the following columns:
Name | Nullable | Data Type | Description
|
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. |
Backdatedtrxsfixed | Yes | CHAR (1) | If checked Fix Backdated Transactions has been executed for the Costing Rule. |
AD_Client_ID | No | VARCHAR (32) | A Client is a company or a legal entity. You cannot share data between Clients. |
M_Costing_Algorithm_ID | No | VARCHAR (32) | Identifies a Costing Algorithm. Core distribution includes Average and Standard costing methods. Additional methods can be added using Extension Modules. |
M_Costing_Rule_ID | No | VARCHAR (32) | Identifies a costing rule for cost calculation. The costing rule defines the algorithm to be used, the date is valid from and if warehouses are used as a cost dimension. |
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. |
Dateto | Yes | TIMESTAMP (7) | The Date To indicates the end date of a range (inclusive) |
Backdatedtrxsfixedprocess | Yes | CHAR (1) | Process that recalculates costs of backdated transactions until the given date.
Run process from Costing Rules window. |
Fixbackdatedfrom | Yes | TIMESTAMP (7) | Starting date in the costing rule to fix backdated transactions |
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. |
ORG_Dimension | No | CHAR (1) | If checked the costs have to be calculated by the legal entity of the transaction. |
Process_Rule | Yes | CHAR (1) | Validate and initialize the Costing Rule. It automatically creates and process the Close and Opening Physical inventories to overwrite an existing Costing Rule. If the instance is using the legacy engine costs it is mandatory to run the Cost Migration Process in advance with System Administrator role. |
M_Product_ID | Yes | VARCHAR (32) | Identifies an item which is either purchased or sold in this organization. |
M_Product_Category_ID | Yes | VARCHAR (32) | Identifies the category which this product belongs to. Product categories are used for pricing. |
Datefrom | Yes | TIMESTAMP (7) | The Date From indicates the starting date of a range. |
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. |
IsValidated | No | CHAR (1) | Flag to determine that the record has been validated. |
Warehouse_Dimension | No | CHAR (1) | If checked the cost is calculated by the warehouse of the transaction |
Columns
Active
- Physical column name: Isactive
- Property Name: active
- Reference: YesNo
- Default value: Y
Backdated Transactions Fixed
- Physical column name: Backdatedtrxsfixed
- Property Name: backdatedTransactionsFixed
- Reference: YesNo
- Default value: N
Callout: SL_CostingRule_FixBackdated
This column has a callout associated. Callout to reset Fix Backdated From in Costing Rule window when the costing rule is nor marked as FIx Backdated 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)
Costing Algorithm
- Physical column name: M_Costing_Algorithm_ID
- Property Name: costingAlgorithm
- Reference: TableDir
- This column is part of the table's identifier
Foreign key column to M_Costing_Algorithm table, (column: M_Costing_Algorithm_ID)
Costing Rule
- Physical column name: M_Costing_Rule_ID
- Property Name: id
- Reference: 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
Ending Date
- Physical column name: Dateto
- Property Name: endingDate
- Reference: DateTime
Fix Backdated Transactions
- Physical column name: Backdatedtrxsfixedprocess
- Property Name: fixBackdatedTransactions
- Reference: Button
- Default value: N
Fixbackdatedfrom
- Physical column name: Fixbackdatedfrom
- Property Name: fixbackdatedfrom
- Reference: DateTime
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
Foreign key column to AD_Org table, (column: AD_Org_ID)
It has a validation "AD_Org Legal Entity", with the following code
exists (select 1 from ad_orgtype where ad_orgtype.ad_orgtype_id = ad_org.ad_orgtype_id and islegalentity='Y') AND IsReady='Y'
Organization Dimension
- Physical column name: ORG_Dimension
- Property Name: organizationDimension
- Reference: YesNo
- Default value: N
Process_Rule
- Physical column name: Process_Rule
- Property Name: processRule
- Reference: Button
- Default value: N
Product
- Physical column name: M_Product_ID
- Property Name: product
- Reference: Search
Foreign key column to M_Product table, (column: M_Product_ID)
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)
Starting Date
- Physical column name: Datefrom
- Property Name: startingDate
- Reference: DateTime
- This column is part of the table's identifier
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)
Validated
- Physical column name: IsValidated
- Property Name: validated
- Reference: YesNo
- Default value: N
Warehouse Dimension
- Physical column name: Warehouse_Dimension
- Property Name: warehouseDimension
- Reference: YesNo
- Default value: N
Other Info
Check Constraints
These are the check constraints for this table:
- M_COSTING_RULE_ISACTIVE_CHK: ISACTIVE IN ('Y', 'N')
- M_COSTING_RULE_ISVALIDATED_CHK: ISVALIDATED IN ('Y', 'N')
- M_COSTING_RULE_ORGDIM_CHK: ORG_DIMENSION IN ('Y', 'N')
- M_COSTING_RULE_PROCESSRULE_CHK: PROCESS_RULE IN ('Y', 'N')
- M_COSTING_RULE_WHDIM_CHK: WAREHOUSE_DIMENSION IN ('Y', 'N')