From 42fc2ba250eac7a37a4316f3b37912a4f11f5ec2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 7 Sep 2007 03:50:47 +0000 Subject: [PATCH] Implement Feature Request [ 1789836 ] Add fields to Import Invoice - allow import charges --- base/src/org/compiere/model/I_I_Invoice.java | 609 ++-- base/src/org/compiere/model/X_I_Invoice.java | 2797 +++++++++-------- .../org/compiere/process/ImportInvoice.java | 67 +- migration/330-trunk/011_FR_1789836 .sql | 178 ++ .../330-trunk/postgresql/011_FR_1789836 .sql | 177 ++ 5 files changed, 2219 insertions(+), 1609 deletions(-) create mode 100644 migration/330-trunk/011_FR_1789836 .sql create mode 100644 migration/330-trunk/postgresql/011_FR_1789836 .sql diff --git a/base/src/org/compiere/model/I_I_Invoice.java b/base/src/org/compiere/model/I_I_Invoice.java index 99dd9c6aa4..057fa44183 100644 --- a/base/src/org/compiere/model/I_I_Invoice.java +++ b/base/src/org/compiere/model/I_I_Invoice.java @@ -5,21 +5,21 @@ * Copyright (C) Trifon Trifonov. * * Copyright (C) Contributors * * * - * This program is free software; + * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * - * as published by the Free Software Foundation; + * as published by the Free Software Foundation; either version 2 * * of the License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; + * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; + * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * * MA 02110-1301, USA. * @@ -30,699 +30,748 @@ * Sponsors: * * - Company (http://www.site.com) * **********************************************************************/ -package org.compiere.model; - -import java.util.*; -import java.sql.Timestamp; -import java.math.*; -import org.compiere.util.*; +package org.compiere.model; - /** Generated Interface for I_Invoice - * @author Trifon Trifonov (generated) - * @version Release 3.3.0 - 2007-08-24 11:39:48.046 - */ - public interface I_I_Invoice -{ +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for I_Invoice + * @author Trifon Trifonov (generated) + * @version Release 3.3.0 + */ +public interface I_I_Invoice +{ /** TableName=I_Invoice */ - public static final String Table_Name = "I_Invoice"; + public static final String Table_Name = "I_Invoice"; /** AD_Table_ID=598 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = MTable.getTable_ID(Table_Name); - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); /** AccessLevel = 2 - Client */ - BigDecimal accessLevel = new BigDecimal(2); + BigDecimal accessLevel = BigDecimal.valueOf(2); /** Load Meta Data */ /** Column name AD_OrgTrx_ID */ - public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; + public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; /** Set Trx Organization. - * Performing or initiating organization + * Performing or initiating organization */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID); /** Get Trx Organization. - * Performing or initiating organization + * Performing or initiating organization */ - public int getAD_OrgTrx_ID(); + public int getAD_OrgTrx_ID(); /** Column name AD_User_ID */ - public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; + public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; /** Set User/Contact. - * User within the system - Internal or Business Partner Contact + * User within the system - Internal or Business Partner Contact */ - public void setAD_User_ID (int AD_User_ID); + public void setAD_User_ID (int AD_User_ID); /** Get User/Contact. - * User within the system - Internal or Business Partner Contact + * User within the system - Internal or Business Partner Contact */ - public int getAD_User_ID(); + public int getAD_User_ID(); - public I_AD_User getI_AD_User() throws Exception; + public I_AD_User getAD_User() throws Exception; + + /** Column name ActivityValue */ + public static final String COLUMNNAME_ActivityValue = "ActivityValue"; + + /** Set ActivityValue */ + public void setActivityValue (String ActivityValue); + + /** Get ActivityValue */ + public String getActivityValue(); /** Column name Address1 */ - public static final String COLUMNNAME_Address1 = "Address1"; + public static final String COLUMNNAME_Address1 = "Address1"; /** Set Address 1. - * Address line 1 for this location + * Address line 1 for this location */ - public void setAddress1 (String Address1); + public void setAddress1 (String Address1); /** Get Address 1. - * Address line 1 for this location + * Address line 1 for this location */ - public String getAddress1(); + public String getAddress1(); /** Column name Address2 */ - public static final String COLUMNNAME_Address2 = "Address2"; + public static final String COLUMNNAME_Address2 = "Address2"; /** Set Address 2. - * Address line 2 for this location + * Address line 2 for this location */ - public void setAddress2 (String Address2); + public void setAddress2 (String Address2); /** Get Address 2. - * Address line 2 for this location + * Address line 2 for this location */ - public String getAddress2(); + public String getAddress2(); /** Column name BPartnerValue */ - public static final String COLUMNNAME_BPartnerValue = "BPartnerValue"; + public static final String COLUMNNAME_BPartnerValue = "BPartnerValue"; /** Set Business Partner Key. - * Key of the Business Partner + * Key of the Business Partner */ - public void setBPartnerValue (String BPartnerValue); + public void setBPartnerValue (String BPartnerValue); /** Get Business Partner Key. - * Key of the Business Partner + * Key of the Business Partner */ - public String getBPartnerValue(); + public String getBPartnerValue(); /** Column name C_Activity_ID */ - public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; + public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; /** Set Activity. - * Business Activity + * Business Activity */ - public void setC_Activity_ID (int C_Activity_ID); + public void setC_Activity_ID (int C_Activity_ID); /** Get Activity. - * Business Activity + * Business Activity */ - public int getC_Activity_ID(); + public int getC_Activity_ID(); - public I_C_Activity getI_C_Activity() throws Exception; + public I_C_Activity getC_Activity() throws Exception; /** Column name C_BPartner_ID */ - public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; /** Set Business Partner . - * Identifies a Business Partner + * Identifies a Business Partner */ - public void setC_BPartner_ID (int C_BPartner_ID); + public void setC_BPartner_ID (int C_BPartner_ID); /** Get Business Partner . - * Identifies a Business Partner + * Identifies a Business Partner */ - public int getC_BPartner_ID(); + public int getC_BPartner_ID(); /** Column name C_BPartner_Location_ID */ - public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID"; + public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID"; /** Set Partner Location. - * Identifies the (ship to) address for this Business Partner + * Identifies the (ship to) address for this Business Partner */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID); + public void setC_BPartner_Location_ID (int C_BPartner_Location_ID); /** Get Partner Location. - * Identifies the (ship to) address for this Business Partner + * Identifies the (ship to) address for this Business Partner */ - public int getC_BPartner_Location_ID(); + public int getC_BPartner_Location_ID(); - public I_C_BPartner_Location getI_C_BPartner_Location() throws Exception; + public I_C_BPartner_Location getC_BPartner_Location() throws Exception; /** Column name C_Campaign_ID */ - public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; + public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID"; /** Set Campaign. - * Marketing Campaign + * Marketing Campaign */ - public void setC_Campaign_ID (int C_Campaign_ID); + public void setC_Campaign_ID (int C_Campaign_ID); /** Get Campaign. - * Marketing Campaign + * Marketing Campaign */ - public int getC_Campaign_ID(); + public int getC_Campaign_ID(); - public I_C_Campaign getI_C_Campaign() throws Exception; + public I_C_Campaign getC_Campaign() throws Exception; + + /** Column name C_Charge_ID */ + public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; + + /** Set Charge. + * Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID); + + /** Get Charge. + * Additional document charges + */ + public int getC_Charge_ID(); + + public I_C_Charge getC_Charge() throws Exception; /** Column name C_Country_ID */ - public static final String COLUMNNAME_C_Country_ID = "C_Country_ID"; + public static final String COLUMNNAME_C_Country_ID = "C_Country_ID"; /** Set Country. - * Country + * Country */ - public void setC_Country_ID (int C_Country_ID); + public void setC_Country_ID (int C_Country_ID); /** Get Country. - * Country + * Country */ - public int getC_Country_ID(); + public int getC_Country_ID(); - public I_C_Country getI_C_Country() throws Exception; + public I_C_Country getC_Country() throws Exception; /** Column name C_Currency_ID */ - public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; + public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID"; /** Set Currency. - * The Currency for this record + * The Currency for this record */ - public void setC_Currency_ID (int C_Currency_ID); + public void setC_Currency_ID (int C_Currency_ID); /** Get Currency. - * The Currency for this record + * The Currency for this record */ - public int getC_Currency_ID(); + public int getC_Currency_ID(); - public I_C_Currency getI_C_Currency() throws Exception; + public I_C_Currency getC_Currency() throws Exception; /** Column name C_DocType_ID */ - public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; + public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID"; /** Set Document Type. - * Document type or rules + * Document type or rules */ - public void setC_DocType_ID (int C_DocType_ID); + public void setC_DocType_ID (int C_DocType_ID); /** Get Document Type. - * Document type or rules + * Document type or rules */ - public int getC_DocType_ID(); + public int getC_DocType_ID(); - public I_C_DocType getI_C_DocType() throws Exception; + public I_C_DocType getC_DocType() throws Exception; /** Column name C_InvoiceLine_ID */ - public static final String COLUMNNAME_C_InvoiceLine_ID = "C_InvoiceLine_ID"; + public static final String COLUMNNAME_C_InvoiceLine_ID = "C_InvoiceLine_ID"; /** Set Invoice Line. - * Invoice Detail Line + * Invoice Detail Line */ - public void setC_InvoiceLine_ID (int C_InvoiceLine_ID); + public void setC_InvoiceLine_ID (int C_InvoiceLine_ID); /** Get Invoice Line. - * Invoice Detail Line + * Invoice Detail Line */ - public int getC_InvoiceLine_ID(); + public int getC_InvoiceLine_ID(); /** Column name C_Invoice_ID */ - public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; + public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID"; /** Set Invoice. - * Invoice Identifier + * Invoice Identifier */ - public void setC_Invoice_ID (int C_Invoice_ID); + public void setC_Invoice_ID (int C_Invoice_ID); /** Get Invoice. - * Invoice Identifier + * Invoice Identifier */ - public int getC_Invoice_ID(); + public int getC_Invoice_ID(); /** Column name C_Location_ID */ - public static final String COLUMNNAME_C_Location_ID = "C_Location_ID"; + public static final String COLUMNNAME_C_Location_ID = "C_Location_ID"; /** Set Address. - * Location or Address + * Location or Address */ - public void setC_Location_ID (int C_Location_ID); + public void setC_Location_ID (int C_Location_ID); /** Get Address. - * Location or Address + * Location or Address */ - public int getC_Location_ID(); + public int getC_Location_ID(); /** Column name C_PaymentTerm_ID */ - public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID"; + public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID"; /** Set Payment Term. - * The terms of Payment (timing, discount) + * The terms of Payment (timing, discount) */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID); + public void setC_PaymentTerm_ID (int C_PaymentTerm_ID); /** Get Payment Term. - * The terms of Payment (timing, discount) + * The terms of Payment (timing, discount) */ - public int getC_PaymentTerm_ID(); + public int getC_PaymentTerm_ID(); - public I_C_PaymentTerm getI_C_PaymentTerm() throws Exception; + public I_C_PaymentTerm getC_PaymentTerm() throws Exception; /** Column name C_Project_ID */ - public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; + public static final String COLUMNNAME_C_Project_ID = "C_Project_ID"; /** Set Project. - * Financial Project + * Financial Project */ - public void setC_Project_ID (int C_Project_ID); + public void setC_Project_ID (int C_Project_ID); /** Get Project. - * Financial Project + * Financial Project */ - public int getC_Project_ID(); + public int getC_Project_ID(); /** Column name C_Region_ID */ - public static final String COLUMNNAME_C_Region_ID = "C_Region_ID"; + public static final String COLUMNNAME_C_Region_ID = "C_Region_ID"; /** Set Region. - * Identifies a geographical Region + * Identifies a geographical Region */ - public void setC_Region_ID (int C_Region_ID); + public void setC_Region_ID (int C_Region_ID); /** Get Region. - * Identifies a geographical Region + * Identifies a geographical Region */ - public int getC_Region_ID(); + public int getC_Region_ID(); - public I_C_Region getI_C_Region() throws Exception; + public I_C_Region getC_Region() throws Exception; /** Column name C_Tax_ID */ - public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; + public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; /** Set Tax. - * Tax identifier + * Tax identifier */ - public void setC_Tax_ID (int C_Tax_ID); + public void setC_Tax_ID (int C_Tax_ID); /** Get Tax. - * Tax identifier + * Tax identifier */ - public int getC_Tax_ID(); + public int getC_Tax_ID(); - public I_C_Tax getI_C_Tax() throws Exception; + public I_C_Tax getC_Tax() throws Exception; + + /** Column name ChargeName */ + public static final String COLUMNNAME_ChargeName = "ChargeName"; + + /** Set Charge Name. + * Name of the Charge + */ + public void setChargeName (String ChargeName); + + /** Get Charge Name. + * Name of the Charge + */ + public String getChargeName(); /** Column name City */ - public static final String COLUMNNAME_City = "City"; + public static final String COLUMNNAME_City = "City"; /** Set City. - * Identifies a City + * Identifies a City */ - public void setCity (String City); + public void setCity (String City); /** Get City. - * Identifies a City + * Identifies a City */ - public String getCity(); + public String getCity(); /** Column name ContactName */ - public static final String COLUMNNAME_ContactName = "ContactName"; + public static final String COLUMNNAME_ContactName = "ContactName"; /** Set Contact Name. - * Business Partner Contact Name + * Business Partner Contact Name */ - public void setContactName (String ContactName); + public void setContactName (String ContactName); /** Get Contact Name. - * Business Partner Contact Name + * Business Partner Contact Name */ - public String getContactName(); + public String getContactName(); /** Column name CountryCode */ - public static final String COLUMNNAME_CountryCode = "CountryCode"; + public static final String COLUMNNAME_CountryCode = "CountryCode"; /** Set ISO Country Code. - * Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html + * Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html */ - public void setCountryCode (boolean CountryCode); + public void setCountryCode (boolean CountryCode); /** Get ISO Country Code. - * Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html + * Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html */ - public boolean isCountryCode(); + public boolean isCountryCode(); /** Column name DateAcct */ - public static final String COLUMNNAME_DateAcct = "DateAcct"; + public static final String COLUMNNAME_DateAcct = "DateAcct"; /** Set Account Date. - * Accounting Date + * Accounting Date */ - public void setDateAcct (Timestamp DateAcct); + public void setDateAcct (Timestamp DateAcct); /** Get Account Date. - * Accounting Date + * Accounting Date */ - public Timestamp getDateAcct(); + public Timestamp getDateAcct(); /** Column name DateInvoiced */ - public static final String COLUMNNAME_DateInvoiced = "DateInvoiced"; + public static final String COLUMNNAME_DateInvoiced = "DateInvoiced"; /** Set Date Invoiced. - * Date printed on Invoice + * Date printed on Invoice */ - public void setDateInvoiced (Timestamp DateInvoiced); + public void setDateInvoiced (Timestamp DateInvoiced); /** Get Date Invoiced. - * Date printed on Invoice + * Date printed on Invoice */ - public Timestamp getDateInvoiced(); + public Timestamp getDateInvoiced(); /** Column name Description */ - public static final String COLUMNNAME_Description = "Description"; + public static final String COLUMNNAME_Description = "Description"; /** Set Description. - * Optional short description of the record + * Optional short description of the record */ - public void setDescription (String Description); + public void setDescription (String Description); /** Get Description. - * Optional short description of the record + * Optional short description of the record */ - public String getDescription(); + public String getDescription(); /** Column name DocTypeName */ - public static final String COLUMNNAME_DocTypeName = "DocTypeName"; + public static final String COLUMNNAME_DocTypeName = "DocTypeName"; /** Set Document Type Name. - * Name of the Document Type + * Name of the Document Type */ - public void setDocTypeName (String DocTypeName); + public void setDocTypeName (String DocTypeName); /** Get Document Type Name. - * Name of the Document Type + * Name of the Document Type */ - public String getDocTypeName(); + public String getDocTypeName(); /** Column name DocumentNo */ - public static final String COLUMNNAME_DocumentNo = "DocumentNo"; + public static final String COLUMNNAME_DocumentNo = "DocumentNo"; /** Set Document No. - * Document sequence number of the document + * Document sequence number of the document */ - public void setDocumentNo (String DocumentNo); + public void setDocumentNo (String DocumentNo); /** Get Document No. - * Document sequence number of the document + * Document sequence number of the document */ - public String getDocumentNo(); + public String getDocumentNo(); /** Column name EMail */ - public static final String COLUMNNAME_EMail = "EMail"; + public static final String COLUMNNAME_EMail = "EMail"; /** Set EMail Address. - * Electronic Mail Address + * Electronic Mail Address */ - public void setEMail (String EMail); + public void setEMail (String EMail); /** Get EMail Address. - * Electronic Mail Address + * Electronic Mail Address */ - public String getEMail(); + public String getEMail(); /** Column name I_ErrorMsg */ - public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg"; + public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg"; /** Set Import Error Message. - * Messages generated from import process + * Messages generated from import process */ - public void setI_ErrorMsg (String I_ErrorMsg); + public void setI_ErrorMsg (String I_ErrorMsg); /** Get Import Error Message. - * Messages generated from import process + * Messages generated from import process */ - public String getI_ErrorMsg(); + public String getI_ErrorMsg(); /** Column name I_Invoice_ID */ - public static final String COLUMNNAME_I_Invoice_ID = "I_Invoice_ID"; + public static final String COLUMNNAME_I_Invoice_ID = "I_Invoice_ID"; /** Set Import Invoice. - * Import Invoice + * Import Invoice */ - public void setI_Invoice_ID (int I_Invoice_ID); + public void setI_Invoice_ID (int I_Invoice_ID); /** Get Import Invoice. - * Import Invoice + * Import Invoice */ - public int getI_Invoice_ID(); + public int getI_Invoice_ID(); /** Column name I_IsImported */ - public static final String COLUMNNAME_I_IsImported = "I_IsImported"; + public static final String COLUMNNAME_I_IsImported = "I_IsImported"; /** Set Imported. - * Has this import been processed + * Has this import been processed */ - public void setI_IsImported (boolean I_IsImported); + public void setI_IsImported (boolean I_IsImported); /** Get Imported. - * Has this import been processed + * Has this import been processed */ - public boolean isI_IsImported(); + public boolean isI_IsImported(); /** Column name IsSOTrx */ - public static final String COLUMNNAME_IsSOTrx = "IsSOTrx"; + public static final String COLUMNNAME_IsSOTrx = "IsSOTrx"; /** Set Sales Transaction. - * This is a Sales Transaction + * This is a Sales Transaction */ - public void setIsSOTrx (boolean IsSOTrx); + public void setIsSOTrx (boolean IsSOTrx); /** Get Sales Transaction. - * This is a Sales Transaction + * This is a Sales Transaction */ - public boolean isSOTrx(); + public boolean isSOTrx(); /** Column name LineDescription */ - public static final String COLUMNNAME_LineDescription = "LineDescription"; + public static final String COLUMNNAME_LineDescription = "LineDescription"; /** Set Line Description. - * Description of the Line + * Description of the Line */ - public void setLineDescription (String LineDescription); + public void setLineDescription (String LineDescription); /** Get Line Description. - * Description of the Line + * Description of the Line */ - public String getLineDescription(); + public String getLineDescription(); /** Column name M_PriceList_ID */ - public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; + public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID"; /** Set Price List. - * Unique identifier of a Price List + * Unique identifier of a Price List */ - public void setM_PriceList_ID (int M_PriceList_ID); + public void setM_PriceList_ID (int M_PriceList_ID); /** Get Price List. - * Unique identifier of a Price List + * Unique identifier of a Price List */ - public int getM_PriceList_ID(); + public int getM_PriceList_ID(); - public I_M_PriceList getI_M_PriceList() throws Exception; + public I_M_PriceList getM_PriceList() throws Exception; /** Column name M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; /** Set Product. - * Product, Service, Item + * Product, Service, Item */ - public void setM_Product_ID (int M_Product_ID); + public void setM_Product_ID (int M_Product_ID); /** Get Product. - * Product, Service, Item + * Product, Service, Item */ - public int getM_Product_ID(); + public int getM_Product_ID(); /** Column name Name */ - public static final String COLUMNNAME_Name = "Name"; + public static final String COLUMNNAME_Name = "Name"; /** Set Name. - * Alphanumeric identifier of the entity + * Alphanumeric identifier of the entity */ - public void setName (String Name); + public void setName (String Name); /** Get Name. - * Alphanumeric identifier of the entity + * Alphanumeric identifier of the entity */ - public String getName(); + public String getName(); /** Column name PaymentTermValue */ - public static final String COLUMNNAME_PaymentTermValue = "PaymentTermValue"; + public static final String COLUMNNAME_PaymentTermValue = "PaymentTermValue"; /** Set Payment Term Key. - * Key of the Payment Term + * Key of the Payment Term */ - public void setPaymentTermValue (String PaymentTermValue); + public void setPaymentTermValue (String PaymentTermValue); /** Get Payment Term Key. - * Key of the Payment Term + * Key of the Payment Term */ - public String getPaymentTermValue(); + public String getPaymentTermValue(); /** Column name Phone */ - public static final String COLUMNNAME_Phone = "Phone"; + public static final String COLUMNNAME_Phone = "Phone"; /** Set Phone. - * Identifies a telephone number + * Identifies a telephone number */ - public void setPhone (String Phone); + public void setPhone (String Phone); /** Get Phone. - * Identifies a telephone number + * Identifies a telephone number */ - public String getPhone(); + public String getPhone(); /** Column name Postal */ - public static final String COLUMNNAME_Postal = "Postal"; + public static final String COLUMNNAME_Postal = "Postal"; /** Set ZIP. - * Postal code + * Postal code */ - public void setPostal (String Postal); + public void setPostal (String Postal); /** Get ZIP. - * Postal code + * Postal code */ - public String getPostal(); + public String getPostal(); /** Column name PriceActual */ - public static final String COLUMNNAME_PriceActual = "PriceActual"; + public static final String COLUMNNAME_PriceActual = "PriceActual"; /** Set Unit Price. - * Actual Price + * Actual Price */ - public void setPriceActual (BigDecimal PriceActual); + public void setPriceActual (BigDecimal PriceActual); /** Get Unit Price. - * Actual Price + * Actual Price */ - public BigDecimal getPriceActual(); + public BigDecimal getPriceActual(); /** Column name Processed */ - public static final String COLUMNNAME_Processed = "Processed"; + public static final String COLUMNNAME_Processed = "Processed"; /** Set Processed. - * The document has been processed + * The document has been processed */ - public void setProcessed (boolean Processed); + public void setProcessed (boolean Processed); /** Get Processed. - * The document has been processed + * The document has been processed */ - public boolean isProcessed(); + public boolean isProcessed(); /** Column name Processing */ - public static final String COLUMNNAME_Processing = "Processing"; + public static final String COLUMNNAME_Processing = "Processing"; /** Set Process Now */ - public void setProcessing (boolean Processing); + public void setProcessing (boolean Processing); /** Get Process Now */ - public boolean isProcessing(); + public boolean isProcessing(); /** Column name ProductValue */ - public static final String COLUMNNAME_ProductValue = "ProductValue"; + public static final String COLUMNNAME_ProductValue = "ProductValue"; /** Set Product Key. - * Key of the Product + * Key of the Product */ - public void setProductValue (String ProductValue); + public void setProductValue (String ProductValue); /** Get Product Key. - * Key of the Product + * Key of the Product */ - public String getProductValue(); + public String getProductValue(); + + /** Column name ProjectValue */ + public static final String COLUMNNAME_ProjectValue = "ProjectValue"; + + /** Set Project Key. + * Key of the Project + */ + public void setProjectValue (String ProjectValue); + + /** Get Project Key. + * Key of the Project + */ + public String getProjectValue(); /** Column name QtyOrdered */ - public static final String COLUMNNAME_QtyOrdered = "QtyOrdered"; + public static final String COLUMNNAME_QtyOrdered = "QtyOrdered"; /** Set Ordered Quantity. - * Ordered Quantity + * Ordered Quantity */ - public void setQtyOrdered (BigDecimal QtyOrdered); + public void setQtyOrdered (BigDecimal QtyOrdered); /** Get Ordered Quantity. - * Ordered Quantity + * Ordered Quantity */ - public BigDecimal getQtyOrdered(); + public BigDecimal getQtyOrdered(); /** Column name RegionName */ - public static final String COLUMNNAME_RegionName = "RegionName"; + public static final String COLUMNNAME_RegionName = "RegionName"; /** Set Region. - * Name of the Region + * Name of the Region */ - public void setRegionName (String RegionName); + public void setRegionName (String RegionName); /** Get Region. - * Name of the Region + * Name of the Region */ - public String getRegionName(); + public String getRegionName(); /** Column name SKU */ - public static final String COLUMNNAME_SKU = "SKU"; + public static final String COLUMNNAME_SKU = "SKU"; /** Set SKU. - * Stock Keeping Unit + * Stock Keeping Unit */ - public void setSKU (String SKU); + public void setSKU (String SKU); /** Get SKU. - * Stock Keeping Unit + * Stock Keeping Unit */ - public String getSKU(); + public String getSKU(); /** Column name SalesRep_ID */ - public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; + public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; /** Set Sales Representative. - * Sales Representative or Company Agent + * Sales Representative or Company Agent */ - public void setSalesRep_ID (int SalesRep_ID); + public void setSalesRep_ID (int SalesRep_ID); /** Get Sales Representative. - * Sales Representative or Company Agent + * Sales Representative or Company Agent */ - public int getSalesRep_ID(); + public int getSalesRep_ID(); /** Column name TaxAmt */ - public static final String COLUMNNAME_TaxAmt = "TaxAmt"; + public static final String COLUMNNAME_TaxAmt = "TaxAmt"; /** Set Tax Amount. - * Tax Amount for a document + * Tax Amount for a document */ - public void setTaxAmt (BigDecimal TaxAmt); + public void setTaxAmt (BigDecimal TaxAmt); /** Get Tax Amount. - * Tax Amount for a document + * Tax Amount for a document */ - public BigDecimal getTaxAmt(); + public BigDecimal getTaxAmt(); /** Column name TaxIndicator */ - public static final String COLUMNNAME_TaxIndicator = "TaxIndicator"; + public static final String COLUMNNAME_TaxIndicator = "TaxIndicator"; /** Set Tax Indicator. - * Short form for Tax to be printed on documents + * Short form for Tax to be printed on documents */ - public void setTaxIndicator (String TaxIndicator); + public void setTaxIndicator (String TaxIndicator); /** Get Tax Indicator. - * Short form for Tax to be printed on documents + * Short form for Tax to be printed on documents */ - public String getTaxIndicator(); + public String getTaxIndicator(); /** Column name UPC */ - public static final String COLUMNNAME_UPC = "UPC"; + public static final String COLUMNNAME_UPC = "UPC"; /** Set UPC/EAN. - * Bar Code (Universal Product Code or its superset European Article Number) + * Bar Code (Universal Product Code or its superset European Article Number) */ - public void setUPC (String UPC); + public void setUPC (String UPC); /** Get UPC/EAN. - * Bar Code (Universal Product Code or its superset European Article Number) + * Bar Code (Universal Product Code or its superset European Article Number) */ - public String getUPC(); -} + public String getUPC(); +} diff --git a/base/src/org/compiere/model/X_I_Invoice.java b/base/src/org/compiere/model/X_I_Invoice.java index 4cdb380d70..38451031c9 100644 --- a/base/src/org/compiere/model/X_I_Invoice.java +++ b/base/src/org/compiere/model/X_I_Invoice.java @@ -14,1332 +14,1479 @@ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.util.*; -import java.sql.*; -import java.math.*; -import java.lang.reflect.Constructor; -import java.util.logging.Level; -import org.compiere.util.*; - -/** Generated Model for I_Invoice - * @author Adempiere (generated) - * @version Release 3.3.0 - $Id$ */ -public class X_I_Invoice extends PO implements I_I_Invoice, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** Standard Constructor */ - public X_I_Invoice (Properties ctx, int I_Invoice_ID, String trxName) - { - super (ctx, I_Invoice_ID, trxName); - /** if (I_Invoice_ID == 0) { setI_Invoice_ID (0); - setI_IsImported (false); -} */ - } - - /** Load Constructor */ - public X_I_Invoice (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 2 - Client - */ - protected int get_AccessLevel() - { - return accessLevel.intValue(); - } - - /** Load Meta Data */ - protected POInfo initPO (Properties ctx) - { - POInfo poi = POInfo.getPOInfo (ctx, Table_ID); - return poi; - } - - public String toString() - { - StringBuffer sb = new StringBuffer ("X_I_Invoice[") - .append(get_ID()).append("]"); - return sb.toString(); - } +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.lang.reflect.Constructor; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import java.util.logging.Level; +import org.compiere.util.Env; + +/** Generated Model for I_Invoice + * @author Adempiere (generated) + * @version Release 3.3.0 - $Id$ */ +public class X_I_Invoice extends PO implements I_I_Invoice, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** Standard Constructor */ + public X_I_Invoice (Properties ctx, int I_Invoice_ID, String trxName) + { + super (ctx, I_Invoice_ID, trxName); + /** if (I_Invoice_ID == 0) + { + setI_Invoice_ID (0); + setI_IsImported (false); + } */ + } + + /** Load Constructor */ + public X_I_Invoice (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 2 - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_I_Invoice[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** AD_OrgTrx_ID AD_Reference_ID=130 */ + public static final int AD_ORGTRX_ID_AD_Reference_ID=130; + /** Set Trx Organization. + @param AD_OrgTrx_ID + Performing or initiating organization + */ + public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) + { + if (AD_OrgTrx_ID <= 0) + set_Value (COLUMNNAME_AD_OrgTrx_ID, null); + else + set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); + } + + /** Get Trx Organization. + @return Performing or initiating organization + */ + public int getAD_OrgTrx_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_User getAD_User() throws Exception + { + Class clazz = MTable.getClass(I_AD_User.Table_Name); + I_AD_User result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set User/Contact. + @param AD_User_ID + User within the system - Internal or Business Partner Contact + */ + public void setAD_User_ID (int AD_User_ID) + { + if (AD_User_ID <= 0) + set_Value (COLUMNNAME_AD_User_ID, null); + else + set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); + } + + /** Get User/Contact. + @return User within the system - Internal or Business Partner Contact + */ + public int getAD_User_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set ActivityValue. + @param ActivityValue ActivityValue */ + public void setActivityValue (String ActivityValue) + { + + if (ActivityValue != null && ActivityValue.length() > 40) + { + log.warning("Length > 40 - truncated"); + ActivityValue = ActivityValue.substring(0, 39); + } + set_Value (COLUMNNAME_ActivityValue, ActivityValue); + } + + /** Get ActivityValue. + @return ActivityValue */ + public String getActivityValue () + { + return (String)get_Value(COLUMNNAME_ActivityValue); + } + + /** Set Address 1. + @param Address1 + Address line 1 for this location + */ + public void setAddress1 (String Address1) + { + + if (Address1 != null && Address1.length() > 60) + { + log.warning("Length > 60 - truncated"); + Address1 = Address1.substring(0, 59); + } + set_Value (COLUMNNAME_Address1, Address1); + } + + /** Get Address 1. + @return Address line 1 for this location + */ + public String getAddress1 () + { + return (String)get_Value(COLUMNNAME_Address1); + } + + /** Set Address 2. + @param Address2 + Address line 2 for this location + */ + public void setAddress2 (String Address2) + { + + if (Address2 != null && Address2.length() > 60) + { + log.warning("Length > 60 - truncated"); + Address2 = Address2.substring(0, 59); + } + set_Value (COLUMNNAME_Address2, Address2); + } + + /** Get Address 2. + @return Address line 2 for this location + */ + public String getAddress2 () + { + return (String)get_Value(COLUMNNAME_Address2); + } + + /** Set Business Partner Key. + @param BPartnerValue + Key of the Business Partner + */ + public void setBPartnerValue (String BPartnerValue) + { + + if (BPartnerValue != null && BPartnerValue.length() > 40) + { + log.warning("Length > 40 - truncated"); + BPartnerValue = BPartnerValue.substring(0, 39); + } + set_Value (COLUMNNAME_BPartnerValue, BPartnerValue); + } + + /** Get Business Partner Key. + @return Key of the Business Partner + */ + public String getBPartnerValue () + { + return (String)get_Value(COLUMNNAME_BPartnerValue); + } + + public I_C_Activity getC_Activity() throws Exception + { + Class clazz = MTable.getClass(I_C_Activity.Table_Name); + I_C_Activity result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Activity. + @param C_Activity_ID + Business Activity + */ + public void setC_Activity_ID (int C_Activity_ID) + { + if (C_Activity_ID <= 0) + set_Value (COLUMNNAME_C_Activity_ID, null); + else + set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); + } + + /** Get Activity. + @return Business Activity + */ + public int getC_Activity_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID <= 0) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** Get Business Partner . + @return Identifies a Business Partner + */ + public int getC_BPartner_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_BPartner_Location getC_BPartner_Location() throws Exception + { + Class clazz = MTable.getClass(I_C_BPartner_Location.Table_Name); + I_C_BPartner_Location result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Partner Location. + @param C_BPartner_Location_ID + Identifies the (ship to) address for this Business Partner + */ + public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) + { + if (C_BPartner_Location_ID <= 0) + set_Value (COLUMNNAME_C_BPartner_Location_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); + } + + /** Get Partner Location. + @return Identifies the (ship to) address for this Business Partner + */ + public int getC_BPartner_Location_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Campaign getC_Campaign() throws Exception + { + Class clazz = MTable.getClass(I_C_Campaign.Table_Name); + I_C_Campaign result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Campaign. + @param C_Campaign_ID + Marketing Campaign + */ + public void setC_Campaign_ID (int C_Campaign_ID) + { + if (C_Campaign_ID <= 0) + set_Value (COLUMNNAME_C_Campaign_ID, null); + else + set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); + } + + /** Get Campaign. + @return Marketing Campaign + */ + public int getC_Campaign_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Charge getC_Charge() throws Exception + { + Class clazz = MTable.getClass(I_C_Charge.Table_Name); + I_C_Charge result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Charge)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Charge_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Charge. + @param C_Charge_ID + Additional document charges + */ + public void setC_Charge_ID (int C_Charge_ID) + { + if (C_Charge_ID <= 0) + set_Value (COLUMNNAME_C_Charge_ID, null); + else + set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID)); + } + + /** Get Charge. + @return Additional document charges + */ + public int getC_Charge_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Country getC_Country() throws Exception + { + Class clazz = MTable.getClass(I_C_Country.Table_Name); + I_C_Country result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Country)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Country_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Country. + @param C_Country_ID + Country + */ + public void setC_Country_ID (int C_Country_ID) + { + if (C_Country_ID <= 0) + set_Value (COLUMNNAME_C_Country_ID, null); + else + set_Value (COLUMNNAME_C_Country_ID, Integer.valueOf(C_Country_ID)); + } + + /** Get Country. + @return Country + */ + public int getC_Country_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Country_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Currency getC_Currency() throws Exception + { + Class clazz = MTable.getClass(I_C_Currency.Table_Name); + I_C_Currency result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Currency. + @param C_Currency_ID + The Currency for this record + */ + public void setC_Currency_ID (int C_Currency_ID) + { + if (C_Currency_ID <= 0) + set_Value (COLUMNNAME_C_Currency_ID, null); + else + set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); + } + + /** Get Currency. + @return The Currency for this record + */ + public int getC_Currency_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_DocType getC_DocType() throws Exception + { + Class clazz = MTable.getClass(I_C_DocType.Table_Name); + I_C_DocType result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Document Type. + @param C_DocType_ID + Document type or rules + */ + public void setC_DocType_ID (int C_DocType_ID) + { + if (C_DocType_ID <= 0) + set_Value (COLUMNNAME_C_DocType_ID, null); + else + set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); + } + + /** Get Document Type. + @return Document type or rules + */ + public int getC_DocType_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Invoice Line. + @param C_InvoiceLine_ID + Invoice Detail Line + */ + public void setC_InvoiceLine_ID (int C_InvoiceLine_ID) + { + if (C_InvoiceLine_ID <= 0) + set_Value (COLUMNNAME_C_InvoiceLine_ID, null); + else + set_Value (COLUMNNAME_C_InvoiceLine_ID, Integer.valueOf(C_InvoiceLine_ID)); + } + + /** Get Invoice Line. + @return Invoice Detail Line + */ + public int getC_InvoiceLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoiceLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Invoice. + @param C_Invoice_ID + Invoice Identifier + */ + public void setC_Invoice_ID (int C_Invoice_ID) + { + if (C_Invoice_ID <= 0) + set_Value (COLUMNNAME_C_Invoice_ID, null); + else + set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); + } + + /** Get Invoice. + @return Invoice Identifier + */ + public int getC_Invoice_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Address. + @param C_Location_ID + Location or Address + */ + public void setC_Location_ID (int C_Location_ID) + { + if (C_Location_ID <= 0) + set_Value (COLUMNNAME_C_Location_ID, null); + else + set_Value (COLUMNNAME_C_Location_ID, Integer.valueOf(C_Location_ID)); + } + + /** Get Address. + @return Location or Address + */ + public int getC_Location_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Location_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_PaymentTerm getC_PaymentTerm() throws Exception + { + Class clazz = MTable.getClass(I_C_PaymentTerm.Table_Name); + I_C_PaymentTerm result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Payment Term. + @param C_PaymentTerm_ID + The terms of Payment (timing, discount) + */ + public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) + { + if (C_PaymentTerm_ID <= 0) + set_Value (COLUMNNAME_C_PaymentTerm_ID, null); + else + set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID)); + } + + /** Get Payment Term. + @return The terms of Payment (timing, discount) + */ + public int getC_PaymentTerm_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Project. + @param C_Project_ID + Financial Project + */ + public void setC_Project_ID (int C_Project_ID) + { + if (C_Project_ID <= 0) + set_Value (COLUMNNAME_C_Project_ID, null); + else + set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); + } + + /** Get Project. + @return Financial Project + */ + public int getC_Project_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Region getC_Region() throws Exception + { + Class clazz = MTable.getClass(I_C_Region.Table_Name); + I_C_Region result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Region)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Region_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Region. + @param C_Region_ID + Identifies a geographical Region + */ + public void setC_Region_ID (int C_Region_ID) + { + if (C_Region_ID <= 0) + set_Value (COLUMNNAME_C_Region_ID, null); + else + set_Value (COLUMNNAME_C_Region_ID, Integer.valueOf(C_Region_ID)); + } + + /** Get Region. + @return Identifies a geographical Region + */ + public int getC_Region_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Region_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_C_Tax getC_Tax() throws Exception + { + Class clazz = MTable.getClass(I_C_Tax.Table_Name); + I_C_Tax result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_C_Tax)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Tax_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Tax. + @param C_Tax_ID + Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID) + { + if (C_Tax_ID <= 0) + set_Value (COLUMNNAME_C_Tax_ID, null); + else + set_Value (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); + } + + /** Get Tax. + @return Tax identifier + */ + public int getC_Tax_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Charge Name. + @param ChargeName + Name of the Charge + */ + public void setChargeName (String ChargeName) + { + + if (ChargeName != null && ChargeName.length() > 60) + { + log.warning("Length > 60 - truncated"); + ChargeName = ChargeName.substring(0, 59); + } + set_Value (COLUMNNAME_ChargeName, ChargeName); + } + + /** Get Charge Name. + @return Name of the Charge + */ + public String getChargeName () + { + return (String)get_Value(COLUMNNAME_ChargeName); + } + + /** Set City. + @param City + Identifies a City + */ + public void setCity (String City) + { + + if (City != null && City.length() > 60) + { + log.warning("Length > 60 - truncated"); + City = City.substring(0, 59); + } + set_Value (COLUMNNAME_City, City); + } + + /** Get City. + @return Identifies a City + */ + public String getCity () + { + return (String)get_Value(COLUMNNAME_City); + } + + /** Set Contact Name. + @param ContactName + Business Partner Contact Name + */ + public void setContactName (String ContactName) + { + + if (ContactName != null && ContactName.length() > 60) + { + log.warning("Length > 60 - truncated"); + ContactName = ContactName.substring(0, 59); + } + set_Value (COLUMNNAME_ContactName, ContactName); + } + + /** Get Contact Name. + @return Business Partner Contact Name + */ + public String getContactName () + { + return (String)get_Value(COLUMNNAME_ContactName); + } + + /** Set ISO Country Code. + @param CountryCode + Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html + */ + public void setCountryCode (boolean CountryCode) + { + set_Value (COLUMNNAME_CountryCode, Boolean.valueOf(CountryCode)); + } + + /** Get ISO Country Code. + @return Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html + */ + public boolean isCountryCode () + { + Object oo = get_Value(COLUMNNAME_CountryCode); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Account Date. + @param DateAcct + Accounting Date + */ + public void setDateAcct (Timestamp DateAcct) + { + set_Value (COLUMNNAME_DateAcct, DateAcct); + } + + /** Get Account Date. + @return Accounting Date + */ + public Timestamp getDateAcct () + { + return (Timestamp)get_Value(COLUMNNAME_DateAcct); + } + + /** Set Date Invoiced. + @param DateInvoiced + Date printed on Invoice + */ + public void setDateInvoiced (Timestamp DateInvoiced) + { + set_Value (COLUMNNAME_DateInvoiced, DateInvoiced); + } + + /** Get Date Invoiced. + @return Date printed on Invoice + */ + public Timestamp getDateInvoiced () + { + return (Timestamp)get_Value(COLUMNNAME_DateInvoiced); + } + + /** Set Description. + @param Description + Optional short description of the record + */ + public void setDescription (String Description) + { + + if (Description != null && Description.length() > 255) + { + log.warning("Length > 255 - truncated"); + Description = Description.substring(0, 254); + } + set_Value (COLUMNNAME_Description, Description); + } + + /** Get Description. + @return Optional short description of the record + */ + public String getDescription () + { + return (String)get_Value(COLUMNNAME_Description); + } + + /** Set Document Type Name. + @param DocTypeName + Name of the Document Type + */ + public void setDocTypeName (String DocTypeName) + { + + if (DocTypeName != null && DocTypeName.length() > 60) + { + log.warning("Length > 60 - truncated"); + DocTypeName = DocTypeName.substring(0, 59); + } + set_Value (COLUMNNAME_DocTypeName, DocTypeName); + } + + /** Get Document Type Name. + @return Name of the Document Type + */ + public String getDocTypeName () + { + return (String)get_Value(COLUMNNAME_DocTypeName); + } + + /** Set Document No. + @param DocumentNo + Document sequence number of the document + */ + public void setDocumentNo (String DocumentNo) + { + + if (DocumentNo != null && DocumentNo.length() > 30) + { + log.warning("Length > 30 - truncated"); + DocumentNo = DocumentNo.substring(0, 29); + } + set_Value (COLUMNNAME_DocumentNo, DocumentNo); + } + + /** Get Document No. + @return Document sequence number of the document + */ + public String getDocumentNo () + { + return (String)get_Value(COLUMNNAME_DocumentNo); + } + + /** Set EMail Address. + @param EMail + Electronic Mail Address + */ + public void setEMail (String EMail) + { + + if (EMail != null && EMail.length() > 60) + { + log.warning("Length > 60 - truncated"); + EMail = EMail.substring(0, 59); + } + set_Value (COLUMNNAME_EMail, EMail); + } + + /** Get EMail Address. + @return Electronic Mail Address + */ + public String getEMail () + { + return (String)get_Value(COLUMNNAME_EMail); + } + + /** Set Import Error Message. + @param I_ErrorMsg + Messages generated from import process + */ + public void setI_ErrorMsg (String I_ErrorMsg) + { + + if (I_ErrorMsg != null && I_ErrorMsg.length() > 2000) + { + log.warning("Length > 2000 - truncated"); + I_ErrorMsg = I_ErrorMsg.substring(0, 1999); + } + set_Value (COLUMNNAME_I_ErrorMsg, I_ErrorMsg); + } + + /** Get Import Error Message. + @return Messages generated from import process + */ + public String getI_ErrorMsg () + { + return (String)get_Value(COLUMNNAME_I_ErrorMsg); + } + + /** Set Import Invoice. + @param I_Invoice_ID + Import Invoice + */ + public void setI_Invoice_ID (int I_Invoice_ID) + { + if (I_Invoice_ID < 1) + throw new IllegalArgumentException ("I_Invoice_ID is mandatory."); + set_ValueNoCheck (COLUMNNAME_I_Invoice_ID, Integer.valueOf(I_Invoice_ID)); + } + + /** Get Import Invoice. + @return Import Invoice + */ + public int getI_Invoice_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_I_Invoice_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Imported. + @param I_IsImported + Has this import been processed + */ + public void setI_IsImported (boolean I_IsImported) + { + set_Value (COLUMNNAME_I_IsImported, Boolean.valueOf(I_IsImported)); + } + + /** Get Imported. + @return Has this import been processed + */ + public boolean isI_IsImported () + { + Object oo = get_Value(COLUMNNAME_I_IsImported); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Sales Transaction. + @param IsSOTrx + This is a Sales Transaction + */ + public void setIsSOTrx (boolean IsSOTrx) + { + set_Value (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx)); + } + + /** Get Sales Transaction. + @return This is a Sales Transaction + */ + public boolean isSOTrx () + { + Object oo = get_Value(COLUMNNAME_IsSOTrx); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Line Description. + @param LineDescription + Description of the Line + */ + public void setLineDescription (String LineDescription) + { + + if (LineDescription != null && LineDescription.length() > 255) + { + log.warning("Length > 255 - truncated"); + LineDescription = LineDescription.substring(0, 254); + } + set_Value (COLUMNNAME_LineDescription, LineDescription); + } + + /** Get Line Description. + @return Description of the Line + */ + public String getLineDescription () + { + return (String)get_Value(COLUMNNAME_LineDescription); + } + + public I_M_PriceList getM_PriceList() throws Exception + { + Class clazz = MTable.getClass(I_M_PriceList.Table_Name); + I_M_PriceList result = null; + try { + Constructor constructor = null; + constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); + result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()}); + } catch (Exception e) { + log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); + log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); + throw e; + } + return result; + } + + /** Set Price List. + @param M_PriceList_ID + Unique identifier of a Price List + */ + public void setM_PriceList_ID (int M_PriceList_ID) + { + if (M_PriceList_ID <= 0) + set_Value (COLUMNNAME_M_PriceList_ID, null); + else + set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); + } + + /** Get Price List. + @return Unique identifier of a Price List + */ + public int getM_PriceList_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID <= 0) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + + if (Name != null && Name.length() > 60) + { + log.warning("Length > 60 - truncated"); + Name = Name.substring(0, 59); + } + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Set Payment Term Key. + @param PaymentTermValue + Key of the Payment Term + */ + public void setPaymentTermValue (String PaymentTermValue) + { + + if (PaymentTermValue != null && PaymentTermValue.length() > 40) + { + log.warning("Length > 40 - truncated"); + PaymentTermValue = PaymentTermValue.substring(0, 39); + } + set_Value (COLUMNNAME_PaymentTermValue, PaymentTermValue); + } + + /** Get Payment Term Key. + @return Key of the Payment Term + */ + public String getPaymentTermValue () + { + return (String)get_Value(COLUMNNAME_PaymentTermValue); + } + + /** Set Phone. + @param Phone + Identifies a telephone number + */ + public void setPhone (String Phone) + { + + if (Phone != null && Phone.length() > 40) + { + log.warning("Length > 40 - truncated"); + Phone = Phone.substring(0, 39); + } + set_Value (COLUMNNAME_Phone, Phone); + } + + /** Get Phone. + @return Identifies a telephone number + */ + public String getPhone () + { + return (String)get_Value(COLUMNNAME_Phone); + } + + /** Set ZIP. + @param Postal + Postal code + */ + public void setPostal (String Postal) + { + + if (Postal != null && Postal.length() > 10) + { + log.warning("Length > 10 - truncated"); + Postal = Postal.substring(0, 9); + } + set_Value (COLUMNNAME_Postal, Postal); + } + + /** Get ZIP. + @return Postal code + */ + public String getPostal () + { + return (String)get_Value(COLUMNNAME_Postal); + } + + /** Set Unit Price. + @param PriceActual + Actual Price + */ + public void setPriceActual (BigDecimal PriceActual) + { + set_Value (COLUMNNAME_PriceActual, PriceActual); + } + + /** Get Unit Price. + @return Actual Price + */ + public BigDecimal getPriceActual () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceActual); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Process Now. + @param Processing Process Now */ + public void setProcessing (boolean Processing) + { + set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); + } -/** AD_OrgTrx_ID AD_Reference_ID=130 */ -public static final int AD_ORGTRX_ID_AD_Reference_ID=130; - /** Set Trx Organization. - @param AD_OrgTrx_ID - Performing or initiating organization - */ - public void setAD_OrgTrx_ID (int AD_OrgTrx_ID) - { - if (AD_OrgTrx_ID <= 0) set_Value (COLUMNNAME_AD_OrgTrx_ID, null); - else - set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID)); - } - - /** Get Trx Organization. - @return Performing or initiating organization - */ - public int getAD_OrgTrx_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_AD_User getI_AD_User() throws Exception - { - Class clazz = MTable.getClass(I_AD_User.Table_Name); - I_AD_User result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set User/Contact. - @param AD_User_ID - User within the system - Internal or Business Partner Contact - */ - public void setAD_User_ID (int AD_User_ID) - { - if (AD_User_ID <= 0) set_Value (COLUMNNAME_AD_User_ID, null); - else - set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); - } - - /** Get User/Contact. - @return User within the system - Internal or Business Partner Contact - */ - public int getAD_User_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Address 1. - @param Address1 - Address line 1 for this location - */ - public void setAddress1 (String Address1) - { - if (Address1 != null && Address1.length() > 60) - { - log.warning("Length > 60 - truncated"); - Address1 = Address1.substring(0, 59); - } - set_Value (COLUMNNAME_Address1, Address1); - } - - /** Get Address 1. - @return Address line 1 for this location - */ - public String getAddress1 () - { - return (String)get_Value(COLUMNNAME_Address1); - } - - /** Set Address 2. - @param Address2 - Address line 2 for this location - */ - public void setAddress2 (String Address2) - { - if (Address2 != null && Address2.length() > 60) - { - log.warning("Length > 60 - truncated"); - Address2 = Address2.substring(0, 59); - } - set_Value (COLUMNNAME_Address2, Address2); - } - - /** Get Address 2. - @return Address line 2 for this location - */ - public String getAddress2 () - { - return (String)get_Value(COLUMNNAME_Address2); - } - - /** Set Business Partner Key. - @param BPartnerValue - Key of the Business Partner - */ - public void setBPartnerValue (String BPartnerValue) - { - if (BPartnerValue != null && BPartnerValue.length() > 40) - { - log.warning("Length > 40 - truncated"); - BPartnerValue = BPartnerValue.substring(0, 39); - } - set_Value (COLUMNNAME_BPartnerValue, BPartnerValue); - } - - /** Get Business Partner Key. - @return Key of the Business Partner - */ - public String getBPartnerValue () - { - return (String)get_Value(COLUMNNAME_BPartnerValue); - } - - public I_C_Activity getI_C_Activity() throws Exception - { - Class clazz = MTable.getClass(I_C_Activity.Table_Name); - I_C_Activity result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Activity)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Activity_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Activity. - @param C_Activity_ID - Business Activity - */ - public void setC_Activity_ID (int C_Activity_ID) - { - if (C_Activity_ID <= 0) set_Value (COLUMNNAME_C_Activity_ID, null); - else - set_Value (COLUMNNAME_C_Activity_ID, Integer.valueOf(C_Activity_ID)); - } - - /** Get Activity. - @return Business Activity - */ - public int getC_Activity_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Activity_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Business Partner . - @param C_BPartner_ID - Identifies a Business Partner - */ - public void setC_BPartner_ID (int C_BPartner_ID) - { - if (C_BPartner_ID <= 0) set_Value (COLUMNNAME_C_BPartner_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); - } - - /** Get Business Partner . - @return Identifies a Business Partner - */ - public int getC_BPartner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_BPartner_Location getI_C_BPartner_Location() throws Exception - { - Class clazz = MTable.getClass(I_C_BPartner_Location.Table_Name); - I_C_BPartner_Location result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_BPartner_Location)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_BPartner_Location_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Partner Location. - @param C_BPartner_Location_ID - Identifies the (ship to) address for this Business Partner - */ - public void setC_BPartner_Location_ID (int C_BPartner_Location_ID) - { - if (C_BPartner_Location_ID <= 0) set_Value (COLUMNNAME_C_BPartner_Location_ID, null); - else - set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID)); - } - - /** Get Partner Location. - @return Identifies the (ship to) address for this Business Partner - */ - public int getC_BPartner_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Campaign getI_C_Campaign() throws Exception - { - Class clazz = MTable.getClass(I_C_Campaign.Table_Name); - I_C_Campaign result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Campaign)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Campaign_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Campaign. - @param C_Campaign_ID - Marketing Campaign - */ - public void setC_Campaign_ID (int C_Campaign_ID) - { - if (C_Campaign_ID <= 0) set_Value (COLUMNNAME_C_Campaign_ID, null); - else - set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); - } - - /** Get Campaign. - @return Marketing Campaign - */ - public int getC_Campaign_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Country getI_C_Country() throws Exception - { - Class clazz = MTable.getClass(I_C_Country.Table_Name); - I_C_Country result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Country)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Country_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Country. - @param C_Country_ID - Country - */ - public void setC_Country_ID (int C_Country_ID) - { - if (C_Country_ID <= 0) set_Value (COLUMNNAME_C_Country_ID, null); - else - set_Value (COLUMNNAME_C_Country_ID, Integer.valueOf(C_Country_ID)); - } - - /** Get Country. - @return Country - */ - public int getC_Country_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Country_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Currency getI_C_Currency() throws Exception - { - Class clazz = MTable.getClass(I_C_Currency.Table_Name); - I_C_Currency result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Currency)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Currency_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Currency. - @param C_Currency_ID - The Currency for this record - */ - public void setC_Currency_ID (int C_Currency_ID) - { - if (C_Currency_ID <= 0) set_Value (COLUMNNAME_C_Currency_ID, null); - else - set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); - } - - /** Get Currency. - @return The Currency for this record - */ - public int getC_Currency_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_DocType getI_C_DocType() throws Exception - { - Class clazz = MTable.getClass(I_C_DocType.Table_Name); - I_C_DocType result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_DocType)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_DocType_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Document Type. - @param C_DocType_ID - Document type or rules - */ - public void setC_DocType_ID (int C_DocType_ID) - { - if (C_DocType_ID <= 0) set_Value (COLUMNNAME_C_DocType_ID, null); - else - set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID)); - } - - /** Get Document Type. - @return Document type or rules - */ - public int getC_DocType_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Invoice Line. - @param C_InvoiceLine_ID - Invoice Detail Line - */ - public void setC_InvoiceLine_ID (int C_InvoiceLine_ID) - { - if (C_InvoiceLine_ID <= 0) set_Value (COLUMNNAME_C_InvoiceLine_ID, null); - else - set_Value (COLUMNNAME_C_InvoiceLine_ID, Integer.valueOf(C_InvoiceLine_ID)); - } - - /** Get Invoice Line. - @return Invoice Detail Line - */ - public int getC_InvoiceLine_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_InvoiceLine_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Invoice. - @param C_Invoice_ID - Invoice Identifier - */ - public void setC_Invoice_ID (int C_Invoice_ID) - { - if (C_Invoice_ID <= 0) set_Value (COLUMNNAME_C_Invoice_ID, null); - else - set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID)); - } - - /** Get Invoice. - @return Invoice Identifier - */ - public int getC_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Address. - @param C_Location_ID - Location or Address - */ - public void setC_Location_ID (int C_Location_ID) - { - if (C_Location_ID <= 0) set_Value (COLUMNNAME_C_Location_ID, null); - else - set_Value (COLUMNNAME_C_Location_ID, Integer.valueOf(C_Location_ID)); - } - - /** Get Address. - @return Location or Address - */ - public int getC_Location_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Location_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_PaymentTerm getI_C_PaymentTerm() throws Exception - { - Class clazz = MTable.getClass(I_C_PaymentTerm.Table_Name); - I_C_PaymentTerm result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Payment Term. - @param C_PaymentTerm_ID - The terms of Payment (timing, discount) - */ - public void setC_PaymentTerm_ID (int C_PaymentTerm_ID) - { - if (C_PaymentTerm_ID <= 0) set_Value (COLUMNNAME_C_PaymentTerm_ID, null); - else - set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID)); - } - - /** Get Payment Term. - @return The terms of Payment (timing, discount) - */ - public int getC_PaymentTerm_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Project. - @param C_Project_ID - Financial Project - */ - public void setC_Project_ID (int C_Project_ID) - { - if (C_Project_ID <= 0) set_Value (COLUMNNAME_C_Project_ID, null); - else - set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID)); - } - - /** Get Project. - @return Financial Project - */ - public int getC_Project_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Region getI_C_Region() throws Exception - { - Class clazz = MTable.getClass(I_C_Region.Table_Name); - I_C_Region result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Region)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Region_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Region. - @param C_Region_ID - Identifies a geographical Region - */ - public void setC_Region_ID (int C_Region_ID) - { - if (C_Region_ID <= 0) set_Value (COLUMNNAME_C_Region_ID, null); - else - set_Value (COLUMNNAME_C_Region_ID, Integer.valueOf(C_Region_ID)); - } - - /** Get Region. - @return Identifies a geographical Region - */ - public int getC_Region_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Region_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - public I_C_Tax getI_C_Tax() throws Exception - { - Class clazz = MTable.getClass(I_C_Tax.Table_Name); - I_C_Tax result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_C_Tax)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Tax_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Tax. - @param C_Tax_ID - Tax identifier - */ - public void setC_Tax_ID (int C_Tax_ID) - { - if (C_Tax_ID <= 0) set_Value (COLUMNNAME_C_Tax_ID, null); - else - set_Value (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); - } - - /** Get Tax. - @return Tax identifier - */ - public int getC_Tax_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set City. - @param City - Identifies a City - */ - public void setCity (String City) - { - if (City != null && City.length() > 60) - { - log.warning("Length > 60 - truncated"); - City = City.substring(0, 59); - } - set_Value (COLUMNNAME_City, City); - } - - /** Get City. - @return Identifies a City - */ - public String getCity () - { - return (String)get_Value(COLUMNNAME_City); - } - - /** Set Contact Name. - @param ContactName - Business Partner Contact Name - */ - public void setContactName (String ContactName) - { - if (ContactName != null && ContactName.length() > 60) - { - log.warning("Length > 60 - truncated"); - ContactName = ContactName.substring(0, 59); - } - set_Value (COLUMNNAME_ContactName, ContactName); - } - - /** Get Contact Name. - @return Business Partner Contact Name - */ - public String getContactName () - { - return (String)get_Value(COLUMNNAME_ContactName); - } - - /** Set ISO Country Code. - @param CountryCode - Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html - */ - public void setCountryCode (boolean CountryCode) - { - set_Value (COLUMNNAME_CountryCode, Boolean.valueOf(CountryCode)); - } - - /** Get ISO Country Code. - @return Upper-case two-letter alphanumeric ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html - */ - public boolean isCountryCode () - { - Object oo = get_Value(COLUMNNAME_CountryCode); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Account Date. - @param DateAcct - Accounting Date - */ - public void setDateAcct (Timestamp DateAcct) - { - set_Value (COLUMNNAME_DateAcct, DateAcct); - } - - /** Get Account Date. - @return Accounting Date - */ - public Timestamp getDateAcct () - { - return (Timestamp)get_Value(COLUMNNAME_DateAcct); - } - - /** Set Date Invoiced. - @param DateInvoiced - Date printed on Invoice - */ - public void setDateInvoiced (Timestamp DateInvoiced) - { - set_Value (COLUMNNAME_DateInvoiced, DateInvoiced); - } - - /** Get Date Invoiced. - @return Date printed on Invoice - */ - public Timestamp getDateInvoiced () - { - return (Timestamp)get_Value(COLUMNNAME_DateInvoiced); - } - - /** Set Description. - @param Description - Optional short description of the record - */ - public void setDescription (String Description) - { - if (Description != null && Description.length() > 255) - { - log.warning("Length > 255 - truncated"); - Description = Description.substring(0, 254); - } - set_Value (COLUMNNAME_Description, Description); - } - - /** Get Description. - @return Optional short description of the record - */ - public String getDescription () - { - return (String)get_Value(COLUMNNAME_Description); - } - - /** Set Document Type Name. - @param DocTypeName - Name of the Document Type - */ - public void setDocTypeName (String DocTypeName) - { - if (DocTypeName != null && DocTypeName.length() > 60) - { - log.warning("Length > 60 - truncated"); - DocTypeName = DocTypeName.substring(0, 59); - } - set_Value (COLUMNNAME_DocTypeName, DocTypeName); - } - - /** Get Document Type Name. - @return Name of the Document Type - */ - public String getDocTypeName () - { - return (String)get_Value(COLUMNNAME_DocTypeName); - } - - /** Set Document No. - @param DocumentNo - Document sequence number of the document - */ - public void setDocumentNo (String DocumentNo) - { - if (DocumentNo != null && DocumentNo.length() > 30) - { - log.warning("Length > 30 - truncated"); - DocumentNo = DocumentNo.substring(0, 29); - } - set_Value (COLUMNNAME_DocumentNo, DocumentNo); - } - - /** Get Document No. - @return Document sequence number of the document - */ - public String getDocumentNo () - { - return (String)get_Value(COLUMNNAME_DocumentNo); - } - - /** Set EMail Address. - @param EMail - Electronic Mail Address - */ - public void setEMail (String EMail) - { - if (EMail != null && EMail.length() > 60) - { - log.warning("Length > 60 - truncated"); - EMail = EMail.substring(0, 59); - } - set_Value (COLUMNNAME_EMail, EMail); - } - - /** Get EMail Address. - @return Electronic Mail Address - */ - public String getEMail () - { - return (String)get_Value(COLUMNNAME_EMail); - } - - /** Set Import Error Message. - @param I_ErrorMsg - Messages generated from import process - */ - public void setI_ErrorMsg (String I_ErrorMsg) - { - if (I_ErrorMsg != null && I_ErrorMsg.length() > 2000) - { - log.warning("Length > 2000 - truncated"); - I_ErrorMsg = I_ErrorMsg.substring(0, 1999); - } - set_Value (COLUMNNAME_I_ErrorMsg, I_ErrorMsg); - } - - /** Get Import Error Message. - @return Messages generated from import process - */ - public String getI_ErrorMsg () - { - return (String)get_Value(COLUMNNAME_I_ErrorMsg); - } - - /** Set Import Invoice. - @param I_Invoice_ID - Import Invoice - */ - public void setI_Invoice_ID (int I_Invoice_ID) - { - if (I_Invoice_ID < 1) - throw new IllegalArgumentException ("I_Invoice_ID is mandatory."); - set_ValueNoCheck (COLUMNNAME_I_Invoice_ID, Integer.valueOf(I_Invoice_ID)); - } - - /** Get Import Invoice. - @return Import Invoice - */ - public int getI_Invoice_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_I_Invoice_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Imported. - @param I_IsImported - Has this import been processed - */ - public void setI_IsImported (boolean I_IsImported) - { - set_Value (COLUMNNAME_I_IsImported, Boolean.valueOf(I_IsImported)); - } - - /** Get Imported. - @return Has this import been processed - */ - public boolean isI_IsImported () - { - Object oo = get_Value(COLUMNNAME_I_IsImported); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Sales Transaction. - @param IsSOTrx - This is a Sales Transaction - */ - public void setIsSOTrx (boolean IsSOTrx) - { - set_Value (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx)); - } - - /** Get Sales Transaction. - @return This is a Sales Transaction - */ - public boolean isSOTrx () - { - Object oo = get_Value(COLUMNNAME_IsSOTrx); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Line Description. - @param LineDescription - Description of the Line - */ - public void setLineDescription (String LineDescription) - { - if (LineDescription != null && LineDescription.length() > 255) - { - log.warning("Length > 255 - truncated"); - LineDescription = LineDescription.substring(0, 254); - } - set_Value (COLUMNNAME_LineDescription, LineDescription); - } - - /** Get Line Description. - @return Description of the Line - */ - public String getLineDescription () - { - return (String)get_Value(COLUMNNAME_LineDescription); - } - - public I_M_PriceList getI_M_PriceList() throws Exception - { - Class clazz = MTable.getClass(I_M_PriceList.Table_Name); - I_M_PriceList result = null; - try { - Constructor constructor = null; - constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class}); - result = (I_M_PriceList)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_PriceList_ID()), get_TrxName()}); - } catch (Exception e) { - log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e); - log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz); - throw e; - } - return result; - } - - /** Set Price List. - @param M_PriceList_ID - Unique identifier of a Price List - */ - public void setM_PriceList_ID (int M_PriceList_ID) - { - if (M_PriceList_ID <= 0) set_Value (COLUMNNAME_M_PriceList_ID, null); - else - set_Value (COLUMNNAME_M_PriceList_ID, Integer.valueOf(M_PriceList_ID)); - } - - /** Get Price List. - @return Unique identifier of a Price List - */ - public int getM_PriceList_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID <= 0) set_Value (COLUMNNAME_M_Product_ID, null); - else - set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Name. - @param Name - Alphanumeric identifier of the entity - */ - public void setName (String Name) - { - if (Name != null && Name.length() > 60) - { - log.warning("Length > 60 - truncated"); - Name = Name.substring(0, 59); - } - set_Value (COLUMNNAME_Name, Name); - } - - /** Get Name. - @return Alphanumeric identifier of the entity - */ - public String getName () - { - return (String)get_Value(COLUMNNAME_Name); - } - - /** Set Payment Term Key. - @param PaymentTermValue - Key of the Payment Term - */ - public void setPaymentTermValue (String PaymentTermValue) - { - if (PaymentTermValue != null && PaymentTermValue.length() > 40) - { - log.warning("Length > 40 - truncated"); - PaymentTermValue = PaymentTermValue.substring(0, 39); - } - set_Value (COLUMNNAME_PaymentTermValue, PaymentTermValue); - } - - /** Get Payment Term Key. - @return Key of the Payment Term - */ - public String getPaymentTermValue () - { - return (String)get_Value(COLUMNNAME_PaymentTermValue); - } - - /** Set Phone. - @param Phone - Identifies a telephone number - */ - public void setPhone (String Phone) - { - if (Phone != null && Phone.length() > 40) - { - log.warning("Length > 40 - truncated"); - Phone = Phone.substring(0, 39); - } - set_Value (COLUMNNAME_Phone, Phone); - } - - /** Get Phone. - @return Identifies a telephone number - */ - public String getPhone () - { - return (String)get_Value(COLUMNNAME_Phone); - } - - /** Set ZIP. - @param Postal - Postal code - */ - public void setPostal (String Postal) - { - if (Postal != null && Postal.length() > 10) - { - log.warning("Length > 10 - truncated"); - Postal = Postal.substring(0, 9); - } - set_Value (COLUMNNAME_Postal, Postal); - } - - /** Get ZIP. - @return Postal code - */ - public String getPostal () - { - return (String)get_Value(COLUMNNAME_Postal); - } - - /** Set Unit Price. - @param PriceActual - Actual Price - */ - public void setPriceActual (BigDecimal PriceActual) - { - set_Value (COLUMNNAME_PriceActual, PriceActual); - } - - /** Get Unit Price. - @return Actual Price - */ - public BigDecimal getPriceActual () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceActual); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Processed. - @param Processed - The document has been processed - */ - public void setProcessed (boolean Processed) - { - set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); - } - - /** Get Processed. - @return The document has been processed - */ - public boolean isProcessed () - { - Object oo = get_Value(COLUMNNAME_Processed); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Process Now. - @param Processing Process Now */ - public void setProcessing (boolean Processing) - { - set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); - } - /** Get Process Now. -@return Process Now */ - public boolean isProcessing () - { - Object oo = get_Value(COLUMNNAME_Processing); - if (oo != null) - { - if (oo instanceof Boolean) - return ((Boolean)oo).booleanValue(); - return "Y".equals(oo); - } - return false; - } - - /** Set Product Key. - @param ProductValue - Key of the Product - */ - public void setProductValue (String ProductValue) - { - if (ProductValue != null && ProductValue.length() > 40) - { - log.warning("Length > 40 - truncated"); - ProductValue = ProductValue.substring(0, 39); - } - set_Value (COLUMNNAME_ProductValue, ProductValue); - } - - /** Get Product Key. - @return Key of the Product - */ - public String getProductValue () - { - return (String)get_Value(COLUMNNAME_ProductValue); - } - - /** Set Ordered Quantity. - @param QtyOrdered - Ordered Quantity - */ - public void setQtyOrdered (BigDecimal QtyOrdered) - { - set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); - } - - /** Get Ordered Quantity. - @return Ordered Quantity - */ - public BigDecimal getQtyOrdered () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Region. - @param RegionName - Name of the Region - */ - public void setRegionName (String RegionName) - { - if (RegionName != null && RegionName.length() > 60) - { - log.warning("Length > 60 - truncated"); - RegionName = RegionName.substring(0, 59); - } - set_Value (COLUMNNAME_RegionName, RegionName); - } - - /** Get Region. - @return Name of the Region - */ - public String getRegionName () - { - return (String)get_Value(COLUMNNAME_RegionName); - } - - /** Set SKU. - @param SKU - Stock Keeping Unit - */ - public void setSKU (String SKU) - { - if (SKU != null && SKU.length() > 30) - { - log.warning("Length > 30 - truncated"); - SKU = SKU.substring(0, 29); - } - set_Value (COLUMNNAME_SKU, SKU); - } - - /** Get SKU. - @return Stock Keeping Unit - */ - public String getSKU () - { - return (String)get_Value(COLUMNNAME_SKU); - } + @return Process Now */ + public boolean isProcessing () + { + Object oo = get_Value(COLUMNNAME_Processing); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } -/** SalesRep_ID AD_Reference_ID=190 */ -public static final int SALESREP_ID_AD_Reference_ID=190; - /** Set Sales Representative. - @param SalesRep_ID - Sales Representative or Company Agent - */ - public void setSalesRep_ID (int SalesRep_ID) - { - if (SalesRep_ID <= 0) set_Value (COLUMNNAME_SalesRep_ID, null); - else - set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); - } - - /** Get Sales Representative. - @return Sales Representative or Company Agent - */ - public int getSalesRep_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Tax Amount. - @param TaxAmt - Tax Amount for a document - */ - public void setTaxAmt (BigDecimal TaxAmt) - { - set_Value (COLUMNNAME_TaxAmt, TaxAmt); - } - - /** Get Tax Amount. - @return Tax Amount for a document - */ - public BigDecimal getTaxAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Tax Indicator. - @param TaxIndicator - Short form for Tax to be printed on documents - */ - public void setTaxIndicator (String TaxIndicator) - { - if (TaxIndicator != null && TaxIndicator.length() > 5) - { - log.warning("Length > 5 - truncated"); - TaxIndicator = TaxIndicator.substring(0, 4); - } - set_Value (COLUMNNAME_TaxIndicator, TaxIndicator); - } - - /** Get Tax Indicator. - @return Short form for Tax to be printed on documents - */ - public String getTaxIndicator () - { - return (String)get_Value(COLUMNNAME_TaxIndicator); - } - - /** Set UPC/EAN. - @param UPC - Bar Code (Universal Product Code or its superset European Article Number) - */ - public void setUPC (String UPC) - { - if (UPC != null && UPC.length() > 30) - { - log.warning("Length > 30 - truncated"); - UPC = UPC.substring(0, 29); - } - set_Value (COLUMNNAME_UPC, UPC); - } - - /** Get UPC/EAN. - @return Bar Code (Universal Product Code or its superset European Article Number) - */ - public String getUPC () - { - return (String)get_Value(COLUMNNAME_UPC); - } + /** Set Product Key. + @param ProductValue + Key of the Product + */ + public void setProductValue (String ProductValue) + { + + if (ProductValue != null && ProductValue.length() > 40) + { + log.warning("Length > 40 - truncated"); + ProductValue = ProductValue.substring(0, 39); + } + set_Value (COLUMNNAME_ProductValue, ProductValue); + } + + /** Get Product Key. + @return Key of the Product + */ + public String getProductValue () + { + return (String)get_Value(COLUMNNAME_ProductValue); + } + + /** Set Project Key. + @param ProjectValue + Key of the Project + */ + public void setProjectValue (String ProjectValue) + { + + if (ProjectValue != null && ProjectValue.length() > 40) + { + log.warning("Length > 40 - truncated"); + ProjectValue = ProjectValue.substring(0, 39); + } + set_Value (COLUMNNAME_ProjectValue, ProjectValue); + } + + /** Get Project Key. + @return Key of the Project + */ + public String getProjectValue () + { + return (String)get_Value(COLUMNNAME_ProjectValue); + } + + /** Set Ordered Quantity. + @param QtyOrdered + Ordered Quantity + */ + public void setQtyOrdered (BigDecimal QtyOrdered) + { + set_Value (COLUMNNAME_QtyOrdered, QtyOrdered); + } + + /** Get Ordered Quantity. + @return Ordered Quantity + */ + public BigDecimal getQtyOrdered () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Region. + @param RegionName + Name of the Region + */ + public void setRegionName (String RegionName) + { + + if (RegionName != null && RegionName.length() > 60) + { + log.warning("Length > 60 - truncated"); + RegionName = RegionName.substring(0, 59); + } + set_Value (COLUMNNAME_RegionName, RegionName); + } + + /** Get Region. + @return Name of the Region + */ + public String getRegionName () + { + return (String)get_Value(COLUMNNAME_RegionName); + } + + /** Set SKU. + @param SKU + Stock Keeping Unit + */ + public void setSKU (String SKU) + { + + if (SKU != null && SKU.length() > 30) + { + log.warning("Length > 30 - truncated"); + SKU = SKU.substring(0, 29); + } + set_Value (COLUMNNAME_SKU, SKU); + } + + /** Get SKU. + @return Stock Keeping Unit + */ + public String getSKU () + { + return (String)get_Value(COLUMNNAME_SKU); + } + + /** SalesRep_ID AD_Reference_ID=190 */ + public static final int SALESREP_ID_AD_Reference_ID=190; + /** Set Sales Representative. + @param SalesRep_ID + Sales Representative or Company Agent + */ + public void setSalesRep_ID (int SalesRep_ID) + { + if (SalesRep_ID <= 0) + set_Value (COLUMNNAME_SalesRep_ID, null); + else + set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); + } + + /** Get Sales Representative. + @return Sales Representative or Company Agent + */ + public int getSalesRep_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Tax Amount. + @param TaxAmt + Tax Amount for a document + */ + public void setTaxAmt (BigDecimal TaxAmt) + { + set_Value (COLUMNNAME_TaxAmt, TaxAmt); + } + + /** Get Tax Amount. + @return Tax Amount for a document + */ + public BigDecimal getTaxAmt () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Tax Indicator. + @param TaxIndicator + Short form for Tax to be printed on documents + */ + public void setTaxIndicator (String TaxIndicator) + { + + if (TaxIndicator != null && TaxIndicator.length() > 5) + { + log.warning("Length > 5 - truncated"); + TaxIndicator = TaxIndicator.substring(0, 4); + } + set_Value (COLUMNNAME_TaxIndicator, TaxIndicator); + } + + /** Get Tax Indicator. + @return Short form for Tax to be printed on documents + */ + public String getTaxIndicator () + { + return (String)get_Value(COLUMNNAME_TaxIndicator); + } + + /** Set UPC/EAN. + @param UPC + Bar Code (Universal Product Code or its superset European Article Number) + */ + public void setUPC (String UPC) + { + + if (UPC != null && UPC.length() > 30) + { + log.warning("Length > 30 - truncated"); + UPC = UPC.substring(0, 29); + } + set_Value (COLUMNNAME_UPC, UPC); + } + + /** Get UPC/EAN. + @return Bar Code (Universal Product Code or its superset European Article Number) + */ + public String getUPC () + { + return (String)get_Value(COLUMNNAME_UPC); + } } \ No newline at end of file diff --git a/base/src/org/compiere/process/ImportInvoice.java b/base/src/org/compiere/process/ImportInvoice.java index 4ebf81009c..0ba4852a15 100644 --- a/base/src/org/compiere/process/ImportInvoice.java +++ b/base/src/org/compiere/process/ImportInvoice.java @@ -1,5 +1,5 @@ /****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * + * Product: Adempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * @@ -26,7 +26,7 @@ import org.compiere.util.*; * Import Invoice from I_Invoice * * @author Jorg Janke - * @version $Id: ImportInvoice.java,v 1.2 2006/07/30 00:51:01 jjanke Exp $ + * @version $Id: ImportInvoice.java,v 1.1 2007/09/05 09:27:31 cruiz Exp $ */ public class ImportInvoice extends SvrProcess { @@ -244,6 +244,52 @@ public class ImportInvoice extends SvrProcess if (no != 0) log.warning ("No PaymentTerm=" + no); + // globalqss - Add project and activity + // Project + sql = new StringBuffer ("UPDATE I_Invoice o " + + "SET C_Project_ID=(SELECT C_Project_ID FROM C_Project p" + + " WHERE o.ProjectValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) " + + "WHERE C_Project_ID IS NULL AND ProjectValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + log.fine("Set Project=" + no); + sql = new StringBuffer ("UPDATE I_Invoice " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Project, ' " + + "WHERE C_Project_ID IS NULL AND (ProjectValue IS NOT NULL)" + + " AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + if (no != 0) + log.warning ("Invalid Project=" + no); + // Activity + sql = new StringBuffer ("UPDATE I_Invoice o " + + "SET C_Activity_ID=(SELECT C_Activity_ID FROM C_Activity p" + + " WHERE o.ActivityValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) " + + "WHERE C_Activity_ID IS NULL AND ActivityValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + log.fine("Set Activity=" + no); + sql = new StringBuffer ("UPDATE I_Invoice " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Activity, ' " + + "WHERE C_Activity_ID IS NULL AND (ActivityValue IS NOT NULL)" + + " AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + if (no != 0) + log.warning ("Invalid Activity=" + no); + // globalqss - add charge + // Charge + sql = new StringBuffer ("UPDATE I_Invoice o " + + "SET C_Charge_ID=(SELECT C_Charge_ID FROM C_Charge p" + + " WHERE o.ChargeName=p.Name AND o.AD_Client_ID=p.AD_Client_ID) " + + "WHERE C_Charge_ID IS NULL AND ChargeName IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + log.fine("Set Charge=" + no); + sql = new StringBuffer ("UPDATE I_Invoice " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Charge, ' " + + "WHERE C_Charge_ID IS NULL AND (ChargeName IS NOT NULL)" + + " AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + if (no != 0) + log.warning ("Invalid Charge=" + no); + // + // BP from EMail sql = new StringBuffer ("UPDATE I_Invoice o " + "SET (C_BPartner_ID,AD_User_ID)=(SELECT C_BPartner_ID,AD_User_ID FROM AD_User u" @@ -394,7 +440,16 @@ public class ImportInvoice extends SvrProcess if (no != 0) log.warning ("Invalid Product=" + no); - // Tax + // globalqss - charge and product are exclusive + sql = new StringBuffer ("UPDATE I_Invoice " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Product and Charge, ' " + + "WHERE M_Product_ID IS NOT NULL AND C_Charge_ID IS NOT NULL " + + " AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + if (no != 0) + log.warning ("Invalid Product and Charge exclusive=" + no); + + // Tax sql = new StringBuffer ("UPDATE I_Invoice o " + "SET C_Tax_ID=(SELECT MAX(C_Tax_ID) FROM C_Tax t" + " WHERE o.TaxIndicator=t.TaxIndicator AND o.AD_Client_ID=t.AD_Client_ID) " @@ -637,6 +692,10 @@ public class ImportInvoice extends SvrProcess lineNo += 10; if (imp.getM_Product_ID() != 0) line.setM_Product_ID(imp.getM_Product_ID(), true); + // globalqss - import invoice with charges + if (imp.getC_Charge_ID() != 0) + line.setC_Charge_ID(imp.getC_Charge_ID()); + // line.setQty(imp.getQtyOrdered()); line.setPrice(); BigDecimal price = imp.getPriceActual(); @@ -686,4 +745,4 @@ public class ImportInvoice extends SvrProcess return ""; } // doIt -} // ImportInvoice +} // ImportInvoice \ No newline at end of file diff --git a/migration/330-trunk/011_FR_1789836 .sql b/migration/330-trunk/011_FR_1789836 .sql new file mode 100644 index 0000000000..01200509e6 --- /dev/null +++ b/migration/330-trunk/011_FR_1789836 .sql @@ -0,0 +1,178 @@ +-- [ 1789836 ] Add fields to Import Invoice - allow import charges +-- http://sourceforge.net/tracker/index.php?func=detail&aid=1789836&group_id=176962&atid=879335 + +ALTER TABLE I_INVOICE ADD (projectvalue NVARCHAR2(40)); + +ALTER TABLE I_INVOICE ADD (activityvalue NVARCHAR2(40)); + +ALTER TABLE I_INVOICE ADD (chargename NVARCHAR2(60)); + +ALTER TABLE I_INVOICE ADD (c_charge_id NUMBER(10)); + +INSERT INTO AD_ELEMENT + (ad_element_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + columnname, entitytype, NAME, printname + ) + VALUES (53222, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'ActivityValue', 'U', 'ActivityValue', 'ActivityValue' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, VERSION, entitytype, + columnname, ad_table_id, ad_reference_id, fieldlength, iskey, + isparent, ismandatory, isupdateable, isidentifier, istranslated, + isencrypted, isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable + ) + VALUES (53241, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Project Key', 'Key of the Project', 0, 'U', + 'ProjectValue', 598, 10, 40, 'N', + 'N', 'N', 'Y', 'N', 'N', + 'N', 'N', 2118, 'Y', + 'N' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, + HELP, + VERSION, entitytype, columnname, ad_table_id, ad_reference_id, + fieldlength, iskey, isparent, ismandatory, isupdateable, + isidentifier, istranslated, isencrypted, isselectioncolumn, + ad_element_id, issyncdatabase, isalwaysupdateable + ) + VALUES (53242, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Charge', 'Additional document charges', + 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', + 0, 'U', 'C_Charge_ID', 598, 19, + 10, 'N', 'N', 'N', 'Y', + 'N', 'N', 'N', 'N', + 968, 'Y', 'N' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, VERSION, entitytype, columnname, ad_table_id, + ad_reference_id, fieldlength, iskey, isparent, ismandatory, + isupdateable, isidentifier, istranslated, isencrypted, + isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable + ) + VALUES (53243, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'ActivityValue', 0, 'U', 'ActivityValue', 598, + 10, 40, 'N', 'N', 'N', + 'Y', 'N', 'N', 'N', + 'N', 53222, 'Y', + 'N' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, VERSION, entitytype, columnname, + ad_table_id, ad_reference_id, fieldlength, iskey, isparent, + ismandatory, isupdateable, isidentifier, istranslated, + isencrypted, isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable + ) + VALUES (53244, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:46', 'MM/DD/YYYY HH24:MI:SS'), + TO_DATE ('09/04/2007 22:54:46', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Charge Name', 'Name of the Charge', 0, 'U', 'ChargeName', + 598, 10, 60, 'N', 'N', + 'N', 'Y', 'N', 'N', + 'N', 'N', 2096, 'Y', + 'N' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, iscentrallymaintained, ad_tab_id, ad_column_id, + isdisplayed, displaylength, isreadonly, seqno, sortno, + issameline, isheading, isfieldonly, isencrypted, entitytype + ) + VALUES (53251, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'ActivityValue', 'Y', 510, 53243, + 'Y', 40, 'N', 498, 0, + 'N', 'N', 'N', 'N', 'U' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, iscentrallymaintained, ad_tab_id, + ad_column_id, ad_fieldgroup_id, isdisplayed, displaylength, + isreadonly, seqno, sortno, issameline, isheading, isfieldonly, + isencrypted, entitytype + ) + VALUES (53252, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Project Key', 'Key of the Project', 'Y', 510, + 53241, 104, 'Y', 40, + 'N', 478, 0, 'N', 'N', 'N', + 'N', 'U' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, + HELP, + iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed, + displaylength, isreadonly, seqno, sortno, issameline, isheading, + isfieldonly, isencrypted, entitytype + ) + VALUES (53253, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Charge', 'Additional document charges', + 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', + 'Y', 510, 53242, 'Y', + 10, 'N', 392, 0, 'N', 'N', + 'N', 'N', 'U' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, iscentrallymaintained, ad_tab_id, + ad_column_id, isdisplayed, displaylength, isreadonly, seqno, + sortno, issameline, isheading, isfieldonly, isencrypted, + entitytype + ) + VALUES (53254, 0, 0, 'Y', + TO_DATE ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_DATE ('09/04/2007 22:57:16', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Charge Name', 'Name of the Charge', 'Y', 510, + 53244, 'Y', 40, 'N', 394, + 0, 'Y', 'N', 'N', 'N', + 'U' + ); + +COMMIT ; diff --git a/migration/330-trunk/postgresql/011_FR_1789836 .sql b/migration/330-trunk/postgresql/011_FR_1789836 .sql new file mode 100644 index 0000000000..534a8460af --- /dev/null +++ b/migration/330-trunk/postgresql/011_FR_1789836 .sql @@ -0,0 +1,177 @@ +-- [ 1789836 ] Add fields to Import Invoice - allow import charges +-- http://sourceforge.net/tracker/index.php?func=detail&aid=1789836&group_id=176962&atid=879335 + +ALTER TABLE I_INVOICE ADD COLUMN projectvalue VARCHAR(40) NULL; + +ALTER TABLE I_INVOICE ADD COLUMN activityvalue VARCHAR(40) NULL; + +ALTER TABLE I_INVOICE ADD COLUMN chargename VARCHAR(60) NULL; + +ALTER TABLE I_INVOICE ADD COLUMN c_charge_id NUMERIC(10,0) NULL; + +INSERT INTO AD_ELEMENT + (ad_element_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + columnname, entitytype, NAME, printname + ) + VALUES (53222, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'ActivityValue', 'U', 'ActivityValue', 'ActivityValue' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, VERSION, entitytype, + columnname, ad_table_id, ad_reference_id, fieldlength, iskey, + isparent, ismandatory, isupdateable, isidentifier, istranslated, + isencrypted, isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable + ) + VALUES (53241, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Project Key', 'Key of the Project', 0, 'U', + 'ProjectValue', 598, 10, 40, 'N', + 'N', 'N', 'Y', 'N', 'N', + 'N', 'N', 2118, 'Y', + 'N' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, + HELP, + VERSION, entitytype, columnname, ad_table_id, ad_reference_id, + fieldlength, iskey, isparent, ismandatory, isupdateable, + isidentifier, istranslated, isencrypted, isselectioncolumn, + ad_element_id, issyncdatabase, isalwaysupdateable + ) + VALUES (53242, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Charge', 'Additional document charges', + 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', + 0, 'U', 'C_Charge_ID', 598, 19, + 10, 'N', 'N', 'N', 'Y', + 'N', 'N', 'N', 'N', + 968, 'Y', 'N' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, VERSION, entitytype, columnname, ad_table_id, + ad_reference_id, fieldlength, iskey, isparent, ismandatory, + isupdateable, isidentifier, istranslated, isencrypted, + isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable + ) + VALUES (53243, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'ActivityValue', 0, 'U', 'ActivityValue', 598, + 10, 40, 'N', 'N', 'N', + 'Y', 'N', 'N', 'N', + 'N', 53222, 'Y', + 'N' + ); + +INSERT INTO AD_COLUMN + (ad_column_id, ad_client_id, ad_org_id, isactive, + created, + updated, createdby, + updatedby, NAME, description, VERSION, entitytype, columnname, + ad_table_id, ad_reference_id, fieldlength, iskey, isparent, + ismandatory, isupdateable, isidentifier, istranslated, + isencrypted, isselectioncolumn, ad_element_id, issyncdatabase, + isalwaysupdateable + ) + VALUES (53244, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:46', 'MM/DD/YYYY HH24:MI:SS'), + TO_TIMESTAMP ('09/04/2007 22:54:46', 'MM/DD/YYYY HH24:MI:SS'), 100, + 100, 'Charge Name', 'Name of the Charge', 0, 'U', 'ChargeName', + 598, 10, 60, 'N', 'N', + 'N', 'Y', 'N', 'N', + 'N', 'N', 2096, 'Y', + 'N' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, iscentrallymaintained, ad_tab_id, ad_column_id, + isdisplayed, displaylength, isreadonly, seqno, sortno, + issameline, isheading, isfieldonly, isencrypted, entitytype + ) + VALUES (53251, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'ActivityValue', 'Y', 510, 53243, + 'Y', 40, 'N', 498, 0, + 'N', 'N', 'N', 'N', 'U' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, iscentrallymaintained, ad_tab_id, + ad_column_id, ad_fieldgroup_id, isdisplayed, displaylength, + isreadonly, seqno, sortno, issameline, isheading, isfieldonly, + isencrypted, entitytype + ) + VALUES (53252, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Project Key', 'Key of the Project', 'Y', 510, + 53241, 104, 'Y', 40, + 'N', 478, 0, 'N', 'N', 'N', + 'N', 'U' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, + HELP, + iscentrallymaintained, ad_tab_id, ad_column_id, isdisplayed, + displaylength, isreadonly, seqno, sortno, issameline, isheading, + isfieldonly, isencrypted, entitytype + ) + VALUES (53253, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Charge', 'Additional document charges', + 'The Charge indicates a type of Charge (Handling, Shipping, Restocking)', + 'Y', 510, 53242, 'Y', + 10, 'N', 392, 0, 'N', 'N', + 'N', 'N', 'U' + ); + +INSERT INTO AD_FIELD + (ad_field_id, ad_client_id, ad_org_id, isactive, + created, createdby, + updated, updatedby, + NAME, description, iscentrallymaintained, ad_tab_id, + ad_column_id, isdisplayed, displaylength, isreadonly, seqno, + sortno, issameline, isheading, isfieldonly, isencrypted, + entitytype + ) + VALUES (53254, 0, 0, 'Y', + TO_TIMESTAMP ('09/04/2007 22:54:47', 'MM/DD/YYYY HH24:MI:SS'), 100, + TO_TIMESTAMP ('09/04/2007 22:57:16', 'MM/DD/YYYY HH24:MI:SS'), 100, + 'Charge Name', 'Name of the Charge', 'Y', 510, + 53244, 'Y', 40, 'N', 394, + 0, 'Y', 'N', 'N', 'N', + 'U' + ); +