View source | Discuss this page | Page history | Printable version   

ERP/2.50/Developers Guide/Database Model/org.openbravo.model.common.order/C Order

Contents

C_Order

Table where there are all the orders. The purchase orders and the sales orders.

This table contains the following columns:

Name Nullable Data Type Description
C_Order_ID NVARCHAR2(32)A unique and often automatically generated identifier for a sales order.
AD_Client_ID NVARCHAR2(32)Client for this installation.
AD_Org_ID NVARCHAR2(32)Organizational entity within client
IsActive NCHAR(1)A flag indicating whether this record is available for use or de-activated.
Created NDATEThe date that this record is completed.
CreatedBy NVARCHAR2(32)User who created this records
Updated NDATEx not implemented
UpdatedBy NVARCHAR2(32)User who updated this records
IsSOTrx NCHAR(1)An indication that a transfer of goods and money between business partners is occurring.
DocumentNo NNVARCHAR2(30)An often automatically generated identifier for all documents.
DocStatus NVARCHAR2(60)The Document Status indicates the status of a document at this time.
DocAction NVARCHAR2(60)A means of changing the transaction status of the document.
Processing YCHAR(1)A request to process the respective document or task.
Processed NCHAR(1)A confirmation that the associated documents or requests are processed.
C_DocType_ID NVARCHAR2(32)A value defining what sequence and process setup are used to handle this document.
C_DocTypeTarget_ID NVARCHAR2(32)The specific document type which should be used for the document.
Description YNVARCHAR2(255)A space to write additional related information.
IsDelivered NCHAR(1)null
IsInvoiced NCHAR(1)An indication that a transaction may be invoiced to a business partner.
IsPrinted NCHAR(1)A reference stating whether or not the document has been printed at any time in the past.
IsSelected NCHAR(1)null
SalesRep_ID YVARCHAR2(32)The person in charge of a document.
DateOrdered NDATEThe time listed on the order.
DatePromised YDATEThe date that a task, process, or action is to be completed or delivered by.
DatePrinted YDATEDate the document was printed.
DateAcct NDATEThe date this transaction is recorded for in the general ledger.
C_BPartner_ID NVARCHAR2(32)Anyone who takes part in daily business operations by acting as a customer, employee, etc.
BillTo_ID YVARCHAR2(32)The location where the invoice payment request will be sent.
C_BPartner_Location_ID NVARCHAR2(32)The location of the selected business partner.
POReference YNVARCHAR2(20)A reference or document order number as listed in business partner application.
IsDiscountPrinted NCHAR(1)An option to have any discount printed on the invoice.
C_Currency_ID NVARCHAR2(32)An accepted medium of monetary exchange that may vary across countries.
PaymentRule NVARCHAR2(60)The method used for payment of this transaction.
C_PaymentTerm_ID NVARCHAR2(32)The setup and timing defined to complete a specified payment.
InvoiceRule NVARCHAR2(60)Frequency and method of invoicing
DeliveryRule NVARCHAR2(60)A definition stating when a specific delivery will occur.
FreightCostRule NVARCHAR2(60)The calculation method used when charging freight.
FreightAmt YNUMBERThe charge amount for a specified shipment.
DeliveryViaRule NVARCHAR2(60)The desired means of getting requested goods to a business partner.
M_Shipper_ID YVARCHAR2(32)The name of the company making the shipment.
C_Charge_ID YVARCHAR2(32)A cost or expense incurred during business activity.
ChargeAmt YNUMBERThe amount of a cost or expense incurred during business activity.
PriorityRule NVARCHAR2(60)A defined level of importance or precedence.
TotalLines NNUMBERThe final sum of all line totals made to a specified document or transaction (not including taxes).
GrandTotal NNUMBERThe final monetary amount (including taxes) charge listed in a document.
M_Warehouse_ID NVARCHAR2(32)The location where products arrive to or are sent from.
M_PriceList_ID NVARCHAR2(32)A catalog of selected items with prices defined generally or for a specific partner.
IsTaxIncluded YCHAR(1)Tax is included in the price
C_Campaign_ID YVARCHAR2(32)An advertising effort aimed at increasing sales.
C_Project_ID YVARCHAR2(32)Identifier of a project defined within the Project & Service Management module.
C_Activity_ID YVARCHAR2(32)A distinct activity defined and used in activity based management.
Posted NVARCHAR2(60)An accounting status button that indicates if the transaction has already been posted to the general ledger or not.
AD_User_ID YVARCHAR2(32)An acquaintance to reach for information related to the business partner.
CopyFrom YCHAR(1)An addition of statements from pre-existing documents.
DropShip_BPartner_ID YVARCHAR2(32)Business Partner for Drop Shipment
DropShip_Location_ID YVARCHAR2(32)Business Partner Shipment Location for Drop Shipment
DropShip_User_ID YVARCHAR2(32)Business Partner Contact for Drop Shipment
IsSelfService NCHAR(1)x not implemented
AD_OrgTrx_ID YVARCHAR2(32)The organization which performs or initiates the transaction.
User1_ID YVARCHAR2(32)A display of optional elements that are previously defined for this account combination.
User2_ID YVARCHAR2(32)A display of optional elements that are previously defined for this account combination.
Deliverynotes YNVARCHAR2(2000)null
C_Incoterms_ID YVARCHAR2(32)null
Incotermsdescription YNVARCHAR2(255)null
Generatetemplate YCHAR(1)null
Delivery_Location_ID YVARCHAR2(32)The specific place or address an order will be shipped to or carried out from.
CopyFromPO YCHAR(1)Copy lines from orders
FIN_Paymentmethod_ID YVARCHAR2(32)It is the method by which payment is expected to be made or received.
FIN_Payment_Priority_ID YVARCHAR2(32)Sets the priority of the payment plans generated when processing the invoice or order.

