ERP 2.50:Developers Guide/Database Model/org.openbravo.model.common.invoice/C InvoiceLine
C_InvoiceLine
Contains the individual items or charges on an Invoice
- Name:InvoiceLine
- Classname:InvoiceLine
This table contains the following columns:
Name | Nullable | Data Type | Description |
C_InvoiceLine_ID | N | VARCHAR2(32) | A statement displaying one item or charge in an invoice. |
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_Invoice_ID | N | VARCHAR2(32) | A document listing products, quantities and prices, payment terms, etc. |
C_OrderLine_ID | Y | VARCHAR2(32) | Purchase Order Line |
M_InOutLine_ID | Y | VARCHAR2(32) | A statement displaying one item, charge, or movement in a shipment. |
Line | N | NUMBER(10, 0) | A line stating the position of this request in the document. |
Description | Y | NVARCHAR2(2000) | A space to write additional related information. |
Financial_Invoice_Line | N | CHAR(1) | This flag will decide whether we are going to book the invoice line on directly general ledger or not. |
Account_ID | Y | VARCHAR2(32) | The identification code used for accounting. |
M_Product_ID | Y | VARCHAR2(32) | An item produced by a process. |
QtyInvoiced | N | NUMBER | The total number of a product included in an invoice to a business partner. |
PriceList | N | NUMBER | The official price of a product in a specified currency. |
PriceActual | N | NUMBER | The price that will be paid for a specified item. |
PriceLimit | N | NUMBER | The lowest price a specified item may be sold for. |
LineNetAmt | N | NUMBER | The final amount of a specified line, based only on quantities and prices. |
C_Charge_ID | Y | VARCHAR2(32) | A cost or expense incurred during business activity. |
ChargeAmt | Y | NUMBER | The amount of a cost or expense incurred during business activity. |
C_UOM_ID | Y | VARCHAR2(32) | A non monetary unit of measure. |
C_Tax_ID | Y | VARCHAR2(32) | The percentage of money requested by the government for this specified product or transaction. |
S_ResourceAssignment_ID | Y | VARCHAR2(32) | x not implemented |
TaxAmt | Y | NUMBER | The total sum of money requested by the government of the specified transaction. |
M_AttributeSetInstance_ID | Y | VARCHAR2(32) | An attribute associated with a product as part of an attribute set. |
IsDescription | N | CHAR(1) | if true, the line is just description and no transaction |
QuantityOrder | Y | NUMBER | The number of a certain item involved in the transaction, shown in units which differ from the standard UOM. |
M_Product_Uom_Id | Y | VARCHAR2(32) | The unit of measure being used for the request. |
C_Invoice_Discount_ID | Y | VARCHAR2(32) | null |
C_Projectline_ID | Y | VARCHAR2(32) | Task or step in a project |
M_Offer_ID | Y | VARCHAR2(32) | The ability to raise or lower prices. |
PriceStd | N | NUMBER | The regular or normal price of a product in the respective price list. |
Excludeforwithholding | Y | CHAR(1) | Exclude for Withholding |
Iseditlinenetamt | Y | CHAR(1) | A flag used to allow the end-user to edit Line Net Amount field. |
Taxbaseamt | Y | NUMBER | The total sum on which taxes are added. |
Other Info
Check constraints
These are the check constraints for this table:
- C_INVOICELINE_CHECK1: ((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))
- C_INVOICELINE_CHECK2: (LINENETAMT = 0) OR (C_TAX_ID IS NOT NULL)
- C_INVOICELINE_FINACCT_CHK: ((FINANCIAL_INVOICE_LINE = 'Y') AND (ACCOUNT_ID IS NOT NULL)) OR ((FINANCIAL_INVOICE_LINE = 'N') AND (ACCOUNT_ID IS NULL))
- C_INVOICELINE_FIN_INVLINE_CHK: FINANCIAL_INVOICE_LINE IN ('Y', 'N')
- C_INVOICELINE_ISACTIVE_CHECK: ISACTIVE IN ('Y', 'N')
- C_INVOICELINE_PRODACCT_CHK: ((ACCOUNT_ID IS NOT NULL) AND (M_PRODUCT_ID IS NULL)) OR (ACCOUNT_ID IS NULL)
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_INVOICELINE_INOUTLINE
- C_INVOICELINE_INVOICE
- C_INVOICELINE_ORDERLINE
- C_INVOICELINE_PRODUCT
Unique
- C_INVOICELINE_KEY
Columns
Invoice Line
The Invoice Line uniquely identifies a single line of an Invoice.
- Physical column name: C_InvoiceLine_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 show child organizations: It only shows the child organizations of the organization's header. With the following code:
AD_ISORGINCLUDED(ad_org.ad_org_id, @AD_ORG_ID@, ad_org.ad_client_id)<>-1 AND IsReady='Y'
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)
Invoice
- Physical column name: C_Invoice_ID
- Property Name: invoice
- Reference: Search
- 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_Invoice table, (column: C_Invoice_ID)
Purchase Order Line
The Purchase Order Line is a unique identifier for a line in an order.
- Physical column name: C_OrderLine_ID
- Property Name: salesOrderLine
- Reference: Search
Foreign key column to C_OrderLine table, (column: C_OrderLine_ID)
Goods Shipment Line
- Physical column name: M_InOutLine_ID
- Property Name: goodsShipmentLine
- Reference: Search
Foreign key column to M_InOutLine table, (column: M_InOutLine_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_InvoiceLine WHERE C_Invoice_ID=@C_Invoice_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: Text
Financial Invoice Line
This flag will decide whether we are going to book the invoice line on directly general ledger or not.
- Physical column name: Financial_Invoice_Line
- Property Name: financialInvoiceLine
- Reference: YesNo
- Default value: N
Account
- Physical column name: Account_ID
- Property Name: account
- Reference: Table
Foreign key column to C_Glitem table, (column: C_Glitem_ID)
Reference Table C_GLItem : It is a general ledger item..
Validation Rule Financial Invoices GL Items: It is allowing only gl items that have enabled for financial invoice lines.. With the following code:
EnableInFinInvoices = 'Y'
Callout: SL_Invoice_Glitem
This element is linked to a callout.
Values populated for other fields is based on the glitem id changes in invoice line
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Glitem Java class.
Product
- Physical column name: M_Product_ID
- Property Name: product
- Reference: Search
Foreign key column to M_Product table, (column: M_Product_ID)
Callout: SL_Invoice_Product
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Product Java class.
Invoiced Quantity
The Invoiced Quantity indicates the quantity of a product that have been invoiced.
- Physical column name: QtyInvoiced
- Property Name: invoicedQuantity
- Reference: Quantity
- Default value: 1
Callout: SL_Invoice_Amt
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Amt Java class.
List Price
The List Price is the official price stated by the selected pricelist and the currency of the document.
- Physical column name: PriceList
- Property Name: listPrice
- Reference: Price
Unit Price
The actual price indicates the price for a product in source currency.
- Physical column name: PriceActual
- Property Name: unitPrice
- Reference: Price
Callout: SL_Invoice_Amt
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Amt Java class.
Price Limit
The Price Limit indicates the lowest price for a product stated in the Price List Currency.
- Physical column name: PriceLimit
- Property Name: priceLimit
- Reference: Price
Line Net Amount
Indicates the line net amount based on the quantity and the actual price. Any additional charges or freight are not included.
- Physical column name: LineNetAmt
- Property Name: lineNetAmount
- Reference: Amount
- This column is part of the table's identifier
Callout: SL_Invoice_Amt
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Amt Java class.
Charge
- Physical column name: C_Charge_ID
- Property Name: charge
- Reference: TableDir
Foreign key column to C_Charge table, (column: C_Charge_ID)
Callout: SL_Invoice_Charge_Tax
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Charge_Tax Java class.
Charge Amount
The Charge Amount indicates the amount for an additional charge.
- Physical column name: ChargeAmt
- Property Name: chargeAmount
- Reference: Amount
UOM
- Physical column name: C_UOM_ID
- Property Name: uOM
- Reference: TableDir
Foreign key column to C_UOM table, (column: C_UOM_ID)
Tax
- Physical column name: C_Tax_ID
- Property Name: tax
- Reference: Table
Foreign key column to C_Tax table, (column: C_Tax_ID)
Reference Table C_Tax Parent is NULL With the following where clause:
C_Tax.Parent_Tax_ID IS NULL
Validation Rule C_Tax IsSOTrx: Validate tax depending on is Sales or Purchase transaction. With the following code:
(C_TAX.SOPOTYPE =(CASE WHEN @IsSOTrx@ = 'Y' THEN 'S' ELSE 'P' END) OR C_TAX.SOPOTYPE = 'B') AND C_TAX.AD_CLIENT_ID=@AD_CLIENT_ID@ AND C_TAX.C_TAX_ID=(CASE WHEN @IsSOTrx@ = 'Y' AND EXISTS(SELECT 1 FROM AD_ORGINFO WHERE ISTAXUNDEDUCTABLE='Y' AND AD_ORG_ID=@AD_ORG_ID@) THEN (SELECT C_TAX_ID FROM AD_ORGINFO WHERE ISTAXUNDEDUCTABLE='Y' AND AD_ORG_ID=@AD_ORG_ID@) ELSE C_TAX.C_TAX_ID END)
Callout: SL_Invoice_Amt
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Amt Java class.
Resource Assignment
The ID identifies a unique record
- Physical column name: S_ResourceAssignment_ID
- Property Name: resourceAssignment
- Reference: Assignment
Tax Amount
The Tax Amount displays the total tax amount for a document.
- Physical column name: TaxAmt
- Property Name: taxAmount
- Reference: Amount
Attribute Set Value
- Physical column name: M_AttributeSetInstance_ID
- Property Name: attributeSetValue
- Reference: PAttribute
Foreign key column to M_AttributeSetInstance table, (column: M_AttributeSetInstance_ID)
Description Only
If a line is Description Only, e.g. Product Inventory is not corrected. No accounting transactions are created and the amount or totals are not included in the document. This for including descriptional detail lines, e.g. for an Work Order.
- Physical column name: IsDescription
- Property Name: descriptionOnly
- Reference: YesNo
- Default value: N
Order Quantity
Product quantity in the order uom.
- Physical column name: QuantityOrder
- Property Name: orderQuantity
- Reference: Quantity
Callout: SL_Invoice_Conversion
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Conversion Java class.
Order UOM
- Physical column name: M_Product_Uom_Id
- Property Name: orderUOM
- Reference: Table
Foreign key column to M_Product_UOM table, (column: M_Product_Uom_Id)
Reference Table M_Product_UOM With the following where clause:
M_Product_UOM.M_Product_ID = @M_Product_ID@
Callout: SL_Invoice_Conversion
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_Invoice_Conversion Java class.
Invoice discount
- Physical column name: C_Invoice_Discount_ID
- Property Name: invoiceDiscount
- Reference: Search
Foreign key column to C_Invoice_Discount table, (column: C_Invoice_Discount_ID)
Project Line
- Physical column name: C_Projectline_ID
- Property Name: projectLine
- Reference: Search
Foreign key column to C_Projectline table, (column: C_ProjectLine_ID)
Price Adjustment
- Physical column name: M_Offer_ID
- Property Name: priceAdjustment
- Reference: TableDir
Foreign key column to M_Offer table, (column: M_Offer_ID)
Standard Price
The Standard Price indicates the standard or normal price for a product on this price list
- Physical column name: PriceStd
- Property Name: standardPrice
- Reference: Price
- Default value: 0
Excludeforwithholding
- Physical column name: Excludeforwithholding
- Property Name: excludeforwithholding
- Reference: YesNo
Edit Line Amount
A flag used to allow the end-user to edit Line Net Amount field.
- Physical column name: Iseditlinenetamt
- Property Name: editLineAmount
- Reference: YesNo
- Default value: N
Alternate Taxable Amount
The Tax Base Amount indicates the base amount used for calculating the tax amount.
- Physical column name: Taxbaseamt
- Property Name: taxableAmount
- Reference: Amount
Related tables
Tables that link this table:
- InvoiceLineOffer.Invoice Line
- ManufacturingProductionRunInvoiceLine.Invoice Line
- TimeAndExpenseSheetLineV.Invoice Line