View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


ERP/3.0/Developers Guide/Reference/Entity Model/InvoiceV2

This article is protected against manual editing because it is automatically generated from Openbravo meta-data. Learn more about writing and translating such documents.
Back button.png   Back to ERP/3.0/Developers_Guide/Reference/Entity_Model#InvoiceV2


To the database table (C_Invoice_V2) of this entity.



Property Column Constraints Type Description
id* C_Invoice_V2_ID Max Length: 32
invoice C_Invoice_ID Mandatory
Invoice The Invoice ID uniquely identifies an Invoice Document.
client AD_Client_ID Mandatory
ADClient A Client is a company or a legal entity. You cannot share data between Clients.
organization AD_Org_ID Mandatory
Organization An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.
active IsActive Mandatory
java.lang.Boolean 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.

creationDate Created Mandatory
java.util.Date The Created field indicates the date that this record was created.
createdBy CreatedBy Mandatory
ADUser The Created By field indicates the user who created this record.
updated Updated Mandatory
java.util.Date The Updated field indicates the date that this record was updated.
updatedBy UpdatedBy Mandatory
ADUser The Updated By field indicates the user who updated this record.
salesTransaction IsSOTrx Mandatory
java.lang.Boolean The Sales Transaction checkbox indicates if this item is a Sales Transaction.
documentNo# DocumentNo Mandatory
Max Length: 30
java.lang.String 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).
documentStatus DocStatus Mandatory
Max Length: 60
java.lang.String 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.
documentAction DocAction Mandatory
Max Length: 60

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

print IsPrinted Mandatory
java.lang.Boolean The Printed checkbox indicates if this document or line will included when printing.
printDiscount IsDiscountPrinted Mandatory
java.lang.Boolean The Discount Printed Checkbox indicates if the discount will be printed on the document.
processNow Processing java.lang.Boolean When this field is set as 'Y' a process is being performed on this record.
processed Processed Mandatory
java.lang.Boolean The Processed checkbox indicates that a document has been processed.
documentType C_DocType_ID Mandatory
DocumentType The Document Type determines document sequence and processing rules
transactionDocument C_DocTypeTarget_ID Mandatory
DocumentType Specifies document subtype (eg. POS Order, Return Material, etc.) that each document (such as Sales Invoice, Purchase Order, etc.). Various document subtypes usually differ on the consequences they have. You can convert document types (e.g. from Offer to Order). The conversion is then reflected in the current type.
salesOrder C_Order_ID Order Unique identifier and a reference to a Sales Order originating from the document sequence defined for this document type.
description Description Max Length: 255
java.lang.String A description is limited to 255 characters.
salesRepresentative SalesRep_ID ADUser Indicates the sales representative responsible for the transaction that the document specifies . A valid sales representative is a business partner marked as an employee and a sales representative.
invoiceDate DateInvoiced Mandatory
java.util.Date The Date Invoice indicates the date printed on the invoice.
datePrinted DatePrinted java.util.Date Indicates the Date that a document was printed.
accountingDate DateAcct Mandatory
java.util.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.
businessPartner C_BPartner_ID Mandatory
BusinessPartner A Business Partner is anyone with whom you transact. This can include a customer, vendor, employee or any combination of these.
partnerAddress C_BPartner_Location_ID Mandatory
BusinessPartnerLocation The Partner address indicates the location of a Business Partner
userContact AD_User_ID ADUser The User identifies a unique user in the system. This could be an internal user or a business partner contact
businessPartnerCategory C_BP_Group_ID Mandatory
BusinessPartnerCategory A way of grouping business partners together for classification and reporting purposes. Provides a method of defining certain defaults to be used when opening new business partners.
orderReference POReference Max Length: 20
java.lang.String 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.
orderDate DateOrdered java.util.Date Indicates the Date an item was ordered.
currency C_Currency_ID Mandatory
Currency Indicates the currency to be used when processing this document.
formOfPayment PaymentRule Mandatory
Max Length: 60
java.lang.String Form of Payment indicates the method of payment used for this transaction (eg. cash, wire transfer, etc.)
paymentTerms C_PaymentTerm_ID Mandatory
FinancialMgmtPaymentTerm Payment Terms identify the method and timing of payment for this transaction.
priceList M_PriceList_ID Mandatory