Other Info

Check constraints

These are the check constraints for this table:

top

Indexes

These are the indexes for this table (for each index there is a list of all the columns included within it):

Non Unique

Unique

top

Columns

Sales Order

Unique identifier and a reference to a Sales Order originating from the document sequence defined for this document type.

top

Client

Foreign key column to AD_Client table, (column: AD_Client_ID)

top

Organization

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'

top

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.

top

Creation Date

The Created field indicates the date that this record was created.

top

Created By

Foreign key column to AD_User table, (column: AD_User_ID)

top

Updated

The Updated field indicates the date that this record was updated.

top

Updated By

Foreign key column to AD_User table, (column: AD_User_ID)

top

Sales Transaction

The Sales Transaction checkbox indicates if this item is a Sales Transaction.

top

Document No.

The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". If the document type of your document has no automatic document sequence defined, the field will be empty when creating a new document. This is for documents which usually have an external number (like vendor invoice). If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Document Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table inside the database (e.g. C_Order).

top

Document Status

The Document Status indicates the status of a document at this time. To change the status of a document, use one of the buttons usually located at the bottom of the document window.

List values: All_Document Status

The allowed values for this list are:

top

Document Action


You find the current status in the Document Status field. The options are listed in a popup

top

Process Now

When this field is set as 'Y' a process is being performed on this record.

top

Processed

The Processed checkbox indicates that a document has been processed.

top

Document Type

Foreign key column to C_DocType table, (column: C_DocType_ID)

top

Transaction Document

Foreign key column to C_DocType table, (column: C_DocType_ID)


Reference Table C_DocType_Trx With the following where clause:

 
C_DocType.AD_Client_ID=@#AD_Client_ID@ AND (@AD_Org_ID@ <> '0' OR COALESCE(@AD_Org_ID@,'-1')='-1')