Price Lists are used to determine the pricing, margin and cost of items purchased or sold.

salesCampaign C_Campaign_ID MarketingCampaign The Campaign defines a unique marketing program. Projects can be associated with a pre defined Marketing Campaign. You can then report based on a specific Campaign.
project C_Project_ID Project Identifier of a project defined within the Project & Service Management module.
activity C_Activity_ID MaterialMgmtABCActivity Activities indicate tasks that are performed and used to utilize Activity based Costing
charge C_Charge_ID FinancialMgmtGLCharge The Charge indicates a type of Charge (Handling, Shipping, Restocking)
chargeAmount ChargeAmt java.math.BigDecimal The Charge Amount indicates the amount for an additional charge.
summedLineAmount TotalLines java.math.BigDecimal The Total amount displays the total of all lines in document currency
grandTotalAmount GrandTotal java.math.BigDecimal The Grand Total displays the total amount including Tax and Freight in document currency
multiplier Multiplier java.math.BigDecimal

Number of times needed to run this sequence in order to satisfy the complete process plan.

Java Entity Class

  * The contents of this file are subject to the Openbravo  Public  License
  * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
  * Version 1.1  with a permitted attribution clause; you may not  use this
  * file except in compliance with the License. You  may  obtain  a copy of
  * the License at
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2008-2019 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
 package org.openbravo.model.common.invoice;
 import java.math.BigDecimal;
 import java.util.Date;
 import org.openbravo.base.structure.ActiveEnabled;
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.base.structure.ClientEnabled;
 import org.openbravo.base.structure.OrganizationEnabled;
 import org.openbravo.base.structure.Traceable;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
 import org.openbravo.model.common.businesspartner.Category;
 import org.openbravo.model.common.businesspartner.Location;
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.order.Order;
 import org.openbravo.model.financialmgmt.payment.PaymentTerm;
 import org.openbravo.model.materialmgmt.cost.ABCActivity;
 import org.openbravo.model.pricing.pricelist.PriceList;
 import org.openbravo.model.project.Project;
  * Entity class for entity InvoiceV2 (stored in table C_Invoice_V2).
  * NOTE: This class should not be instantiated directly. To instantiate this
  * class the {@link org.openbravo.base.provider.OBProvider} should be used.
 public class InvoiceV2 extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled {
     private static final long serialVersionUID = 1L;
     public static final String TABLE_NAME = "C_Invoice_V2";
     public static final String ENTITY_NAME = "InvoiceV2";
     public static final String PROPERTY_ID = "id";
     public static final String PROPERTY_INVOICE = "invoice";
     public static final String PROPERTY_CLIENT = "client";
     public static final String PROPERTY_ORGANIZATION = "organization";
     public static final String PROPERTY_ACTIVE = "active";
     public static final String PROPERTY_CREATIONDATE = "creationDate";
     public static final String PROPERTY_CREATEDBY = "createdBy";
     public static final String PROPERTY_UPDATED = "updated";
     public static final String PROPERTY_UPDATEDBY = "updatedBy";
     public static final String PROPERTY_SALESTRANSACTION = "salesTransaction";
     public static final String PROPERTY_DOCUMENTNO = "documentNo";
     public static final String PROPERTY_DOCUMENTSTATUS = "documentStatus";
     public static final String PROPERTY_DOCUMENTACTION = "documentAction";
     public static final String PROPERTY_PRINT = "print";
     public static final String PROPERTY_PRINTDISCOUNT = "printDiscount";
     public static final String PROPERTY_PROCESSNOW = "processNow";
     public static final String PROPERTY_PROCESSED = "processed";
     public static final String PROPERTY_DOCUMENTTYPE = "documentType";
     public static final String PROPERTY_TRANSACTIONDOCUMENT = "transactionDocument";
     public static final String PROPERTY_SALESORDER = "salesOrder";
     public static final String PROPERTY_DESCRIPTION = "description";
     public static final String PROPERTY_SALESREPRESENTATIVE = "salesRepresentative";
     public static final String PROPERTY_INVOICEDATE = "invoiceDate";
     public static final String PROPERTY_DATEPRINTED = "datePrinted";
     public static final String PROPERTY_ACCOUNTINGDATE = "accountingDate";
     public static final String PROPERTY_BUSINESSPARTNER = "businessPartner";
     public static final String PROPERTY_PARTNERADDRESS = "partnerAddress";
     public static final String PROPERTY_USERCONTACT = "userContact";
     public static final String PROPERTY_BUSINESSPARTNERCATEGORY = "businessPartnerCategory";
     public static final String PROPERTY_ORDERREFERENCE = "orderReference";
     public static final String PROPERTY_ORDERDATE = "orderDate";
     public static final String PROPERTY_CURRENCY = "currency";
     public static final String PROPERTY_FORMOFPAYMENT = "formOfPayment";
     public static final String PROPERTY_PAYMENTTERMS = "paymentTerms";
     public static final String PROPERTY_PRICELIST = "priceList";
     public static final String PROPERTY_SALESCAMPAIGN = "salesCampaign";
     public static final String PROPERTY_PROJECT = "project";
     public static final String PROPERTY_ACTIVITY = "activity";
     public static final String PROPERTY_CHARGE = "charge";
     public static final String PROPERTY_CHARGEAMOUNT = "chargeAmount";
     public static final String PROPERTY_SUMMEDLINEAMOUNT = "summedLineAmount";
     public static final String PROPERTY_GRANDTOTALAMOUNT = "grandTotalAmount";
     public static final String PROPERTY_MULTIPLIER = "multiplier";
     public InvoiceV2() {
         setDefaultValue(PROPERTY_ACTIVE, true);
         setDefaultValue(PROPERTY_SALESTRANSACTION, false);
         setDefaultValue(PROPERTY_PRINT, false);
         setDefaultValue(PROPERTY_PRINTDISCOUNT, false);
         setDefaultValue(PROPERTY_PROCESSNOW, false);
         setDefaultValue(PROPERTY_PROCESSED, false);
     public String getEntityName() {
         return ENTITY_NAME;
     public String getId() {
         return (String) get(PROPERTY_ID);
     public void setId(String id) {
         set(PROPERTY_ID, id);
     public Invoice getInvoice() {
         return (Invoice) get(PROPERTY_INVOICE);
     public void setInvoice(Invoice invoice) {
         set(PROPERTY_INVOICE, invoice);
     public Client getClient() {
         return (Client) get(PROPERTY_CLIENT);
     public void setClient(Client client) {
         set(PROPERTY_CLIENT, client);
     public Organization getOrganization() {
         return (Organization) get(PROPERTY_ORGANIZATION);
     public void setOrganization(Organization organization) {
         set(PROPERTY_ORGANIZATION, organization);
     public Boolean isActive() {
         return (Boolean) get(PROPERTY_ACTIVE);
     public void setActive(Boolean active) {
         set(PROPERTY_ACTIVE, active);
     public Date getCreationDate() {
         return (Date) get(PROPERTY_CREATIONDATE);
     public void setCreationDate(Date creationDate) {
         set(PROPERTY_CREATIONDATE, creationDate);
     public User getCreatedBy() {
         return (User) get(PROPERTY_CREATEDBY);
     public void setCreatedBy(User createdBy) {
         set(PROPERTY_CREATEDBY, createdBy);
     public Date getUpdated() {
         return (Date) get(PROPERTY_UPDATED);
     public void setUpdated(Date updated) {
         set(PROPERTY_UPDATED, updated);
     public User getUpdatedBy() {
         return (User) get(PROPERTY_UPDATEDBY);
     public void setUpdatedBy(User updatedBy) {
         set(PROPERTY_UPDATEDBY, updatedBy);
     public Boolean isSalesTransaction() {
         return (Boolean) get(PROPERTY_SALESTRANSACTION);
     public void setSalesTransaction(Boolean salesTransaction) {
         set(PROPERTY_SALESTRANSACTION, salesTransaction);
     public String getDocumentNo() {
         return (String) get(PROPERTY_DOCUMENTNO);
     public void setDocumentNo(String documentNo) {
         set(PROPERTY_DOCUMENTNO, documentNo);
     public String getDocumentStatus() {
         return (String) get(PROPERTY_DOCUMENTSTATUS);
     public void setDocumentStatus(String documentStatus) {
         set(PROPERTY_DOCUMENTSTATUS, documentStatus);
     public String getDocumentAction() {
         return (String) get(PROPERTY_DOCUMENTACTION);
     public void setDocumentAction(String documentAction) {
         set(PROPERTY_DOCUMENTACTION, documentAction);
     public Boolean isPrint() {
         return (Boolean) get(PROPERTY_PRINT);
     public void setPrint(Boolean print) {
         set(PROPERTY_PRINT, print);
     public Boolean isPrintDiscount() {
         return (Boolean) get(PROPERTY_PRINTDISCOUNT);
     public void setPrintDiscount(Boolean printDiscount) {
         set(PROPERTY_PRINTDISCOUNT, printDiscount);
     public Boolean isProcessNow() {
         return (Boolean) get(PROPERTY_PROCESSNOW);
     public void setProcessNow(Boolean processNow) {
         set(PROPERTY_PROCESSNOW, processNow);
     public Boolean isProcessed() {
         return (Boolean) get(PROPERTY_PROCESSED);
     public void setProcessed(Boolean processed) {
         set(PROPERTY_PROCESSED, processed);
     public DocumentType getDocumentType() {
         return (DocumentType) get(PROPERTY_DOCUMENTTYPE);
     public void setDocumentType(DocumentType documentType) {
         set(PROPERTY_DOCUMENTTYPE, documentType);
     public DocumentType getTransactionDocument() {
         return (DocumentType) get(PROPERTY_TRANSACTIONDOCUMENT);
     public void setTransactionDocument(DocumentType transactionDocument) {
         set(PROPERTY_TRANSACTIONDOCUMENT, transactionDocument);
     public Order getSalesOrder() {
         return (Order) get(PROPERTY_SALESORDER);
     public void setSalesOrder(Order salesOrder) {
         set(PROPERTY_SALESORDER, salesOrder);
     public String getDescription() {
         return (String) get(PROPERTY_DESCRIPTION);
     public void setDescription(String description) {
         set(PROPERTY_DESCRIPTION, description);
     public User getSalesRepresentative() {
         return (User) get(PROPERTY_SALESREPRESENTATIVE);
     public void setSalesRepresentative(User salesRepresentative) {
         set(PROPERTY_SALESREPRESENTATIVE, salesRepresentative);
     public Date getInvoiceDate() {
         return (Date) get(PROPERTY_INVOICEDATE);
     public void setInvoiceDate(Date invoiceDate) {
         set(PROPERTY_INVOICEDATE, invoiceDate);
     public Date getDatePrinted() {
         return (Date) get(PROPERTY_DATEPRINTED);
     public void setDatePrinted(Date datePrinted) {
         set(PROPERTY_DATEPRINTED, datePrinted);
     public Date getAccountingDate() {
         return (Date) get(PROPERTY_ACCOUNTINGDATE);
     public void setAccountingDate(Date accountingDate) {
         set(PROPERTY_ACCOUNTINGDATE, accountingDate);
     public BusinessPartner getBusinessPartner() {
         return (BusinessPartner) get(PROPERTY_BUSINESSPARTNER);
     public void setBusinessPartner(BusinessPartner businessPartner) {
         set(PROPERTY_BUSINESSPARTNER, businessPartner);
     public Location getPartnerAddress() {
         return (Location) get(PROPERTY_PARTNERADDRESS);
     public void setPartnerAddress(Location partnerAddress) {
         set(PROPERTY_PARTNERADDRESS, partnerAddress);
     public User getUserContact() {
         return (User) get(PROPERTY_USERCONTACT);
     public void setUserContact(User userContact) {
         set(PROPERTY_USERCONTACT, userContact);
     public Category getBusinessPartnerCategory() {
         return (Category) get(PROPERTY_BUSINESSPARTNERCATEGORY);
     public void setBusinessPartnerCategory(Category businessPartnerCategory) {
         set(PROPERTY_BUSINESSPARTNERCATEGORY, businessPartnerCategory);
     public String getOrderReference() {
         return (String) get(PROPERTY_ORDERREFERENCE);
     public void setOrderReference(String orderReference) {
         set(PROPERTY_ORDERREFERENCE, orderReference);
     public Date getOrderDate() {
         return (Date) get(PROPERTY_ORDERDATE);
     public void setOrderDate(Date orderDate) {
         set(PROPERTY_ORDERDATE, orderDate);
     public Currency getCurrency() {
         return (Currency) get(PROPERTY_CURRENCY);
     public void setCurrency(Currency currency) {
         set(PROPERTY_CURRENCY, currency);
     public String getFormOfPayment() {
         return (String) get(PROPERTY_FORMOFPAYMENT);
     public void setFormOfPayment(String formOfPayment) {
         set(PROPERTY_FORMOFPAYMENT, formOfPayment);
     public PaymentTerm getPaymentTerms() {
         return (PaymentTerm) get(PROPERTY_PAYMENTTERMS);
     public void setPaymentTerms(PaymentTerm paymentTerms) {
         set(PROPERTY_PAYMENTTERMS, paymentTerms);
     public PriceList getPriceList() {
         return (PriceList) get(PROPERTY_PRICELIST);
     public void setPriceList(PriceList priceList) {
         set(PROPERTY_PRICELIST, priceList);
     public Campaign getSalesCampaign() {
         return (Campaign) get(PROPERTY_SALESCAMPAIGN);
     public void setSalesCampaign(Campaign salesCampaign) {
         set(PROPERTY_SALESCAMPAIGN, salesCampaign);
     public Project getProject() {
         return (Project) get(PROPERTY_PROJECT);
     public void setProject(Project project) {
         set(PROPERTY_PROJECT, project);
     public ABCActivity getActivity() {
         return (ABCActivity) get(PROPERTY_ACTIVITY);
     public void setActivity(ABCActivity activity) {
         set(PROPERTY_ACTIVITY, activity);
     public GLCharge getCharge() {
         return (GLCharge) get(PROPERTY_CHARGE);
     public void setCharge(GLCharge charge) {
         set(PROPERTY_CHARGE, charge);
     public BigDecimal getChargeAmount() {
         return (BigDecimal) get(PROPERTY_CHARGEAMOUNT);
     public void setChargeAmount(BigDecimal chargeAmount) {
         set(PROPERTY_CHARGEAMOUNT, chargeAmount);
     public BigDecimal getSummedLineAmount() {
         return (BigDecimal) get(PROPERTY_SUMMEDLINEAMOUNT);
     public void setSummedLineAmount(BigDecimal summedLineAmount) {
         set(PROPERTY_SUMMEDLINEAMOUNT, summedLineAmount);
     public BigDecimal getGrandTotalAmount() {
         return (BigDecimal) get(PROPERTY_GRANDTOTALAMOUNT);
     public void setGrandTotalAmount(BigDecimal grandTotalAmount) {
         set(PROPERTY_GRANDTOTALAMOUNT, grandTotalAmount);
     public BigDecimal getMultiplier() {
         return (BigDecimal) get(PROPERTY_MULTIPLIER);
     public void setMultiplier(BigDecimal multiplier) {
         set(PROPERTY_MULTIPLIER, multiplier);

Retrieved from ""

This page has been accessed 973 times. This page was last modified on 24 June 2019, at 15:59. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.