Validation Rule C_DocType PO/SO: Document Tpe for orders. With the following code:

 
C_DocType.DocBaseType IN ('SOO', 'POO') AND C_DocType.IsSOTrx='@IsSOTrx@' AND (AD_ISORGINCLUDED(@AD_Org_ID@,C_DocType.AD_Org_ID, @#AD_Client_ID@) <> '-1' OR COALESCE(@AD_Org_ID@,'-1')='-1')

Callout: SL_Order_DocType

This element is linked to a callout.

It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Order_DocType Java class.

top

Description

A description is limited to 255 characters.

top

Delivered

top

Re-invoice

Indicator if invoiced

top

Print

The Printed checkbox indicates if this document or line will included when printing.

top

Selected

top

Sales Representative

Foreign key column to AD_User table, (column: AD_User_ID)


Reference Table AD_User SalesRep With the following where clause:

 
EXISTS (SELECT * FROM C_BPartner bp WHERE AD_User.C_BPartner_ID=bp.C_BPartner_ID AND bp.IsSalesRep='Y')


top

Order Date

Indicates the Date an item was ordered.

top

Scheduled Delivery Date

Scheduled Delivery Date indicates the date, if any, that an order was promised by.

top

Date printed

Indicates the Date that a document was printed.

top

Accounting Date

The date this transaction is recorded on in the general ledger. This date also indicates which accounting period within the fiscal year this transaction will be part of.

top

Business Partner

Foreign key column to C_BPartner table, (column: C_BPartner_ID)

Callout: SE_Order_BPartner

This element is linked to a callout.

It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Order_BPartner Java class.

top

Invoice Address

Foreign key column to C_BPartner_Location table, (column: C_BPartner_Location_ID)


Reference Table C_BPartner Location


Validation Rule C_BPartner Location - Bill To: null. With the following code:

 
C_BPartner_Location.C_BPartner_ID=@C_BPartner_ID@ AND C_BPartner_Location.IsBillTo='Y' AND C_BPartner_Location.IsActive='Y'

top

Partner Address

Foreign key column to C_BPartner_Location table, (column: C_BPartner_Location_ID)


Validation Rule C_BPartner Location - Ship To: null. With the following code:

 
C_BPartner_Location.C_BPartner_ID=@C_BPartner_ID@ AND C_BPartner_Location.IsShipTo='Y' AND C_BPartner_Location.IsActive='Y'

top

Order Reference

This can be used to input a reference for this specific transaction. For example, a Purchase Order number can be input on a Sales Order for easier reference.

top

Print Discount

The Discount Printed Checkbox indicates if the discount will be printed on the document.

top

Currency

Foreign key column to C_Currency table, (column: C_Currency_ID)

top

Form of Payment

Form of Payment indicates the method of payment used for this transaction (eg. cash, wire transfer, etc.)

List values: All_Payment Rule

The allowed values for this list are:

top

Payment Terms

Foreign key column to C_PaymentTerm table, (column: C_PaymentTerm_ID)

top

Invoice Terms

The Invoice Rule defines how a Business Partner is invoiced and the frequency of invoicing.

Validation Rule Invoice Rules for POS Sales orders: Filters the possible Invoice Rules whein is selected the POS Sales order document.. With the following code:

 
(AD_Ref_List.value IN ('I', 'D', 'O') OR @OrderType@<>'WR')

List values: C_Order InvoiceRule

The allowed values for this list are:

top

Delivery Terms

The Delivery Rule indicates when an order should be delivered. For example should the order be delivered when the entire order is complete, when a line is complete or as the products become available.

List values: C_Order DeliveryRule

The allowed values for this list are:

top

Freight Cost Rule

The Freight Cost Rule indicates the method used when charging for freight.

List values: C_Order FreightCostRule

The allowed values for this list are:

top

Freight Amount

The Freight Amount indicates the amount charged for Freight in the document currency.

top

Delivery Method

The Delivery Via indicates how the products should be delivered. For example, will the order be picked up or shipped.

List values: C_Order DeliveryViaRule

The allowed values for this list are:

top

Shipping Company

Foreign key column to M_Shipper table, (column: M_Shipper_ID)

top

Charge

Foreign key column to C_Charge table, (column: C_Charge_ID)


Reference Table C_Charge With the following where clause:

 
C_Charge.AD_Client_ID IN (@#User_Client@)


Callout: SL_Charge

This element is linked to a callout.

It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Charge Java class.

top

Charge Amount

The Charge Amount indicates the amount for an additional charge.

top

Priority

The Priority indicates the importance (high, medium, low) of this document

List values: All_PriorityRule

The allowed values for this list are:

top

Summed Line Amount

The Total amount displays the total of all lines in document currency

top

Grand Total Amount

The Grand Total displays the total amount including Tax and Freight in document currency

top

Warehouse

Foreign key column to M_Warehouse table, (column: M_Warehouse_ID)


Reference Table M_Warehouse of Client With the following where clause:

 
M_Warehouse.AD_Client_ID=@#AD_Client_ID@ AND (select ad.isactive from ad_org ad where ad.ad_org_id = M_Warehouse.AD_Org_ID) = 'Y'


top

Price List

Foreign key column to M_PriceList table, (column: M_PriceList_ID)

Callout: SL_Order_PriceList

This element is linked to a callout.

It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Order_PriceList Java class.

top

Price includes Tax

The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.

top

Sales Campaign

Foreign key column to C_Campaign table, (column: C_Campaign_ID)

top

Project

Foreign key column to C_Project table, (column: C_Project_ID)


Validation Rule C_Project based on status and bpartner: null. With the following code:

 
C_Project.projectstatus IN ('OP', 'OR') AND (C_Project.c_bpartner_id=@C_BPartner_ID@ OR '@IsSOTrx@'='N') OR C_Project.c_project_id = @c_project_id@

Callout: SE_Order_Project

This element is linked to a callout.

It is implemented by org.openbravo.erpCommon.ad_callouts.SE_Order_Project Java class.

top

Activity

Foreign key column to C_Activity table, (column: C_Activity_ID)

top

Posted

An accounting status button that indicates if the transaction has already been posted to the general ledger or not. When doing the accounting manually this button can be used to post or unpost the transaction from the general ledger by hand.

top

User/Contact

Foreign key column to AD_User table, (column: AD_User_ID)


Validation Rule AD_User C_BPartner User/Contacts: null. With the following code:

 
AD_User.C_BPartner_ID=@C_BPartner_ID@

top

Copy from

Copy lines (products) from another document of the same type.

top

Drop Ship Partner

Foreign key column to C_BPartner table, (column: C_BPartner_ID)


Reference Table C_BPartner Customers With the following where clause:

 
C_BPartner.IsCustomer='Y'


top

Drop Ship Location

Foreign key column to C_BPartner_Location table, (column: C_BPartner_Location_ID)


Reference Table C_BPartner Location


Validation Rule C_BPartner Location - Drop Ship To: null. With the following code:

 
C_BPartner_Location.C_BPartner_ID=@DropShip_BPartner_ID@ AND C_BPartner_Location.IsShipTo='Y'

top

Drop Ship Contact

Foreign key column to AD_User table, (column: AD_User_ID)


Reference Table AD_User


Validation Rule AD_User C_BPartner User/Contacts Drop: null. With the following code:

 
AD_User.C_BPartner_ID=@DropShip_BPartner_ID@

top

Self-Service

Self-Service allows users to enter data or update their data. The flag indicates, that this record was entered or created via Self-Service or that the user can change it via the Self-Service functionality.

top

Trx Organization

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'


top

1st Dimension

The user defined element displays the optional elements that have been defined for this account combination.

top

2nd Dimension

The user defined element displays the optional elements that have been defined for this account combination.

top

Delivery notes

Notes for the delivery

top

Incoterms

Foreign key column to C_Incoterms table, (column: C_Incoterms_ID)

top

INCOTERMS description

Description of the incoterm

top

Generate template

A button that copies the products that are defined as template in the business partner window

top

Delivery Location

Foreign key column to C_BPartner_Location table, (column: C_BPartner_Location_ID)


Reference Table C_BPartner Location


Validation Rule C_BPartner Location - Ship To: null. With the following code:

 
C_BPartner_Location.C_BPartner_ID=@C_BPartner_ID@ AND C_BPartner_Location.IsShipTo='Y' AND C_BPartner_Location.IsActive='Y'

top

Copy from PO

Copy lines from orders

top

Payment Method

Foreign key column to FIN_Paymentmethod table, (column: Fin_Paymentmethod_ID)


Validation Rule FIN_PaymentMethodsWithAccount: Filters only the payment methods that belong to a financial account. With the following code:

 
EXISTS (SELECT 1 FROM FIN_FinAcc_PaymentMethod fapm WHERE FIN_PaymentMethod.FIN_PaymentMethod_ID=fapm.FIN_PaymentMethod_ID)

top

FIN_Payment_Priority_ID

Foreign key column to FIN_Payment_Priority table, (column: FIN_Payment_Priority_ID)

top

Related tables

Tables that link this table:

top

Retrieved from "http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/Database_Model/org.openbravo.model.common.order/C_Order"

This page has been accessed 16,447 times. This page was last modified on 2 July 2011, at 20:47. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.