Integrate Fixed Assets

This commit is contained in:
Carlos Ruiz 2008-05-31 02:43:50 +00:00
parent 1cb7f8c208
commit 4b805febaa
97 changed files with 99445 additions and 21 deletions

View File

@ -0,0 +1,229 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import org.compiere.process.*;
import org.compiere.model.*;
import org.compiere.util.DB;
import java.math.BigDecimal;
/**
* Dispose Asset
*
* @author Rob klein
* @version $Id: AssetDisposed.java,v 1.0$
*/
public class AssetDisposed extends SvrProcess
{
/** Record ID */
private int p_Asset_Disposed_ID = 0;
private boolean m_DeleteOld = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("DeleteOld"))
m_DeleteOld = "Y".equals(para[i].getParameter());
else
log.info("prepare - Unknown Parameter: " + name);
}
p_Asset_Disposed_ID = getRecord_ID();
} // prepare
/**
* Build Depreciation Workfile
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("doIt - Asset_Disposed_ID=" + p_Asset_Disposed_ID);
if (p_Asset_Disposed_ID == 0)
throw new IllegalArgumentException("No Record");
String sql = null;
//
int no = 0;
BigDecimal v_Balance = new BigDecimal("0.0");
X_A_Asset_Disposed AssetDisposed = new X_A_Asset_Disposed (getCtx(), p_Asset_Disposed_ID, null);
String clientCheck = " AND AD_Client_ID=" + AssetDisposed.getAD_Client_ID();
if (m_DeleteOld)
{
sql = "DELETE A_DEPRECIATION_EXP "
+ "WHERE Processed='Y'"
+ " AND A_Entry_Type = 'DIS'" + clientCheck;
no = DB.executeUpdate (sql,null);
log.info ("doIt - Delete old processed entries =" + no);
}
sql = null;
log.info("doIt - Starting Disposal = " + no);
sql = "SELECT A.A_ASSET_ID, A.POSTINGTYPE, A.A_DEPRECIATION_ACCT, "
+ " A.A_ACCUMDEPRECIATION_ACCT, A.A_DISPOSAL_LOSS, A.A_DISPOSAL_REVENUE, "
+ " A.A_ASSET_ACCT, A.A_SPLIT_PERCENT, A.AD_ORG_ID, A.AD_CLIENT_ID, "
+ " B.A_ASSET_COST, B.A_ACCUMULATED_DEPR "
+ " FROM A_ASSET_ACCT A, A_DEPRECIATION_WORKFILE B "
+ " WHERE A.A_ASSET_ID = " + AssetDisposed.getA_Asset_ID()
+ " and B.A_ASSET_ID = " + AssetDisposed.getA_Asset_ID()
+ " and A.POSTINGTYPE = B.POSTINGTYPE"
+ " and A.AD_CLIENT_ID = B.AD_CLIENT_ID";
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql,null);
log.info("doIt - SQL=" + sql);
String v_PostingType = null;
//X_A_Depreciation_Exp depexp = new X_A_Depreciation_Exp (getCtx(), 0, null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
if (v_PostingType != rs.getString("PostingType") & v_PostingType != null)
{
sql = "UPDATE A_DEPRECIATION_WORKFILE "
+ "SET A_ACCUMULATED_DEPR = " + v_Balance
+ "WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + AssetDisposed.getA_Asset_ID()
+ "AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + v_PostingType + "'";
DB.executeUpdate(sql,null);
v_Balance = new BigDecimal("0.0");
v_PostingType = rs.getString("PostingType");
}
else if (v_PostingType == null)
{
v_PostingType = rs.getString("PostingType");
}
// Create JV for the asset disposal - remove cost of asset on balance sheet
X_A_Depreciation_Exp depexp0 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp0.setPostingType(rs.getString("PostingType"));
depexp0.setA_Asset_ID(AssetDisposed.getA_Asset_ID());
depexp0.setExpense(rs.getBigDecimal("A_Asset_Cost").multiply(new BigDecimal(-1)).multiply(rs.getBigDecimal("A_Split_Percent")));
depexp0.setDateAcct(AssetDisposed.getDateAcct());
depexp0.setA_Account_Number(rs.getInt("A_Asset_Acct"));
depexp0.setDescription("Asset Disposed - Cost of Asset");
depexp0.setIsDepreciated(true);
depexp0.setA_Period(AssetDisposed.getC_Period_ID());
depexp0.setA_Entry_Type("DIS");
depexp0.save();
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setPostingType(rs.getString("PostingType"));
depexp1.setA_Asset_ID(AssetDisposed.getA_Asset_ID());
depexp1.setExpense(rs.getBigDecimal("A_Asset_Cost").multiply(rs.getBigDecimal("A_Split_Percent")));
depexp1.setDateAcct(AssetDisposed.getDateAcct());
depexp1.setA_Account_Number(rs.getInt("A_Disposal_Loss"));
depexp1.setDescription("Asset Disposed - Cost of Asset");
depexp1.setIsDepreciated(false);
depexp1.setA_Period(AssetDisposed.getC_Period_ID());
depexp1.setA_Entry_Type("DIS");
depexp1.save();
v_Balance = v_Balance.add(rs.getBigDecimal("A_Asset_Cost").multiply(rs.getBigDecimal("A_Split_Percent")));
// Create JV for the asset disposal - remove accumulated depreciation of the asset on balance sheet
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp2.setPostingType(rs.getString("PostingType"));
depexp2.setA_Asset_ID(AssetDisposed.getA_Asset_ID());
depexp2.setExpense(rs.getBigDecimal("A_Accumulated_Depr").multiply(rs.getBigDecimal("A_Split_Percent")));
depexp2.setDateAcct(AssetDisposed.getDateAcct());
depexp2.setA_Account_Number(rs.getInt("A_Accumdepreciation_Acct"));
depexp2.setDescription("Asset Disposed - Accum Depr");
depexp2.setIsDepreciated(true);
depexp2.setA_Period(AssetDisposed.getC_Period_ID());
depexp2.setA_Entry_Type("DIS");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setPostingType(rs.getString("PostingType"));
depexp3.setA_Asset_ID(AssetDisposed.getA_Asset_ID());
depexp3.setExpense(rs.getBigDecimal("A_Accumulated_Depr").multiply(new BigDecimal(-1)).multiply(rs.getBigDecimal("A_Split_Percent")));
depexp3.setDateAcct(AssetDisposed.getDateAcct());
depexp3.setA_Account_Number(rs.getInt("A_Disposal_Loss"));
depexp3.setDescription("Asset Disposed - Accum Depr");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(AssetDisposed.getC_Period_ID());
depexp3.setA_Entry_Type("DIS");
depexp3.save();
}
sql = "UPDATE A_ASSET "
+ "SET ISDISPOSED = 'Y',"
+ " ASSETDISPOSALDATE = " + DB.TO_DATE(AssetDisposed.getA_Disposed_Date())
+ " WHERE A_ASSET_ID = " + AssetDisposed.getA_Asset_ID();
DB.executeUpdate(sql,null);
sql = "UPDATE A_DEPRECIATION_WORKFILE "
+ "SET A_ACCUMULATED_DEPR = " + v_Balance
+ "WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + AssetDisposed.getA_Asset_ID()
+ "AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + v_PostingType + "'";
DB.executeUpdate(sql,null);
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setA_Asset_ID(AssetDisposed.getA_Asset_ID());
change.setChangeType("DIS");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "DIS"));
change.setAssetDisposalDate(AssetDisposed.getA_Disposed_Date());
change.setAssetAccumDepreciationAmt(v_Balance);
change.setIsFullyDepreciated(true);
change.setIsDisposed(true);
change.save();
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getDeliveries"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // AssetDisposed

View File

@ -0,0 +1,447 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import org.compiere.process.*;
import org.compiere.model.*;
import org.compiere.model.X_C_Period;
import org.compiere.util.DB;
//import java.math.*;
import java.math.BigDecimal;
/**
* Asset Revaluation Entry
*
* @author Rob Klein
* @version $Id: AssetRevalEntry.java,v 1.0$
*/
public class AssetRevalEntry extends SvrProcess
{
/** Record ID */
private int p_Asset_Reval_Entry_ID = 0;
private boolean m_DeleteOld = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("DeleteOld"))
m_DeleteOld = "Y".equals(para[i].getParameter());
else
log.info("prepare - Unknown Parameter: " + name);
}
p_Asset_Reval_Entry_ID = getRecord_ID();
} // prepare
/**
* Build Depreciation Workfile
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("doIt - Asset_Reval_Entry_ID=" + p_Asset_Reval_Entry_ID);
if (p_Asset_Reval_Entry_ID == 0)
throw new IllegalArgumentException("No Record");
//
int no = 0;
BigDecimal v_Cost_reval = new BigDecimal("0.0");
BigDecimal v_Cost_reval_pior = new BigDecimal("0.0");
BigDecimal v_Accum_reval = new BigDecimal("0.0");
BigDecimal v_Accum_reval_prior = new BigDecimal("0.0");
BigDecimal v_Current_exp_reval = new BigDecimal("0.0");
BigDecimal v_Multipler = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_reval = new BigDecimal("0.0");
X_A_Asset_Reval_Entry AssetReval = new X_A_Asset_Reval_Entry (getCtx(), p_Asset_Reval_Entry_ID, null);
X_C_Period Period = new X_C_Period (getCtx(), AssetReval.getC_Period_ID(), null);
String sql = null;
log.info("doIt - Starting Transfer = " + no);
String clientCheck = " AND AD_Client_ID=" + AssetReval.getAD_Client_ID();
sql = "SELECT A.A_REVAL_COST_OFFSET, A.A_REVAL_ACCUMDEP_OFFSET_CUR, A.A_REVAL_DEPEXP_OFFSET "
+ " A.A_ACCUMDEPRECIATION_ACCT, A.A_ASSET_ACCT, A.A_DEPRECIATION_ACCT, "
+ " A.A_REVAL_ACCUMDEP_OFFSET_PRIOR, A.A_REVAL_COST_OFFSET_PRIOR "
+ " B.A_ASSET_ID, B.A_ASSET_COST, B.A_ACCUMULATED_DEPR, B.A_ASSET_COST_REVAL, B.A_ACCUMULATED_DEPR_REVAL"
+ " FROM A_ASSET_ACCT A, A_DEPRECIATION_WORKFILE B"
+ " WHERE A.POSTINGTYPE = '" + AssetReval.getPostingType()
+ " AND B.POSTINGTYPE = '" + AssetReval.getPostingType()
+ " AND A.AD_Client_ID=" + AssetReval.getAD_Client_ID()
+ " AND B.AD_Client_ID=" + AssetReval.getAD_Client_ID()
+ " AND A.AD_Asset_ID = A.AD_Asset_ID";
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql,null);
log.info("doIt - SQL=" + sql);
X_A_Depreciation_Exp depexp = new X_A_Depreciation_Exp (getCtx(), 0, null);
if (m_DeleteOld)
{
sql = "DELETE A_DEPRECIATION_EXP "
+ "WHERE Processed='Y'"
+ " AND A_Entry_Type = 'RVL'" + clientCheck;
no = DB.executeUpdate (sql,null);
log.info ("doIt - Delete old processed entries =" + no);
}
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
String sql2 = "select A_ASSET_REVAL_INDEX_ID from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ AssetReval.getA_Effective_Date()
+ ")";
X_A_Asset_Reval_Index ARevalIndex = new X_A_Asset_Reval_Index (getCtx(), DB.getSQLValue(null ,sql), null);
MAsset Asset = new MAsset (getCtx(), rs.getInt("A_Asset_ID"), null);
if (AssetReval.getA_Reval_Multiplier() == "IND")
{
if (AssetReval.getA_Reval_Effective_Date() == "DA"){
sql2 = "Select A_REVAL_MULTIPLIER from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ Asset.getA_Asset_CreateDate()
+ ")";
}
else if (AssetReval.getA_Reval_Effective_Date() == "RD"){
sql2 = "Select A_REVAL_MULTIPLIER from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ Asset.getA_Asset_RevalDate()
+ ")";
}
else if (AssetReval.getA_Reval_Effective_Date() == "SD"){
sql2 = "Select A_REVAL_MULTIPLIER from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ Asset.getAssetServiceDate()
+ ")";
}
PreparedStatement pstmt2 = null;
pstmt2 = DB.prepareStatement (sql2,null);
log.info("doIt - SQL2=" + sql2);
try {
ResultSet rs2 = pstmt2.executeQuery();
while (rs2.next()){
v_Multipler = ARevalIndex.getA_Reval_Rate().divide(rs2.getBigDecimal("A_REVAL_MULTIPLIER"),8);
}
v_Cost_reval = ((rs.getBigDecimal("A_Asset_Cost").subtract(rs.getBigDecimal("A_ASSET_COST_REVAL"))).multiply( v_Multipler)).subtract(rs.getBigDecimal("A_Asset_Cost"));
v_Accum_reval = ((rs.getBigDecimal("A_ACCUMULATED_DEPR").subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR_REVAL"))).multiply( v_Multipler)).subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR"));
sql2 = "SELECT SUM(CHANGEAMT) AS SUM_CHANGEAMT FROM A_ASSET_CHANGE WHERE A_ASSET_ID = "
+ rs.getInt("A_Asset_ID")+ " AND CHANGETYPE = 'D'";
pstmt2 = DB.prepareStatement (sql2,null);
log.info("doIt - SQL2=" + sql2);
try {
rs2 = pstmt2.executeQuery();
while (rs2.next()){
v_Dep_Exp_reval = (rs2.getBigDecimal("SUM_CHANGEAMT").multiply( v_Multipler)).subtract(rs.getBigDecimal("SUM_CHANGEAMT"));
}
rs2.close();
pstmt2.close();
pstmt2 = null;
}
catch (Exception e)
{
log.info("getDeliveries"+ e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
// Create JV for the Reval Cost Amounts
X_A_Depreciation_Exp depexp0 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp0.setPostingType(AssetReval.getPostingType());
depexp0.setA_Asset_ID(Asset.getA_Asset_ID());
depexp0.setExpense(v_Cost_reval);
depexp0.setDateAcct(AssetReval.getDateAcct());
depexp0.setA_Account_Number(rs.getInt("A_ASSET_ACCT"));
depexp0.setDescription("Asset Revaluation");
depexp0.setIsDepreciated(false);
depexp0.setA_Period(AssetReval.getC_Period_ID());
depexp0.setA_Entry_Type("RVL");
depexp0.save();
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setPostingType(AssetReval.getPostingType());
depexp1.setA_Asset_ID(Asset.getA_Asset_ID());
depexp1.setExpense(v_Cost_reval.multiply(new BigDecimal(-1)));
depexp1.setDateAcct(AssetReval.getDateAcct());
depexp1.setA_Account_Number(rs.getInt("A_REVAL_COST_OFFSET"));
depexp1.setDescription("Asset Revaluation");
depexp1.setIsDepreciated(false);
depexp1.setA_Period(AssetReval.getC_Period_ID());
depexp1.setA_Entry_Type("RVL");
depexp1.save();
// Create JV for the Reval Accum Depr Amounts
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp2.setPostingType(AssetReval.getPostingType());
depexp2.setA_Asset_ID(Asset.getA_Asset_ID());
depexp2.setExpense(v_Accum_reval);
depexp2.setDateAcct(AssetReval.getDateAcct());
depexp2.setA_Account_Number(rs.getInt("A_ACCUMDEPRECIATION_ACCT"));
depexp2.setDescription("Asset Revaluation");
depexp2.setIsDepreciated(false);
depexp2.setA_Period(AssetReval.getC_Period_ID());
depexp2.setA_Entry_Type("RVL");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setPostingType(AssetReval.getPostingType());
depexp3.setA_Asset_ID(Asset.getA_Asset_ID());
depexp3.setExpense(v_Accum_reval.multiply(new BigDecimal(-1)));
depexp3.setDateAcct(AssetReval.getDateAcct());
depexp3.setA_Account_Number(rs.getInt("A_ACCUMULATED_DEPR_REVAL"));
depexp3.setDescription("Asset Revaluation");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(AssetReval.getC_Period_ID());
depexp3.setA_Entry_Type("RVL");
depexp3.save();
// Create JV for the Reval Depreciation Expense Amounts
X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp4.setPostingType(AssetReval.getPostingType());
depexp4.setA_Asset_ID(Asset.getA_Asset_ID());
depexp4.setExpense(v_Dep_Exp_reval);
depexp4.setDateAcct(AssetReval.getDateAcct());
depexp4.setA_Account_Number(rs.getInt("A_DEPRECIATION_ACCT"));
depexp4.setDescription("Asset Revaluation");
depexp4.setIsDepreciated(false);
depexp4.setA_Period(AssetReval.getC_Period_ID());
depexp4.setA_Entry_Type("RVL");
depexp4.save();
X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp5.setPostingType(AssetReval.getPostingType());
depexp5.setA_Asset_ID(Asset.getA_Asset_ID());
depexp5.setExpense(v_Dep_Exp_reval.multiply(new BigDecimal(-1)));
depexp5.setDateAcct(AssetReval.getDateAcct());
depexp5.setA_Account_Number(rs.getInt("A_REVAL_DEPEXP_OFFSET"));
depexp5.setDescription("Asset Revaluation");
depexp5.setIsDepreciated(false);
depexp5.setA_Period(AssetReval.getC_Period_ID());
depexp5.setA_Entry_Type("RVL");
depexp5.save();
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getDeliveries"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
}
else if (AssetReval.getA_Reval_Multiplier() == "FAC")
{
if (AssetReval.getA_Reval_Effective_Date() == "DA"){
sql2 = "Select A_REVAL_MULTIPLIER from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ Asset.getA_Asset_CreateDate()
+ ")";
}
else if (AssetReval.getA_Reval_Effective_Date() == "RD"){
sql2 = "Select A_REVAL_MULTIPLIER from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ Asset.getA_Asset_RevalDate()
+ ")";
}
else if (AssetReval.getA_Reval_Effective_Date() == "SD"){
sql2 = "Select A_REVAL_MULTIPLIER from A_ASSET_REVAL_INDEX where A_REVAL_CODE = " + AssetReval.getA_Rev_Code()
+ " and A_EFFECTIVE_DATE = (select MAX(A_EFFECTIVE_DATE) from A_ASSET_REVAL_INDEX where A_EFFECTIVE_DATE < "
+ Asset.getAssetServiceDate()
+ ")";
}
PreparedStatement pstmt2 = null;
pstmt2 = DB.prepareStatement (sql2,null);
log.info("doIt - SQL2=" + sql2);
try {
ResultSet rs2 = pstmt2.executeQuery();
while (rs2.next()){
v_Multipler = rs2.getBigDecimal("A_REVAL_MULTIPLIER");
}
v_Cost_reval = ((rs.getBigDecimal("A_Asset_Cost").subtract(rs.getBigDecimal("A_ASSET_COST_REVAL"))).multiply( v_Multipler)).subtract(rs.getBigDecimal("A_Asset_Cost"));
v_Accum_reval = ((rs.getBigDecimal("A_ACCUMULATED_DEPR").subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR_REVAL"))).multiply( v_Multipler)).subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR"));
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getDeliveries"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
}
v_Cost_reval = ((rs.getBigDecimal("A_Asset_Cost").subtract(rs.getBigDecimal("A_ASSET_COST_REVAL"))).multiply( v_Multipler)).subtract(rs.getBigDecimal("A_Asset_Cost"));
v_Accum_reval = ((rs.getBigDecimal("A_ACCUMULATED_DEPR").subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR_REVAL"))).multiply( v_Multipler)).subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR"));
// Create JV for the Reval Cost Amounts
X_A_Depreciation_Exp depexp0 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp0.setPostingType(AssetReval.getPostingType());
depexp0.setA_Asset_ID(Asset.getA_Asset_ID());
depexp0.setExpense(v_Cost_reval);
depexp0.setDateAcct(AssetReval.getDateAcct());
depexp0.setA_Account_Number(rs.getInt("A_ASSET_ACCT"));
depexp0.setDescription("Asset Revaluation");
depexp0.setIsDepreciated(false);
depexp0.setA_Period(AssetReval.getC_Period_ID());
depexp0.setA_Entry_Type("RVL");
depexp0.save();
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setPostingType(AssetReval.getPostingType());
depexp1.setA_Asset_ID(Asset.getA_Asset_ID());
depexp1.setExpense(v_Cost_reval.multiply(new BigDecimal(-1)));
depexp1.setDateAcct(AssetReval.getDateAcct());
depexp1.setA_Account_Number(rs.getInt("A_REVAL_COST_OFFSET"));
depexp1.setDescription("Asset Revaluation");
depexp1.setIsDepreciated(false);
depexp1.setA_Period(AssetReval.getC_Period_ID());
depexp1.setA_Entry_Type("RVL");
depexp1.save();
// Create JV for the Reval Accum Depr Amounts
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp2.setPostingType(AssetReval.getPostingType());
depexp2.setA_Asset_ID(Asset.getA_Asset_ID());
depexp2.setExpense(v_Accum_reval);
depexp2.setDateAcct(AssetReval.getDateAcct());
depexp2.setA_Account_Number(rs.getInt("A_ACCUMDEPRECIATION_ACCT"));
depexp2.setDescription("Asset Revaluation");
depexp2.setIsDepreciated(false);
depexp2.setA_Period(AssetReval.getC_Period_ID());
depexp2.setA_Entry_Type("RVL");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setPostingType(AssetReval.getPostingType());
depexp3.setA_Asset_ID(Asset.getA_Asset_ID());
depexp3.setExpense(v_Accum_reval.multiply(new BigDecimal(-1)));
depexp3.setDateAcct(AssetReval.getDateAcct());
depexp3.setA_Account_Number(rs.getInt("A_ACCUMULATED_DEPR_REVAL"));
depexp3.setDescription("Asset Revaluation");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(AssetReval.getC_Period_ID());
depexp3.setA_Entry_Type("RVL");
depexp3.save();
// Create JV for the Reval Depreciation Expense Amounts
X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp4.setPostingType(AssetReval.getPostingType());
depexp4.setA_Asset_ID(Asset.getA_Asset_ID());
depexp4.setExpense(v_Accum_reval);
depexp4.setDateAcct(AssetReval.getDateAcct());
depexp4.setA_Account_Number(rs.getInt("A_DEPRECIATION_ACCT"));
depexp4.setDescription("Asset Revaluation");
depexp4.setIsDepreciated(false);
depexp4.setA_Period(AssetReval.getC_Period_ID());
depexp4.setA_Entry_Type("RVL");
depexp4.save();
X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp5.setPostingType(AssetReval.getPostingType());
depexp5.setA_Asset_ID(Asset.getA_Asset_ID());
depexp5.setExpense(v_Accum_reval.multiply(new BigDecimal(-1)));
depexp5.setDateAcct(AssetReval.getDateAcct());
depexp5.setA_Account_Number(rs.getInt("A_REVAL_DEPEXP_OFFSET"));
depexp5.setDescription("Asset Revaluation");
depexp5.setIsDepreciated(false);
depexp5.setA_Period(AssetReval.getC_Period_ID());
depexp5.setA_Entry_Type("RVL");
depexp5.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getDeliveries"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // AssetRevalEntry

View File

@ -0,0 +1,603 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import org.compiere.process.*;
import org.compiere.model.*;
import org.compiere.util.DB;
//import java.math.*;
import java.math.BigDecimal;
/**
* Split an Asset
*
* @author Rob Klein
* @version $Id: AssetSplit,v 1.0 $
*/
public class AssetSplit extends SvrProcess
{
/** Record ID */
private int p_Asset_Split_ID = 0;
//private boolean m_DeleteOld = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
//ProcessInfoParameter[] para = getParameter();
p_Asset_Split_ID = getRecord_ID();
} // prepare
/**
* Transfer Asset
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("doIt - Asset_Split_ID=" + p_Asset_Split_ID);
if (p_Asset_Split_ID == 0)
throw new IllegalArgumentException("No Record");
//
int no = 0;
BigDecimal v_AccumBalance_New = new BigDecimal("0.0");
BigDecimal v_CostBalance_New = new BigDecimal("0.0");
BigDecimal v_QTY_New = new BigDecimal("0.0");
BigDecimal v_SalvageValue_New = new BigDecimal("0.0");
BigDecimal v_AccumBalance_Org = new BigDecimal("0.0");
BigDecimal v_CostBalance_Org = new BigDecimal("0.0");
BigDecimal v_QTY_Org = new BigDecimal("0.0");
BigDecimal v_SalvageValue_Org = new BigDecimal("0.0");
BigDecimal v_multiplier_New = new BigDecimal("0.0");
BigDecimal v_ManDep_Org = new BigDecimal("0.0");
BigDecimal v_ManDep_New = new BigDecimal("0.0");
int v_AssetNumber = 0, A_Accumdepreciation_Acct = 0;
int A_Cost_Acct = 0, A_DepExp_Acct = 0;
log.info("doIt - Starting Split = " + no);
X_A_Asset_Split AssetSplit = new X_A_Asset_Split (getCtx(), p_Asset_Split_ID, null);
X_A_Asset Asset = new X_A_Asset (getCtx(), AssetSplit.getA_Asset_ID(), null);
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), AssetSplit.getA_Depreciation_Workfile_ID(), null);
X_A_Asset_Acct assetacct = new X_A_Asset_Acct (getCtx(), AssetSplit.getA_Asset_Acct_ID(), null);
v_AccumBalance_Org = assetwk.getA_Accumulated_Depr();
v_SalvageValue_Org = assetwk.getA_Salvage_Value();
v_CostBalance_Org = assetwk.getA_Asset_Cost();
v_QTY_Org = AssetSplit.getA_QTY_Current();
v_ManDep_Org = assetacct.getA_Depreciation_Manual_Amount();
if (AssetSplit.getA_Split_Type().compareTo("PER") == 0){
v_multiplier_New = AssetSplit.getA_Percent_Split();
v_AccumBalance_New = v_AccumBalance_Org.multiply(AssetSplit.getA_Percent_Split());
v_CostBalance_New = v_CostBalance_Org.multiply(AssetSplit.getA_Percent_Split());
v_QTY_New = v_QTY_Org.multiply(AssetSplit.getA_Percent_Split());
v_SalvageValue_New = v_SalvageValue_Org.multiply(AssetSplit.getA_Percent_Split());
v_AccumBalance_Org = v_AccumBalance_Org.subtract(v_AccumBalance_New);
v_CostBalance_Org = v_CostBalance_Org.subtract(v_CostBalance_New);
v_QTY_Org = v_QTY_Org.subtract(v_QTY_New);
v_SalvageValue_Org = v_SalvageValue_Org.subtract(v_SalvageValue_New);
v_ManDep_New = v_ManDep_Org.multiply(AssetSplit.getA_Percent_Split());
v_ManDep_Org =v_ManDep_Org.subtract(v_ManDep_New);
}
else if (AssetSplit.getA_Split_Type().compareTo("QTY")==0) {
v_multiplier_New = AssetSplit.getA_QTY_Split().setScale(5).divide(v_QTY_Org.setScale(5), 0);
v_AccumBalance_New = v_AccumBalance_Org .multiply(v_multiplier_New);
v_CostBalance_New = v_CostBalance_Org .multiply(v_multiplier_New);
v_QTY_New = AssetSplit.getA_QTY_Split();
v_SalvageValue_New = v_SalvageValue_Org.multiply(v_multiplier_New);
v_AccumBalance_Org = v_AccumBalance_Org.subtract(v_AccumBalance_New);
v_CostBalance_Org = v_CostBalance_Org .subtract(v_CostBalance_New);
v_QTY_Org = v_QTY_Org .subtract(v_QTY_New);
v_SalvageValue_Org = v_SalvageValue_Org .subtract(v_SalvageValue_New);
v_ManDep_New = v_ManDep_Org.multiply(v_multiplier_New);
v_ManDep_Org =v_ManDep_Org.subtract(v_ManDep_New);
}
else if (AssetSplit.getA_Split_Type().compareTo("AMT")==0) {
v_multiplier_New = AssetSplit.getA_Amount_Split().setScale(5).divide(v_CostBalance_Org.setScale(5), 0);
v_AccumBalance_New = v_AccumBalance_Org .multiply(v_multiplier_New);
v_CostBalance_New = AssetSplit.getA_Amount_Split();
v_QTY_New = v_QTY_Org .multiply(v_multiplier_New);
v_SalvageValue_New = v_SalvageValue_Org.multiply(v_multiplier_New);
v_AccumBalance_Org = v_AccumBalance_Org.subtract(v_AccumBalance_New);
v_CostBalance_Org = v_CostBalance_Org.subtract(v_CostBalance_New);
v_QTY_Org = v_QTY_Org.subtract(v_QTY_New);
v_SalvageValue_Org = v_SalvageValue_Org.subtract(v_SalvageValue_New);
v_ManDep_New = v_ManDep_Org.multiply(v_multiplier_New);
v_ManDep_Org =v_ManDep_Org.subtract(v_ManDep_New);
}
if (AssetSplit.getA_Asset_ID_To() == 0)
{
//Insert New Asset
X_A_Asset AssetNew = new X_A_Asset (getCtx(), 0, null);
AssetNew.setValue(Asset.getValue());
AssetNew.setA_Parent_Asset_ID(Asset.getA_Asset_ID());
AssetNew.setName(Asset.getName());
AssetNew.setDescription(Asset.getDescription());
AssetNew.setHelp(Asset.getHelp());
AssetNew.setA_Asset_Group_ID(Asset.getA_Asset_Group_ID());
AssetNew.setM_Product_ID(Asset.getM_Product_ID());
AssetNew.setSerNo(Asset.getSerNo());
AssetNew.setLot(Asset.getLot());
AssetNew.setVersionNo(Asset.getVersionNo());
AssetNew.setGuaranteeDate(Asset.getGuaranteeDate());
AssetNew.setAssetServiceDate(Asset.getAssetServiceDate());
AssetNew.setUseLifeMonths(Asset.getUseLifeMonths());
AssetNew.setUseLifeYears(Asset.getUseLifeYears());
AssetNew.setUseUnits(Asset.getUseUnits());
AssetNew.setIsOwned(Asset.isOwned());
AssetNew.setIsDepreciated(Asset.isDepreciated());
AssetNew.setAssetDepreciationDate(Asset.getAssetDepreciationDate());
AssetNew.setIsInPosession(Asset.isInPosession());
AssetNew.setLocationComment( "Split from Asset #" +AssetSplit.getA_Asset_ID());
AssetNew.setC_BPartner_ID(Asset.getC_BPartner_ID());
AssetNew.setC_BPartner_Location_ID(Asset.getC_BPartner_Location_ID());
AssetNew.setA_QTY_Current(v_QTY_New);
AssetNew.setA_QTY_Original(v_QTY_New);
AssetNew.save();
v_AssetNumber = AssetNew.getA_Asset_ID();
//Create Asset Addition Record
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, null);
assetadd.setA_Asset_ID(AssetNew.getA_Asset_ID());
assetadd.setAssetValueAmt(v_CostBalance_New );
assetadd.setDescription("Split from Asset #" + AssetSplit.getA_Asset_ID());
assetadd.setA_CapvsExp("Cap");
assetadd.setA_SourceType("MAN");
assetadd.setA_QTY_Current(v_QTY_New);
assetadd.setPostingType(AssetSplit.getPostingType());
assetadd.setM_InOutLine_ID(1);
assetadd.save();
String sql2 = "SELECT A_Asset_Acct_ID "
+ "FROM A_Asset_Acct "
+ "WHERE A_Asset_ID= " + v_AssetNumber
+ "AND PostingType = '" + AssetSplit.getPostingType() +"'";
int v_NewAssetAcctID = 0;
v_NewAssetAcctID = DB.getSQLValue(null, sql2);
//Insert the New Asset in the Account File
X_A_Asset_Acct assetacctnew = new X_A_Asset_Acct (getCtx(), v_NewAssetAcctID, null);
assetacctnew.setA_Asset_ID(v_AssetNumber);
assetacctnew.setC_AcctSchema_ID(assetacct.getC_AcctSchema_ID());
assetacctnew.setA_Depreciation_ID(assetacct.getA_Depreciation_ID());
assetacctnew.setA_Depreciation_Acct(assetacct.getA_Depreciation_Acct());
assetacctnew.setA_Accumdepreciation_Acct(assetacct.getA_Accumdepreciation_Acct());
assetacctnew.setA_Disposal_Loss(assetacct.getA_Disposal_Loss());
assetacctnew.setA_Disposal_Revenue(assetacct.getA_Disposal_Revenue());
assetacctnew.setA_Asset_Acct(assetacct.getA_Asset_Acct());
assetacctnew.setA_Asset_Spread_ID(assetacct.getA_Asset_Spread_ID());
assetacctnew.setA_Depreciation_Method_ID(assetacct.getA_Depreciation_Method_ID());
assetacctnew.setA_Period_Start(assetacct.getA_Period_Start());
assetacctnew.setA_Period_End(assetacct.getA_Period_End());
assetacctnew.setA_Split_Percent(assetacct.getA_Split_Percent());
assetacctnew.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
assetacctnew.setA_Salvage_Value(v_SalvageValue_New);
assetacctnew.setPostingType(assetacct.getPostingType());
assetacctnew.setA_Depreciation_Conv_ID(assetacct.getA_Depreciation_Conv_ID());
assetacctnew.setA_Depreciation_Manual_Amount(v_ManDep_New);
assetacctnew.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
if (assetacct.getA_Depreciation_Manual_Period() == null)
assetacctnew.setA_Depreciation_Manual_Period(" ");
else
assetacctnew.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
assetacctnew.save();
sql2 = null;
sql2 = "SELECT A_Depreciation_Workfile_ID "
+ "FROM A_Depreciation_Workfile "
+ "WHERE A_Asset_ID= " + v_AssetNumber
+ " AND PostingType = '" + AssetSplit.getPostingType() +"'";
int v_NewWorkfileID = 0;
v_NewWorkfileID = DB.getSQLValue(null, sql2);
//Insert the New Asset in the Deprecation Workfile
X_A_Depreciation_Workfile assetwknew = new X_A_Depreciation_Workfile (getCtx(), v_NewWorkfileID, null);
assetwknew.setA_Asset_ID(v_AssetNumber);
assetwknew.setA_Asset_Cost(assetwknew.getA_Asset_Cost().add(v_CostBalance_New));
assetwknew.setA_Accumulated_Depr(v_AccumBalance_New);
assetwknew.setA_Life_Period(assetwk.getA_Life_Period());
assetwknew.setA_Period_Posted(assetwk.getA_Period_Posted());
assetwknew.setA_Salvage_Value(v_SalvageValue_New);
assetwknew.setA_Asset_Life_Years(assetwk.getA_Asset_Life_Years());
assetwknew.setPostingType(assetwk.getPostingType());
assetwknew.setA_QTY_Current(assetwknew.getA_QTY_Current().add(v_QTY_New));
assetwknew.setIsDepreciated(assetwk.isDepreciated());
assetwknew.setA_Asset_Life_Current_Year(assetwk.getA_Asset_Life_Current_Year());
assetwknew.setA_Curr_Dep_Exp(new BigDecimal (0.0));
assetwknew.save();
//Record transaction in Asset History
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setAssetValueAmt(v_CostBalance_New );
change.setPostingType(assetacct.getPostingType());
change.setA_Asset_ID(AssetNew.getA_Asset_ID());
change.setAssetAccumDepreciationAmt(v_AccumBalance_New);
change.setA_Salvage_Value(v_SalvageValue_New);
change.setPostingType(assetacct.getPostingType());
change.setA_Split_Percent(assetacct.getA_Split_Percent());
change.setConventionType(assetacct.getA_Depreciation_Conv_ID());
change.setA_Asset_ID(AssetNew.getA_Asset_ID());
change.setDepreciationType(assetacct.getA_Depreciation_ID());
change.setA_Asset_Spread_Type(assetacct.getA_Asset_Spread_ID());
change.setA_Period_Start(assetacct.getA_Period_Start());
change.setA_Period_End(assetacct.getA_Period_End());
change.setIsInPosession(AssetNew.isOwned());
change.setIsDisposed(AssetNew.isDisposed());
change.setIsDepreciated(AssetNew.isDepreciated());
change.setIsFullyDepreciated(AssetNew.isFullyDepreciated());
change.setA_Depreciation_Calc_Type(assetacct.getA_Depreciation_Method_ID());
change.setA_Asset_Acct(assetacct.getA_Asset_Acct());
change.setC_AcctSchema_ID(assetacct.getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(assetacct.getA_Accumdepreciation_Acct());
change.setA_Depreciation_Acct(assetacct.getA_Depreciation_Acct());
change.setA_Disposal_Revenue(assetacct.getA_Disposal_Revenue());
change.setA_Disposal_Loss(assetacct.getA_Disposal_Loss());
change.setA_Reval_Accumdep_Offset_Cur(assetacct.getA_Reval_Accumdep_Offset_Cur());
change.setA_Reval_Accumdep_Offset_Prior(assetacct.getA_Reval_Accumdep_Offset_Prior());
if (assetacct.getA_Reval_Cal_Method() == null)
change.setA_Reval_Cal_Method(" ");
else
change.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
change.setA_Reval_Cost_Offset(assetacct.getA_Reval_Cost_Offset());
change.setA_Reval_Cost_Offset_Prior(assetacct.getA_Reval_Cost_Offset_Prior());
change.setA_Reval_Depexp_Offset(assetacct.getA_Reval_Depexp_Offset());
change.setA_Depreciation_Manual_Amount(assetacct.getA_Depreciation_Manual_Amount());
if (assetacct.getA_Depreciation_Manual_Period() == null)
change.setA_Depreciation_Manual_Period(" ");
else
change.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
change.setA_Depreciation_Table_Header_ID(assetacct.getA_Depreciation_Table_Header_ID());
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(Asset.getA_Parent_Asset_ID());
change.setChangeType("SPL");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change.setLot(AssetNew.getLot());
change.setSerno(AssetNew.getSerNo());
change.setVersionno(AssetNew.getVersionNo());
change.setUseLifeMonths(AssetNew.getUseLifeMonths());
change.setUseLifeYears(AssetNew.getUseLifeYears());
change.setLifeUseUnits(AssetNew.getLifeUseUnits());
change.setAssetDisposalDate(AssetNew.getAssetDisposalDate());
change.setAssetServiceDate(AssetNew.getAssetServiceDate());
change.setC_BPartner_Location_ID(AssetNew.getC_BPartner_Location_ID());
change.setC_BPartner_ID(AssetNew.getC_BPartner_ID());
change.setA_QTY_Current(AssetNew.getA_QTY_Current());
change.setA_QTY_Original(AssetNew.getA_QTY_Original());
change.save();
//Record Account Numbers for JE's
A_Accumdepreciation_Acct = assetacctnew.getA_Accumdepreciation_Acct();
A_Cost_Acct = assetacctnew.getA_Asset_Acct();
A_DepExp_Acct = assetacctnew.getA_Depreciation_Acct();
}
else
{
v_AssetNumber = AssetSplit.getA_Asset_ID_To();
//Update Target Asset Record
X_A_Asset AssetNew = new X_A_Asset (getCtx(), v_AssetNumber, null);
AssetNew.setA_QTY_Current(AssetNew.getA_QTY_Current().add(v_QTY_New));
AssetNew.setA_QTY_Original(AssetNew.getA_QTY_Original().add(v_QTY_New));
AssetNew.save();
//Create Asset Addition Record
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, null);
assetadd.setA_Asset_ID(v_AssetNumber);
assetadd.setAssetValueAmt(v_CostBalance_New );
assetadd.setDescription("Split from Asset #" + AssetSplit.getA_Asset_ID());
assetadd.setA_CapvsExp("Cap");
assetadd.setA_SourceType("MAN");
assetadd.setA_QTY_Current(v_QTY_New);
assetadd.setPostingType(AssetSplit.getPostingType());
assetadd.setM_InOutLine_ID(1);
assetadd.save();
String sql2 = "SELECT A_Asset_Acct_ID "
+ "FROM A_Asset_Acct "
+ "WHERE A_Asset_ID= " + v_AssetNumber
+ "AND PostingType = '" + AssetSplit.getPostingType() +"'";
int v_NewAssetAcctID = 0;
v_NewAssetAcctID = DB.getSQLValue(null, sql2);
//Update Target Asset in the Account File
X_A_Asset_Acct assetacctnew = new X_A_Asset_Acct (getCtx(), v_NewAssetAcctID, null);
assetacctnew.setA_Salvage_Value(assetacctnew.getA_Salvage_Value().add(v_SalvageValue_New));
assetacctnew.setA_Depreciation_Manual_Amount(assetacctnew.getA_Depreciation_Manual_Amount().add(v_ManDep_New));
assetacctnew.save();
sql2 = null;
sql2 = "SELECT A_Depreciation_Workfile_ID "
+ "FROM A_Depreciation_Workfile "
+ "WHERE A_Asset_ID= " + v_AssetNumber
+ " AND PostingType = '" + AssetSplit.getPostingType() +"'";
int v_NewWorkfileID = 0;
v_NewWorkfileID = DB.getSQLValue(null, sql2);
//Update Target Asset in the Deprecation Workfile
X_A_Depreciation_Workfile assetwknew = new X_A_Depreciation_Workfile (getCtx(), v_NewWorkfileID, null);
assetwknew.setA_Asset_Cost(assetwknew.getA_Asset_Cost().add(v_CostBalance_New));
assetwknew.setA_Accumulated_Depr(assetwknew.getA_Accumulated_Depr().add(v_AccumBalance_New));
assetwknew.setA_Salvage_Value(assetwknew.getA_Salvage_Value().add(v_SalvageValue_New));
assetwknew.setA_QTY_Current(assetwknew.getA_QTY_Current().add(v_QTY_New));
assetwknew.save();
//Record transaction in Asset History
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setAssetValueAmt(v_CostBalance_New );
change.setPostingType(assetacct.getPostingType());
change.setA_Asset_ID(AssetNew.getA_Asset_ID());
change.setAssetAccumDepreciationAmt(v_AccumBalance_New);
change.setA_Salvage_Value(v_SalvageValue_New);
change.setPostingType(assetacct.getPostingType());
change.setA_Split_Percent(assetacct.getA_Split_Percent());
change.setConventionType(assetacct.getA_Depreciation_Conv_ID());
change.setA_Asset_ID(AssetNew.getA_Asset_ID());
change.setDepreciationType(assetacct.getA_Depreciation_ID());
change.setA_Asset_Spread_Type(assetacct.getA_Asset_Spread_ID());
change.setA_Period_Start(assetacct.getA_Period_Start());
change.setA_Period_End(assetacct.getA_Period_End());
change.setIsInPosession(AssetNew.isOwned());
change.setIsDisposed(AssetNew.isDisposed());
change.setIsDepreciated(AssetNew.isDepreciated());
change.setIsFullyDepreciated(AssetNew.isFullyDepreciated());
change.setA_Depreciation_Calc_Type(assetacct.getA_Depreciation_Method_ID());
change.setA_Asset_Acct(assetacct.getA_Asset_Acct());
change.setC_AcctSchema_ID(assetacct.getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(assetacct.getA_Accumdepreciation_Acct());
change.setA_Depreciation_Acct(assetacct.getA_Depreciation_Acct());
change.setA_Disposal_Revenue(assetacct.getA_Disposal_Revenue());
change.setA_Disposal_Loss(assetacct.getA_Disposal_Loss());
change.setA_Reval_Accumdep_Offset_Cur(assetacct.getA_Reval_Accumdep_Offset_Cur());
change.setA_Reval_Accumdep_Offset_Prior(assetacct.getA_Reval_Accumdep_Offset_Prior());
change.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
change.setA_Reval_Cost_Offset(assetacct.getA_Reval_Cost_Offset());
change.setA_Reval_Cost_Offset_Prior(assetacct.getA_Reval_Cost_Offset_Prior());
change.setA_Reval_Depexp_Offset(assetacct.getA_Reval_Depexp_Offset());
change.setA_Depreciation_Manual_Amount(assetacct.getA_Depreciation_Manual_Amount());
if (assetacct.getA_Reval_Cal_Method() == null)
change.setA_Reval_Cal_Method(" ");
else
change.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
if (assetacct.getA_Depreciation_Manual_Period() == null)
change.setA_Depreciation_Manual_Period(" ");
else
change.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
change.setA_Depreciation_Table_Header_ID(assetacct.getA_Depreciation_Table_Header_ID());
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(Asset.getA_Parent_Asset_ID());
change.setChangeType("SPL");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change.setLot(AssetNew.getLot());
change.setSerno(AssetNew.getSerNo());
change.setVersionno(AssetNew.getVersionNo());
change.setUseLifeMonths(AssetNew.getUseLifeMonths());
change.setUseLifeYears(AssetNew.getUseLifeYears());
change.setLifeUseUnits(AssetNew.getLifeUseUnits());
change.setAssetDisposalDate(AssetNew.getAssetDisposalDate());
change.setAssetServiceDate(AssetNew.getAssetServiceDate());
change.setC_BPartner_Location_ID(AssetNew.getC_BPartner_Location_ID());
change.setC_BPartner_ID(AssetNew.getC_BPartner_ID());
change.setA_QTY_Current(AssetNew.getA_QTY_Current());
change.setA_QTY_Original(AssetNew.getA_QTY_Original());
change.save();
//Record Account Numbers for JE's
A_Accumdepreciation_Acct = assetacctnew.getA_Accumdepreciation_Acct();
A_Cost_Acct = assetacctnew.getA_Asset_Acct();
A_DepExp_Acct = assetacctnew.getA_Depreciation_Acct();
}
// Update original Asset
Asset.setA_QTY_Current(v_QTY_Org);
Asset.save();
// Update original asset for the split
X_A_Asset_Addition assetaddold = new X_A_Asset_Addition (getCtx(), 0, null);
assetaddold.setA_Asset_ID(Asset.getA_Asset_ID());
assetaddold.setAssetValueAmt(v_CostBalance_New.multiply( new BigDecimal(-1)));
assetaddold.setDescription("Split to Asset #" + v_AssetNumber);
assetaddold.setA_CapvsExp("Cap");
assetaddold.setA_SourceType("MAN");
assetaddold.setA_QTY_Current(v_QTY_New.multiply( new BigDecimal(-1)));
assetaddold.setPostingType(AssetSplit.getPostingType());
assetaddold.setM_InOutLine_ID(1);
assetaddold.save();
//Update the Original Asset in the Account File
assetacct.setA_Salvage_Value(v_SalvageValue_Org);
assetacct.setA_Depreciation_Manual_Amount(v_ManDep_Org);
assetacct.save();
//Update the Original Asset in the Deprecation Workfile
assetwk.setA_Asset_Cost(v_CostBalance_Org);
assetwk.setA_Accumulated_Depr(v_AccumBalance_Org);
assetwk.setA_Salvage_Value(v_SalvageValue_Org);
assetwk.setA_QTY_Current(v_QTY_Org);
assetwk.save();
MAssetChange change1 = new MAssetChange (getCtx(), 0, null);
change1.setChangeType("SPL");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change1.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change1.setAssetValueAmt(v_CostBalance_New.multiply(new BigDecimal(-1)));
change1.setPostingType(assetacct.getPostingType());
if (assetacct.getA_Reval_Cal_Method() == null)
change1.setA_Reval_Cal_Method(" ");
else
change1.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
if (assetacct.getA_Depreciation_Manual_Period() == null)
change1.setA_Depreciation_Manual_Period(" ");
else
change1.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
change1.setA_Asset_ID(Asset.getA_Asset_ID());
change1.setAssetAccumDepreciationAmt(v_AccumBalance_New.multiply(new BigDecimal(-1)));
change1.setA_Salvage_Value(v_SalvageValue_New.multiply(new BigDecimal(-1)));
change1.setA_QTY_Current(v_QTY_New.multiply(new BigDecimal(-1)));
change1.save();
//Create Journal Entries for the split
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
//Create JV for the accumulated depreciation of the asset
depexp2.setPostingType(AssetSplit.getPostingType());
depexp2.setA_Asset_ID(v_AssetNumber);
depexp2.setExpense(v_AccumBalance_New.multiply(new BigDecimal(-1)));
depexp2.setDateAcct(AssetSplit.getDateAcct());
depexp2.setA_Account_Number(A_Accumdepreciation_Acct);
depexp2.setDescription("Asset Split Accum Dep");
depexp2.setIsDepreciated(false);
depexp2.setA_Period(AssetSplit.getC_Period_ID());
depexp2.setA_Entry_Type("SPL");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setPostingType(AssetSplit.getPostingType());
depexp3.setA_Asset_ID(AssetSplit.getA_Asset_ID());
depexp3.setExpense(v_AccumBalance_New);
depexp3.setDateAcct(AssetSplit.getDateAcct());
depexp3.setA_Account_Number(assetacct.getA_Accumdepreciation_Acct());
depexp3.setDescription("Asset Split Accum Dep");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(AssetSplit.getC_Period_ID());
depexp3.setA_Entry_Type("SPL");
depexp3.save();
X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null);
//Create JV for the Cost of the asset
depexp4.setPostingType(AssetSplit.getPostingType());
depexp4.setA_Asset_ID(v_AssetNumber);
depexp4.setExpense(v_CostBalance_New);
depexp4.setDateAcct(AssetSplit.getDateAcct());
depexp4.setA_Account_Number(A_Cost_Acct);
depexp4.setDescription("Asset Split Cost");
depexp4.setIsDepreciated(false);
depexp4.setA_Period(AssetSplit.getC_Period_ID());
depexp4.setA_Entry_Type("SPL");
depexp4.save();
X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp5.setPostingType(AssetSplit.getPostingType());
depexp5.setA_Asset_ID(AssetSplit.getA_Asset_ID());
depexp5.setExpense(v_CostBalance_New.multiply(new BigDecimal(-1)));
depexp5.setDateAcct(AssetSplit.getDateAcct());
depexp5.setA_Account_Number(assetacct.getA_Asset_Acct());
depexp5.setDescription("Asset Split Cost");
depexp5.setIsDepreciated(false);
depexp5.setA_Period(AssetSplit.getC_Period_ID());
depexp5.setA_Entry_Type("SPL");
depexp5.save();
String sql = null;
log.info("doIt - Finishing Split = " + no);
sql = "SELECT A_ASSET_ID, CHANGEAMT "
+ "FROM A_ASSET_CHANGE "
+ "WHERE A_ASSET_CHANGE.A_ASSET_ID = " + AssetSplit.getA_Asset_ID()
+ " AND A_ASSET_CHANGE.POSTINGTYPE = '" + AssetSplit.getPostingType()
+ "' AND A_ASSET_CHANGE.CHANGETYPE= 'D' "
+ "AND TRUNC(A_ASSET_CHANGE.DATEACCT, 'YY') = TRUNC( " + DB.TO_DATE(AssetSplit.getDateAcct()) + ", 'YY') "
+ "AND TRUNC(A_ASSET_CHANGE.DATEACCT, 'MM') <= TRUNC( " + DB.TO_DATE(AssetSplit.getDateAcct()) + ", 'MM') "
+ "AND A_ASSET_CHANGE.C_VALIDCOMBINATION_ID = " + assetacct.getA_Depreciation_Acct();
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql,null);
log.info("doIt - SQL=" + sql);
BigDecimal v_Balance = new BigDecimal("0.0");
try {
ResultSet rs = pstmt.executeQuery();
if (AssetSplit.isA_Transfer_Balance_IS()==true)
{
while (rs.next());
v_Balance = v_Balance.add(rs.getBigDecimal("ChangeAmt"));
// Create JV for YTD Depreciation Expense
X_A_Depreciation_Exp depexp0 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp0.setPostingType(AssetSplit.getPostingType());
depexp0.setA_Asset_ID(v_AssetNumber);
depexp0.setExpense(v_Balance.multiply(v_multiplier_New));
depexp0.setDateAcct(AssetSplit.getDateAcct());
depexp0.setA_Account_Number(A_DepExp_Acct);
depexp0.setDescription("Asset Split YTD Depreciation Expense");
depexp0.setIsDepreciated(false);
depexp0.setA_Period(AssetSplit.getC_Period_ID());
depexp0.setA_Entry_Type("SPL");
depexp0.save();
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setPostingType(AssetSplit.getPostingType());
depexp1.setA_Asset_ID(AssetSplit.getA_Asset_ID());
depexp1.setExpense(v_Balance.multiply(new BigDecimal(-1)).multiply(v_multiplier_New));
depexp1.setDateAcct(AssetSplit.getDateAcct());
depexp1.setA_Account_Number(assetacct.getA_Depreciation_Acct());
depexp1.setDescription("Asset Split YTD Depreciation Expense");
depexp1.setIsDepreciated(false);
depexp1.setA_Period(AssetSplit.getC_Period_ID());
depexp1.setA_Entry_Type("SPL");
depexp1.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("AssetSplit"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // AssetSplit

View File

@ -0,0 +1,289 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import org.compiere.process.*;
//import org.compiere.model.X_C_Period;
import org.compiere.model.*;
import org.compiere.util.DB;
//import java.math.*;
import java.math.BigDecimal;
/**
* Asset Transfer
*
* @author Rob Klein
* @version $Id: AssetTransfer.java,v 1.0 $
*/
public class AssetTransfer extends SvrProcess
{
/** Record ID */
private int p_Asset_Transfer_ID = 0;
private boolean m_DeleteOld = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("DeleteOld"))
m_DeleteOld = "Y".equals(para[i].getParameter());
else
log.info("prepare - Unknown Parameter: " + name);
}
p_Asset_Transfer_ID = getRecord_ID();
} // prepare
/**
* Build Depreciation Workfile
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("doIt - Asset_Transfer_ID=" + p_Asset_Transfer_ID);
if (p_Asset_Transfer_ID == 0)
throw new IllegalArgumentException("No Record");
//
int no = 0;
BigDecimal v_Balance = new BigDecimal("0.0");
X_A_Asset_Transfer AssetTransfer = new X_A_Asset_Transfer (getCtx(), p_Asset_Transfer_ID, null);
//X_C_Period Period = new X_C_Period (getCtx(), AssetTransfer.getC_Period_ID(), null);
String sql = null;
log.info("doIt - Starting Transfer = " + no);
sql = "SELECT A_ASSET_ID, CHANGEAMT "
+ "FROM A_ASSET_CHANGE "
+ "WHERE A_ASSET_CHANGE.A_ASSET_ID = " + AssetTransfer.getA_Asset_ID()
+ " AND A_ASSET_CHANGE.POSTINGTYPE = '" + AssetTransfer.getPostingType()
+ "' AND A_ASSET_CHANGE.CHANGETYPE= 'D' "
+ "AND TRUNC(A_ASSET_CHANGE.DATEACCT, 'YY') = TRUNC( " + DB.TO_DATE(AssetTransfer.getDateAcct()) + ", 'YY') "
+ "AND TRUNC(A_ASSET_CHANGE.DATEACCT, 'MM') <= TRUNC( " + DB.TO_DATE(AssetTransfer.getDateAcct()) + ", 'MM') "
+ "AND A_ASSET_CHANGE.C_VALIDCOMBINATION_ID = " + AssetTransfer.getA_Depreciation_Acct();
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql,null);
log.info("doIt - SQL=" + sql);
//X_A_Depreciation_Exp depexp = new X_A_Depreciation_Exp (getCtx(), 0, null);
String clientCheck = " AND AD_Client_ID=" + AssetTransfer.getAD_Client_ID();
if (m_DeleteOld)
{
sql = "DELETE A_DEPRECIATION_EXP "
+ "WHERE Processed='Y'"
+ " AND A_Entry_Type = 'TRN'" + clientCheck;
no = DB.executeUpdate (sql,null);
log.info ("doIt - Delete old processed entries =" + no);
}
try {
ResultSet rs = pstmt.executeQuery();
if (AssetTransfer.isA_Transfer_Balance_IS()==true)
{
while (rs.next());
v_Balance = v_Balance.add(rs.getBigDecimal("ChangeAmt"));
// Create JV for the Income Statement Amounts
X_A_Depreciation_Exp depexp0 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp0.setPostingType(AssetTransfer.getPostingType());
depexp0.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
depexp0.setExpense(v_Balance);
depexp0.setDateAcct(AssetTransfer.getDateAcct());
depexp0.setA_Account_Number(AssetTransfer.getA_Depreciation_Acct_New());
depexp0.setDescription("Asset Transfer");
depexp0.setIsDepreciated(false);
depexp0.setA_Period(AssetTransfer.getC_Period_ID());
depexp0.setA_Entry_Type("TRN");
depexp0.save();
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setPostingType(AssetTransfer.getPostingType());
depexp1.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
depexp1.setExpense(v_Balance.multiply(new BigDecimal(-1)));
depexp1.setDateAcct(AssetTransfer.getDateAcct());
depexp1.setA_Account_Number(AssetTransfer.getA_Depreciation_Acct_New());
depexp1.setDescription("Asset Transfer");
depexp1.setIsDepreciated(false);
depexp1.setA_Period(AssetTransfer.getC_Period_ID());
depexp1.setA_Entry_Type("TRN");
depexp1.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getDeliveries"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
sql = null;
sql = "SELECT A_ASSET_COST, A_ACCUMULATED_DEPR "
+ "FROM A_DEPRECIATION_WORKFILE "
+ "WHERE A_ASSET_ID = " + AssetTransfer.getA_Asset_ID()
+ " AND POSTINGTYPE = '" + AssetTransfer.getPostingType()
+ "' AND AD_CLIENT_ID = " + AssetTransfer.getAD_Client_ID()
+ " AND AD_ORG_ID = " + AssetTransfer.getAD_Org_ID();
pstmt = null;
pstmt = DB.prepareStatement (sql,ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE,null);
try {
ResultSet rs = pstmt.executeQuery();
rs.first();
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
// Create JV for the accumulated depreciation of the asset
depexp2.setPostingType(AssetTransfer.getPostingType());
depexp2.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
depexp2.setExpense(rs.getBigDecimal("A_ACCUMULATED_DEPR"));
depexp2.setDateAcct(AssetTransfer.getDateAcct());
depexp2.setA_Account_Number(AssetTransfer.getA_Accumdepreciation_Acct_New());
depexp2.setDescription("Asset Transfer Accum Dep");
depexp2.setIsDepreciated(false);
depexp2.setA_Period(AssetTransfer.getC_Period_ID());
depexp2.setA_Entry_Type("TRN");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setPostingType(AssetTransfer.getPostingType());
depexp3.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
depexp3.setExpense(rs.getBigDecimal("A_ACCUMULATED_DEPR").multiply(new BigDecimal(-1)));
depexp3.setDateAcct(AssetTransfer.getDateAcct());
depexp3.setA_Account_Number(AssetTransfer.getA_Accumdepreciation_Acct());
depexp3.setDescription("Asset Transfer Accum Dep");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(AssetTransfer.getC_Period_ID());
depexp3.setA_Entry_Type("TRN");
depexp3.save();
X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, null);
// Create JV for the Cost of the asset
depexp4.setPostingType(AssetTransfer.getPostingType());
depexp4.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
depexp4.setExpense(rs.getBigDecimal("A_Asset_Cost"));
depexp4.setDateAcct(AssetTransfer.getDateAcct());
depexp4.setA_Account_Number(AssetTransfer.getA_Asset_Acct_New());
depexp4.setDescription("Asset Transfer Cost");
depexp4.setIsDepreciated(false);
depexp4.setA_Period(AssetTransfer.getC_Period_ID());
depexp4.setA_Entry_Type("TRN");
depexp4.save();
X_A_Depreciation_Exp depexp5 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp5.setPostingType(AssetTransfer.getPostingType());
depexp5.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
depexp5.setExpense(rs.getBigDecimal("A_Asset_Cost").multiply(new BigDecimal(-1)));
depexp5.setDateAcct(AssetTransfer.getDateAcct());
depexp5.setA_Account_Number(AssetTransfer.getA_Asset_Acct());
depexp5.setDescription("Asset Transfer Cost");
depexp5.setIsDepreciated(false);
depexp5.setA_Period(AssetTransfer.getC_Period_ID());
depexp5.setA_Entry_Type("TRN");
depexp5.save();
// Update Asset Setup for New Accounts
sql = null;
sql = "UPDATE A_ASSET_ACCT "
+ "SET A_DEPRECIATION_ACCT = " + AssetTransfer.getA_Depreciation_Acct_New()
+ ", A_ACCUMDEPRECIATION_ACCT = " + AssetTransfer.getA_Accumdepreciation_Acct_New()
+ ", A_DISPOSAL_LOSS = " + AssetTransfer.getA_Disposal_Loss_New()
+ ", A_DISPOSAL_REVENUE = " + AssetTransfer.getA_Disposal_Revenue_New()
+ ", A_ASSET_ACCT = "+ AssetTransfer.getA_Asset_Acct_New()
+ " WHERE A_ASSET_ID = " + AssetTransfer.getA_Asset_ID()
+ " AND POSTINGTYPE = '" + AssetTransfer.getPostingType()
+ "' AND A_PERIOD_START = " + AssetTransfer.getA_Period_Start()
+ " AND A_PERIOD_END = " + AssetTransfer.getA_Period_End();
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setChangeType("TRN");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "TRN"));
change.setPostingType(AssetTransfer.getPostingType());
change.setA_Split_Percent(AssetTransfer.getA_Split_Percent());
change.setA_Asset_ID(AssetTransfer.getA_Asset_ID());
change.setA_Period_Start(AssetTransfer.getA_Period_Start());
change.setA_Period_End(AssetTransfer.getA_Period_End());
change.setA_Asset_Acct(AssetTransfer.getA_Asset_Acct_New());
change.setC_AcctSchema_ID(AssetTransfer.getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(AssetTransfer.getA_Accumdepreciation_Acct_New());
change.setA_Depreciation_Acct(AssetTransfer.getA_Depreciation_Acct_New());
change.setA_Disposal_Revenue(AssetTransfer.getA_Disposal_Revenue_New());
change.setA_Disposal_Loss(AssetTransfer.getA_Disposal_Loss_New());
change.setAssetAccumDepreciationAmt(rs.getBigDecimal("A_ACCUMULATED_DEPR"));
change.setAssetBookValueAmt(rs.getBigDecimal("A_Asset_Cost"));
change.setChangeAmt(v_Balance);
change.save();
DB.executeUpdate(sql,null);
AssetTransfer.setIsActive(false);
AssetTransfer.save();
// Remove Entry from Processing file
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("TransferAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // AssetTransfer

View File

@ -0,0 +1,381 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.compiere.model.*;
import org.compiere.util.DB;
//import java.math.*;
import java.math.BigDecimal;
import org.compiere.process.*;
/**
* Build Depreciation Forecast File
*
* @author Rob Klein
* @version $Id: BuildDepForecastFile.java,v 1.0 $
*/
public class BuildDepForecastFile extends SvrProcess
{
/** Record ID */
private int p_Depreciation_Build_ID = 0;
private boolean m_DeleteOld = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("DeleteOld"))
m_DeleteOld = "Y".equals(para[i].getParameter());
else
log.info("prepare - Unknown Parameter: " + name);
}
p_Depreciation_Build_ID = getRecord_ID();
} // prepare
/**
* Build Depreciation Workfile
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("doIt - Depreciation_Build_ID=" + p_Depreciation_Build_ID);
if (p_Depreciation_Build_ID == 0)
throw new IllegalArgumentException("No Record");
String clientCheck = " AND AD_Client_ID=" + getAD_Client_ID();
//
int no = 0;
if (m_DeleteOld)
{
String sql = "DELETE A_DEPRECIATION_EXP "
+ "WHERE A_Entry_Type = 'FOR'" + clientCheck;
no = DB.executeUpdate (sql,null);
log.info ("doIt - Delete old processed entries =" + no);
}
X_A_Depreciation_Forecast DepBuild = new X_A_Depreciation_Forecast (getCtx(), p_Depreciation_Build_ID, null);
String sql = null;
sql = "DELETE FROM A_DEPRECIATION_EXP WHERE PostingType"
+ " = '" + DepBuild.getPostingType() + "' and A_Asset_ID"
+ " >= " + DepBuild.getA_Start_Asset_ID() + " and A_Asset_ID "
+ " <= " + DepBuild.getA_End_Asset_ID()
+ " and A_Entry_Type = 'FOR'"
+ clientCheck;
no = DB.executeUpdate(sql,null);
log.info("doIt - Clear DepExpense = " + no);
sql = null;
sql = "UPDATE A_DEPRECIATION_WORKFILE SET A_CURR_DEP_EXP = 0, A_CURRENT_PERIOD = 0 WHERE POSTINGTYPE"
+ " = '" + DepBuild.getPostingType() + "' and A_Asset_ID"
+ " >= " + DepBuild.getA_Start_Asset_ID() + " and A_Asset_ID "
+ " <= " + DepBuild.getA_End_Asset_ID()
+ clientCheck;
no = DB.executeUpdate(sql,null);
log.info("doIt - DepExpense Reset= " + no);
sql = null;
sql =" SELECT A_ASSET.A_ASSET_ID, A_ASSET.USELIFEYEARS, A_ASSET.USELIFEMONTHS, A_ASSET.LIFEUSEUNITS, "
+" A_ASSET.USEUNITS, A_ASSET.ISOWNED, A_ASSET.ISDISPOSED,A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED, "
+" A_DEPRECIATION_WORKFILE.A_CURR_DEP_EXP, A_ASSET.ASSETDEPRECIATIONDATE, A_ASSET.ISFULLYDEPRECIATED, "
+" A_ASSET.ASSETSERVICEDATE, A_DEPRECIATION_WORKFILE.A_ASSET_ID as v_Asset_ID, A_DEPRECIATION_WORKFILE.POSTINGTYPE, "
+" A_DEPRECIATION_FORECAST.A_START_ASSET_ID, A_DEPRECIATION_FORECAST.A_END_ASSET_ID, A_DEPRECIATION_WORKFILE.A_ACCUMULATED_DEPR,"
+" A_DEPRECIATION_FORECAST.AD_CLIENT_ID, A_DEPRECIATION_FORECAST.AD_ORG_ID, A_DEPRECIATION_WORKFILE.A_SALVAGE_VALUE,"
+" A_DEPRECIATION_FORECAST.CREATEDBY, A_DEPRECIATION_FORECAST.UPDATEDBY, A_DEPRECIATION_FORECAST.POSTINGTYPE as v_PostingType,"
+" A_DEPRECIATION_WORKFILE.A_DEPRECIATION_WORKFILE_ID, A_DEPRECIATION_FORECAST.DATEDOC, A_DEPRECIATION_WORKFILE.A_ASSET_COST"
+" FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET, COMPIERE.A_DEPRECIATION_FORECAST "
+" WHERE A_ASSET.A_ASSET_ID = A_DEPRECIATION_WORKFILE.A_ASSET_ID AND A_ASSET.ISOWNED = 'Y' AND A_DEPRECIATION_FORECAST.A_START_ASSET_ID <= A_ASSET.A_ASSET_ID"
+" AND A_DEPRECIATION_FORECAST.A_END_ASSET_ID >= A_ASSET.A_ASSET_ID AND A_ASSET.ISFULLYDEPRECIATED = 'N' AND A_ASSET.ISDEPRECIATED = 'Y'"
+" AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = ? ";
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE,null);
try {
pstmt.setString(1, DepBuild.getPostingType());
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs.getInt("A_DEPRECIATION_WORKFILE_ID"), null);
String sql2 = null;
sql2 =" SELECT * FROM A_ASSET_ACCT WHERE PostingType"
+ " = '" + DepBuild.getPostingType() + "' and A_Asset_ID"
+ " = " + rs.getInt("A_ASSET_ID");
PreparedStatement pstmt2 = null;
pstmt2 = DB.prepareStatement (sql2, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE,null);
try {
ResultSet rs2 = pstmt2.executeQuery();
//CallableStatement cs;
BigDecimal v_Dep_Exp_Inception = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_Inception2 = new BigDecimal("0.0");
BigDecimal v_HalfYearConv = new BigDecimal("0.0");
BigDecimal v_HalfYearConv_Adj = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_Adjustment = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_Monthly = new BigDecimal("0.0");
BigDecimal v_total_adjustment = new BigDecimal("0.0");
int asset_id_current = 0;
double v_current=0;
BigDecimal v_current_adj = new BigDecimal(0.0);
while (rs2.next()){
//X_A_Asset_Acct assetacct = new X_A_Asset_Acct (getCtx(), rs2.getInt("A_ASSET_ACCT_ID"), null);
X_A_Depreciation depreciation = new X_A_Depreciation (getCtx(), rs2.getInt("A_DEPRECIATION_ID"), null);
X_A_Depreciation_Convention depreciation_conv = new X_A_Depreciation_Convention (getCtx(), rs2.getInt("A_DEPRECIATION_CONV_ID"), null);
X_A_Depreciation_Exp depexp = new X_A_Depreciation_Exp (getCtx(), 0, null);
//Date d1,d2;
//d1 = rs.getDate("ASSETSERVICEDATE");
//d2 = rs.getDate("DATEDOC");
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEDOC"));
int DateAcctYear = calendar.get(Calendar.YEAR);
int DateAcctMonth = calendar.get(Calendar.MONTH);
double v_period = (Math.ceil(DateAcctMonth)+ (Math.floor(DateAcctYear) - Math.floor(AssetServiceDateYear))*12 - Math.floor(AssetServiceDateMonth)) ;
//Record booked depreciation expense
if (rs2.getInt("A_ASSET_ID")!=asset_id_current )
{
v_current_adj = new BigDecimal(0.0);
depexp.setPostingType(DepBuild.getPostingType());
depexp.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp.setPostingType(rs.getString("PostingType"));
depexp.setExpense(assetwk.getA_Accumulated_Depr().setScale(5, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp.setDescription("Actual Depreciation Expense Booked");
depexp.setA_Period(rs.getInt("A_Period_Posted"));
depexp.setIsDepreciated(true);
depexp.setDateAcct(assetwk.getAssetDepreciationDate());
depexp.setA_Entry_Type("FOR");
depexp.save();
}
else
{
v_current_adj = v_current_adj.subtract(new BigDecimal(0.0));
}
int method = 0;
method = rs2.getInt("A_DEPRECIATION_METHOD_ID");
//Set depreciation date and record in workfile
Calendar cal = GregorianCalendar.getInstance();
Timestamp ts;
ts =(rs.getTimestamp("ASSETSERVICEDATE"));
cal.setTime(ts);
assetwk.setDateAcct(ts);
assetwk.setA_Period_Forecast(new BigDecimal(assetwk.getA_Period_Posted()));
assetwk.save();
//Calculate life to date depreciation
while (v_current < v_period ){
v_Dep_Exp_Inception2 = Depreciation.Dep_Type(depreciation.getDepreciationType(),rs2.getInt("A_Asset_ID"),v_current, rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), v_Dep_Exp_Inception);
//cs = DB.prepareCall("{ ? = call "+ depreciation.getDepreciationType() + "(" + rs2.getInt("A_Asset_ID") + "," + (v_current) + ",'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + "," + v_Dep_Exp_Inception + ")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_Dep_Exp_Inception2 = cs.getBigDecimal(1);
//cs.close();
v_HalfYearConv_Adj = new BigDecimal(Conventions.Dep_Convention(depreciation_conv.getConventionType(),rs2.getInt("A_Asset_ID"), rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), 1, (v_current -1 )));
//cs = DB.prepareCall("{ ? = call " + depreciation_conv.getConventionType() + "(" + rs2.getInt("A_Asset_ID") + ",'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + ", 1 ," + (v_current -1 )+ ")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_HalfYearConv_Adj = cs.getBigDecimal(1);
//cs.close();
v_HalfYearConv = v_HalfYearConv.add(v_HalfYearConv_Adj);
cal.add(Calendar.MONTH, 1);
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
ts.setTime(cal.getTimeInMillis());
assetwk.setDateAcct(ts);
v_current_adj = v_current_adj.add((v_HalfYearConv_Adj));
assetwk.setA_Period_Forecast(v_current_adj);
assetwk.save();
v_Dep_Exp_Inception = v_Dep_Exp_Inception .add(v_Dep_Exp_Inception2.multiply(v_HalfYearConv_Adj));
v_current = v_current + 1;
}
//log.info("doIt - Booked Expense= "+assetwk.getA_Accumulated_Depr());
//log.info("doIt - Calculated Expense= "+v_Dep_Exp_Inception);
//Calculate necessary adjustment per period
X_A_Depreciation_Method depreciation_method = new X_A_Depreciation_Method (getCtx(), method, null);
if (v_Dep_Exp_Inception.compareTo( assetwk.getA_Accumulated_Depr())!=0)
{
v_Dep_Exp_Adjustment = DepreciationAdj.Dep_Adj(depreciation_method.getDepreciationType(),rs2.getInt("A_Asset_ID") , (v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr())) , (Math.floor(DateAcctMonth)), rs2.getString("PostingType") , rs2.getInt("A_ASSET_ACCT_ID"));
//cs = DB.prepareCall("{ ? = call " + depreciation_method.getDepreciationType() + "(" + rs2.getInt("A_Asset_ID") + "," + (v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr())) + "," + (Math.floor(d2.getMonth()))+ ",'" + rs2.getString("PostingType") + "'," +rs2.getInt("A_ASSET_ACCT_ID") +")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_Dep_Exp_Adjustment = cs.getBigDecimal(1);
//cs.close();
v_total_adjustment = v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr());
}
v_current = v_current+1;
//v_Dep_Exp_Inception = (rs.getBigDecimal("A_ACCUMULATED_DEPR"));
BigDecimal v_period_adj = new BigDecimal(rs2.getInt("A_PERIOD_END"));
int lastdepexp2=0;
while (v_current_adj.compareTo(v_period_adj)<0){
//Calculation depreciation expense
v_Dep_Exp_Monthly = Depreciation.Dep_Type(depreciation.getDepreciationType(),rs2.getInt("A_Asset_ID"),v_current-1, rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), v_Dep_Exp_Inception);
//cs = DB.prepareCall("{ ? = call " + depreciation.getDepreciationType() + "(" + rs2.getInt("A_Asset_ID") +", "+ (v_current-1) +" ,'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + " , " + (v_Dep_Exp_Inception) + ")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_Dep_Exp_Monthly = cs.getBigDecimal(1);
//cs.close();
//Adjust for half year convention
//log.info(depreciation_conv.getConventionType());
//log.info(""+rs2.getInt("A_Asset_ID"));
v_HalfYearConv_Adj = new BigDecimal(Conventions.Dep_Convention(depreciation_conv.getConventionType(),rs2.getInt("A_Asset_ID"), rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), 0, 1 ));
//log.info(""+v_HalfYearConv_Adj);
//cs = DB.prepareCall("{ ? = call " + depreciation_conv.getConventionType() + "(" + rs2.getInt("A_Asset_ID") +",'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + " , 0, 1)}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_HalfYearConv_Adj = cs.getBigDecimal(1);
//cs.close();
v_Dep_Exp_Monthly = v_Dep_Exp_Monthly.multiply((v_HalfYearConv_Adj));
v_HalfYearConv = v_HalfYearConv.add( v_HalfYearConv_Adj);
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
if (v_total_adjustment.setScale(2, BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal (0.00))!=0)
{
//Record necessary adjustments
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setA_Entry_Type("FOR");
depexp1.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp1.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp1.setPostingType(rs.getString("PostingType"));
depexp1.setExpense(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp1.setDescription("Forecasted Depreciation Expense Adj.");
depexp1.setA_Period((int)v_current);
depexp1.setIsDepreciated(true);
depexp1.setDateAcct(ts);
depexp1.save();
v_total_adjustment = v_total_adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).subtract(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP));
//Record adjusted expense
depexp2.setPostingType(DepBuild.getPostingType());
depexp2.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp2.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp2.setPostingType(rs.getString("PostingType"));
depexp2.setExpense((v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp2.setDescription("Forecasted Depreciation Expense");
depexp2.setA_Period((int)v_current);
depexp2.setIsDepreciated(true);
depexp2.setDateAcct(ts);
depexp2.setA_Entry_Type("FOR");
depexp2.save();
v_Dep_Exp_Inception = v_Dep_Exp_Inception.add((v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP))).setScale(2, BigDecimal.ROUND_HALF_UP);
}
else
{
//Record expense
depexp2.setPostingType(DepBuild.getPostingType());
depexp2.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp2.setExpense(v_Dep_Exp_Adjustment.setScale(2, BigDecimal.ROUND_HALF_UP));
depexp2.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp2.setPostingType(rs.getString("PostingType"));
depexp2.setExpense(v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp2.setDescription("Forecasted Depreciation Expense");
depexp2.setA_Period((int)v_current);
depexp2.setIsDepreciated(true);
depexp2.setDateAcct(ts);
depexp2.setA_Entry_Type("FOR");
depexp2.save();
v_Dep_Exp_Inception = v_Dep_Exp_Inception.add(v_Dep_Exp_Monthly).setScale(2, BigDecimal.ROUND_HALF_UP);
}
lastdepexp2 = depexp2.get_ID();
//Advance calender
cal.add(Calendar.MONTH, 1);
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
ts.setTime(cal.getTimeInMillis());
v_current_adj = v_current_adj.add((v_HalfYearConv_Adj)).setScale(2, BigDecimal.ROUND_HALF_UP);
//record in workfile
assetwk.setA_Period_Forecast(v_current_adj);
assetwk.setDateAcct(ts);
assetwk.save();
v_current = v_current + 1;
}
//adjust last entry for rounding errors
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), lastdepexp2, null);
depexp2.setExpense(depexp2.getExpense().add(((rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE").subtract(v_total_adjustment))).subtract(v_Dep_Exp_Inception)).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent")))));
depexp2.save();
asset_id_current = rs2.getInt("A_ASSET_ID");
log.info("Asset #"+asset_id_current);
}
rs2.close();
pstmt2.close();
pstmt2 = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // BuildDepForecastFile

View File

@ -0,0 +1,441 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.compiere.FA.Conventions;
import org.compiere.model.*;
import org.compiere.util.DB;
//import java.math.*;
import java.math.BigDecimal;
import org.compiere.process.*;
/**
* Build Depreciation Work File
*
* @author Rob Klein
* @version $Id: BuildDepWorkFile.java,v 1.0 $
*/
public class BuildDepWorkFile extends SvrProcess
{
/** Record ID */
private int p_Depreciation_Build_ID = 0;
private boolean m_DeleteOld = false;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("DeleteOld"))
m_DeleteOld = "Y".equals(para[i].getParameter());
else
log.info("prepare - Unknown Parameter: " + name);
}
p_Depreciation_Build_ID = getRecord_ID();
} // prepare
/**
* Build Depreciation Workfile
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("doIt - Depreciation_Build_ID=" + p_Depreciation_Build_ID);
if (p_Depreciation_Build_ID == 0)
throw new IllegalArgumentException("No Record");
String clientCheck = " AND AD_Client_ID=" + getAD_Client_ID();
//
int no = 0;
//if (m_DeleteOld)
//{
// String sql = "DELETE A_DEPRECIATION_EXP "
// + "WHERE A_Entry_Type = 'FOR'" + clientCheck;
//
// no = DB.executeUpdate (sql);
// log.info ("doIt - Delete old processed entries =" + no);
//}
X_A_Depreciation_Forecast DepBuild = new X_A_Depreciation_Forecast (getCtx(), p_Depreciation_Build_ID, null);
String sql = null;
sql = "DELETE FROM A_DEPRECIATION_EXP WHERE PostingType"
+ " = '" + DepBuild.getPostingType() + "' and A_Asset_ID"
+ " >= " + DepBuild.getA_Start_Asset_ID() + " and A_Asset_ID "
+ " <= " + DepBuild.getA_End_Asset_ID()
+ " AND A_Entry_Type = 'DEP'"
+ clientCheck;
no = DB.executeUpdate(sql,null);
log.info("doIt - Clear DepExpense = " + no);
sql = null;
sql = "UPDATE A_DEPRECIATION_WORKFILE SET A_CURR_DEP_EXP = 0, A_CURRENT_PERIOD = 0 WHERE POSTINGTYPE"
+ " = '" + DepBuild.getPostingType() + "' and A_Asset_ID"
+ " >= " + DepBuild.getA_Start_Asset_ID() + " and A_Asset_ID "
+ " <= " + DepBuild.getA_End_Asset_ID()
+ clientCheck;
no = DB.executeUpdate(sql,null);
log.info("doIt - DepExpense Reset= " + no);
sql = null;
sql =" SELECT A_ASSET.A_ASSET_ID, A_ASSET.USELIFEYEARS, A_ASSET.USELIFEMONTHS, A_ASSET.LIFEUSEUNITS, "
+ "A_ASSET.USEUNITS, A_ASSET.ISOWNED, A_ASSET.ISDISPOSED,A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED, "
+ " A_DEPRECIATION_WORKFILE.A_CURR_DEP_EXP, A_ASSET.ASSETDEPRECIATIONDATE, A_ASSET.ISFULLYDEPRECIATED, "
+ " A_ASSET.ASSETSERVICEDATE, A_DEPRECIATION_WORKFILE.A_ASSET_ID as v_Asset_ID, A_DEPRECIATION_WORKFILE.POSTINGTYPE, "
+ " A_DEPRECIATION_BUILD.A_START_ASSET_ID, A_DEPRECIATION_BUILD.A_END_ASSET_ID, A_DEPRECIATION_WORKFILE.A_ACCUMULATED_DEPR, "
+ " A_DEPRECIATION_BUILD.PERIODNO, A_DEPRECIATION_BUILD.AD_CLIENT_ID, A_DEPRECIATION_BUILD.AD_ORG_ID, "
+ " A_DEPRECIATION_BUILD.CREATEDBY, A_DEPRECIATION_BUILD.UPDATEDBY, A_DEPRECIATION_BUILD.POSTINGTYPE as v_PostingType, "
+ " A_DEPRECIATION_BUILD.DATEACCT, A_DEPRECIATION_BUILD.C_PERIOD_ID, A_DEPRECIATION_WORKFILE.A_DEPRECIATION_WORKFILE_ID, "
+ " A_DEPRECIATION_BUILD.DATEDOC "
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET, COMPIERE.A_DEPRECIATION_BUILD "
+ " WHERE A_ASSET.A_ASSET_ID = A_DEPRECIATION_WORKFILE.A_ASSET_ID AND A_ASSET.ISOWNED = 'Y' AND "
+ " A_DEPRECIATION_BUILD.DATEACCT >= A_ASSET.ASSETSERVICEDATE AND A_DEPRECIATION_BUILD.A_START_ASSET_ID <= A_ASSET.A_ASSET_ID "
+ " AND A_DEPRECIATION_BUILD.A_END_ASSET_ID >= A_ASSET.A_ASSET_ID AND A_ASSET.ISFULLYDEPRECIATED = 'N' AND A_ASSET.ISDEPRECIATED = 'Y' "
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = ? ";
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE,null);
try {
pstmt.setString(1, DepBuild.getPostingType());
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs.getInt("A_DEPRECIATION_WORKFILE_ID"), null);
String sql2 = null;
sql2 =" SELECT * FROM A_ASSET_ACCT WHERE PostingType"
+ " = '" + DepBuild.getPostingType() + "' and A_Asset_ID"
+ " = " + rs.getInt("A_ASSET_ID");
PreparedStatement pstmt2 = null;
pstmt2 = DB.prepareStatement (sql2, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE,null);
try {
ResultSet rs2 = pstmt2.executeQuery();
//CallableStatement cs;
BigDecimal v_Dep_Exp_Inception = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_Inception2 = new BigDecimal("0.0");
BigDecimal v_HalfYearConv = new BigDecimal("0.0");
BigDecimal v_HalfYearConv_Adj = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_Adjustment = new BigDecimal("0.0");
BigDecimal v_Dep_Exp_Monthly = new BigDecimal("0.0");
BigDecimal v_total_adjustment = new BigDecimal("0.0");
int asset_id_current = 0;
double v_current=0;
BigDecimal v_current_adj = new BigDecimal(0.0);
while (rs2.next()){
//X_A_Asset_Acct assetacct = new X_A_Asset_Acct (getCtx(), rs2.getInt("A_ASSET_ACCT_ID"), null);
X_A_Depreciation depreciation = new X_A_Depreciation (getCtx(), rs2.getInt("A_DEPRECIATION_ID"), null);
X_A_Depreciation_Convention depreciation_conv = new X_A_Depreciation_Convention (getCtx(), rs2.getInt("A_DEPRECIATION_CONV_ID"), null);
//X_A_Depreciation_Exp depexp = new X_A_Depreciation_Exp (getCtx(), 0, null);
//Date d1,d2;
//d1 = rs.getDate("ASSETSERVICEDATE");
//d2 = rs.getDate("DATEACCT");
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
int DateAcctMonth = calendar.get(Calendar.MONTH);
double v_period = (Math.ceil(DateAcctMonth)+ (Math.floor(DateAcctYear) - Math.floor(AssetServiceDateYear))*12 - Math.floor(AssetServiceDateMonth)) ;
//Record booked depreciation expense
if (rs2.getInt("A_ASSET_ID")!=asset_id_current )
{
v_current_adj = new BigDecimal(0.0);
//depexp.setPostingType(DepBuild.getPostingType());
//depexp.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
//depexp.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
//depexp.setPostingType(rs.getString("PostingType"));
//depexp.setExpense(assetwk.getA_Accumulated_Depr().setScale(5, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
//depexp.setDescription("Actual Depreciation Expense Booked");
//depexp.setA_Period(rs.getInt("A_Period_Posted"));
//depexp.setIsDepreciated(true);
//depexp.setDateAcct(assetwk.getAssetDepreciationDate());
//depexp.setA_Entry_Type("DEP");
//depexp.save();
}
else
{
v_current_adj = v_current_adj.subtract(new BigDecimal(0.0));
}
int method = 0;
method = rs2.getInt("A_DEPRECIATION_METHOD_ID");
//Set depreciation date and record in workfile
Calendar cal = GregorianCalendar.getInstance();
Timestamp ts;
ts =(rs.getTimestamp("ASSETSERVICEDATE"));
cal.setTime(ts);
assetwk.setDateAcct(ts);
assetwk.setA_Period_Forecast(new BigDecimal(assetwk.getA_Period_Posted()));
assetwk.save();
//Calculate life to date depreciation
while (v_current < v_period ){
v_Dep_Exp_Inception2 = Depreciation.Dep_Type(depreciation.getDepreciationType(),rs2.getInt("A_Asset_ID"),v_current, rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), v_Dep_Exp_Inception);
//cs = DB.prepareCall("{ ? = call "+ depreciation.getDepreciationType() + "(" + rs2.getInt("A_Asset_ID") + "," + (v_current) + ",'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + "," + v_Dep_Exp_Inception + ")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_Dep_Exp_Inception2 = cs.getBigDecimal(1);
//cs.close();
v_HalfYearConv_Adj = new BigDecimal(Conventions.Dep_Convention(depreciation_conv.getConventionType(),rs2.getInt("A_Asset_ID"), rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), 1, (v_current -1 )));
//cs = DB.prepareCall("{ ? = call " + depreciation_conv.getConventionType() + "(" + rs2.getInt("A_Asset_ID") + ",'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + ", 1 ," + (v_current -1 )+ ")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_HalfYearConv_Adj = cs.getBigDecimal(1);
//cs.close();
v_HalfYearConv = v_HalfYearConv.add(v_HalfYearConv_Adj);
cal.add(Calendar.MONTH, 1);
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
ts.setTime(cal.getTimeInMillis());
assetwk.setDateAcct(ts);
v_current_adj = v_current_adj.add((v_HalfYearConv_Adj));
assetwk.setA_Period_Forecast(v_current_adj);
assetwk.save();
v_Dep_Exp_Inception = v_Dep_Exp_Inception .add(v_Dep_Exp_Inception2.multiply(v_HalfYearConv_Adj));
v_current = v_current + 1;
}
//log.info("doIt - Booked Expense= "+assetwk.getA_Accumulated_Depr());
//log.info("doIt - Calculated Expense= "+v_Dep_Exp_Inception);
//Calculate necessary adjustment per period
X_A_Depreciation_Method depreciation_method = new X_A_Depreciation_Method (getCtx(), method, null);
if (v_Dep_Exp_Inception.compareTo( assetwk.getA_Accumulated_Depr())!=0)
{
v_Dep_Exp_Adjustment = DepreciationAdj.Dep_Adj(depreciation_method.getDepreciationType(),rs2.getInt("A_Asset_ID") , (v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr())) , (Math.floor(DateAcctMonth)), rs2.getString("PostingType") , rs2.getInt("A_ASSET_ACCT_ID"));
//cs = DB.prepareCall("{ ? = call " + depreciation_method.getDepreciationType() + "(" + rs2.getInt("A_Asset_ID") + "," + (v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr())) + "," + (Math.floor(d2.getMonth()))+ ",'" + rs2.getString("PostingType") + "'," +rs2.getInt("A_ASSET_ACCT_ID") +")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_Dep_Exp_Adjustment = cs.getBigDecimal(1);
//cs.close();
//log.info("doIt - callable statement #3= "+v_Dep_Exp_Adjustment);
v_total_adjustment = v_Dep_Exp_Inception.subtract(assetwk.getA_Accumulated_Depr());
}
//Record necessary adjustments
if (v_Dep_Exp_Adjustment.setScale(2, BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal (0.00))!=0)
{
X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp1.setA_Entry_Type("DEP");
depexp1.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp1.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp1.setPostingType(rs.getString("PostingType"));
depexp1.setExpense(v_Dep_Exp_Adjustment.setScale(2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp1.setDescription("Depreciation Expense Adj.");
depexp1.setA_Period(rs.getInt("C_Period_ID"));
depexp1.setIsDepreciated(true);
depexp1.setDateAcct(rs.getTimestamp("DateAcct"));
depexp1.save();
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp2.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp2.setA_Account_Number(rs2.getInt("A_AccumDepreciation_Acct"));
depexp2.setPostingType(rs.getString("PostingType"));
depexp2.setExpense(v_Dep_Exp_Adjustment.setScale(2, BigDecimal.ROUND_HALF_UP).multiply( new BigDecimal(-1 * rs2.getFloat("A_Split_Percent"))));
depexp2.setDescription("Depreciation Expense Adj.");
depexp2.setA_Period(rs.getInt("C_Period_ID"));
depexp2.setIsDepreciated(false);
depexp2.setDateAcct(rs.getTimestamp("DateAcct"));
depexp2.setA_Entry_Type("DEP");
depexp2.save();
v_total_adjustment = v_total_adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).subtract(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP));
}
v_current = v_current+1;
//v_Dep_Exp_Inception = (rs.getBigDecimal("A_ACCUMULATED_DEPR"));
//BigDecimal v_period_adj = new BigDecimal(rs2.getInt("A_PERIOD_END"));
int lastdepexp2=0;
//Calculation depreciation expense
v_Dep_Exp_Monthly = Depreciation.Dep_Type(depreciation.getDepreciationType(),rs2.getInt("A_Asset_ID"),v_current-1, rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), v_Dep_Exp_Inception);
//cs = DB.prepareCall("{ ? = call " + depreciation.getDepreciationType() + "(" + rs2.getInt("A_Asset_ID") +", "+ (v_current-1) +" ,'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + " , " + (v_Dep_Exp_Inception) + ")}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_Dep_Exp_Monthly = cs.getBigDecimal(1);
//cs.close();
//log.info("This is v_Dep_Exp_Monthly "+v_Dep_Exp_Monthly);
//Adjust for half year convention
v_HalfYearConv_Adj = new BigDecimal(Conventions.Dep_Convention(depreciation_conv.getConventionType(),rs2.getInt("A_Asset_ID"), rs2.getString("PostingType"), rs2.getInt("A_ASSET_ACCT_ID"), 0, 1 ));
//cs = DB.prepareCall("{ ? = call " + depreciation_conv.getConventionType() + "(" + rs2.getInt("A_Asset_ID") +",'" + rs2.getString("PostingType") + "'," + rs2.getInt("A_ASSET_ACCT_ID") + " , 0, 1)}");
//cs.registerOutParameter(1, java.sql.Types.DECIMAL);
//cs.execute();
//v_HalfYearConv_Adj = cs.getBigDecimal(1);
//cs.close();
//log.info("This is v_HalfYearConv_Adj "+v_HalfYearConv_Adj);
v_Dep_Exp_Monthly = v_Dep_Exp_Monthly.multiply((v_HalfYearConv_Adj));
//log.info("This is v_Dep_Exp_Monthly "+v_Dep_Exp_Monthly);
v_HalfYearConv = v_HalfYearConv.add( v_HalfYearConv_Adj);
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, null);
if (v_total_adjustment.setScale(2, BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal (0.00))!=0)
{
//Record necessary adjustments
//X_A_Depreciation_Exp depexp1 = new X_A_Depreciation_Exp (getCtx(), 0, null);
//depexp1.setA_Entry_Type("FOR");
//depexp1.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
//depexp1.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
//depexp1.setPostingType(rs.getString("PostingType"));
//depexp1.setExpense(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
//depexp1.setDescription("Forecasted Depreciation Expense Adj.");
//depexp1.setA_Period((int)v_current);
//depexp1.setIsDepreciated(true);
//depexp1.setDateAcct(ts);
//depexp1.save();
v_total_adjustment = v_total_adjustment.setScale(5, BigDecimal.ROUND_HALF_UP).subtract(v_Dep_Exp_Adjustment.setScale(5, BigDecimal.ROUND_HALF_UP));
//Record adjusted expense
depexp2.setPostingType(DepBuild.getPostingType());
depexp2.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp2.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp2.setPostingType(rs.getString("PostingType"));
depexp2.setExpense((v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp2.setDescription("Depreciation Expense");
depexp2.setA_Period(rs.getInt("C_Period_ID"));
depexp2.setIsDepreciated(true);
depexp2.setDateAcct(rs.getTimestamp("DateAcct"));
depexp2.setA_Entry_Type("DEP");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp3.setA_Account_Number(rs2.getInt("A_AccumDepreciation_Acct"));
depexp3.setPostingType(rs.getString("PostingType"));
depexp3.setExpense(v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP).multiply( new BigDecimal(-1 * rs2.getFloat("A_Split_Percent"))));
depexp3.setDescription("Depreciation Expense");
depexp3.setA_Period(rs.getInt("C_Period_ID"));
depexp3.setIsDepreciated(false);
depexp3.setDateAcct(rs.getTimestamp("DateAcct"));
depexp3.setA_Entry_Type("DEP");
depexp3.save();
v_Dep_Exp_Inception = v_Dep_Exp_Inception.add((v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP))).setScale(2, BigDecimal.ROUND_HALF_UP);
}
else
{
//Record expense
depexp2.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp2.setA_Account_Number(rs2.getInt("A_Depreciation_Acct"));
depexp2.setPostingType(rs.getString("PostingType"));
depexp2.setExpense(v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(rs2.getFloat("A_Split_Percent"))));
depexp2.setDescription("Depreciation Expense");
depexp2.setA_Period(rs.getInt("C_Period_ID"));
depexp2.setIsDepreciated(true);
depexp2.setDateAcct(rs.getTimestamp("DateAcct"));
depexp2.setA_Entry_Type("DEP");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, null);
depexp3.setA_Asset_ID(rs.getInt("A_ASSET_ID"));
depexp3.setA_Account_Number(rs2.getInt("A_AccumDepreciation_Acct"));
depexp3.setPostingType(rs.getString("PostingType"));
depexp3.setExpense(v_Dep_Exp_Monthly.setScale(2, BigDecimal.ROUND_HALF_UP).multiply( new BigDecimal(-1 * rs2.getFloat("A_Split_Percent"))));
depexp3.setDescription("Depreciation Expense");
depexp3.setA_Period(rs.getInt("C_Period_ID"));
depexp3.setIsDepreciated(false);
depexp3.setDateAcct(rs.getTimestamp("DateAcct"));
depexp3.setA_Entry_Type("DEP");
depexp3.save();
v_Dep_Exp_Inception = v_Dep_Exp_Inception.add(v_Dep_Exp_Monthly).setScale(2, BigDecimal.ROUND_HALF_UP);
}
lastdepexp2 = depexp2.get_ID();
//Advance calender
cal.add(Calendar.MONTH, 1);
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
ts.setTime(cal.getTimeInMillis());
v_current_adj = v_current_adj.add((v_HalfYearConv_Adj)).setScale(2, BigDecimal.ROUND_HALF_UP);
//record in workfile
assetwk.setA_Period_Forecast(v_current_adj);
assetwk.setDateAcct(ts);
assetwk.setA_Current_Period((int)v_current);
assetwk.save();
asset_id_current = rs2.getInt("A_ASSET_ID");
log.info(""+asset_id_current);
}
rs2.close();
pstmt2.close();
pstmt2 = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // InvoiceCreateInOut

View File

@ -0,0 +1,142 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import java.util.*;
import org.compiere.util.*;
import org.compiere.model.CalloutEngine;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
/**
* FA Callout.
*
* @author Rob Klein
* @version $Id: CalloutFA.java,v 1.0 $
*/
public class CalloutFA extends CalloutEngine
{
/**
* Table_Period. Used to set the Manual Period Field. This allows
* the Spread Field to be displayed when there is a code that
* has been setup as Yearly.
* The string in the Callout field is:
* <code>com.compiere.custom.CalloutEngine.Table_Period</code>
*
* @param ctx Context
* @param WindowNo current Window No
* @param mTab Model Tab
* @param mField Model Field
* @param value The new value
* @param oldValue The old value
* @return error message or "" if OK
*/
public String Table_Period (Properties ctx, int WindowNo,
GridTab mTab, GridField mField, Object value, Object oldValue)
{
Integer A_Depreciation_Table_Header_ID = (Integer)value;
try
{
if (A_Depreciation_Table_Header_ID != null){
String SQL = "SELECT A_Term "
+ "FROM A_Depreciation_Table_Header "
+ "WHERE A_Depreciation_Table_Header_ID='"
+A_Depreciation_Table_Header_ID
+"'";
PreparedStatement pstmt = DB.prepareStatement(SQL,null);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
// Charges - Set Context
Env.setContext(ctx, WindowNo, "A_DEPRECIATION_MANUAL_PERIOD", rs.getString("A_Term"));
mTab.setValue ("A_DEPRECIATION_MANUAL_PERIOD", rs.getString("A_Term"));
}
rs.close();
pstmt.close();
}
}
catch (SQLException e)
{
log.info("PeriodType "+ e);
return e.getLocalizedMessage();
}
return "";
} // Period Type
/**
* Field_Clear. Used to set the Manual Period Field. This allows
* the Spread Field to be displayed when there is a code that
* has been setup as Yearly.
* The string in the Callout field is:
* <code>com.compiere.custom.CalloutEngine.Table_Period</code>
*
* @param ctx Context
* @param WindowNo current Window No
* @param mTab Model Tab
* @param mField Model Field
* @param value The new value
* @param oldValue The old value
* @return error message or "" if OK
*/
public String Field_Clear (Properties ctx, int WindowNo,
GridTab mTab, GridField mField, Object value, Object oldValue)
{
Object A_Depreciation_ID = value;
try
{
String SQL = "SELECT DepreciationType "
+ "FROM A_Depreciation "
+ "WHERE A_Depreciation_ID="
+ A_Depreciation_ID;
PreparedStatement pstmt = DB.prepareStatement(SQL,null);
ResultSet rs = pstmt.executeQuery();
if (rs.next())
{
// Charges - Set Context
if (rs.getString("DepreciationType")!= "TAB" | rs.getString("DepreciationType")!= "MAN")
{
Env.setContext(ctx, WindowNo, "A_DEPRECIATION_MANUAL_PERIOD", "");
//mTab.setValue ("A_Depreciation_Manual_Period", null);
mTab.setValue ("A_Depreciation_Manual_Amount", null);
mTab.setValue ("A_Depreciation_Table_Header_ID", null);
}
if (rs.getString("DepreciationType")== "TAB")
{
mTab.setValue ("A_Depreciation_Manual_Amount", null);
}
if (rs.getString("DepreciationType")== "MAN")
{
mTab.setValue ("A_Depreciation_Table_Header_ID", null);
}
}
rs.close();
pstmt.close();
}
catch (SQLException e)
{
log.info("PeriodType "+ e);
return e.getLocalizedMessage();
}
return "";
} // Period Type
} // CalloutFA

View File

@ -0,0 +1,413 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert Klein. robeklein@hotmail.com
* _____________________________________________
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
//import java.text.SimpleDateFormat;
//import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Calendar;
import org.compiere.util.*;
/**
* Fixed Asset Conventions
*
* @author Rob Klein
* @version $Id: Conventions.java,v 1.0 $
*
*/
public class Conventions {
/**
*
*
*/
static public double Dep_Convention(String Type,int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
if(Type.compareTo("FMCON")==0)
return FMCON(p_A_ASSET_ID, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Flag, p_Period);
else if(Type.compareTo("FYCON")==0)
return FYCON(p_A_ASSET_ID, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Flag, p_Period);
else if(Type.compareTo("DYCON")==0)
return DYCON(p_A_ASSET_ID, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Flag, p_Period);
else if(Type.compareTo("MMCON")==0)
return MMCON(p_A_ASSET_ID, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Flag, p_Period);
else if(Type.compareTo("MQCON")==0)
return MQCON(p_A_ASSET_ID, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Flag, p_Period);
else if(Type.compareTo("HYCON")==0)
return HYCON(p_A_ASSET_ID, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Flag, p_Period);
else
return 0.0;
}
/**
*
*
*/
static public double FMCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
return 1.0;
}
static public double HYCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
int v_adj=0;
StringBuffer sqlB = new StringBuffer ("SELECT A_ASSET.ASSETSERVICEDATE, A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED,"
+ " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD,"
+ " A_DEPRECIATION_WORKFILE.DATEACCT"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET"
+ " WHERE A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE+"'");
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
int v_Months_of_Half_Year = (12-(AssetServiceDateMonth)+1);
//ADJUST PERIOD FOR MID-MONTH CONVENTION
if(DateAcctYear == AssetServiceDateYear)
v_adj = 6/v_Months_of_Half_Year;
else
v_adj = 1;
if(p_Flag == 2){
//ADJUST COST CORRECTIONS FOR HALF-YEAR CONVENTION
if (p_Period == AssetServiceDateYear)
v_adj = 6/v_Months_of_Half_Year;
else
v_adj = 1;
}
}
}
catch (Exception e)
{
System.out.println("HYCON"+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return v_adj;
}
static public double FYCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
int v_adj=0;
StringBuffer sqlB = new StringBuffer ("SELECT A_ASSET.ASSETSERVICEDATE,"
+ " A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED,"
+ " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD,"
+ " A_DEPRECIATION_WORKFILE.DATEACCT"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET"
+ " WHERE A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE+"'");
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
int v_Months_of_Full_Year = 12 - AssetServiceDateMonth;
if(p_Flag < 2){
//ADJUST PERIOD FOR FULL-YEAR CONVENTION
if(DateAcctYear == AssetServiceDateYear)
v_adj = 12/v_Months_of_Full_Year;
else
v_adj = 1;
}
if(p_Flag == 2){
//ADJUST COST CORRECTIONS FOR FULL-YEAR CONVENTION
v_adj = 12/v_Months_of_Full_Year;
}
}
}
catch (Exception e)
{
System.out.println("FYCON"+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return v_adj;
}
static public double DYCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
int v_adj=0;
StringBuffer sqlB = new StringBuffer ("SELECT A_ASSET.ASSETSERVICEDATE,"
+ " A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED,"
+ " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD,"
+ " A_DEPRECIATION_WORKFILE.DATEACCT"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET"
+ " WHERE A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE+"'");
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
int AssetServiceDateDay = calendar.get(Calendar.DAY_OF_YEAR);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
int DateAcctMonth = calendar.get(Calendar.MONTH);
if(p_Flag ==0){
//ADJUST PERIOD FOR DAY CONVENTION
if(DateAcctYear == AssetServiceDateYear){
return ((365-(double)AssetServiceDateDay)/365);
}
else if ((DateAcctYear*12 + DateAcctMonth) == (AssetServiceDateYear+rs.getInt("A_ASSET_LIFE_YEARS"))*12 + AssetServiceDateMonth)
return ((double)AssetServiceDateDay/365);
else if ((DateAcctYear*12 + DateAcctMonth) > (AssetServiceDateYear+rs.getInt("A_ASSET_LIFE_YEARS"))*12 + AssetServiceDateMonth)
return ((double)AssetServiceDateDay/365);
else
return 1;
}
if(p_Flag ==1){
//ADJUST PERIOD FOR DAY CONVENTION
if(DateAcctYear == AssetServiceDateYear){
return ((365-(double)AssetServiceDateDay)/365);
}
if(DateAcctYear == (AssetServiceDateYear+rs.getInt("A_ASSET_LIFE_YEARS")+1))
return ((double)AssetServiceDateDay/365);
else
return 1;
}
if(p_Flag == 2){
//ADJUST PERIOD FOR DAY CONVENTION
return ((365-(double)AssetServiceDateDay)/365);
}
}
}
catch (Exception e)
{
System.out.println("DYCON"+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return v_adj;
}
static public double MMCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
int v_adj=0;
StringBuffer sqlB = new StringBuffer ("SELECT A_ASSET.ASSETSERVICEDATE,"
+ " A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED,"
+ " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD,"
+ " A_DEPRECIATION_WORKFILE.DATEACCT"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET"
+ " WHERE A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE+"'");
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctMonth = calendar.get(Calendar.MONTH);
if(p_Flag ==0){
if(DateAcctMonth - AssetServiceDateMonth >1)
return 1;
else
return .5;
}
if(p_Flag ==1){
if(p_Period == 0)
return .5;
else
return 1;
}
if(p_Flag == 2){
if (p_Period - AssetServiceDateMonth >1)
return 1;
else
return .5;
}
}
}
catch (Exception e)
{
System.out.println("MMCON"+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return v_adj;
}
static public double MQCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period)
{
int v_adj=0;
StringBuffer sqlB = new StringBuffer ("SELECT A_ASSET.ASSETSERVICEDATE,"
+ " A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED,"
+ " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD,"
+ " A_DEPRECIATION_WORKFILE.DATEACCT"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET"
+ " WHERE A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE+"'");
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
int DateAcctMonth = calendar.get(Calendar.MONTH);
if(p_Flag <2){
//ADJUST PERIOD FOR MID-QUARTER CONVENTION
if(DateAcctYear == AssetServiceDateYear){
if(AssetServiceDateMonth < 4 )
return .875;
else if (AssetServiceDateMonth < 7 )
return .625;
else if (AssetServiceDateMonth < 10 )
return .375;
else if (AssetServiceDateMonth > 9 )
return .125;
}
else if(DateAcctYear*12 + DateAcctMonth >= ((AssetServiceDateYear+rs.getInt("A_ASSET_LIFE_YEARS"))*12 + AssetServiceDateMonth)){
if(AssetServiceDateMonth < 4 )
return .125;
else if (AssetServiceDateMonth < 7 )
return .375;
else if (AssetServiceDateMonth < 10 )
return .625;
else if (AssetServiceDateMonth > 9 )
return .875;
}
else
return 1;
}
if(p_Flag == 2){
if(AssetServiceDateMonth< 4 )
return .875;
else if (AssetServiceDateMonth < 7 )
return .625;
else if (AssetServiceDateMonth < 10 )
return .375;
else if (AssetServiceDateMonth > 9 )
return .125;
}
}
}
catch (Exception e)
{
System.out.println("MQCON"+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return v_adj;
}
}// Conventions

View File

@ -0,0 +1,390 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import org.compiere.model.*;
import org.compiere.process.*;
import org.compiere.util.DB;
import java.math.BigDecimal;
/**
* Create Asset from FA GL Process
*
* @author Rob Klein
* @version $Id: CreateGLAsset.java,v 1.0 $
*/
public class CreateGLAsset extends SvrProcess
{
private int p_client = 0;
//private int p_org = 0;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("AD_Client_ID"))
p_client = para[i].getParameterAsInt();
else
log.info("prepare - Unknown Parameter: " + name);
}
} // prepare
/**
* Process Invoices
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("Starting inbound invoice process");
int uselifemonths = 0;
int uselifeyears = 0;
String sql =" SELECT * FROM GL_JOURNALLINE WHERE A_Processed <> 'Y' and AD_Client_ID = ?"
+ " and A_CreateAsset = 'Y' and Processed = 'Y'";
log.info(sql);
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement(sql,get_TrxName());
try {
pstmt.setInt(1, p_client);
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
X_A_Asset asset = new X_A_Asset (getCtx(), rs.getInt("A_Asset_ID"), get_TrxName());
X_GL_JournalLine JVLine = new X_GL_JournalLine (getCtx(), rs.getInt("GL_JournalLine_ID"), get_TrxName());
String sql2 ="SELECT C.AccountType FROM GL_JournalLine A, C_ValidCombination B, C_ElementValue C WHERE A.GL_JournalLine_ID = ?" +
" and A.C_ValidCombination_ID = B.C_ValidCombination_ID and B.Account_ID = C.C_ElementValue_ID";
String acctType = DB.getSQLValueString(get_TrxName(),sql2, JVLine.getGL_JournalLine_ID());
if (acctType.equals("A")){
sql ="SELECT * FROM A_Asset_Group_Acct WHERE A_Asset_Group_ID = ? AND IsActive='Y'";
log.info("yes");
pstmt = null;
pstmt = DB.prepareStatement(sql,get_TrxName());
if(asset.getA_Asset_ID()==0) {
Number groupId = (Number)JVLine.get_Value(I_CustomColumn.A_Asset_Group_ID);
pstmt.setInt(1, groupId != null ? groupId.intValue() : 0);
} else
pstmt.setInt(1, asset.getA_Asset_Group_ID());
ResultSet rs2 = pstmt.executeQuery();
while (rs2.next()){
X_A_Asset_Group_Acct assetgrpacct = new X_A_Asset_Group_Acct (getCtx(), rs2,get_TrxName());
MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName());
if (assetgrpacct.isProcessing()== true){
sql2 = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=? and"
+ " PostingType = '"+assetgrpacct.getPostingType()+"'";
if (DB.getSQLValue(get_TrxName(),sql2, asset.getA_Asset_ID())== 0)
{
asset.setIsOwned(true);
asset.setIsDepreciated(assetgrpacct.isProcessing());
asset.setA_Asset_CreateDate(JVLine.getDateAcct());
asset.setIsInPosession(true);
if(JVLine.getDescription()!= null)
asset.setName(JVLine.getDescription());
else
asset.setName("Asset created from JV");
asset.setHelp("Created from JV #" + JVLine.getGL_Journal_ID() + " on line #" + JVLine.getLine());
asset.setDescription(JVLine.getDescription());
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
asset.setA_Asset_Group_ID(assetgrpacct.getA_Asset_Group_ID());
asset.setA_QTY_Current(JVLine.getQty());
asset.setA_QTY_Original(JVLine.getQty());
asset.save();
asset.setA_Parent_Asset_ID(asset.getA_Asset_ID());
asset.save();
boolean isdepreciate = assetgrpacct.isProcessing();
if (isdepreciate == true)
{
assetacct.setPostingType(assetgrpacct.getPostingType());
assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent());
assetacct.setA_Depreciation_Conv_ID(assetgrpacct.getConventionType());
assetacct.setA_Asset_ID(asset.getA_Asset_ID());
assetacct.setA_Depreciation_ID(assetgrpacct.getDepreciationType());
assetacct.setA_Asset_Spread_ID(assetgrpacct.getA_Asset_Spread_Type());
assetacct.setA_Period_Start(1);
if (asset.getUseLifeMonths() == 0 & asset.getUseLifeYears() == 0){
assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths());
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
asset.setIsDepreciated(true);
asset.setIsOwned(true);
asset.save();
uselifemonths = assetgrpacct.getUseLifeMonths();
uselifeyears = assetgrpacct.getUseLifeYears();
}
else if(asset.getUseLifeMonths() == 0){
assetacct.setA_Period_End(asset.getUseLifeYears()*12);
asset.setUseLifeMonths(asset.getUseLifeYears()*12);
asset.setIsDepreciated(true);
asset.setIsOwned(true);
asset.save();
uselifemonths = asset.getUseLifeYears()*12;
uselifeyears = asset.getUseLifeYears();
}
else{
assetacct.setA_Period_End(asset.getUseLifeMonths());
uselifemonths = asset.getUseLifeMonths();
uselifeyears = asset.getUseLifeYears();}
assetacct.setA_Depreciation_Method_ID(assetgrpacct.getA_Depreciation_Calc_Type());
assetacct.setA_Asset_Acct(assetgrpacct.getA_Asset_Acct());
assetacct.setC_AcctSchema_ID(assetgrpacct.getC_AcctSchema_ID());
assetacct.setA_Salvage_Value(new BigDecimal (0.0));
assetacct.setA_Accumdepreciation_Acct(assetgrpacct.getA_Accumdepreciation_Acct());
assetacct.setA_Depreciation_Acct(assetgrpacct.getA_Depreciation_Acct());
assetacct.setA_Disposal_Revenue(assetgrpacct.getA_Disposal_Revenue());
assetacct.setA_Disposal_Loss(assetgrpacct.getA_Disposal_Loss());
assetacct.setA_Reval_Accumdep_Offset_Cur(assetgrpacct.getA_Reval_Accumdep_Offset_Cur());
assetacct.setA_Reval_Accumdep_Offset_Prior(assetgrpacct.getA_Reval_Accumdep_Offset_Prior());
assetacct.setA_Reval_Cal_Method(assetgrpacct.getA_Reval_Cal_Method());
assetacct.setA_Reval_Cost_Offset(assetgrpacct.getA_Reval_Cost_Offset());
assetacct.setA_Reval_Cost_Offset_Prior(assetgrpacct.getA_Reval_Cost_Offset_Prior());
assetacct.setA_Reval_Depexp_Offset(assetgrpacct.getA_Reval_Depexp_Offset());
assetacct.setA_Depreciation_Manual_Amount(assetgrpacct.getA_Depreciation_Manual_Amount());
assetacct.setA_Depreciation_Manual_Period(assetgrpacct.getA_Depreciation_Manual_Period());
assetacct.setA_Depreciation_Table_Header_ID(assetgrpacct.getA_Depreciation_Table_Header_ID());
assetacct.setA_Depreciation_Variable_Perc(assetgrpacct.getA_Depreciation_Variable_Perc());
assetacct.setProcessing(false);
assetacct.save();
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setPostingType(assetacct.getPostingType());
change.setA_Split_Percent(assetacct.getA_Split_Percent());
change.setConventionType(assetacct.getA_Depreciation_Conv_ID());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setDepreciationType(assetacct.getA_Depreciation_ID());
change.setA_Asset_Spread_Type(assetacct.getA_Asset_Spread_ID());
change.setA_Period_Start(assetacct.getA_Period_Start());
change.setA_Period_End(assetacct.getA_Period_End());
change.setIsInPosession(asset.isOwned());
change.setIsDisposed(asset.isDisposed());
change.setIsDepreciated(asset.isDepreciated());
change.setIsFullyDepreciated(asset.isFullyDepreciated());
change.setA_Depreciation_Calc_Type(assetacct.getA_Depreciation_Method_ID());
change.setA_Asset_Acct(assetacct.getA_Asset_Acct());
change.setC_AcctSchema_ID(assetacct.getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(assetacct.getA_Accumdepreciation_Acct());
change.setA_Depreciation_Acct(assetacct.getA_Depreciation_Acct());
change.setA_Disposal_Revenue(assetacct.getA_Disposal_Revenue());
change.setA_Disposal_Loss(assetacct.getA_Disposal_Loss());
change.setA_Reval_Accumdep_Offset_Cur(assetacct.getA_Reval_Accumdep_Offset_Cur());
change.setA_Reval_Accumdep_Offset_Prior(assetacct.getA_Reval_Accumdep_Offset_Prior());
change.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
change.setA_Reval_Cost_Offset(assetacct.getA_Reval_Cost_Offset());
change.setA_Reval_Cost_Offset_Prior(assetacct.getA_Reval_Cost_Offset_Prior());
change.setA_Reval_Depexp_Offset(assetacct.getA_Reval_Depexp_Offset());
change.setA_Depreciation_Manual_Amount(assetacct.getA_Depreciation_Manual_Amount());
change.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
change.setA_Depreciation_Table_Header_ID(assetacct.getA_Depreciation_Table_Header_ID());
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(asset.getA_Parent_Asset_ID());
change.setChangeType("CRT");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setIsInPosession(asset.isOwned());
change.setIsDisposed(asset.isDisposed());
change.setIsDepreciated(asset.isDepreciated());
change.setIsFullyDepreciated(asset.isFullyDepreciated());
change.setLot(asset.getLot());
change.setSerno(asset.getSerNo());
change.setVersionno(asset.getVersionNo());
change.setUseLifeMonths(asset.getUseLifeMonths());
change.setUseLifeYears(asset.getUseLifeYears());
change.setLifeUseUnits(asset.getLifeUseUnits());
change.setAssetDisposalDate(asset.getAssetDisposalDate());
change.setAssetServiceDate(asset.getAssetServiceDate());
change.setC_BPartner_Location_ID(asset.getC_BPartner_Location_ID());
change.setC_BPartner_ID(asset.getC_BPartner_ID());
change.setAssetValueAmt(JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr()));
change.setA_Asset_CreateDate(asset.getA_Asset_CreateDate());
change.setAd_User_ID(asset.getAD_User_ID());
change.setC_Location_ID(asset.getC_Location_ID());
change.save();
}
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName());
assetwk.setA_Asset_ID(asset.getA_Asset_ID());
assetwk.setA_Life_Period(assetgrpacct.getUseLifeMonths());
assetwk.setA_Asset_Life_Years(assetgrpacct.getUseLifeYears());
assetwk.setA_Asset_Cost(assetwk.getA_Asset_Cost().add(JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr())));
assetwk.setA_Accumulated_Depr(new BigDecimal (0.0));
assetwk.setA_Salvage_Value(new BigDecimal (0.0));
assetwk.setA_Period_Posted(0);
assetwk.setA_Asset_Life_Current_Year(new BigDecimal (0.0));
assetwk.setA_Curr_Dep_Exp(new BigDecimal (0.0));
assetwk.setA_QTY_Current(JVLine.getQty());
assetwk.setIsDepreciated(assetgrpacct.isProcessing());
assetwk.setPostingType(assetgrpacct.getPostingType());
assetwk.save();
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName());
assetadd.setA_Asset_ID(asset.getA_Asset_ID());
assetadd.setAssetValueAmt(JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr()));
assetadd.setA_SourceType("JRN");
assetadd.setA_CapvsExp("Cap");
assetadd.setA_QTY_Current(JVLine.getQty());
assetadd.setDocumentNo(""+JVLine.getGL_Journal_ID());
assetadd.setGL_JournalBatch_ID(JVLine.getGL_Journal_ID());
assetadd.setLine(JVLine.getLine());
assetadd.setDescription(JVLine.getDescription());
assetadd.setPostingType(assetwk.getPostingType());
assetadd.save();
}
else
{
sql2 ="SELECT * FROM A_Depreciation_Workfile WHERE A_Asset_ID = ? and PostingType = ?";
PreparedStatement pstmt2 = null;
pstmt2 = DB.prepareStatement(sql2,get_TrxName());
log.info("no");
try {
pstmt2.setInt(1, asset.getA_Asset_ID());
pstmt2.setString(2, assetgrpacct.getPostingType());
ResultSet rs3 = pstmt2.executeQuery();
while (rs3.next()){
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs3, get_TrxName());
assetwk.setA_Asset_ID(asset.getA_Asset_ID());
assetwk.setA_Life_Period(assetgrpacct.getUseLifeMonths());
assetwk.setA_Asset_Life_Years(assetgrpacct.getUseLifeYears());
assetwk.setA_Asset_Cost(assetwk.getA_Asset_Cost().add(JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr())));
assetwk.setA_QTY_Current(assetwk.getA_QTY_Current().add(JVLine.getQty()));
assetwk.setIsDepreciated(assetgrpacct.isProcessing());
assetwk.save();
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName());
assetadd.setA_Asset_ID(asset.getA_Asset_ID());
assetadd.setAssetValueAmt((JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr())));
assetadd.setA_SourceType("JRN");
assetadd.setA_CapvsExp("Cap");
assetadd.setA_QTY_Current(JVLine.getQty());
assetadd.setDocumentNo(""+JVLine.getGL_Journal_ID());
assetadd.setGL_JournalBatch_ID(JVLine.getGL_Journal_ID());
assetadd.setLine(JVLine.getLine());
assetadd.setDescription(JVLine.getDescription());
assetadd.setPostingType(assetwk.getPostingType());
assetadd.save();
asset.setA_QTY_Original(assetadd.getA_QTY_Current().add(asset.getA_QTY_Original()));
asset.setA_QTY_Current(assetadd.getA_QTY_Current().add(asset.getA_QTY_Current()));
asset.save();
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setChangeType("ADD");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType(assetwk.getPostingType());
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.save();
}
rs3.close();
pstmt2.close();
pstmt2 = null;
}
catch (Exception e)
{
log.info("getAssets "+ e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
}
}
}
}
else if (acctType.equals("E"))
{
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName());
assetadd.setA_Asset_ID(asset.getA_Asset_ID());
assetadd.setAssetValueAmt((JVLine.getAmtAcctDr().subtract(JVLine.getAmtAcctCr())));
assetadd.setA_SourceType("JRN");
assetadd.setA_CapvsExp("Exp");
assetadd.setA_QTY_Current(JVLine.getQty());
assetadd.setDocumentNo(""+JVLine.getGL_Journal_ID());
assetadd.setGL_JournalBatch_ID(JVLine.getGL_Journal_ID());
assetadd.setLine(JVLine.getLine());
assetadd.setDescription(JVLine.getDescription());
assetadd.setPostingType("A");
assetadd.save();
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.setChangeType("EXP");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "EXP"));
assetadd.setPostingType("A");
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.save();
}
JVLine.set_ValueOfColumn(I_CustomColumn.A_Processed, Boolean.TRUE);
JVLine.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets "+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
} // CreateGLAsset

View File

@ -0,0 +1,651 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2004 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
//import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.X_C_Invoice;
import org.compiere.model.X_C_InvoiceLine;
import org.compiere.model.X_M_Product;
import org.compiere.model.X_M_Product_Category;
import org.compiere.model.X_C_BPartner;
import org.compiere.process.*;
import org.compiere.util.DB;
//import org.compiere.util.Env;
import java.math.BigDecimal;
//import org.compiere.model.MCharge;
import org.compiere.model.*;
/**
* Create Asset from Invoice Process
*
* @author Rob Klein
*
*/
public class CreateInvoicedAsset extends SvrProcess
{
private int p_client = 0;
//private int p_org = 0;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("AD_Client_ID"))
p_client = para[i].getParameterAsInt();
else
log.info("prepare - Unknown Parameter: " + name);
}
} // prepare
/**
* Process Invoices
* @return info
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
log.info("Starting inbound invoice process");
int uselifemonths = 0;
int uselifeyears = 0;
int C_Period_ID=0;
int invoiceAcct=0;
String sql =" SELECT * FROM C_InvoiceLine WHERE A_Processed is null and AD_Client_ID = ?"
+ " and A_CreateAsset = 'Y' and Processed = 'Y'";
log.info("sql"+sql+p_client);
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement(sql,get_TrxName());
try {
pstmt.setInt(1, p_client);
ResultSet rs = pstmt.executeQuery();
int i=0;
while (rs.next()){
i=i+1;
log.info("here is the counter "+i);
X_A_Asset asset = new X_A_Asset (getCtx(), rs.getInt("A_Asset_ID"), get_TrxName());
X_C_Invoice Invoice = new X_C_Invoice (getCtx(), rs.getInt("C_Invoice_ID"), get_TrxName());
X_C_InvoiceLine InvoiceLine = new X_C_InvoiceLine (getCtx(), rs, get_TrxName());
X_M_Product product = new X_M_Product (getCtx(), InvoiceLine.getM_Product_ID(), get_TrxName());
//X_M_Product_Category productcat = new X_M_Product_Category (getCtx(), product.getM_Product_Category_ID(), get_TrxName());
//X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0);
X_C_BPartner business = new X_C_BPartner (getCtx(), Invoice.getC_BPartner_ID(), get_TrxName());
if (rs.getString("A_CapvsExp").equals("Cap")){
String sqla ="SELECT * FROM A_Asset_Group_Acct WHERE A_Asset_Group_ID = ? AND IsActive='Y'";
PreparedStatement pstmt1 = null;
pstmt1 = DB.prepareStatement(sqla,get_TrxName());
if(asset.getA_Asset_ID()==0) {
Number groupId = (Number)InvoiceLine.get_Value(I_CustomColumn.A_Asset_Group_ID);
pstmt1.setInt(1, groupId != null ? groupId.intValue() : 0);
} else
pstmt1.setInt(1, asset.getA_Asset_Group_ID());
ResultSet rs2 = pstmt1.executeQuery();
while (rs2.next()){
X_A_Asset_Group_Acct assetgrpacct = new X_A_Asset_Group_Acct (getCtx(), rs2,get_TrxName());
MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName());
if (assetgrpacct.isProcessing()== true){
String sql2 = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=? and"
+ " PostingType = '"+assetgrpacct.getPostingType()+"'";
if (DB.getSQLValue(get_TrxName(),sql2, asset.getA_Asset_ID())== 0)
{
asset.setIsOwned(true);
asset.setIsDepreciated(assetgrpacct.isProcessing());
asset.setA_Asset_CreateDate(Invoice.getDateInvoiced());
asset.setIsInPosession(true);
if (InvoiceLine.getM_Product_ID()>0)
asset.setName(product.getName()+"-"+business.getName()+"-"+Invoice.getDocumentNo());
else
asset.setName(business.getName()+"-"+Invoice.getDocumentNo());
asset.setHelp("Created from Invoice #" + rs.getInt("C_Invoice_ID") + " on line #" + InvoiceLine.getLine());
asset.setDescription(InvoiceLine.getDescription());
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
asset.setA_Asset_Group_ID(assetgrpacct.getA_Asset_Group_ID());
asset.setA_QTY_Current(InvoiceLine.getQtyEntered());
asset.setA_QTY_Original(InvoiceLine.getQtyEntered());
asset.save();
asset.setA_Parent_Asset_ID(asset.getA_Asset_ID());
asset.save();
boolean isdepreciate = assetgrpacct.isProcessing();
if (isdepreciate == true)
{
assetacct.setPostingType(assetgrpacct.getPostingType());
assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent());
assetacct.setA_Depreciation_Conv_ID(assetgrpacct.getConventionType());
assetacct.setA_Asset_ID(asset.getA_Asset_ID());
assetacct.setA_Depreciation_ID(assetgrpacct.getDepreciationType());
assetacct.setA_Asset_Spread_ID(assetgrpacct.getA_Asset_Spread_Type());
assetacct.setA_Period_Start(1);
if (asset.getUseLifeMonths() == 0 & asset.getUseLifeYears() == 0){
assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths());
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
asset.setIsDepreciated(true);
asset.setIsOwned(true);
asset.save();
uselifemonths = assetgrpacct.getUseLifeMonths();
uselifeyears = assetgrpacct.getUseLifeYears();
}
else if(asset.getUseLifeMonths() == 0){
assetacct.setA_Period_End(asset.getUseLifeYears()*12);
asset.setUseLifeMonths(asset.getUseLifeYears()*12);
asset.setIsDepreciated(true);
asset.setIsOwned(true);
asset.save();
uselifemonths = asset.getUseLifeYears()*12;
uselifeyears = asset.getUseLifeYears();
}
else{
assetacct.setA_Period_End(asset.getUseLifeMonths());
uselifemonths = asset.getUseLifeMonths();
uselifeyears = asset.getUseLifeYears();}
assetacct.setA_Depreciation_Method_ID(assetgrpacct.getA_Depreciation_Calc_Type());
assetacct.setA_Asset_Acct(assetgrpacct.getA_Asset_Acct());
assetacct.setC_AcctSchema_ID(assetgrpacct.getC_AcctSchema_ID());
assetacct.setA_Accumdepreciation_Acct(assetgrpacct.getA_Accumdepreciation_Acct());
assetacct.setA_Depreciation_Acct(assetgrpacct.getA_Depreciation_Acct());
assetacct.setA_Disposal_Revenue(assetgrpacct.getA_Disposal_Revenue());
assetacct.setA_Disposal_Loss(assetgrpacct.getA_Disposal_Loss());
assetacct.setA_Salvage_Value(new BigDecimal(0.0));
assetacct.setA_Reval_Accumdep_Offset_Cur(assetgrpacct.getA_Reval_Accumdep_Offset_Cur());
assetacct.setA_Reval_Accumdep_Offset_Prior(assetgrpacct.getA_Reval_Accumdep_Offset_Prior());
assetacct.setA_Reval_Cal_Method(assetgrpacct.getA_Reval_Cal_Method());
assetacct.setA_Reval_Cost_Offset(assetgrpacct.getA_Reval_Cost_Offset());
assetacct.setA_Reval_Cost_Offset_Prior(assetgrpacct.getA_Reval_Cost_Offset_Prior());
assetacct.setA_Reval_Depexp_Offset(assetgrpacct.getA_Reval_Depexp_Offset());
assetacct.setA_Depreciation_Manual_Amount(assetgrpacct.getA_Depreciation_Manual_Amount());
assetacct.setA_Depreciation_Manual_Period(assetgrpacct.getA_Depreciation_Manual_Period());
assetacct.setA_Depreciation_Table_Header_ID(assetgrpacct.getA_Depreciation_Table_Header_ID());
assetacct.setA_Depreciation_Variable_Perc(assetgrpacct.getA_Depreciation_Variable_Perc());
assetacct.setProcessing(false);
assetacct.save();
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setPostingType(assetacct.getPostingType());
change.setA_Split_Percent(assetacct.getA_Split_Percent());
change.setConventionType(assetacct.getA_Depreciation_Conv_ID());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setDepreciationType(assetacct.getA_Depreciation_ID());
change.setA_Asset_Spread_Type(assetacct.getA_Asset_Spread_ID());
change.setA_Period_Start(assetacct.getA_Period_Start());
change.setA_Period_End(assetacct.getA_Period_End());
change.setIsInPosession(asset.isOwned());
change.setIsDisposed(asset.isDisposed());
change.setIsDepreciated(asset.isDepreciated());
change.setIsFullyDepreciated(asset.isFullyDepreciated());
change.setA_Depreciation_Calc_Type(assetacct.getA_Depreciation_Method_ID());
change.setA_Asset_Acct(assetacct.getA_Asset_Acct());
change.setC_AcctSchema_ID(assetacct.getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(assetacct.getA_Accumdepreciation_Acct());
change.setA_Depreciation_Acct(assetacct.getA_Depreciation_Acct());
change.setA_Disposal_Revenue(assetacct.getA_Disposal_Revenue());
change.setA_Disposal_Loss(assetacct.getA_Disposal_Loss());
change.setA_Reval_Accumdep_Offset_Cur(assetacct.getA_Reval_Accumdep_Offset_Cur());
change.setA_Reval_Accumdep_Offset_Prior(assetacct.getA_Reval_Accumdep_Offset_Prior());
change.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
change.setA_Reval_Cost_Offset(assetacct.getA_Reval_Cost_Offset());
change.setA_Reval_Cost_Offset_Prior(assetacct.getA_Reval_Cost_Offset_Prior());
change.setA_Reval_Depexp_Offset(assetacct.getA_Reval_Depexp_Offset());
change.setA_Depreciation_Manual_Amount(assetacct.getA_Depreciation_Manual_Amount());
change.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
change.setA_Depreciation_Table_Header_ID(assetacct.getA_Depreciation_Table_Header_ID());
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(asset.getA_Parent_Asset_ID());
change.setChangeType("CRT");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setIsInPosession(asset.isOwned());
change.setIsDisposed(asset.isDisposed());
change.setIsDepreciated(asset.isDepreciated());
change.setIsFullyDepreciated(asset.isFullyDepreciated());
change.setLot(asset.getLot());
change.setSerno(asset.getSerNo());
change.setVersionno(asset.getVersionNo());
change.setUseLifeMonths(asset.getUseLifeMonths());
change.setUseLifeYears(asset.getUseLifeYears());
change.setLifeUseUnits(asset.getLifeUseUnits());
change.setAssetDisposalDate(asset.getAssetDisposalDate());
change.setAssetServiceDate(asset.getAssetServiceDate());
change.setC_BPartner_Location_ID(asset.getC_BPartner_Location_ID());
change.setC_BPartner_ID(asset.getC_BPartner_ID());
change.setAssetValueAmt(InvoiceLine.getLineTotalAmt());
change.setA_QTY_Current(InvoiceLine.getQtyEntered());
change.setA_QTY_Original(InvoiceLine.getQtyEntered());
change.setA_Asset_CreateDate(asset.getA_Asset_CreateDate());
change.setAd_User_ID(asset.getAD_User_ID());
change.setC_Location_ID(asset.getC_Location_ID());
change.save();
}
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName());
assetwk.setA_Asset_ID(asset.getA_Asset_ID());
assetwk.setA_Life_Period(assetgrpacct.getUseLifeMonths());
assetwk.setA_Asset_Life_Years(assetgrpacct.getUseLifeYears());
assetwk.setA_Asset_Cost(assetwk.getA_Asset_Cost().add(InvoiceLine.getLineTotalAmt()));
assetwk.setA_QTY_Current(InvoiceLine.getQtyEntered());
assetwk.setIsDepreciated(assetgrpacct.isProcessing());
assetwk.setPostingType(assetgrpacct.getPostingType());
assetwk.setA_Accumulated_Depr(new BigDecimal (0.0));
assetwk.setA_Period_Posted(0);
assetwk.setA_Asset_Life_Current_Year(new BigDecimal (0.0));
assetwk.setA_Curr_Dep_Exp(new BigDecimal (0.0));
assetwk.save();
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName());
assetadd.setA_Asset_ID(asset.getA_Asset_ID());
assetadd.setAssetValueAmt(InvoiceLine.getLineTotalAmt());
assetadd.setA_SourceType("INV");
assetadd.setA_CapvsExp("Cap");
assetadd.setM_InOutLine_ID(rs.getInt("C_Invoice_ID"));
assetadd.setC_Invoice_ID(rs.getInt("C_Invoice_ID"));
assetadd.setDocumentNo(Invoice.getDocumentNo());
assetadd.setLine(InvoiceLine.getLine());
assetadd.setDescription(InvoiceLine.getDescription());
assetadd.setA_QTY_Current(InvoiceLine.getQtyEntered());
assetadd.setPostingType(assetwk.getPostingType());
assetadd.save();
String sql1 = "SELECT C_Period_ID "
+ "FROM C_Period "
+ "WHERE C_Year_ID IN "
+ " (SELECT C_Year_ID FROM C_Year WHERE C_Calendar_ID ="
+ " (SELECT C_Calendar_ID FROM AD_ClientInfo WHERE AD_Client_ID=?))"
+ " AND ? BETWEEN StartDate AND EndDate"
+ " AND PeriodType='S'";
try
{
PreparedStatement pstmt4 = DB.prepareStatement(sql1,get_TrxName());
pstmt4.setInt(1, asset.getAD_Client_ID());
pstmt4.setTimestamp(2, Invoice.getDateAcct());
ResultSet rs4 = pstmt4.executeQuery();
if (rs4.next())
C_Period_ID = rs4.getInt(1);
rs4.close();
pstmt4.close();
pstmt4 = null;
}
catch (SQLException e)
{
log.log(Level.SEVERE, "Journal_Period - DateAcct", e);
return e.getLocalizedMessage();
}
/**Code below is for future functionality
int DocumentNo = MSequence.getNextID (Env.getAD_Client_ID(Env.getCtx()), "DocumentNo_M_InOut", get_TrxName());
//Adjust Inventory Quantity
X_M_InOut mInOut = new X_M_InOut (getCtx(), 0, get_TrxName());
mInOut.setC_BPartner_ID (Invoice.getC_BPartner_ID());
mInOut.setC_BPartner_Location_ID (Invoice.getC_BPartner_Location_ID());
mInOut.setC_DocType_ID (Invoice.getC_DocType_ID());
mInOut.setDateAcct (new Timestamp(System.currentTimeMillis())); // @#Date@
mInOut.setDeliveryRule ("A"); // A
mInOut.setDeliveryViaRule ("P"); // P
mInOut.setDocAction ("CO"); // CO
mInOut.setDocStatus ("DR"); // DR
mInOut.setDescription("Invoice transfered to assets");
mInOut.setDocumentNo (""+DocumentNo);
mInOut.setFreightCostRule ("I"); // I
mInOut.setPriorityRule("5");
mInOut.setIsApproved (false);
mInOut.setIsInDispute (false);
mInOut.setIsInTransit (false);
mInOut.setIsPrinted (false);
mInOut.setIsSOTrx (false); // @IsSOTrx@
mInOut.setM_InOut_ID (0);
mInOut.setM_Warehouse_ID (0);
mInOut.setMovementDate (new Timestamp(System.currentTimeMillis())); // @#Date@
mInOut.setMovementType ("V-");
mInOut.setPosted (false);
mInOut.setProcessed (false);
mInOut.setSendEMail (false);
mInOut.save();
X_M_InOutLine mInOutLine = new X_M_InOutLine (getCtx(), 0, get_TrxName());
mInOutLine.setC_UOM_ID (InvoiceLine.getC_UOM_ID()); // @#C_UOM_ID@
mInOutLine.setIsDescription (false); // N
mInOutLine.setIsInvoiced (false);
mInOutLine.setLine (10); // @SQL=SELECT NVL(MAX(Line),0)+10 AS DefaultValue FROM M_InOutLine WHERE M_InOut_ID=@M_InOut_ID@
mInOutLine.setM_AttributeSetInstance_ID (InvoiceLine.getM_AttributeSetInstance_ID());
mInOutLine.setM_InOut_ID (mInOut.getM_InOut_ID());
mInOutLine.setM_Locator_ID (0); // @M_Locator_ID@
mInOutLine.setM_Product_ID (InvoiceLine.getM_Product_ID());
mInOutLine.setMovementQty (InvoiceLine.getQtyInvoiced()); // 1
mInOutLine.setProcessed (false);
mInOutLine.setQtyEntered (Env.ZERO); // 1
**/
//Determine non tax accounts to credit
invoiceAcct = determineAcct (assetacct.getC_AcctSchema_ID(), InvoiceLine.getM_Product_ID(), InvoiceLine.getC_Charge_ID(), InvoiceLine.getLineNetAmt());
//Create Journal Entries for the new asset
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName());
depexp2.setPostingType(assetacct.getPostingType());
depexp2.setA_Asset_ID(asset.getA_Asset_ID());
depexp2.setExpense(InvoiceLine.getLineTotalAmt());
depexp2.setDateAcct(Invoice.getDateAcct());
depexp2.setA_Account_Number(assetacct.getA_Asset_Acct());
depexp2.setDescription("Create Asset from Invoice");
depexp2.setIsDepreciated(false);
depexp2.setA_Period(C_Period_ID);
depexp2.setA_Entry_Type("NEW");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName());
depexp3.setPostingType(assetacct.getPostingType());
depexp3.setA_Asset_ID(asset.getA_Asset_ID());
depexp3.setExpense(InvoiceLine.getLineNetAmt().multiply(new BigDecimal (-1)));
depexp3.setDateAcct(Invoice.getDateAcct());
depexp3.setA_Account_Number(invoiceAcct);
depexp3.setDescription("Create Asset from Invoice");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(C_Period_ID);
depexp3.setA_Entry_Type("NEW");
depexp3.save();
//Determine if tax adjustment is necessary
if (InvoiceLine.getTaxAmt().compareTo(new BigDecimal (0))!=0){
invoiceAcct = determineTaxAcct (assetacct.getC_AcctSchema_ID(), InvoiceLine.getC_Tax_ID());
X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName());
depexp4.setPostingType(assetacct.getPostingType());
depexp4.setA_Asset_ID(asset.getA_Asset_ID());
depexp4.setExpense(InvoiceLine.getTaxAmt().multiply(new BigDecimal (-1)));
depexp4.setDateAcct(Invoice.getDateAcct());
depexp4.setA_Account_Number(invoiceAcct);
depexp4.setDescription("Create Asset from Invoice");
depexp4.setIsDepreciated(false);
depexp4.setA_Period(C_Period_ID);
depexp4.setA_Entry_Type("NEW");
depexp4.save();
}
}
else
{
sql2 ="SELECT * FROM A_Depreciation_Workfile WHERE A_Asset_ID = ? and PostingType = ?";
PreparedStatement pstmt2 = null;
pstmt2 = DB.prepareStatement(sql2,get_TrxName());
try {
pstmt2.setInt(1, asset.getA_Asset_ID());
pstmt2.setString(2, assetgrpacct.getPostingType());
ResultSet rs3 = pstmt2.executeQuery();
while (rs3.next()){
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs3, get_TrxName());
assetwk.setA_Asset_ID(asset.getA_Asset_ID());
assetwk.setA_Life_Period(assetgrpacct.getUseLifeMonths());
assetwk.setA_Asset_Life_Years(assetgrpacct.getUseLifeYears());
assetwk.setA_Asset_Cost(assetwk.getA_Asset_Cost().add(InvoiceLine.getLineTotalAmt()));
assetwk.setIsDepreciated(assetgrpacct.isProcessing());
assetwk.setA_QTY_Current(InvoiceLine.getQtyEntered());
assetwk.save();
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName());
assetadd.setA_Asset_ID(asset.getA_Asset_ID());
assetadd.setAssetValueAmt(InvoiceLine.getLineTotalAmt());
assetadd.setA_SourceType("INV");
assetadd.setA_CapvsExp("Cap");
assetadd.setM_InOutLine_ID(rs.getInt("C_Invoice_ID"));
assetadd.setC_Invoice_ID(rs.getInt("C_Invoice_ID"));
assetadd.setDocumentNo(Invoice.getDocumentNo());
assetadd.setLine(InvoiceLine.getLine());
assetadd.setDescription(InvoiceLine.getDescription());
assetadd.setA_QTY_Current(InvoiceLine.getQtyEntered());
assetadd.setPostingType(assetwk.getPostingType());
assetadd.save();
asset.setA_QTY_Original(assetadd.getA_QTY_Current().add(asset.getA_QTY_Original()));
asset.setA_QTY_Current(assetadd.getA_QTY_Current().add(asset.getA_QTY_Current()));
asset.save();
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.setChangeType("ADD");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType(assetwk.getPostingType());
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.save();
//Determine non tax accounts to credit
invoiceAcct = determineAcct (assetacct.getC_AcctSchema_ID(), InvoiceLine.getM_Product_ID(), InvoiceLine.getC_Charge_ID(), InvoiceLine.getLineNetAmt());
//Create Journal Entries for the new asset
X_A_Depreciation_Exp depexp2 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName());
depexp2.setPostingType(assetacct.getPostingType());
depexp2.setA_Asset_ID(asset.getA_Asset_ID());
depexp2.setExpense(InvoiceLine.getLineTotalAmt());
depexp2.setDateAcct(Invoice.getDateAcct());
depexp2.setA_Account_Number(assetacct.getA_Asset_Acct());
depexp2.setDescription("Create Asset from Invoice");
depexp2.setIsDepreciated(false);
depexp2.setA_Period(C_Period_ID);
depexp2.setA_Entry_Type("NEW");
depexp2.save();
X_A_Depreciation_Exp depexp3 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName());
depexp3.setPostingType(assetacct.getPostingType());
depexp3.setA_Asset_ID(asset.getA_Asset_ID());
depexp3.setExpense(InvoiceLine.getLineNetAmt().multiply(new BigDecimal (-1)));
depexp3.setDateAcct(Invoice.getDateAcct());
depexp3.setA_Account_Number(invoiceAcct);
depexp3.setDescription("Create Asset from Invoice");
depexp3.setIsDepreciated(false);
depexp3.setA_Period(C_Period_ID);
depexp3.setA_Entry_Type("NEW");
depexp3.save();
//Determine if tax adjustment is necessary
if (InvoiceLine.getTaxAmt().compareTo(new BigDecimal (0))!=0){
invoiceAcct = determineTaxAcct (assetacct.getC_AcctSchema_ID(), InvoiceLine.getC_Tax_ID());
X_A_Depreciation_Exp depexp4 = new X_A_Depreciation_Exp (getCtx(), 0, get_TrxName());
depexp4.setPostingType(assetacct.getPostingType());
depexp4.setA_Asset_ID(asset.getA_Asset_ID());
depexp4.setExpense(InvoiceLine.getTaxAmt().multiply(new BigDecimal (-1)));
depexp4.setDateAcct(Invoice.getDateAcct());
depexp4.setA_Account_Number(invoiceAcct);
depexp4.setDescription("Create Asset from Invoice");
depexp4.setIsDepreciated(false);
depexp4.setA_Period(C_Period_ID);
depexp4.setA_Entry_Type("NEW");
depexp4.save();
}
}
rs3.close();
pstmt2.close();
pstmt2 = null;
}
catch (Exception e)
{
log.info("getAssets "+ e);
}
finally
{
try
{
if (pstmt2 != null)
pstmt2.close ();
}
catch (Exception e)
{}
pstmt2 = null;
}
}
}
}
rs2.close();
pstmt1.close();
pstmt1 = null;
}
else if (rs.getString("A_CapvsExp").equals("Exp"))
{
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, get_TrxName());
assetadd.setA_Asset_ID(asset.getA_Asset_ID());
assetadd.setAssetValueAmt(InvoiceLine.getLineTotalAmt());
assetadd.setA_SourceType("INV");
assetadd.setA_CapvsExp("Exp");
assetadd.setM_InOutLine_ID(rs.getInt("C_Invoice_ID"));
assetadd.setC_Invoice_ID(rs.getInt("C_Invoice_ID"));
assetadd.setDocumentNo(Invoice.getDocumentNo());
assetadd.setLine(InvoiceLine.getLine());
assetadd.setDescription(InvoiceLine.getDescription());
assetadd.setA_QTY_Current(InvoiceLine.getQtyEntered());
assetadd.setPostingType("A");
assetadd.save();
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.setChangeType("EXP");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "EXP"));
assetadd.setPostingType("A");
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.save();
}
InvoiceLine.set_ValueOfColumn(I_CustomColumn.A_Processed, Boolean.TRUE);
InvoiceLine.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets "+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return "";
} // doIt
/**
* Get non tax posting accounts for invoice.
*
*
*/
private int determineAcct (int C_AcctSchema_ID, int M_Product_ID, int C_Charge_ID, BigDecimal lineAmt)
{
int invoiceAcct =0;
if (M_Product_ID == 0 && C_Charge_ID != 0)
{
if(lineAmt.signum() > 0){
String sqlb = "SELECT CH_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? and C_AcctSchema_ID=?";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_Charge_ID,C_AcctSchema_ID);
}
else{
String sqlb = "SELECT CH_Revenue_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? and C_AcctSchema_ID=?";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_Charge_ID,C_AcctSchema_ID);
}
}
else if(M_Product_ID != 0){
if(lineAmt.signum() > 0){
String sqlb = "SELECT P_Expense_Acct FROM M_Product_Acct WHERE M_Product_ID=? and C_AcctSchema_ID=?";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,M_Product_ID,C_AcctSchema_ID);
}
else{
String sqlb = "SELECT P_Revenue_Acct FROM M_Product_Acct WHERE M_Product_ID=? and C_AcctSchema_ID=?";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,M_Product_ID,C_AcctSchema_ID);
}
}
else{
if(lineAmt.signum() > 0){
String sqlb = "SELECT P_Expense_Acct "
+ "FROM M_Product_Category pc, M_Product_Category_Acct pca "
+ "WHERE pc.M_Product_Category_ID=pca.M_Product_Category_ID"
+ " AND pca.C_AcctSchema_ID=? "
+ "ORDER BY pc.IsDefault DESC, pc.Created";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_AcctSchema_ID);
}
else{
String sqlb = "SELECT P_Revenue_Acct "
+ "FROM M_Product_Category pc, M_Product_Category_Acct pca "
+ "WHERE pc.M_Product_Category_ID=pca.M_Product_Category_ID"
+ " AND pca.C_AcctSchema_ID=? "
+ "ORDER BY pc.IsDefault DESC, pc.Created";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_AcctSchema_ID);
}
}
return invoiceAcct;
}
/**
* Get tax posting accounts for invoice.
*
*
*/
private int determineTaxAcct (int C_AcctSchema_ID, int C_Tax_ID)
{
int invoiceAcct =0;
String sqlb = "SELECT T_Expense_Acct FROM C_Tax_Acct WHERE C_AcctSchema_ID=? and C_Tax_ID=?";
invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_AcctSchema_ID,C_Tax_ID);
return invoiceAcct;
}
} // InvoiceCreateInOut

View File

@ -0,0 +1,952 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert Klein. robeklein@hotmail.com
* _____________________________________________
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.compiere.util.*;
import java.lang.Math;
import java.math.BigDecimal;
/**
* Fixed Asset Depreciation
*
* @author Rob Klein
* @version $Id: Conventions.java,v 1.0 $
*
*/
public class Depreciation {
/**
*
*
*/
static public BigDecimal Dep_Type(String Type,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal A_Period_Exp = new BigDecimal(0.0);
if(Type.compareTo("DB150")==0){
A_Period_Exp = DB150( 0, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("DB150 Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("DB1SL")==0){
A_Period_Exp = DB150( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("DB1SL Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("DB200")==0){
A_Period_Exp = DB200( 0, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("DB200 Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("DB2SL")==0){
A_Period_Exp = DB200( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("DB2SL Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("VAR")==0){
A_Period_Exp = DBVAR( 0, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("VAR Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("VARSL")==0){
A_Period_Exp = DBVAR( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("VARSL Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("MAN")==0){
A_Period_Exp = MAN( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("MAN Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("SL")==0){
A_Period_Exp = SL( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("SL Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("SYD")==0){
A_Period_Exp = SYD( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("SYD Main: "+A_Period_Exp);
return A_Period_Exp;
}
else if(Type.compareTo("TAB")==0){
A_Period_Exp = TAB( 1, p_A_ASSET_ID, p_A_CURRENT_PERIOD, p_POSTINGTYPE, p_A_ASSET_ACCT_ID, p_Accum_Dep);
//System.out.println("TAB Main: "+A_Period_Exp);
return A_Period_Exp;
}
else
return new BigDecimal(0.0);
}
static public BigDecimal DB150(int p_SL, int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal v_DB = new BigDecimal(0.0);
BigDecimal v_Accum_Dep = new BigDecimal(0.0);
BigDecimal v_SL = new BigDecimal(0.0);
BigDecimal A_Period_Exp = new BigDecimal(0.0);
int v_counter = 0;
double v_months = 0;
int v_firstyr = 0;
double v_monthadj = 0;
BigDecimal v_adj = new BigDecimal(0.0);
BigDecimal v_Base_Amount = new BigDecimal(0.0);
BigDecimal v_Salvage_Amount = new BigDecimal(0.0);
double v_Life_Periods = 0;
double v_Life_Years = 0;
String v_con_type = null;
StringBuffer sqlB = new StringBuffer ("SELECT A.A_ASSET_COST, A.A_SALVAGE_VALUE, A.A_LIFE_PERIOD, A.A_ASSET_LIFE_YEARS, A.DATEACCT,"
+ " D.ASSETSERVICEDATE, C.CONVENTIONTYPE "
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE A, COMPIERE.A_ASSET_ACCT B,COMPIERE.A_ASSET D,COMPIERE.A_DEPRECIATION_CONVENTION C "
+ " WHERE A.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_PERIOD_POSTED+1 >= A_PERIOD_START AND A_PERIOD_POSTED+1 <= A_PERIOD_END "
+ " AND A.POSTINGTYPE = '" + p_POSTINGTYPE
+ "' AND B.POSTINGTYPE = '" + p_POSTINGTYPE
+ "' AND B.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID
+ " AND D.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_DEPRECIATION_CONV_ID = C.A_DEPRECIATION_CONVENTION_ID");
//System.out.println("DB150: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
v_Base_Amount = rs.getBigDecimal("A_ASSET_COST");
v_Salvage_Amount = rs.getBigDecimal("A_SALVAGE_VALUE");
v_Life_Periods = rs.getDouble("A_LIFE_PERIOD");
v_Life_Years = rs.getDouble("A_ASSET_LIFE_YEARS");
v_con_type = rs.getString("CONVENTIONTYPE");
double v_period = DateAcctYear - AssetServiceDateYear;
while (v_counter <= v_period){
if(v_firstyr == 0){
v_DB = (v_Base_Amount.subtract(v_Accum_Dep).subtract(v_Salvage_Amount)).multiply(new BigDecimal(1.5/v_Life_Years));
v_months = 12 - AssetServiceDateMonth +1;
if (v_con_type.compareTo("HYCON") ==0){
v_adj = new BigDecimal(Conventions.HYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj).multiply(new BigDecimal(v_months)));
v_monthadj = 6-v_months;
}
else if (v_con_type.compareTo("FYCON") ==0){
v_adj = new BigDecimal(Conventions.FYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,0,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj).multiply(new BigDecimal(v_months)));
v_monthadj = 12-v_months;
}
else if (v_con_type.compareTo("DYCON") ==0){
v_adj = new BigDecimal(Conventions.DYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_monthadj = 0;
}
else if (v_con_type.compareTo("MQCON") ==0){
v_adj = new BigDecimal(Conventions.MQCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj));
v_DB =(v_DB.divide(new BigDecimal(v_months),2, BigDecimal.ROUND_HALF_UP));
v_monthadj = 0;
}
else if (v_con_type.compareTo("FMCON") ==0){
v_adj = new BigDecimal(Conventions.FMCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(new BigDecimal(v_months)));
v_monthadj = 0;
}
else if (v_con_type.compareTo("MMCON") ==0){
v_Accum_Dep = v_Accum_Dep.add(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(.5)).add(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(v_months-1));
v_adj = new BigDecimal(Conventions.MMCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateMonth+1));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(v_adj);
v_monthadj = 0;
}
v_firstyr = 1;
}
else{
v_DB = (v_Base_Amount.subtract(v_Accum_Dep).subtract(v_Salvage_Amount)).multiply(new BigDecimal(1.5/v_Life_Years));
v_Accum_Dep = v_Accum_Dep.add(v_DB);
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
}
v_counter = v_counter+1;
}
A_Period_Exp = v_DB;
if (p_SL ==1 ){
if (v_Life_Periods-(p_A_CURRENT_PERIOD+v_monthadj)>0 )
v_SL = ((v_Base_Amount.subtract(v_Salvage_Amount).subtract(p_Accum_Dep)).divide(new BigDecimal(v_Life_Periods-(p_A_CURRENT_PERIOD+v_monthadj)),2, BigDecimal.ROUND_HALF_UP));
if (A_Period_Exp.compareTo(v_SL)==-1)
A_Period_Exp = v_SL;
if (v_Base_Amount.subtract(p_Accum_Dep).subtract(A_Period_Exp).compareTo(v_Salvage_Amount)==-1 )
A_Period_Exp =v_Base_Amount.subtract(p_Accum_Dep).subtract(v_Salvage_Amount);
}
}
//System.out.println("DB150: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("DB150: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal DB200(int p_SL,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal v_DB = new BigDecimal(0.0);
BigDecimal v_Accum_Dep = new BigDecimal(0.0);
BigDecimal v_SL = new BigDecimal(0.0);
BigDecimal A_Period_Exp = new BigDecimal(0.0);
int v_counter = 0;
double v_months = 0;
int v_firstyr = 0;
double v_monthadj = 0;
BigDecimal v_adj = new BigDecimal(0.0);
BigDecimal v_Base_Amount = new BigDecimal(0.0);
BigDecimal v_Salvage_Amount = new BigDecimal(0.0);
double v_Life_Periods = 0;
double v_Life_Years = 0;
String v_con_type = null;
StringBuffer sqlB = new StringBuffer ("SELECT A.A_ASSET_COST, A.A_SALVAGE_VALUE, A.A_LIFE_PERIOD, A.A_ASSET_LIFE_YEARS, A.DATEACCT,"
+ " D.ASSETSERVICEDATE, C.CONVENTIONTYPE "
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE A, COMPIERE.A_ASSET_ACCT B,COMPIERE.A_ASSET D,COMPIERE.A_DEPRECIATION_CONVENTION C "
+ " WHERE A.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_PERIOD_POSTED+1 >= A_PERIOD_START AND A_PERIOD_POSTED+1 <= A_PERIOD_END "
+ " AND A.POSTINGTYPE = '" + p_POSTINGTYPE
+ "' AND B.POSTINGTYPE = '" + p_POSTINGTYPE
+ "' AND B.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID
+ " AND D.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_DEPRECIATION_CONV_ID = C.A_DEPRECIATION_CONVENTION_ID");
//System.out.println("DB200: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
v_counter = 0;
v_months = 0;
v_firstyr = 0;
v_monthadj = 0;
v_adj = new BigDecimal(0.0);
v_Base_Amount = rs.getBigDecimal("A_ASSET_COST");
v_Salvage_Amount = rs.getBigDecimal("A_SALVAGE_VALUE");
v_Life_Periods = rs.getDouble("A_LIFE_PERIOD");
v_Life_Years = rs.getDouble("A_ASSET_LIFE_YEARS");
v_con_type = rs.getString("CONVENTIONTYPE");
double v_period = DateAcctYear - AssetServiceDateYear;
while (v_counter <= v_period){
if(v_firstyr == 0){
v_DB = (v_Base_Amount.subtract(v_Accum_Dep).subtract(v_Salvage_Amount)).multiply(new BigDecimal(2/v_Life_Years));
v_months = 12 - AssetServiceDateMonth +1;
if (v_con_type.compareTo("HYCON") ==0){
v_adj = new BigDecimal(Conventions.HYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj).multiply(new BigDecimal(v_months)));
v_monthadj = 6-v_months;
}
else if (v_con_type.compareTo("FYCON") ==0){
v_adj = new BigDecimal(Conventions.FYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,0,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj).multiply(new BigDecimal(v_months)));
v_monthadj = 12-v_months;
}
else if (v_con_type.compareTo("DYCON") ==0){
v_adj = new BigDecimal(Conventions.DYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_monthadj = 0;
}
else if (v_con_type.compareTo("MQCON") ==0){
v_adj = new BigDecimal(Conventions.MQCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj));
v_DB =(v_DB.divide(new BigDecimal(v_months),2, BigDecimal.ROUND_HALF_UP));
v_monthadj = 0;
}
else if (v_con_type.compareTo("FMCON") ==0){
v_adj = new BigDecimal(Conventions.FMCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(new BigDecimal(v_months)));
v_monthadj = 0;
}
else if (v_con_type.compareTo("MMCON") ==0){
v_Accum_Dep = v_Accum_Dep.add(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(.5)).add(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(v_months-1));
v_adj = new BigDecimal(Conventions.MMCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateMonth+1));
v_DB = (v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(v_adj);
v_monthadj = 0;
}
v_firstyr = 1;
}
else{
v_DB = (v_Base_Amount.subtract(v_Accum_Dep).subtract(v_Salvage_Amount)).multiply(new BigDecimal(2/v_Life_Years));
v_Accum_Dep = v_Accum_Dep.add(v_DB);
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
}
v_counter = v_counter+1;
}
A_Period_Exp = v_DB;
if (p_SL ==1 ){
if (v_Life_Periods-(p_A_CURRENT_PERIOD+v_monthadj)>0 )
v_SL = ((v_Base_Amount.subtract(v_Salvage_Amount).subtract(p_Accum_Dep)).divide(new BigDecimal(v_Life_Periods-(p_A_CURRENT_PERIOD+v_monthadj)),2, BigDecimal.ROUND_HALF_UP));
if (A_Period_Exp.compareTo(v_SL)==-1)
A_Period_Exp = v_SL;
if (v_Base_Amount.subtract(p_Accum_Dep).subtract(A_Period_Exp).compareTo(v_Salvage_Amount)==-1 )
A_Period_Exp =v_Base_Amount.subtract(p_Accum_Dep).subtract(v_Salvage_Amount);
}
}
//System.out.println("DB200: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("DB200: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal DBVAR(int p_SL,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal v_DB = new BigDecimal(0.0);
BigDecimal v_Accum_Dep = new BigDecimal(0.0);
BigDecimal v_SL = new BigDecimal(0.0);
BigDecimal A_Period_Exp = new BigDecimal(0.0);
double v_Var = 0.0;
int v_counter = 0;
double v_months = 0;
int v_firstyr = 0;
double v_monthadj = 0;
BigDecimal v_adj = new BigDecimal(0.0);
BigDecimal v_Base_Amount = new BigDecimal(0.0);
BigDecimal v_Salvage_Amount = new BigDecimal(0.0);
double v_Life_Periods = 0;
double v_Life_Years = 0;
String v_con_type = null;
StringBuffer sqlB = new StringBuffer ("SELECT A.A_ASSET_COST, A.A_SALVAGE_VALUE, A.A_LIFE_PERIOD, A.A_ASSET_LIFE_YEARS, A.DATEACCT,"
+ " D.ASSETSERVICEDATE, C.CONVENTIONTYPE, A_DEPRECIATION_VARIABLE_PERC "
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE A, COMPIERE.A_ASSET_ACCT B,COMPIERE.A_ASSET D,COMPIERE.A_DEPRECIATION_CONVENTION C "
+ " WHERE A.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_PERIOD_POSTED+1 >= A_PERIOD_START AND A_PERIOD_POSTED+1 <= A_PERIOD_END "
+ " AND A.POSTINGTYPE = '" + p_POSTINGTYPE
+ "' AND B.POSTINGTYPE = '" + p_POSTINGTYPE
+ "' AND B.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID
+ " AND D.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_DEPRECIATION_CONV_ID = C.A_DEPRECIATION_CONVENTION_ID");
//System.out.println("DBVAR: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
v_counter = 0;
v_months = 0;
v_firstyr = 0;
v_monthadj = 0;
v_Var=rs.getDouble("A_DEPRECIATION_VARIABLE_PERC");
v_adj = new BigDecimal(0.0);
v_Base_Amount = rs.getBigDecimal("A_ASSET_COST");
v_Salvage_Amount = rs.getBigDecimal("A_SALVAGE_VALUE");
v_Life_Periods = rs.getDouble("A_LIFE_PERIOD");
v_Life_Years = rs.getDouble("A_ASSET_LIFE_YEARS");
v_con_type = rs.getString("CONVENTIONTYPE");
Calendar calendar = new GregorianCalendar();
calendar.setTime(rs.getDate("ASSETSERVICEDATE"));
int AssetServiceDateYear = calendar.get(Calendar.YEAR);
int AssetServiceDateMonth = calendar.get(Calendar.MONTH);
calendar.setTime(rs.getDate("DATEACCT"));
int DateAcctYear = calendar.get(Calendar.YEAR);
double v_period = DateAcctYear - AssetServiceDateYear;
while (v_counter <= v_period){
if(v_firstyr == 0){
v_DB = (v_Base_Amount.subtract(v_Accum_Dep).subtract(v_Salvage_Amount)).multiply(new BigDecimal(v_Var/v_Life_Years));
v_months = 12 - AssetServiceDateMonth +1;
if (v_con_type.compareTo("HYCON") ==0){
v_adj = new BigDecimal(Conventions.HYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj).multiply(new BigDecimal(v_months)));
v_monthadj = 6-v_months;
}
else if (v_con_type.compareTo("FYCON") ==0){
v_adj = new BigDecimal(Conventions.FYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,0,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj).multiply(new BigDecimal(v_months)));
v_monthadj = 12-v_months;
}
else if (v_con_type.compareTo("DYCON") ==0){
v_adj = new BigDecimal(Conventions.DYCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_monthadj = 0;
}
else if (v_con_type.compareTo("MQCON") ==0){
v_adj = new BigDecimal(Conventions.MQCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(v_adj));
v_DB =(v_DB.divide(new BigDecimal(v_months),2, BigDecimal.ROUND_HALF_UP));
v_monthadj = 0;
}
else if (v_con_type.compareTo("FMCON") ==0){
v_adj = new BigDecimal(Conventions.FMCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateYear));
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
v_Accum_Dep = v_Accum_Dep.add(v_DB.multiply(new BigDecimal(v_months)));
v_monthadj = 0;
}
else if (v_con_type.compareTo("MMCON") ==0){
v_Accum_Dep = v_Accum_Dep.add(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(.5)).add(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP)).multiply(new BigDecimal(v_months-1));
v_adj = new BigDecimal(Conventions.MMCON(p_A_ASSET_ID,p_POSTINGTYPE,p_A_ASSET_ACCT_ID,2,AssetServiceDateMonth+1));
v_DB = (v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP).multiply(v_adj));
v_monthadj = 0;
}
v_firstyr = 1;
}
else{
v_DB = (v_Base_Amount.subtract(v_Accum_Dep).subtract(v_Salvage_Amount)).multiply(new BigDecimal(v_Var/v_Life_Years));
v_Accum_Dep = v_Accum_Dep.add(v_DB);
v_DB =(v_DB.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP));
}
v_counter = v_counter+1;
}
A_Period_Exp = v_DB;
if (p_SL ==1 ){
if (v_Life_Periods-(p_A_CURRENT_PERIOD+v_monthadj)>0 )
v_SL = ((v_Base_Amount.subtract(v_Salvage_Amount).subtract(p_Accum_Dep)).divide(new BigDecimal(v_Life_Periods-(p_A_CURRENT_PERIOD+v_monthadj)),2, BigDecimal.ROUND_HALF_UP));
if (A_Period_Exp.compareTo(v_SL)==-1)
A_Period_Exp = v_SL;
if (v_Base_Amount.subtract(p_Accum_Dep).subtract(A_Period_Exp).compareTo(v_Salvage_Amount)==-1 )
A_Period_Exp =v_Base_Amount.subtract(p_Accum_Dep).subtract(v_Salvage_Amount);
}
}
//System.out.println("DBVAR: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("DBVAR: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal MAN(int p_SL,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
int v_Dep_Mon = 0;
BigDecimal v_Dep_Sprd = new BigDecimal(0.0);
BigDecimal A_Period_Exp = new BigDecimal(0.0);
StringBuffer sqlB = new StringBuffer ("SELECT B.A_ASSET_COST, B.A_SALVAGE_VALUE, B.A_LIFE_PERIOD, "
+ " A_ASSET_LIFE_YEARS, A_ASSET_LIFE_CURRENT_YEAR,A_ACCUMULATED_DEPR, A_DEPRECIATION_MANUAL_AMOUNT, "
+ " A_ASSET_SPREAD_ID, A_DEPRECIATION_MANUAL_PERIOD, A.AD_Client_ID "
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE B, COMPIERE.A_ASSET_ACCT A "
+ " WHERE B.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID);
//System.out.println("MAN: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
if (rs.getString("A_DEPRECIATION_MANUAL_PERIOD").compareTo("PR")==0)
A_Period_Exp = rs.getBigDecimal("A_DEPRECIATION_MANUAL_AMOUNT");
else if (rs.getString("A_DEPRECIATION_MANUAL_PERIOD").compareTo("YR")==0){
if (p_A_CURRENT_PERIOD == -1){
//System.out.println("MAN YR - A_CURRENT_PERIOD = -1 ");
StringBuffer sql3 = new StringBuffer("SELECT PeriodNo"
+ " FROM C_Period WHERE C_Period_ID = 183 "
+ " AND AD_Client_ID = ? ");
v_Dep_Mon = DB.getSQLValue(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else{
//System.out.println("MAN YR - A_CURRENT_PERIOD = " + p_A_CURRENT_PERIOD);
v_Dep_Mon = (int)p_A_CURRENT_PERIOD - (int)(Math.ceil((double)p_A_CURRENT_PERIOD/12)*12-12) ;
}
//System.out.println("MAN v_Dep_Mon: "+v_Dep_Mon);
if (v_Dep_Mon==1){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_1"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==2){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_2"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==3){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_3"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==4){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_4"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==5){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_5"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==6){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_6"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==7){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_7"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==8){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_8"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==9){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_9"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==10){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_10"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==11)
{
StringBuffer sql3 = new StringBuffer("SELECT A_Period_11"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==12){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_12"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else if (v_Dep_Mon==13){
StringBuffer sql3 = new StringBuffer("SELECT A_Period_13"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
else
{
StringBuffer sql3 = new StringBuffer("SELECT A_Period_14"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("A_ASSET_SPREAD_ID"));
//System.out.println("MAN YR - SpreadAmnt = " + sql3.toString());
}
//System.out.println("MAN v_Dep_Sprd: "+v_Dep_Sprd);
A_Period_Exp = rs.getBigDecimal("A_DEPRECIATION_MANUAL_AMOUNT").multiply(v_Dep_Sprd);
}
}
//System.out.println("MAN: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("MAN: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal SL(int p_SL,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal A_Period_Exp = new BigDecimal(0.0);
StringBuffer sqlB = new StringBuffer ("SELECT A_DEPRECIATION_WORKFILE.A_ASSET_COST, "
+ " A_DEPRECIATION_WORKFILE.A_SALVAGE_VALUE, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET_ACCT"
+ " WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_ASSET_ACCT.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A_ASSET_ACCT.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A_ASSET_ACCT.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID);
//System.out.println("SL: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
A_Period_Exp = ((rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE"))).divide( rs.getBigDecimal("A_LIFE_PERIOD"),2, BigDecimal.ROUND_HALF_UP));
}
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("SL: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal UOP(int p_SL,int p_A_ASSET_ID, int p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal A_Period_Exp = new BigDecimal(0.0);
StringBuffer sqlB = new StringBuffer ("SELECT A_DEPRECIATION_WORKFILE.A_ASSET_COST, "
+ " A_DEPRECIATION_WORKFILE.A_SALVAGE_VALUE, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD"
+ " A_ASSET.LIFEUSEUNITS, A_ASSET.USEUNITS, A_DEPRECIATION_WORKFILE.A_ACCUMULATED_DEPR"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET_ACCT"
+ " WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_ASSET_ACCT.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A_ASSET_ACCT.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A_ASSET_ACCT.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID);
//System.out.println("UOP: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
A_Period_Exp = (rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE"))
.multiply(new BigDecimal(rs.getDouble("USEUNITS")/rs.getDouble("LIFEUSEUNITS")))
.subtract(rs.getBigDecimal("A_ACCUMULATED_DEPR")));
}
//System.out.println("UOP: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("UOP: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal SYD(int p_SL,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal A_Period_Exp = new BigDecimal(0.0);
StringBuffer sqlB = new StringBuffer ("SELECT A_DEPRECIATION_WORKFILE.A_ASSET_COST, "
+ " A_DEPRECIATION_WORKFILE.A_SALVAGE_VALUE, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD, "
+ " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_CURRENT_YEAR, A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, "
+ " A_ASSET.ASSETSERVICEDATE, A_DEPRECIATION_BUILD.DATEACCT"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE, COMPIERE.A_ASSET_ACCT, COMPIERE.A_ASSET, A_DEPRECIATION_BUILD"
+ " WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_ASSET_ACCT.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_PERIOD_POSTED+1 >= A_PERIOD_START AND A_PERIOD_POSTED+1 <= A_PERIOD_END "
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A_ASSET_ACCT.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND A_ASSET_ACCT.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID);
//System.out.println("SYD: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
int v_life_current_year = (int)(p_A_CURRENT_PERIOD/(12))+1;
A_Period_Exp = ((rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE")))
.multiply(new BigDecimal(2*(rs.getInt("A_ASSET_LIFE_YEARS")-v_life_current_year+1)))
.divide(new BigDecimal(rs.getInt("A_ASSET_LIFE_YEARS")*(rs.getInt("A_ASSET_LIFE_YEARS")+1)),2, BigDecimal.ROUND_HALF_UP));
A_Period_Exp = A_Period_Exp.divide(new BigDecimal(12.0),2, BigDecimal.ROUND_HALF_UP);
}
//System.out.println("SYD: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("SYD: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
static public BigDecimal TAB(int p_SL,int p_A_ASSET_ID, double p_A_CURRENT_PERIOD, String p_POSTINGTYPE,
int p_A_ASSET_ACCT_ID, BigDecimal p_Accum_Dep)
{
BigDecimal A_Period_Exp = new BigDecimal(0.0);
BigDecimal v_Dep_Rate = new BigDecimal(0.0);
BigDecimal v_Dep_Sprd = new BigDecimal(0.0);
int v_Dep_Mon = 0;
int v_Dep_Per = 0;
StringBuffer sqlB = new StringBuffer ("SELECT A.A_ASSET_COST, A.A_SALVAGE_VALUE, A.A_LIFE_PERIOD,"
+ " B.A_DEPRECIATION_TABLE_HEADER_ID, A.AD_Client_ID, C.A_TERM, C.A_Depreciation_Table_Code "
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE A, COMPIERE.A_ASSET_ACCT B, A_Depreciation_Table_Header C"
+ " WHERE A.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND B.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND B.POSTINGTYPE = '"+p_POSTINGTYPE
+ "' AND B.A_ASSET_ACCT_ID = " + p_A_ASSET_ACCT_ID
+ "' AND C.A_DEPRECIATION_TABLE_HEADER_ID = A_DEPRECIATION_TABLE_HEADER_ID");
//System.out.println("TAB: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
if (rs.getString("A_TERM").compareTo("PR")==0){
StringBuffer sql3 = new StringBuffer("SELECT A_Depreciation_Rate"
+ " FROM A_Depreciation_Table_Detail WHERE A_DEPRECIATION_TABLE_CODE = " + rs.getString("A_Depreciation_Table_Code")
+ " AND A_Period = ? ");
v_Dep_Rate = DB.getSQLValueBD(null, sql3.toString(), (int)p_A_CURRENT_PERIOD);
A_Period_Exp = (rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE")).multiply(v_Dep_Rate));
}
else if (rs.getString("A_TERM").compareTo("YR")==0){
StringBuffer sql3 = new StringBuffer("SELECT A_Depreciation_Rate"
+ " FROM A_Depreciation_Table_Detail WHERE A_DEPRECIATION_TABLE_CODE = " + rs.getString("A_Depreciation_Table_Code")
+ " AND A_Period = ? ");
v_Dep_Rate = DB.getSQLValueBD(null, sql3.toString(), (int)(Math.ceil((double)p_A_CURRENT_PERIOD+1)/12));
sql3 = new StringBuffer("SELECT C_Period_ID"
+ " FROM A_Depreciation_Build ");
v_Dep_Per = DB.getSQLValue(null, sql3.toString());
if (p_A_CURRENT_PERIOD == -1){
sql3 = new StringBuffer("SELECT PeriodNo"
+ " FROM C_Period WHERE C_Period_ID = " + v_Dep_Per
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else
v_Dep_Mon = (int)p_A_CURRENT_PERIOD - (int)(Math.ceil((double)p_A_CURRENT_PERIOD)/12*12-12) ;
if (v_Dep_Mon==1){
sql3 = new StringBuffer("SELECT A_Period_1"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==2){
sql3 = new StringBuffer("SELECT A_Period_2"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==3){
sql3 = new StringBuffer("SELECT A_Period_3"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==4){
sql3 = new StringBuffer("SELECT A_Period_4"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==5){
sql3 = new StringBuffer("SELECT A_Period_5"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==6){
sql3 = new StringBuffer("SELECT A_Period_6"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==7){
sql3 = new StringBuffer("SELECT A_Period_7"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==8){
sql3 = new StringBuffer("SELECT A_Period_8"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==9){
sql3 = new StringBuffer("SELECT A_Period_9"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==10){
sql3 = new StringBuffer("SELECT A_Period_10"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==11){
sql3 = new StringBuffer("SELECT A_Period_11"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==12){
sql3 = new StringBuffer("SELECT A_Period_12"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else if (v_Dep_Mon==13){
sql3 = new StringBuffer("SELECT A_Period_13"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
else{
sql3 = new StringBuffer("SELECT A_Period_14"
+ " FROM A_Asset_Spread WHERE A_Asset_Spread_ID = " + rs.getString("A_Depreciation_Table_Code")
+ " AND AD_Client_ID = ? ");
v_Dep_Sprd = DB.getSQLValueBD(null, sql3.toString(), rs.getInt("AD_Client_ID"));
}
A_Period_Exp = (rs.getBigDecimal("A_ASSET_COST").subtract(rs.getBigDecimal("A_SALVAGE_VALUE")).multiply(v_Dep_Rate).multiply(v_Dep_Sprd));
}
}
//System.out.println("TAB: "+A_Period_Exp);
return A_Period_Exp;
}
catch (Exception e)
{
System.out.println("TAB: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Period_Exp;
}
}// Depreciation

View File

@ -0,0 +1,148 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert Klein. robeklein@hotmail.com
* _____________________________________________
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import org.compiere.util.*;
//import java.lang.Math;
import java.math.BigDecimal;
/**
* Fixed Asset Depreciation
*
* @author Rob Klein
* @version $Id: Conventions.java,v 1.0 $
*
*/
public class DepreciationAdj {
/**
*
*
*/
static public BigDecimal Dep_Adj(String Type, int p_A_ASSET_ID, BigDecimal p_A_ASSET_ADJUSTMENT, double p_A_PERIODNO,
String p_POSTINGTYPE,int p_A_ASSET_ACCT_ID)
{
BigDecimal A_Dep_Adj = new BigDecimal(0.0);
if(Type.compareTo("MDI")==0){
A_Dep_Adj = MDI( p_A_ASSET_ID, p_A_ASSET_ADJUSTMENT, p_A_PERIODNO,
p_POSTINGTYPE, p_A_ASSET_ACCT_ID);
//System.out.println("MDI Main: "+A_Dep_Adj);
return A_Dep_Adj;
}
else if(Type.compareTo("LDI")==0){
A_Dep_Adj = LDI( p_A_ASSET_ID, p_A_ASSET_ADJUSTMENT, p_A_PERIODNO,
p_POSTINGTYPE, p_A_ASSET_ACCT_ID);
//System.out.println("LDI Main: "+A_Dep_Adj);
return A_Dep_Adj;
}
else if(Type.compareTo("YDI")==0){
A_Dep_Adj = YDI( p_A_ASSET_ID, p_A_ASSET_ADJUSTMENT, p_A_PERIODNO,
p_POSTINGTYPE, p_A_ASSET_ACCT_ID);
//System.out.println("YDI Main: "+A_Dep_Adj);
return A_Dep_Adj;
}
else
return new BigDecimal(0.0);
}
static public BigDecimal LDI( int p_A_ASSET_ID, BigDecimal p_A_ASSET_ADJUSTMENT, double p_A_PERIODNO,
String p_POSTINGTYPE,int p_A_ASSET_ACCT_ID)
{
BigDecimal A_Dep_Adj = new BigDecimal(0.0);
StringBuffer sqlB = new StringBuffer ("SELECT A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD, A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE"
+ " WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE +"'");
//System.out.println("LDI: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
A_Dep_Adj = p_A_ASSET_ADJUSTMENT.divide(new BigDecimal(rs.getDouble("A_LIFE_PERIOD")-rs.getDouble("A_PERIOD_POSTED")+1),2, BigDecimal.ROUND_HALF_UP);
}
//System.out.println("LDI: "+A_Period_Exp);
return A_Dep_Adj;
}
catch (Exception e)
{
System.out.println("LDI: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Dep_Adj;
}
static public BigDecimal MDI( int p_A_ASSET_ID, BigDecimal p_A_ASSET_ADJUSTMENT, double p_A_PERIODNO,
String p_POSTINGTYPE,int p_A_ASSET_ACCT_ID)
{
return p_A_ASSET_ADJUSTMENT;
}
static public BigDecimal YDI( int p_A_ASSET_ID, BigDecimal p_A_ASSET_ADJUSTMENT, double p_A_PERIODNO,
String p_POSTINGTYPE,int p_A_ASSET_ACCT_ID)
{
BigDecimal A_Dep_Adj = new BigDecimal(0.0);
StringBuffer sqlB = new StringBuffer ("SELECT A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD, A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED"
+ " FROM COMPIERE.A_DEPRECIATION_WORKFILE"
+ " WHERE A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID
+ " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE +"'");
//System.out.println("DB150: "+sqlB.toString());
PreparedStatement pstmt = null;
pstmt = DB.prepareStatement (sqlB.toString(),null);
try {
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
A_Dep_Adj = p_A_ASSET_ADJUSTMENT.divide(new BigDecimal(12-p_A_PERIODNO),2, BigDecimal.ROUND_HALF_UP);
}
//System.out.println("LDI: "+A_Period_Exp);
return A_Dep_Adj;
}
catch (Exception e)
{
System.out.println("LDI: "+e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
return A_Dep_Adj;
}
}// Depreciation

View File

@ -0,0 +1,12 @@
package org.compiere.FA;
/**
* Column name constant for fixed asset customization to core tables.
* @author Low Heng Sin
*
*/
public interface I_CustomColumn {
public final static String A_Asset_Group_ID = "A_Asset_Group_ID";
public final static String A_Processed = "A_Processed";
}

View File

@ -0,0 +1,482 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
*
* Copyright (C) 2005 Robert KLEIN. robeklein@gmail.com *
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.FA;
import java.sql.*;
import java.sql.Timestamp;
//import java.sql.Date;
import java.math.*;
import org.compiere.process.*;
import org.compiere.util.*;
/**
* Import Assets
*
* @author Rob Klein
* @version $Id: ImportAsset.java,v 1.0 $
*/
public class ImportAsset extends SvrProcess
{
/**
* Import Asset
*/
public ImportAsset()
{
super();
} // ImportAsset
/** Client to be imported to */
private int m_AD_Client_ID = 0;
/** Delete old Imported */
private boolean m_deleteOldImported = false;
/** Organization to be imported to */
private int m_AD_Org_ID = 0;
/** Effective */
private Timestamp m_DateValue = null;
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare()
{
ProcessInfoParameter[] para = getParameter();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (name.equals("AD_Client_ID"))
m_AD_Client_ID = (para[i].getParameterAsInt());
else if (name.equals("DeleteOldImported"))
m_deleteOldImported = "Y".equals(para[i].getParameter());
else
log.info("ImportAsset.prepare - Unknown Parameter: " + name);
}
m_DateValue = new Timestamp (System.currentTimeMillis());
//java.util.Date today = new java.util.Date();
//m_DateValue = new java.sql.Date(today.getTime());
} // prepare
/**
* Perrform process.
* @return Message
* @throws Exception
*/
protected String doIt() throws java.lang.Exception
{
StringBuffer sql = null;
int no = 0;
String clientCheck = " AND AD_Client_ID=" + m_AD_Client_ID;
// **** Prepare ****
// Delete Old Imported
/**if (m_deleteOldImported)
{
sql = new StringBuffer ("DELETE I_Asset "
+ "WHERE I_IsImported='Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString());
}**/
// Set Client, Org, IaActive, Created/Updated, ProductType
sql = new StringBuffer ("UPDATE I_Asset "
+ "SET AD_Client_ID = COALESCE (AD_Client_ID, ").append(m_AD_Client_ID).append("),"
+ " AD_Org_ID = COALESCE (AD_Org_ID, 0),"
+ " IsActive = COALESCE (IsActive, 'Y'),"
+ " CreatedBy = COALESCE (CreatedBy, 0),"
+ " UpdatedBy = COALESCE (UpdatedBy, 0),"
+ " I_ErrorMsg = NULL,"
+ " I_IsImported = 'N' "
+ "WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(),null);
// Set Currency
/**sql = new StringBuffer ("UPDATE I_Asset i "
+ "SET ISO_Code=(SELECT ISO_Code FROM C_Currency c"
+ " INNER JOIN C_AcctSchema a ON (a.C_Currency_ID=c.C_Currency_ID)"
+ " INNER JOIN AD_ClientInfo ci ON (a.C_AcctSchema_ID=ci.C_AcctSchema1_ID)"
+ " WHERE ci.AD_Client_ID=i.AD_Client_ID) "
+ "WHERE C_Currency_ID IS NULL AND ISO_Code IS NULL"
+ " AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString());
Log.trace(Log.l5_DData, "ImportAsset.doIt", "Set Currency Default=" + no);
//
sql = new StringBuffer ("UPDATE I_Asset i "
+ "SET C_Currency_ID=(SELECT C_Currency_ID FROM C_Currency c"
+ " WHERE i.ISO_Code=c.ISO_Code AND c.AD_Client_ID IN (0,i.AD_Client_ID)) "
+ "WHERE C_Currency_ID IS NULL"
+ " AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString());
Log.trace(Log.l5_DData, "ImportAsset.doIt", "Set Currency=" + no);
//
sql = new StringBuffer ("UPDATE I_Asset "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Currency,' "
+ "WHERE C_Currency_ID IS NULL"
+ " AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString());
Log.trace(Log.l3_Util, "ImportAsset.doIt", "Invalid Currency=" + no);
**/
// -------------------------------------------------------------------
int noInsert = 0;
int noUpdate = 0;
//int noInsertPO = 0;
//int noUpdatePO = 0;
// Go through Records
sql = new StringBuffer ("SELECT I_Asset_ID, A_Asset_ID "
+ "FROM I_Asset WHERE I_IsImported='N'").append(clientCheck).append(" Order By I_Asset_ID");
// Connection conn = DB.createConnection(false, Connection.TRANSACTION_READ_COMMITTED);
try
{
// Insert Asset from Import
StringBuffer sqlA = new StringBuffer ("INSERT INTO A_Asset (A_Asset_ID,"
+ "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
+ "Value,Name,Description,Help,"
+ "A_Asset_Group_ID,M_Product_ID,SerNo,LOT,VersionNo,GuaranteeDate,"
+ "AssetServiceDate,IsOwned,AssetDepreciationDate, UseLifeYears, UseLifeMonths,"
+ "LifeUseUnits, UseUnits, Isdisposed, AssetDisposalDate, IsInPosession,"
+ "LocationComment, M_Locator_ID, C_BPartner_ID, C_BPartner_Location_ID,"
+ "C_Location_ID, IsDepreciated, IsFullyDepreciated, AD_User_ID,"
+ "M_AttributeSetInstance_ID, A_Parent_Asset_ID, A_QTY_Original,"
+ "A_QTY_Current) "
+ "SELECT ?,"
+ "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
+ "Value,Name,Description,Help,"
+ "A_Asset_Group_ID,M_Product_ID,SerNo,LOT,VersionNo,GuaranteeDate,"
+ "AssetServiceDate,IsOwned,AssetDepreciationDate, UseLifeYears, UseLifeMonths,"
+ "LifeUseUnits, UseUnits, Isdisposed, AssetDisposalDate, IsInPosession,"
+ "LocationComment, M_Locator_ID, C_BPartner_ID, C_BPartner_Location_ID,"
+ "C_Location_ID, IsDepreciated, IsFullyDepreciated, AD_User_ID,"
+ "M_AttributeSetInstance_ID, A_Parent_Asset_ID, A_QTY_Original,"
+ "A_QTY_Current "
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?");
PreparedStatement pstmt_insertProduct = DB.prepareStatement(sqlA.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
// Update Assets from Import
StringBuffer sqlB = new StringBuffer ("UPDATE A_Asset "
+ "SET( A_Asset_ID,"
+ "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
+ "Value,Name,Description,Help,"
+ "A_Asset_Group_ID,M_Product_ID,SerNo,LOT,VersionNo,GuaranteeDate,"
+ "AssetServiceDate,IsOwned,AssetDepreciationDate, UseLifeYears, UseLifeMonths,"
+ "LifeUseUnits, UseUnits, Isdisposed, AssetDisposalDate, IsInPosession,"
+ "LocationComment, M_Locator_ID, C_BPartner_ID, C_BPartner_Location_ID,"
+ "C_Location_ID, IsDepreciated, IsFullyDepreciated, AD_User_ID,"
+ "M_AttributeSetInstance_ID, A_Parent_Asset_ID, A_QTY_Original,"
+ "A_QTY_Current) = "
+ "(SELECT A_Asset_ID,"
+ "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
+ "Value,Name,Description,Help,"
+ "A_Asset_Group_ID,M_Product_ID,SerNo,LOT,VersionNo,GuaranteeDate,"
+ "AssetServiceDate,IsOwned,AssetDepreciationDate, UseLifeYears, UseLifeMonths,"
+ "LifeUseUnits, UseUnits, Isdisposed, AssetDisposalDate, IsInPosession,"
+ "LocationComment, M_Locator_ID, C_BPartner_ID, C_BPartner_Location_ID,"
+ "C_Location_ID, IsDepreciated, IsFullyDepreciated, AD_User_ID,"
+ "M_AttributeSetInstance_ID, A_Parent_Asset_ID, A_QTY_Original,"
+ "A_QTY_Current "
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?) "
+ "WHERE A_Asset_ID=?");
PreparedStatement pstmt_updateProduct = DB.prepareStatement(sqlB.toString(), ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
// Insert Asset Accounts from Import
StringBuffer sqlC = new StringBuffer ("INSERT INTO A_Asset_Acct ("
+ "A_ASSET_ID, C_ACCTSCHEMA_ID, AD_CLIENT_ID,"
+ "AD_ORG_ID,ISACTIVE, CREATED, CREATEDBY, UPDATED ,UPDATEDBY,"
+ "A_DEPRECIATION_ID, A_DEPRECIATION_ACCT, A_ACCUMDEPRECIATION_ACCT,"
+ "A_DISPOSAL_LOSS, A_DISPOSAL_REVENUE, A_ASSET_ACCT,A_ASSET_SPREAD_ID,"
+ "A_DEPRECIATION_METHOD_ID,A_PERIOD_START,A_PERIOD_END, A_DEPRECIATION_CONV_ID,"
+ "A_SALVAGE_VALUE, POSTINGTYPE, A_SPLIT_PERCENT, A_DEPRECIATION_MANUAL_AMOUNT, "
+ "A_DEPRECIATION_MANUAL_PERIOD, A_DEPRECIATION_VARIABLE_PERC, A_ASSET_ACCT_ID) "
+ "SELECT ?,C_ACCTSCHEMA_ID,"
+ "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
+ "DEPRECIATIONTYPE, A_DEPRECIATION_ACCT, A_ACCUMDEPRECIATION_ACCT,"
+ "A_DISPOSAL_LOSS, A_DISPOSAL_REVENUE, A_ASSET_ACCT,A_ASSET_SPREAD_TYPE,"
+ "A_DEPRECIATION_CALC_TYPE,A_PERIOD_START,A_PERIOD_END, CONVENTIONTYPE,"
+ "A_SALVAGE_VALUE, POSTINGTYPE, A_SPLIT_PERCENT, A_DEPRECIATION_MANUAL_AMOUNT,"
+ "A_DEPRECIATION_MANUAL_PERIOD, A_DEPRECIATION_VARIABLE_PERC, ? "
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?");
PreparedStatement pstmt_insertAssetAcct = DB.prepareStatement(sqlC.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
// Insert Asset Balances from Import
StringBuffer sqlD = new StringBuffer ("INSERT INTO A_DEPRECIATION_WORKFILE ("
+ "A_DEPRECIATION_WORKFILE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE,"
+ "CREATED, CREATEDBY, UPDATED, UPDATEDBY, A_ASSET_ID, A_ASSET_COST,"
+ "A_ACCUMULATED_DEPR, A_CALC_ACCUMULATED_DEPR, A_LIFE_PERIOD,"
+ "A_PERIOD_POSTED, A_CURRENT_PERIOD, A_PRIOR_YEAR_ACCUMULATED_DEPR,"
+ "A_BASE_AMOUNT, A_SALVAGE_VALUE, A_CURR_DEP_EXP, A_ASSET_LIFE_YEARS,"
+ "A_ASSET_LIFE_CURRENT_YEAR, ISDEPRECIATED, POSTINGTYPE, A_QTY_CURRENT"
+ ")"
+ "SELECT "
+ "?, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE,"
+ "CREATED, CREATEDBY, UPDATED, UPDATEDBY, ?, A_ASSET_COST,"
+ "A_ACCUMULATED_DEPR, A_CALC_ACCUMULATED_DEPR, A_LIFE_PERIOD,"
+ "A_PERIOD_POSTED, A_CURRENT_PERIOD, A_PRIOR_YEAR_ACCUMULATED_DEPR,"
+ "A_BASE_AMOUNT, A_SALVAGE_VALUE, A_CURR_DEP_EXP, A_ASSET_LIFE_YEARS,"
+ "A_ASSET_LIFE_CURRENT_YEAR, ISDEPRECIATED, POSTINGTYPE, A_QTY_CURRENT"
+ " "
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?");
PreparedStatement pstmt_insertAssetBal = DB.prepareStatement(sqlD.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
// Insert Asset Additions from Import
StringBuffer sqlE = new StringBuffer ("INSERT INTO A_Asset_Addition ("
+ " A_ASSET_ADDITION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE,"
+ " CREATED, CREATEDBY, UPDATED, UPDATEDBY, A_ASSET_ID,"
+ " ASSETVALUEAMT, DESCRIPTION, M_INOUTLINE_ID, "
+ " POSTINGTYPE, A_QTY_CURRENT, A_SOURCETYPE, A_CAPVSEXP) "
+ "SELECT "
+ " ?, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE,"
+ " CREATED, CREATEDBY, UPDATED, UPDATEDBY, ?,"
+ " A_ASSET_COST, 'Imported Asset', '1', "
+ " POSTINGTYPE, A_QTY_CURRENT, 'IMP', 'Cap' "
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?");
PreparedStatement pstmt_insertAssetAdd = DB.prepareStatement(sqlE.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
// Insert Asset Additions from Import
StringBuffer sqlF = new StringBuffer ("INSERT INTO A_Asset_Change ("
+ "A_ASSET_CHANGE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, "
+ "CREATED, CREATEDBY, UPDATED, UPDATEDBY, A_ASSET_ID, "
+ "CHANGETYPE, USELIFEYEARS, "
+ "USELIFEMONTHS, LIFEUSEUNITS, ASSETDEPRECIATIONDATE, "
+ "A_ASSET_ADDITION_ID, SERNO,"
+ "LOT, VERSIONNO, ASSETACCUMDEPRECIATIONAMT, TEXTDETAILS, "
+ "ASSETSERVICEDATE, ASSETBOOKVALUEAMT, ASSETMARKETVALUEAMT, "
+ "ASSETVALUEAMT, ASSETDISPOSALDATE, A_PARENT_ASSET_ID, "
+ "C_BPARTNER_ID, C_BPARTNER_LOCATION_ID, C_LOCATION_ID, "
+ "A_DEPRECIATION_ACCT, A_ACCUMDEPRECIATION_ACCT, A_DISPOSAL_LOSS, "
+ "A_DISPOSAL_REVENUE, A_ASSET_ACCT, A_ASSET_SPREAD_TYPE, "
+ "A_DEPRECIATION_CALC_TYPE, A_PERIOD_START, A_PERIOD_END, "
+ "A_SALVAGE_VALUE, POSTINGTYPE, A_ASSET_ACCT_ID, CONVENTIONTYPE, "
+ "A_SPLIT_PERCENT, DEPRECIATIONTYPE, A_QTY_CURRENT, ISDEPRECIATED, "
+ "ISFULLYDEPRECIATED, ISINPOSESSION, ISDISPOSED, ISOWNED) "
+ "SELECT "
+ "?, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, "
+ "CREATED, CREATEDBY, UPDATED, UPDATEDBY, ?, "
+ "'IMP', USELIFEYEARS, "
+ "USELIFEMONTHS, LIFEUSEUNITS, ASSETDEPRECIATIONDATE, "
+ "?, SERNO, "
+ "LOT, VERSIONNO, A_ACCUMULATED_DEPR, 'Imported Fixed Asset', "
+ "ASSETSERVICEDATE, A_BASE_AMOUNT, ASSETMARKETVALUEAMT, "
+ "A_ASSET_COST, ASSETDISPOSALDATE, A_PARENT_ASSET_ID, "
+ "C_BPARTNER_ID, C_BPARTNER_LOCATION_ID, C_LOCATION_ID, "
+ "A_DEPRECIATION_ACCT, A_ACCUMDEPRECIATION_ACCT, A_DISPOSAL_LOSS, "
+ "A_DISPOSAL_REVENUE, A_ASSET_ACCT, A_ASSET_SPREAD_TYPE, "
+ "A_DEPRECIATION_CALC_TYPE, A_PERIOD_START, A_PERIOD_END, "
+ "A_SALVAGE_VALUE, POSTINGTYPE, ?, CONVENTIONTYPE, "
+ "A_SPLIT_PERCENT, DEPRECIATIONTYPE, A_QTY_CURRENT, ISDEPRECIATED, "
+ "ISFULLYDEPRECIATED, ISINPOSESSION, ISDISPOSED, ISOWNED "
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?");
PreparedStatement pstmt_insertAssetChg = DB.prepareStatement(sqlF.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
/*
// Update Asset Accounts from Import
PreparedStatement pstmt_updateAssetAcct = conn.prepareStatement
("UPDATE A_Asset_Acct "
+ "SET("
+ "A_ASSET_ID, C_ACCTSCHEMA_ID, AD_CLIENT_ID"
+ "AD_ORG_ID,ISACTIVE, CREATED, CREATEDBY, UPDATED ,UPDATEDBY"
+ "A_DEPRECIATION_ID, A_DEPRECIATION_ACCT, A_ACCUMDEPRECIATION_ACCT"
+ "A_DISPOSAL_LOSS, A_DISPOSAL_REVENUE, A_ASSET_ACCT,A_ASSET_SPREAD_ID"
+ "A_DEPRECIATION_METHOD_ID,A_PERIOD_START,A_PERIOD_END"
+ "A_SALVAGE_VALUE, POSTINGTYPE, A_SPLIT_PERCENT) = "
+ "(SELECT ?,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,"
+ "DEPRECIATIONTYPE, A_DEPRECIATION_ACCT, A_ACCUMDEPRECIATION_ACCT"
+ "A_DISPOSAL_LOSS, A_DISPOSAL_REVENUE, A_ASSET_ACCT,A_ASSET_SPREAD_TYPE"
+ "A_DEPRECIATION_METHOD_ID,A_PERIOD_START,A_PERIOD_END"
+ "A_SALVAGE_VALUE, POSTINGTYPE, A_SPLIT_PERCENT"
+ "FROM I_Asset "
+ "WHERE I_Asset_ID=?) "
+ "WHERE A_Asset_ID=?");
*/
// Set Imported = Y
PreparedStatement pstmt_setImported = DB.prepareStatement
("UPDATE I_Asset SET I_IsImported='Y', "
//+ "Updated= TO_DATE('"+m_DateValue+"','YYYY-MM-DD HH24:MI:SS.FFF') "
+ "Processed='Y' WHERE I_Asset_ID=?",ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
//
PreparedStatement pstmt = DB.prepareStatement(sql.toString(),ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, null);
ResultSet rs = pstmt.executeQuery();
int x = 0;
while (rs.next())
{
x=x+1;
int I_Asset_ID = rs.getInt(1);
int A_Asset_ID = rs.getInt(2);
int A_Asset_Acct_ID = 0;
int A_DEPRECIATION_WORKFILE_ID = 0;
int A_ASSET_ADDITION_ID = 0;
int A_ASSET_CHANGE_ID = 0;
boolean newAsset = true;
if (A_Asset_ID == 0)
{
A_Asset_ID = DB.getNextID(m_AD_Client_ID, "A_Asset", null);
A_Asset_Acct_ID = DB.getNextID(m_AD_Client_ID, "A_Asset_Acct", null);
A_DEPRECIATION_WORKFILE_ID = DB.getNextID(m_AD_Client_ID, "A_Depreciation_Workfile", null);
A_ASSET_ADDITION_ID = DB.getNextID(m_AD_Client_ID, "A_Asset_Addition", null);
A_ASSET_CHANGE_ID = DB.getNextID(m_AD_Client_ID, "A_Asset_Change", null);
newAsset = true;
}
else
{
// Check to see if Asset_ID exists
int found = DB.getSQLValue(null,"SELECT COUNT(*) FROM A_ASSET WHERE A_ASSET_ID = " + A_Asset_ID + clientCheck);
if (found == 0)
{
newAsset = true;
A_DEPRECIATION_WORKFILE_ID = DB.getNextID(m_AD_Client_ID, "A_Depreciation_Workfile", null);
A_ASSET_ADDITION_ID = DB.getNextID(m_AD_Client_ID, "A_Asset_Addition", null);
A_ASSET_CHANGE_ID = DB.getNextID(m_AD_Client_ID, "A_Asset_Change", null);
A_Asset_Acct_ID = DB.getNextID(m_AD_Client_ID, "A_Asset_Acct", null);
}
else
{
newAsset = false;
}
}
// Product
if (newAsset) // Insert new Asset
{
pstmt_insertProduct.setInt(1, A_Asset_ID);
pstmt_insertProduct.setInt(2, I_Asset_ID);
pstmt_insertAssetAcct.setInt(1, A_Asset_ID);
pstmt_insertAssetAcct.setInt(2, A_Asset_Acct_ID);
pstmt_insertAssetAcct.setInt(3, I_Asset_ID);
pstmt_insertAssetBal.setInt(1, A_DEPRECIATION_WORKFILE_ID);
pstmt_insertAssetBal.setInt(2, A_Asset_ID);
pstmt_insertAssetBal.setInt(3, I_Asset_ID);
pstmt_insertAssetAdd.setInt(1, A_ASSET_ADDITION_ID);
pstmt_insertAssetAdd.setInt(2, A_Asset_ID);
pstmt_insertAssetAdd.setInt(3, I_Asset_ID);
pstmt_insertAssetChg.setInt(1, A_ASSET_CHANGE_ID);
pstmt_insertAssetChg.setInt(2, A_Asset_ID);
pstmt_insertAssetChg.setInt(3, A_ASSET_ADDITION_ID);
pstmt_insertAssetChg.setInt(4, A_Asset_Acct_ID);
pstmt_insertAssetChg.setInt(5, I_Asset_ID);
try
{
no = pstmt_insertProduct.executeUpdate();
no = pstmt_insertAssetAcct.executeUpdate();
no = pstmt_insertAssetBal.executeUpdate();
no = pstmt_insertAssetAdd.executeUpdate();
no = pstmt_insertAssetChg.executeUpdate();
noInsert++;
}
catch (SQLException ex)
{
sql = new StringBuffer ("UPDATE I_Asset "
+ "SET I_IsImported='E', I_ErrorMsg=").append(DB.TO_STRING("Insert Asset: " + ex.toString()))
.append(" WHERE I_Asset_ID=").append(I_Asset_ID);
DB.executeUpdate(sql.toString(),null);
continue;
}
}
else // Update Asset
{
pstmt_updateProduct.setInt(1, I_Asset_ID);
pstmt_updateProduct.setInt(2, A_Asset_ID);
try
{
//String sqlcall = "UPDATE A_Asset SET(AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Value,Name,Description,Help,A_Asset_Group_ID,M_Product_ID,SerNo,LOT,VersionNo,GuaranteeDate,AssetServiceDate,IsOwned,AssetDepreciationDate, UseLifeYears, UseLifeMonths,LifeUseUnits, UseUnits, Isdisposed, AssetDisposalDate, IsInPosession,LocationComment, M_Locator_ID, C_BPartner_ID, C_BPartner_Location_ID,C_Location_ID, IsDepreciated, IsFullyDepreciated, AD_User_ID,M_AttributeSetInstance_ID, A_Parent_Asset_ID, A_QTY_Original,A_QTY_Current) = (SELECT AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Value,Name,Description,Help,A_Asset_Group_ID,M_Product_ID,SerNo,LOT,VersionNo,GuaranteeDate,AssetServiceDate,IsOwned,AssetDepreciationDate, UseLifeYears, UseLifeMonths,LifeUseUnits, UseUnits, Isdisposed, AssetDisposalDate, IsInPosession,LocationComment, M_Locator_ID, C_BPartner_ID, C_BPartner_Location_ID,C_Location_ID, IsDepreciated, IsFullyDepreciated, AD_User_ID,M_AttributeSetInstance_ID, A_Parent_Asset_ID, A_QTY_Original,A_QTY_Current FROM I_Asset WHERE I_Asset_ID=1000000) WHERE A_Asset_ID=2005000";
//pstmt_updateProduct = prepareStatement(sqlB.toString(), ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE, null);
pstmt_updateProduct.executeUpdate();
noUpdate++;
}
catch (SQLException ex)
{
sql = new StringBuffer ("UPDATE I_Asset "
+ "SET I_IsImported='E', I_ErrorMsg=").append(DB.TO_STRING("Update Asset: " + ex.toString()))
.append(" WHERE I_Asset_ID=").append(I_Asset_ID);
//DB.executeUpdate(sql.toString());
continue;
}
}
pstmt_setImported.setInt(1, I_Asset_ID);
no = pstmt_setImported.executeUpdate();
//conn.commit();
} // for all I_Asset
rs.close();
pstmt.close();
//
pstmt_insertProduct.close();
pstmt_updateProduct.close();
pstmt_setImported.close();
//
//conn.close();
//conn = null;
}
catch (SQLException e)
{
throw new Exception ("ImportAsset3.doIt", e);
}
finally
{
;
}
// Set Error to indicator to not imported
sql = new StringBuffer ("UPDATE I_Asset "
+ "SET I_IsImported='N' "
//+ "Updated= TO_DATE('"+m_DateValue+"','YYYY-MM-DD HH24:MI:SS.FFF') "
+ "WHERE I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(),null);
addLog (0, null, new BigDecimal (no), "@Errors@");
addLog (0, null, new BigDecimal (noInsert), "@A_Asset_ID@: @Inserted@");
addLog (0, null, new BigDecimal (noUpdate), "@A_Asset_ID@: @Updated@");
return "";
} // doIt
} // ImportAsset

File diff suppressed because it is too large Load Diff

View File

@ -72,6 +72,15 @@ public interface I_A_Asset
public I_AD_User getAD_User() throws Exception; public I_AD_User getAD_User() throws Exception;
/** Column name A_Asset_CreateDate */
public static final String COLUMNNAME_A_Asset_CreateDate = "A_Asset_CreateDate";
/** Set A_Asset_CreateDate */
public void setA_Asset_CreateDate (Timestamp A_Asset_CreateDate);
/** Get A_Asset_CreateDate */
public Timestamp getA_Asset_CreateDate();
/** Column name A_Asset_Group_ID */ /** Column name A_Asset_Group_ID */
public static final String COLUMNNAME_A_Asset_Group_ID = "A_Asset_Group_ID"; public static final String COLUMNNAME_A_Asset_Group_ID = "A_Asset_Group_ID";
@ -100,6 +109,42 @@ public interface I_A_Asset
*/ */
public int getA_Asset_ID(); public int getA_Asset_ID();
/** Column name A_Asset_RevalDate */
public static final String COLUMNNAME_A_Asset_RevalDate = "A_Asset_RevalDate";
/** Set A_Asset_RevalDate */
public void setA_Asset_RevalDate (Timestamp A_Asset_RevalDate);
/** Get A_Asset_RevalDate */
public Timestamp getA_Asset_RevalDate();
/** Column name A_Parent_Asset_ID */
public static final String COLUMNNAME_A_Parent_Asset_ID = "A_Parent_Asset_ID";
/** Set A_Parent_Asset_ID */
public void setA_Parent_Asset_ID (int A_Parent_Asset_ID);
/** Get A_Parent_Asset_ID */
public int getA_Parent_Asset_ID();
/** Column name A_QTY_Current */
public static final String COLUMNNAME_A_QTY_Current = "A_QTY_Current";
/** Set A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current);
/** Get A_QTY_Current */
public BigDecimal getA_QTY_Current();
/** Column name A_QTY_Original */
public static final String COLUMNNAME_A_QTY_Original = "A_QTY_Original";
/** Set A_QTY_Original */
public void setA_QTY_Original (BigDecimal A_QTY_Original);
/** Get A_QTY_Original */
public BigDecimal getA_QTY_Original();
/** Column name AssetDepreciationDate */ /** Column name AssetDepreciationDate */
public static final String COLUMNNAME_AssetDepreciationDate = "AssetDepreciationDate"; public static final String COLUMNNAME_AssetDepreciationDate = "AssetDepreciationDate";
@ -517,6 +562,15 @@ public interface I_A_Asset
*/ */
public int getNextMaintenenceUnit(); public int getNextMaintenenceUnit();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
/** Column name Qty */ /** Column name Qty */
public static final String COLUMNNAME_Qty = "Qty"; public static final String COLUMNNAME_Qty = "Qty";

View File

@ -0,0 +1,333 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Acct
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Acct
{
/** TableName=A_Asset_Acct */
public static final String Table_Name = "A_Asset_Acct";
/** AD_Table_ID=53123 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Accumdepreciation_Acct */
public static final String COLUMNNAME_A_Accumdepreciation_Acct = "A_Accumdepreciation_Acct";
/** Set A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct);
/** Get A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct();
/** Column name A_Asset_Acct */
public static final String COLUMNNAME_A_Asset_Acct = "A_Asset_Acct";
/** Set A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct);
/** Get A_Asset_Acct */
public int getA_Asset_Acct();
/** Column name A_Asset_Acct_ID */
public static final String COLUMNNAME_A_Asset_Acct_ID = "A_Asset_Acct_ID";
/** Set A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID);
/** Get A_Asset_Acct_ID */
public int getA_Asset_Acct_ID();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Spread_ID */
public static final String COLUMNNAME_A_Asset_Spread_ID = "A_Asset_Spread_ID";
/** Set A_Asset_Spread_ID */
public void setA_Asset_Spread_ID (int A_Asset_Spread_ID);
/** Get A_Asset_Spread_ID */
public int getA_Asset_Spread_ID();
/** Column name A_Depreciation_Acct */
public static final String COLUMNNAME_A_Depreciation_Acct = "A_Depreciation_Acct";
/** Set A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct);
/** Get A_Depreciation_Acct */
public int getA_Depreciation_Acct();
/** Column name A_Depreciation_Conv_ID */
public static final String COLUMNNAME_A_Depreciation_Conv_ID = "A_Depreciation_Conv_ID";
/** Set A_Depreciation_Conv_ID */
public void setA_Depreciation_Conv_ID (int A_Depreciation_Conv_ID);
/** Get A_Depreciation_Conv_ID */
public int getA_Depreciation_Conv_ID();
/** Column name A_Depreciation_ID */
public static final String COLUMNNAME_A_Depreciation_ID = "A_Depreciation_ID";
/** Set A_Depreciation_ID */
public void setA_Depreciation_ID (int A_Depreciation_ID);
/** Get A_Depreciation_ID */
public int getA_Depreciation_ID();
/** Column name A_Depreciation_Manual_Amount */
public static final String COLUMNNAME_A_Depreciation_Manual_Amount = "A_Depreciation_Manual_Amount";
/** Set A_Depreciation_Manual_Amount */
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount);
/** Get A_Depreciation_Manual_Amount */
public BigDecimal getA_Depreciation_Manual_Amount();
/** Column name A_Depreciation_Manual_Period */
public static final String COLUMNNAME_A_Depreciation_Manual_Period = "A_Depreciation_Manual_Period";
/** Set A_Depreciation_Manual_Period */
public void setA_Depreciation_Manual_Period (String A_Depreciation_Manual_Period);
/** Get A_Depreciation_Manual_Period */
public String getA_Depreciation_Manual_Period();
/** Column name A_Depreciation_Method_ID */
public static final String COLUMNNAME_A_Depreciation_Method_ID = "A_Depreciation_Method_ID";
/** Set A_Depreciation_Method_ID */
public void setA_Depreciation_Method_ID (int A_Depreciation_Method_ID);
/** Get A_Depreciation_Method_ID */
public int getA_Depreciation_Method_ID();
/** Column name A_Depreciation_Table_Header_ID */
public static final String COLUMNNAME_A_Depreciation_Table_Header_ID = "A_Depreciation_Table_Header_ID";
/** Set A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID);
/** Get A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID();
/** Column name A_Depreciation_Variable_Perc */
public static final String COLUMNNAME_A_Depreciation_Variable_Perc = "A_Depreciation_Variable_Perc";
/** Set A_Depreciation_Variable_Perc */
public void setA_Depreciation_Variable_Perc (BigDecimal A_Depreciation_Variable_Perc);
/** Get A_Depreciation_Variable_Perc */
public BigDecimal getA_Depreciation_Variable_Perc();
/** Column name A_Disposal_Gain */
public static final String COLUMNNAME_A_Disposal_Gain = "A_Disposal_Gain";
/** Set A_Disposal_Gain */
public void setA_Disposal_Gain (int A_Disposal_Gain);
/** Get A_Disposal_Gain */
public int getA_Disposal_Gain();
/** Column name A_Disposal_Loss */
public static final String COLUMNNAME_A_Disposal_Loss = "A_Disposal_Loss";
/** Set A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss);
/** Get A_Disposal_Loss */
public int getA_Disposal_Loss();
/** Column name A_Disposal_Revenue */
public static final String COLUMNNAME_A_Disposal_Revenue = "A_Disposal_Revenue";
/** Set A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue);
/** Get A_Disposal_Revenue */
public int getA_Disposal_Revenue();
/** Column name A_Period_End */
public static final String COLUMNNAME_A_Period_End = "A_Period_End";
/** Set A_Period_End */
public void setA_Period_End (int A_Period_End);
/** Get A_Period_End */
public int getA_Period_End();
/** Column name A_Period_Start */
public static final String COLUMNNAME_A_Period_Start = "A_Period_Start";
/** Set A_Period_Start */
public void setA_Period_Start (int A_Period_Start);
/** Get A_Period_Start */
public int getA_Period_Start();
/** Column name A_Reval_Accumdep_Offset_Cur */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Cur = "A_Reval_Accumdep_Offset_Cur";
/** Set A_Reval_Accumdep_Offset_Cur */
public void setA_Reval_Accumdep_Offset_Cur (int A_Reval_Accumdep_Offset_Cur);
/** Get A_Reval_Accumdep_Offset_Cur */
public int getA_Reval_Accumdep_Offset_Cur();
/** Column name A_Reval_Accumdep_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Prior = "A_Reval_Accumdep_Offset_Prior";
/** Set A_Reval_Accumdep_Offset_Prior */
public void setA_Reval_Accumdep_Offset_Prior (int A_Reval_Accumdep_Offset_Prior);
/** Get A_Reval_Accumdep_Offset_Prior */
public int getA_Reval_Accumdep_Offset_Prior();
/** Column name A_Reval_Cal_Method */
public static final String COLUMNNAME_A_Reval_Cal_Method = "A_Reval_Cal_Method";
/** Set A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method);
/** Get A_Reval_Cal_Method */
public String getA_Reval_Cal_Method();
/** Column name A_Reval_Cost_Offset */
public static final String COLUMNNAME_A_Reval_Cost_Offset = "A_Reval_Cost_Offset";
/** Set A_Reval_Cost_Offset */
public void setA_Reval_Cost_Offset (int A_Reval_Cost_Offset);
/** Get A_Reval_Cost_Offset */
public int getA_Reval_Cost_Offset();
/** Column name A_Reval_Cost_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Cost_Offset_Prior = "A_Reval_Cost_Offset_Prior";
/** Set A_Reval_Cost_Offset_Prior */
public void setA_Reval_Cost_Offset_Prior (int A_Reval_Cost_Offset_Prior);
/** Get A_Reval_Cost_Offset_Prior */
public int getA_Reval_Cost_Offset_Prior();
/** Column name A_Reval_Depexp_Offset */
public static final String COLUMNNAME_A_Reval_Depexp_Offset = "A_Reval_Depexp_Offset";
/** Set A_Reval_Depexp_Offset */
public void setA_Reval_Depexp_Offset (int A_Reval_Depexp_Offset);
/** Get A_Reval_Depexp_Offset */
public int getA_Reval_Depexp_Offset();
/** Column name A_Salvage_Value */
public static final String COLUMNNAME_A_Salvage_Value = "A_Salvage_Value";
/** Set A_Salvage_Value */
public void setA_Salvage_Value (BigDecimal A_Salvage_Value);
/** Get A_Salvage_Value */
public BigDecimal getA_Salvage_Value();
/** Column name A_Split_Percent */
public static final String COLUMNNAME_A_Split_Percent = "A_Split_Percent";
/** Set A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent);
/** Get A_Split_Percent */
public BigDecimal getA_Split_Percent();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,215 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Addition
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Addition
{
/** TableName=A_Asset_Addition */
public static final String Table_Name = "A_Asset_Addition";
/** AD_Table_ID=53137 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_Addition_ID */
public static final String COLUMNNAME_A_Asset_Addition_ID = "A_Asset_Addition_ID";
/** Set A_Asset_Addition_ID */
public void setA_Asset_Addition_ID (int A_Asset_Addition_ID);
/** Get A_Asset_Addition_ID */
public int getA_Asset_Addition_ID();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_CapvsExp */
public static final String COLUMNNAME_A_CapvsExp = "A_CapvsExp";
/** Set A_CapvsExp */
public void setA_CapvsExp (String A_CapvsExp);
/** Get A_CapvsExp */
public String getA_CapvsExp();
/** Column name A_QTY_Current */
public static final String COLUMNNAME_A_QTY_Current = "A_QTY_Current";
/** Set A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current);
/** Get A_QTY_Current */
public BigDecimal getA_QTY_Current();
/** Column name A_SourceType */
public static final String COLUMNNAME_A_SourceType = "A_SourceType";
/** Set A_SourceType */
public void setA_SourceType (String A_SourceType);
/** Get A_SourceType */
public String getA_SourceType();
/** Column name AssetValueAmt */
public static final String COLUMNNAME_AssetValueAmt = "AssetValueAmt";
/** Set Asset value.
* Book Value of the asset
*/
public void setAssetValueAmt (BigDecimal AssetValueAmt);
/** Get Asset value.
* Book Value of the asset
*/
public BigDecimal getAssetValueAmt();
/** Column name C_Invoice_ID */
public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID";
/** Set Invoice.
* Invoice Identifier
*/
public void setC_Invoice_ID (int C_Invoice_ID);
/** Get Invoice.
* Invoice Identifier
*/
public int getC_Invoice_ID();
public I_C_Invoice getC_Invoice() throws Exception;
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name DocumentNo */
public static final String COLUMNNAME_DocumentNo = "DocumentNo";
/** Set Document No.
* Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo);
/** Get Document No.
* Document sequence number of the document
*/
public String getDocumentNo();
/** Column name GL_JournalBatch_ID */
public static final String COLUMNNAME_GL_JournalBatch_ID = "GL_JournalBatch_ID";
/** Set Journal Batch.
* General Ledger Journal Batch
*/
public void setGL_JournalBatch_ID (int GL_JournalBatch_ID);
/** Get Journal Batch.
* General Ledger Journal Batch
*/
public int getGL_JournalBatch_ID();
public I_GL_JournalBatch getGL_JournalBatch() throws Exception;
/** Column name Line */
public static final String COLUMNNAME_Line = "Line";
/** Set Line No.
* Unique line for this document
*/
public void setLine (int Line);
/** Get Line No.
* Unique line for this document
*/
public int getLine();
/** Column name M_InOutLine_ID */
public static final String COLUMNNAME_M_InOutLine_ID = "M_InOutLine_ID";
/** Set Shipment/Receipt Line.
* Line on Shipment or Receipt document
*/
public void setM_InOutLine_ID (int M_InOutLine_ID);
/** Get Shipment/Receipt Line.
* Line on Shipment or Receipt document
*/
public int getM_InOutLine_ID();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
}

View File

@ -0,0 +1,733 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Change
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Change
{
/** TableName=A_Asset_Change */
public static final String Table_Name = "A_Asset_Change";
/** AD_Table_ID=53133 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Accumdepreciation_Acct */
public static final String COLUMNNAME_A_Accumdepreciation_Acct = "A_Accumdepreciation_Acct";
/** Set A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct);
/** Get A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct();
/** Column name A_Asset_Acct */
public static final String COLUMNNAME_A_Asset_Acct = "A_Asset_Acct";
/** Set A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct);
/** Get A_Asset_Acct */
public int getA_Asset_Acct();
/** Column name A_Asset_Acct_ID */
public static final String COLUMNNAME_A_Asset_Acct_ID = "A_Asset_Acct_ID";
/** Set A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID);
/** Get A_Asset_Acct_ID */
public int getA_Asset_Acct_ID();
/** Column name A_Asset_Addition_ID */
public static final String COLUMNNAME_A_Asset_Addition_ID = "A_Asset_Addition_ID";
/** Set A_Asset_Addition_ID */
public void setA_Asset_Addition_ID (int A_Asset_Addition_ID);
/** Get A_Asset_Addition_ID */
public int getA_Asset_Addition_ID();
/** Column name A_Asset_Change_ID */
public static final String COLUMNNAME_A_Asset_Change_ID = "A_Asset_Change_ID";
/** Set A_Asset_Change_ID */
public void setA_Asset_Change_ID (int A_Asset_Change_ID);
/** Get A_Asset_Change_ID */
public int getA_Asset_Change_ID();
/** Column name A_Asset_CreateDate */
public static final String COLUMNNAME_A_Asset_CreateDate = "A_Asset_CreateDate";
/** Set A_Asset_CreateDate */
public void setA_Asset_CreateDate (Timestamp A_Asset_CreateDate);
/** Get A_Asset_CreateDate */
public Timestamp getA_Asset_CreateDate();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Retirement_ID */
public static final String COLUMNNAME_A_Asset_Retirement_ID = "A_Asset_Retirement_ID";
/** Set Asset Retirement.
* Internally used asset is not longer used.
*/
public void setA_Asset_Retirement_ID (int A_Asset_Retirement_ID);
/** Get Asset Retirement.
* Internally used asset is not longer used.
*/
public int getA_Asset_Retirement_ID();
/** Column name A_Asset_RevalDate */
public static final String COLUMNNAME_A_Asset_RevalDate = "A_Asset_RevalDate";
/** Set A_Asset_RevalDate */
public void setA_Asset_RevalDate (Timestamp A_Asset_RevalDate);
/** Get A_Asset_RevalDate */
public Timestamp getA_Asset_RevalDate();
/** Column name A_Asset_Spread_Type */
public static final String COLUMNNAME_A_Asset_Spread_Type = "A_Asset_Spread_Type";
/** Set A_Asset_Spread_Type */
public void setA_Asset_Spread_Type (int A_Asset_Spread_Type);
/** Get A_Asset_Spread_Type */
public int getA_Asset_Spread_Type();
/** Column name A_Depreciation_Acct */
public static final String COLUMNNAME_A_Depreciation_Acct = "A_Depreciation_Acct";
/** Set A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct);
/** Get A_Depreciation_Acct */
public int getA_Depreciation_Acct();
/** Column name A_Depreciation_Calc_Type */
public static final String COLUMNNAME_A_Depreciation_Calc_Type = "A_Depreciation_Calc_Type";
/** Set A_Depreciation_Calc_Type */
public void setA_Depreciation_Calc_Type (int A_Depreciation_Calc_Type);
/** Get A_Depreciation_Calc_Type */
public int getA_Depreciation_Calc_Type();
/** Column name A_Depreciation_Manual_Amount */
public static final String COLUMNNAME_A_Depreciation_Manual_Amount = "A_Depreciation_Manual_Amount";
/** Set A_Depreciation_Manual_Amount */
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount);
/** Get A_Depreciation_Manual_Amount */
public BigDecimal getA_Depreciation_Manual_Amount();
/** Column name A_Depreciation_Manual_Period */
public static final String COLUMNNAME_A_Depreciation_Manual_Period = "A_Depreciation_Manual_Period";
/** Set A_Depreciation_Manual_Period */
public void setA_Depreciation_Manual_Period (String A_Depreciation_Manual_Period);
/** Get A_Depreciation_Manual_Period */
public String getA_Depreciation_Manual_Period();
/** Column name A_Depreciation_Table_Header_ID */
public static final String COLUMNNAME_A_Depreciation_Table_Header_ID = "A_Depreciation_Table_Header_ID";
/** Set A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID);
/** Get A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID();
/** Column name A_Depreciation_Variable_Perc */
public static final String COLUMNNAME_A_Depreciation_Variable_Perc = "A_Depreciation_Variable_Perc";
/** Set A_Depreciation_Variable_Perc */
public void setA_Depreciation_Variable_Perc (BigDecimal A_Depreciation_Variable_Perc);
/** Get A_Depreciation_Variable_Perc */
public BigDecimal getA_Depreciation_Variable_Perc();
/** Column name A_Disposal_Loss */
public static final String COLUMNNAME_A_Disposal_Loss = "A_Disposal_Loss";
/** Set A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss);
/** Get A_Disposal_Loss */
public int getA_Disposal_Loss();
/** Column name A_Disposal_Revenue */
public static final String COLUMNNAME_A_Disposal_Revenue = "A_Disposal_Revenue";
/** Set A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue);
/** Get A_Disposal_Revenue */
public int getA_Disposal_Revenue();
/** Column name A_Parent_Asset_ID */
public static final String COLUMNNAME_A_Parent_Asset_ID = "A_Parent_Asset_ID";
/** Set A_Parent_Asset_ID */
public void setA_Parent_Asset_ID (int A_Parent_Asset_ID);
/** Get A_Parent_Asset_ID */
public int getA_Parent_Asset_ID();
/** Column name A_Period_End */
public static final String COLUMNNAME_A_Period_End = "A_Period_End";
/** Set A_Period_End */
public void setA_Period_End (int A_Period_End);
/** Get A_Period_End */
public int getA_Period_End();
/** Column name A_Period_Start */
public static final String COLUMNNAME_A_Period_Start = "A_Period_Start";
/** Set A_Period_Start */
public void setA_Period_Start (int A_Period_Start);
/** Get A_Period_Start */
public int getA_Period_Start();
/** Column name A_QTY_Current */
public static final String COLUMNNAME_A_QTY_Current = "A_QTY_Current";
/** Set A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current);
/** Get A_QTY_Current */
public BigDecimal getA_QTY_Current();
/** Column name A_QTY_Original */
public static final String COLUMNNAME_A_QTY_Original = "A_QTY_Original";
/** Set A_QTY_Original */
public void setA_QTY_Original (BigDecimal A_QTY_Original);
/** Get A_QTY_Original */
public BigDecimal getA_QTY_Original();
/** Column name A_Reval_Accumdep_Offset_Cur */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Cur = "A_Reval_Accumdep_Offset_Cur";
/** Set A_Reval_Accumdep_Offset_Cur */
public void setA_Reval_Accumdep_Offset_Cur (int A_Reval_Accumdep_Offset_Cur);
/** Get A_Reval_Accumdep_Offset_Cur */
public int getA_Reval_Accumdep_Offset_Cur();
/** Column name A_Reval_Accumdep_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Prior = "A_Reval_Accumdep_Offset_Prior";
/** Set A_Reval_Accumdep_Offset_Prior */
public void setA_Reval_Accumdep_Offset_Prior (int A_Reval_Accumdep_Offset_Prior);
/** Get A_Reval_Accumdep_Offset_Prior */
public int getA_Reval_Accumdep_Offset_Prior();
/** Column name A_Reval_Cal_Method */
public static final String COLUMNNAME_A_Reval_Cal_Method = "A_Reval_Cal_Method";
/** Set A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method);
/** Get A_Reval_Cal_Method */
public String getA_Reval_Cal_Method();
/** Column name A_Reval_Cost_Offset */
public static final String COLUMNNAME_A_Reval_Cost_Offset = "A_Reval_Cost_Offset";
/** Set A_Reval_Cost_Offset */
public void setA_Reval_Cost_Offset (int A_Reval_Cost_Offset);
/** Get A_Reval_Cost_Offset */
public int getA_Reval_Cost_Offset();
/** Column name A_Reval_Cost_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Cost_Offset_Prior = "A_Reval_Cost_Offset_Prior";
/** Set A_Reval_Cost_Offset_Prior */
public void setA_Reval_Cost_Offset_Prior (int A_Reval_Cost_Offset_Prior);
/** Get A_Reval_Cost_Offset_Prior */
public int getA_Reval_Cost_Offset_Prior();
/** Column name A_Reval_Depexp_Offset */
public static final String COLUMNNAME_A_Reval_Depexp_Offset = "A_Reval_Depexp_Offset";
/** Set A_Reval_Depexp_Offset */
public void setA_Reval_Depexp_Offset (int A_Reval_Depexp_Offset);
/** Get A_Reval_Depexp_Offset */
public int getA_Reval_Depexp_Offset();
/** Column name A_Salvage_Value */
public static final String COLUMNNAME_A_Salvage_Value = "A_Salvage_Value";
/** Set A_Salvage_Value */
public void setA_Salvage_Value (BigDecimal A_Salvage_Value);
/** Get A_Salvage_Value */
public BigDecimal getA_Salvage_Value();
/** Column name A_Split_Percent */
public static final String COLUMNNAME_A_Split_Percent = "A_Split_Percent";
/** Set A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent);
/** Get A_Split_Percent */
public BigDecimal getA_Split_Percent();
/** Column name Ad_User_ID */
public static final String COLUMNNAME_Ad_User_ID = "Ad_User_ID";
/** Set Ad_User_ID */
public void setAd_User_ID (int Ad_User_ID);
/** Get Ad_User_ID */
public int getAd_User_ID();
/** Column name AssetAccumDepreciationAmt */
public static final String COLUMNNAME_AssetAccumDepreciationAmt = "AssetAccumDepreciationAmt";
/** Set AssetAccumDepreciationAmt */
public void setAssetAccumDepreciationAmt (BigDecimal AssetAccumDepreciationAmt);
/** Get AssetAccumDepreciationAmt */
public BigDecimal getAssetAccumDepreciationAmt();
/** Column name AssetBookValueAmt */
public static final String COLUMNNAME_AssetBookValueAmt = "AssetBookValueAmt";
/** Set AssetBookValueAmt */
public void setAssetBookValueAmt (BigDecimal AssetBookValueAmt);
/** Get AssetBookValueAmt */
public BigDecimal getAssetBookValueAmt();
/** Column name AssetDepreciationDate */
public static final String COLUMNNAME_AssetDepreciationDate = "AssetDepreciationDate";
/** Set Asset Depreciation Date.
* Date of last depreciation
*/
public void setAssetDepreciationDate (Timestamp AssetDepreciationDate);
/** Get Asset Depreciation Date.
* Date of last depreciation
*/
public Timestamp getAssetDepreciationDate();
/** Column name AssetDisposalDate */
public static final String COLUMNNAME_AssetDisposalDate = "AssetDisposalDate";
/** Set Asset Disposal Date.
* Date when the asset is/was disposed
*/
public void setAssetDisposalDate (Timestamp AssetDisposalDate);
/** Get Asset Disposal Date.
* Date when the asset is/was disposed
*/
public Timestamp getAssetDisposalDate();
/** Column name AssetMarketValueAmt */
public static final String COLUMNNAME_AssetMarketValueAmt = "AssetMarketValueAmt";
/** Set Market value Amount.
* Market value of the asset
*/
public void setAssetMarketValueAmt (BigDecimal AssetMarketValueAmt);
/** Get Market value Amount.
* Market value of the asset
*/
public BigDecimal getAssetMarketValueAmt();
/** Column name AssetServiceDate */
public static final String COLUMNNAME_AssetServiceDate = "AssetServiceDate";
/** Set In Service Date.
* Date when Asset was put into service
*/
public void setAssetServiceDate (Timestamp AssetServiceDate);
/** Get In Service Date.
* Date when Asset was put into service
*/
public Timestamp getAssetServiceDate();
/** Column name AssetValueAmt */
public static final String COLUMNNAME_AssetValueAmt = "AssetValueAmt";
/** Set Asset value.
* Book Value of the asset
*/
public void setAssetValueAmt (BigDecimal AssetValueAmt);
/** Get Asset value.
* Book Value of the asset
*/
public BigDecimal getAssetValueAmt();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
/** Set Business Partner .
* Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID);
/** Get Business Partner .
* Identifies a Business Partner
*/
public int getC_BPartner_ID();
/** Column name 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
*/
public void setC_BPartner_Location_ID (int C_BPartner_Location_ID);
/** Get Partner Location.
* Identifies the (ship to) address for this Business Partner
*/
public int getC_BPartner_Location_ID();
/** Column name C_Location_ID */
public static final String COLUMNNAME_C_Location_ID = "C_Location_ID";
/** Set Address.
* Location or Address
*/
public void setC_Location_ID (int C_Location_ID);
/** Get Address.
* Location or Address
*/
public int getC_Location_ID();
/** Column name C_ValidCombination_ID */
public static final String COLUMNNAME_C_ValidCombination_ID = "C_ValidCombination_ID";
/** Set Combination.
* Valid Account Combination
*/
public void setC_ValidCombination_ID (int C_ValidCombination_ID);
/** Get Combination.
* Valid Account Combination
*/
public int getC_ValidCombination_ID();
/** Column name ChangeAmt */
public static final String COLUMNNAME_ChangeAmt = "ChangeAmt";
/** Set ChangeAmt */
public void setChangeAmt (BigDecimal ChangeAmt);
/** Get ChangeAmt */
public BigDecimal getChangeAmt();
/** Column name ChangeDate */
public static final String COLUMNNAME_ChangeDate = "ChangeDate";
/** Set ChangeDate */
public void setChangeDate (Timestamp ChangeDate);
/** Get ChangeDate */
public Timestamp getChangeDate();
/** Column name ChangeType */
public static final String COLUMNNAME_ChangeType = "ChangeType";
/** Set ChangeType */
public void setChangeType (String ChangeType);
/** Get ChangeType */
public String getChangeType();
/** Column name ConventionType */
public static final String COLUMNNAME_ConventionType = "ConventionType";
/** Set ConventionType */
public void setConventionType (int ConventionType);
/** Get ConventionType */
public int getConventionType();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name DepreciationType */
public static final String COLUMNNAME_DepreciationType = "DepreciationType";
/** Set DepreciationType */
public void setDepreciationType (int DepreciationType);
/** Get DepreciationType */
public int getDepreciationType();
/** Column name IsDepreciated */
public static final String COLUMNNAME_IsDepreciated = "IsDepreciated";
/** Set Depreciate.
* The asset will be depreciated
*/
public void setIsDepreciated (boolean IsDepreciated);
/** Get Depreciate.
* The asset will be depreciated
*/
public boolean isDepreciated();
/** Column name IsDisposed */
public static final String COLUMNNAME_IsDisposed = "IsDisposed";
/** Set Disposed.
* The asset is disposed
*/
public void setIsDisposed (boolean IsDisposed);
/** Get Disposed.
* The asset is disposed
*/
public boolean isDisposed();
/** Column name IsFullyDepreciated */
public static final String COLUMNNAME_IsFullyDepreciated = "IsFullyDepreciated";
/** Set Fully depreciated.
* The asset is fully depreciated
*/
public void setIsFullyDepreciated (boolean IsFullyDepreciated);
/** Get Fully depreciated.
* The asset is fully depreciated
*/
public boolean isFullyDepreciated();
/** Column name IsInPosession */
public static final String COLUMNNAME_IsInPosession = "IsInPosession";
/** Set In Possession.
* The asset is in the possession of the organization
*/
public void setIsInPosession (boolean IsInPosession);
/** Get In Possession.
* The asset is in the possession of the organization
*/
public boolean isInPosession();
/** Column name IsOwned */
public static final String COLUMNNAME_IsOwned = "IsOwned";
/** Set Owned.
* The asset is owned by the organization
*/
public void setIsOwned (boolean IsOwned);
/** Get Owned.
* The asset is owned by the organization
*/
public boolean isOwned();
/** Column name LifeUseUnits */
public static final String COLUMNNAME_LifeUseUnits = "LifeUseUnits";
/** Set Life use.
* Units of use until the asset is not usable anymore
*/
public void setLifeUseUnits (int LifeUseUnits);
/** Get Life use.
* Units of use until the asset is not usable anymore
*/
public int getLifeUseUnits();
/** Column name Lot */
public static final String COLUMNNAME_Lot = "Lot";
/** Set Lot No.
* Lot number (alphanumeric)
*/
public void setLot (String Lot);
/** Get Lot No.
* Lot number (alphanumeric)
*/
public String getLot();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Serno */
public static final String COLUMNNAME_Serno = "Serno";
/** Set Serno */
public void setSerno (String Serno);
/** Get Serno */
public String getSerno();
/** Column name TextDetails */
public static final String COLUMNNAME_TextDetails = "TextDetails";
/** Set Details */
public void setTextDetails (String TextDetails);
/** Get Details */
public String getTextDetails();
/** Column name UseLifeMonths */
public static final String COLUMNNAME_UseLifeMonths = "UseLifeMonths";
/** Set Usable Life - Months.
* Months of the usable life of the asset
*/
public void setUseLifeMonths (int UseLifeMonths);
/** Get Usable Life - Months.
* Months of the usable life of the asset
*/
public int getUseLifeMonths();
/** Column name UseLifeYears */
public static final String COLUMNNAME_UseLifeYears = "UseLifeYears";
/** Set Usable Life - Years.
* Years of the usable life of the asset
*/
public void setUseLifeYears (int UseLifeYears);
/** Get Usable Life - Years.
* Years of the usable life of the asset
*/
public int getUseLifeYears();
/** Column name UseUnits */
public static final String COLUMNNAME_UseUnits = "UseUnits";
/** Set Use units.
* Currently used units of the assets
*/
public void setUseUnits (int UseUnits);
/** Get Use units.
* Currently used units of the assets
*/
public int getUseUnits();
/** Column name Versionno */
public static final String COLUMNNAME_Versionno = "Versionno";
/** Set Versionno */
public void setVersionno (String Versionno);
/** Get Versionno */
public String getVersionno();
}

View File

@ -0,0 +1,187 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Disposed
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Disposed
{
/** TableName=A_Asset_Disposed */
public static final String Table_Name = "A_Asset_Disposed";
/** AD_Table_ID=53127 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_Disposed_ID */
public static final String COLUMNNAME_A_Asset_Disposed_ID = "A_Asset_Disposed_ID";
/** Set A_Asset_Disposed_ID */
public void setA_Asset_Disposed_ID (int A_Asset_Disposed_ID);
/** Get A_Asset_Disposed_ID */
public int getA_Asset_Disposed_ID();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Trade_ID */
public static final String COLUMNNAME_A_Asset_Trade_ID = "A_Asset_Trade_ID";
/** Set A_Asset_Trade_ID */
public void setA_Asset_Trade_ID (int A_Asset_Trade_ID);
/** Get A_Asset_Trade_ID */
public int getA_Asset_Trade_ID();
/** Column name A_Disposed_Date */
public static final String COLUMNNAME_A_Disposed_Date = "A_Disposed_Date";
/** Set A_Disposed_Date */
public void setA_Disposed_Date (Timestamp A_Disposed_Date);
/** Get A_Disposed_Date */
public Timestamp getA_Disposed_Date();
/** Column name A_Disposed_Method */
public static final String COLUMNNAME_A_Disposed_Method = "A_Disposed_Method";
/** Set A_Disposed_Method */
public void setA_Disposed_Method (String A_Disposed_Method);
/** Get A_Disposed_Method */
public String getA_Disposed_Method();
/** Column name A_Disposed_Reason */
public static final String COLUMNNAME_A_Disposed_Reason = "A_Disposed_Reason";
/** Set A_Disposed_Reason */
public void setA_Disposed_Reason (String A_Disposed_Reason);
/** Get A_Disposed_Reason */
public String getA_Disposed_Reason();
/** Column name A_Proceeds */
public static final String COLUMNNAME_A_Proceeds = "A_Proceeds";
/** Set A_Proceeds */
public void setA_Proceeds (BigDecimal A_Proceeds);
/** Get A_Proceeds */
public BigDecimal getA_Proceeds();
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name DateDoc */
public static final String COLUMNNAME_DateDoc = "DateDoc";
/** Set Document Date.
* Date of the Document
*/
public void setDateDoc (Timestamp DateDoc);
/** Get Document Date.
* Date of the Document
*/
public Timestamp getDateDoc();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,343 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Group_Acct
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Group_Acct
{
/** TableName=A_Asset_Group_Acct */
public static final String Table_Name = "A_Asset_Group_Acct";
/** AD_Table_ID=53130 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Accumdepreciation_Acct */
public static final String COLUMNNAME_A_Accumdepreciation_Acct = "A_Accumdepreciation_Acct";
/** Set A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct);
/** Get A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct();
/** Column name A_Asset_Acct */
public static final String COLUMNNAME_A_Asset_Acct = "A_Asset_Acct";
/** Set A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct);
/** Get A_Asset_Acct */
public int getA_Asset_Acct();
/** Column name A_Asset_Group_Acct_ID */
public static final String COLUMNNAME_A_Asset_Group_Acct_ID = "A_Asset_Group_Acct_ID";
/** Set A_Asset_Group_Acct_ID */
public void setA_Asset_Group_Acct_ID (int A_Asset_Group_Acct_ID);
/** Get A_Asset_Group_Acct_ID */
public int getA_Asset_Group_Acct_ID();
/** Column name A_Asset_Group_ID */
public static final String COLUMNNAME_A_Asset_Group_ID = "A_Asset_Group_ID";
/** Set Asset Group.
* Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID);
/** Get Asset Group.
* Group of Assets
*/
public int getA_Asset_Group_ID();
public I_A_Asset_Group getA_Asset_Group() throws Exception;
/** Column name A_Asset_Spread_Type */
public static final String COLUMNNAME_A_Asset_Spread_Type = "A_Asset_Spread_Type";
/** Set A_Asset_Spread_Type */
public void setA_Asset_Spread_Type (int A_Asset_Spread_Type);
/** Get A_Asset_Spread_Type */
public int getA_Asset_Spread_Type();
/** Column name A_Depreciation_Acct */
public static final String COLUMNNAME_A_Depreciation_Acct = "A_Depreciation_Acct";
/** Set A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct);
/** Get A_Depreciation_Acct */
public int getA_Depreciation_Acct();
/** Column name A_Depreciation_Calc_Type */
public static final String COLUMNNAME_A_Depreciation_Calc_Type = "A_Depreciation_Calc_Type";
/** Set A_Depreciation_Calc_Type */
public void setA_Depreciation_Calc_Type (int A_Depreciation_Calc_Type);
/** Get A_Depreciation_Calc_Type */
public int getA_Depreciation_Calc_Type();
/** Column name A_Depreciation_ID */
public static final String COLUMNNAME_A_Depreciation_ID = "A_Depreciation_ID";
/** Set A_Depreciation_ID */
public void setA_Depreciation_ID (int A_Depreciation_ID);
/** Get A_Depreciation_ID */
public int getA_Depreciation_ID();
/** Column name A_Depreciation_Manual_Amount */
public static final String COLUMNNAME_A_Depreciation_Manual_Amount = "A_Depreciation_Manual_Amount";
/** Set A_Depreciation_Manual_Amount */
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount);
/** Get A_Depreciation_Manual_Amount */
public BigDecimal getA_Depreciation_Manual_Amount();
/** Column name A_Depreciation_Manual_Period */
public static final String COLUMNNAME_A_Depreciation_Manual_Period = "A_Depreciation_Manual_Period";
/** Set A_Depreciation_Manual_Period */
public void setA_Depreciation_Manual_Period (String A_Depreciation_Manual_Period);
/** Get A_Depreciation_Manual_Period */
public String getA_Depreciation_Manual_Period();
/** Column name A_Depreciation_Table_Header_ID */
public static final String COLUMNNAME_A_Depreciation_Table_Header_ID = "A_Depreciation_Table_Header_ID";
/** Set A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID);
/** Get A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID();
/** Column name A_Depreciation_Variable_Perc */
public static final String COLUMNNAME_A_Depreciation_Variable_Perc = "A_Depreciation_Variable_Perc";
/** Set A_Depreciation_Variable_Perc */
public void setA_Depreciation_Variable_Perc (BigDecimal A_Depreciation_Variable_Perc);
/** Get A_Depreciation_Variable_Perc */
public BigDecimal getA_Depreciation_Variable_Perc();
/** Column name A_Disposal_Gain */
public static final String COLUMNNAME_A_Disposal_Gain = "A_Disposal_Gain";
/** Set A_Disposal_Gain */
public void setA_Disposal_Gain (int A_Disposal_Gain);
/** Get A_Disposal_Gain */
public int getA_Disposal_Gain();
/** Column name A_Disposal_Loss */
public static final String COLUMNNAME_A_Disposal_Loss = "A_Disposal_Loss";
/** Set A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss);
/** Get A_Disposal_Loss */
public int getA_Disposal_Loss();
/** Column name A_Disposal_Revenue */
public static final String COLUMNNAME_A_Disposal_Revenue = "A_Disposal_Revenue";
/** Set A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue);
/** Get A_Disposal_Revenue */
public int getA_Disposal_Revenue();
/** Column name A_Reval_Accumdep_Offset_Cur */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Cur = "A_Reval_Accumdep_Offset_Cur";
/** Set A_Reval_Accumdep_Offset_Cur */
public void setA_Reval_Accumdep_Offset_Cur (int A_Reval_Accumdep_Offset_Cur);
/** Get A_Reval_Accumdep_Offset_Cur */
public int getA_Reval_Accumdep_Offset_Cur();
/** Column name A_Reval_Accumdep_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Prior = "A_Reval_Accumdep_Offset_Prior";
/** Set A_Reval_Accumdep_Offset_Prior */
public void setA_Reval_Accumdep_Offset_Prior (int A_Reval_Accumdep_Offset_Prior);
/** Get A_Reval_Accumdep_Offset_Prior */
public int getA_Reval_Accumdep_Offset_Prior();
/** Column name A_Reval_Cal_Method */
public static final String COLUMNNAME_A_Reval_Cal_Method = "A_Reval_Cal_Method";
/** Set A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method);
/** Get A_Reval_Cal_Method */
public String getA_Reval_Cal_Method();
/** Column name A_Reval_Cost_Offset */
public static final String COLUMNNAME_A_Reval_Cost_Offset = "A_Reval_Cost_Offset";
/** Set A_Reval_Cost_Offset */
public void setA_Reval_Cost_Offset (int A_Reval_Cost_Offset);
/** Get A_Reval_Cost_Offset */
public int getA_Reval_Cost_Offset();
/** Column name A_Reval_Cost_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Cost_Offset_Prior = "A_Reval_Cost_Offset_Prior";
/** Set A_Reval_Cost_Offset_Prior */
public void setA_Reval_Cost_Offset_Prior (int A_Reval_Cost_Offset_Prior);
/** Get A_Reval_Cost_Offset_Prior */
public int getA_Reval_Cost_Offset_Prior();
/** Column name A_Reval_Depexp_Offset */
public static final String COLUMNNAME_A_Reval_Depexp_Offset = "A_Reval_Depexp_Offset";
/** Set A_Reval_Depexp_Offset */
public void setA_Reval_Depexp_Offset (int A_Reval_Depexp_Offset);
/** Get A_Reval_Depexp_Offset */
public int getA_Reval_Depexp_Offset();
/** Column name A_Split_Percent */
public static final String COLUMNNAME_A_Split_Percent = "A_Split_Percent";
/** Set A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent);
/** Get A_Split_Percent */
public BigDecimal getA_Split_Percent();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name ConventionType */
public static final String COLUMNNAME_ConventionType = "ConventionType";
/** Set ConventionType */
public void setConventionType (int ConventionType);
/** Get ConventionType */
public int getConventionType();
/** Column name DepreciationType */
public static final String COLUMNNAME_DepreciationType = "DepreciationType";
/** Set DepreciationType */
public void setDepreciationType (int DepreciationType);
/** Get DepreciationType */
public int getDepreciationType();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
/** Column name UseLifeMonths */
public static final String COLUMNNAME_UseLifeMonths = "UseLifeMonths";
/** Set Usable Life - Months.
* Months of the usable life of the asset
*/
public void setUseLifeMonths (int UseLifeMonths);
/** Get Usable Life - Months.
* Months of the usable life of the asset
*/
public int getUseLifeMonths();
/** Column name UseLifeYears */
public static final String COLUMNNAME_UseLifeYears = "UseLifeYears";
/** Set Usable Life - Years.
* Years of the usable life of the asset
*/
public void setUseLifeYears (int UseLifeYears);
/** Get Usable Life - Years.
* Years of the usable life of the asset
*/
public int getUseLifeYears();
}

View File

@ -0,0 +1,188 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Info_Fin
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Info_Fin
{
/** TableName=A_Asset_Info_Fin */
public static final String Table_Name = "A_Asset_Info_Fin";
/** AD_Table_ID=53132 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Info_Fin_ID */
public static final String COLUMNNAME_A_Asset_Info_Fin_ID = "A_Asset_Info_Fin_ID";
/** Set A_Asset_Info_Fin_ID */
public void setA_Asset_Info_Fin_ID (int A_Asset_Info_Fin_ID);
/** Get A_Asset_Info_Fin_ID */
public int getA_Asset_Info_Fin_ID();
/** Column name A_Contract_Date */
public static final String COLUMNNAME_A_Contract_Date = "A_Contract_Date";
/** Set A_Contract_Date */
public void setA_Contract_Date (Timestamp A_Contract_Date);
/** Get A_Contract_Date */
public Timestamp getA_Contract_Date();
/** Column name A_Due_On */
public static final String COLUMNNAME_A_Due_On = "A_Due_On";
/** Set A_Due_On */
public void setA_Due_On (String A_Due_On);
/** Get A_Due_On */
public String getA_Due_On();
/** Column name A_Expired_Date */
public static final String COLUMNNAME_A_Expired_Date = "A_Expired_Date";
/** Set A_Expired_Date */
public void setA_Expired_Date (Timestamp A_Expired_Date);
/** Get A_Expired_Date */
public Timestamp getA_Expired_Date();
/** Column name A_Finance_Meth */
public static final String COLUMNNAME_A_Finance_Meth = "A_Finance_Meth";
/** Set A_Finance_Meth */
public void setA_Finance_Meth (String A_Finance_Meth);
/** Get A_Finance_Meth */
public String getA_Finance_Meth();
/** Column name A_Monthly_Payment */
public static final String COLUMNNAME_A_Monthly_Payment = "A_Monthly_Payment";
/** Set A_Monthly_Payment */
public void setA_Monthly_Payment (BigDecimal A_Monthly_Payment);
/** Get A_Monthly_Payment */
public BigDecimal getA_Monthly_Payment();
/** Column name A_Purchase_Option */
public static final String COLUMNNAME_A_Purchase_Option = "A_Purchase_Option";
/** Set A_Purchase_Option */
public void setA_Purchase_Option (boolean A_Purchase_Option);
/** Get A_Purchase_Option */
public boolean isA_Purchase_Option();
/** Column name A_Purchase_Option_Credit */
public static final String COLUMNNAME_A_Purchase_Option_Credit = "A_Purchase_Option_Credit";
/** Set A_Purchase_Option_Credit */
public void setA_Purchase_Option_Credit (int A_Purchase_Option_Credit);
/** Get A_Purchase_Option_Credit */
public int getA_Purchase_Option_Credit();
/** Column name A_Purchase_Option_Credit_Per */
public static final String COLUMNNAME_A_Purchase_Option_Credit_Per = "A_Purchase_Option_Credit_Per";
/** Set A_Purchase_Option_Credit_Per */
public void setA_Purchase_Option_Credit_Per (BigDecimal A_Purchase_Option_Credit_Per);
/** Get A_Purchase_Option_Credit_Per */
public BigDecimal getA_Purchase_Option_Credit_Per();
/** Column name A_Purchase_Price */
public static final String COLUMNNAME_A_Purchase_Price = "A_Purchase_Price";
/** Set A_Purchase_Price */
public void setA_Purchase_Price (BigDecimal A_Purchase_Price);
/** Get A_Purchase_Price */
public BigDecimal getA_Purchase_Price();
/** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
/** Set Business Partner .
* Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID);
/** Get Business Partner .
* Identifies a Business Partner
*/
public int getC_BPartner_ID();
/** Column name TextMsg */
public static final String COLUMNNAME_TextMsg = "TextMsg";
/** Set Text Message.
* Text Message
*/
public void setTextMsg (String TextMsg);
/** Get Text Message.
* Text Message
*/
public String getTextMsg();
}

View File

@ -0,0 +1,144 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Info_Ins
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Info_Ins
{
/** TableName=A_Asset_Info_Ins */
public static final String Table_Name = "A_Asset_Info_Ins";
/** AD_Table_ID=53135 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Info_Ins_ID */
public static final String COLUMNNAME_A_Asset_Info_Ins_ID = "A_Asset_Info_Ins_ID";
/** Set A_Asset_Info_Ins_ID */
public void setA_Asset_Info_Ins_ID (int A_Asset_Info_Ins_ID);
/** Get A_Asset_Info_Ins_ID */
public int getA_Asset_Info_Ins_ID();
/** Column name A_Ins_Premium */
public static final String COLUMNNAME_A_Ins_Premium = "A_Ins_Premium";
/** Set A_Ins_Premium */
public void setA_Ins_Premium (BigDecimal A_Ins_Premium);
/** Get A_Ins_Premium */
public BigDecimal getA_Ins_Premium();
/** Column name A_Ins_Value */
public static final String COLUMNNAME_A_Ins_Value = "A_Ins_Value";
/** Set A_Ins_Value */
public void setA_Ins_Value (BigDecimal A_Ins_Value);
/** Get A_Ins_Value */
public BigDecimal getA_Ins_Value();
/** Column name A_Insurance_Co */
public static final String COLUMNNAME_A_Insurance_Co = "A_Insurance_Co";
/** Set A_Insurance_Co */
public void setA_Insurance_Co (String A_Insurance_Co);
/** Get A_Insurance_Co */
public String getA_Insurance_Co();
/** Column name A_Policy_No */
public static final String COLUMNNAME_A_Policy_No = "A_Policy_No";
/** Set A_Policy_No */
public void setA_Policy_No (String A_Policy_No);
/** Get A_Policy_No */
public String getA_Policy_No();
/** Column name A_Renewal_Date */
public static final String COLUMNNAME_A_Renewal_Date = "A_Renewal_Date";
/** Set A_Renewal_Date */
public void setA_Renewal_Date (Timestamp A_Renewal_Date);
/** Get A_Renewal_Date */
public Timestamp getA_Renewal_Date();
/** Column name A_Replace_Cost */
public static final String COLUMNNAME_A_Replace_Cost = "A_Replace_Cost";
/** Set A_Replace_Cost */
public void setA_Replace_Cost (BigDecimal A_Replace_Cost);
/** Get A_Replace_Cost */
public BigDecimal getA_Replace_Cost();
/** Column name Text */
public static final String COLUMNNAME_Text = "Text";
/** Set Text */
public void setText (String Text);
/** Get Text */
public String getText();
}

View File

@ -0,0 +1,139 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Info_Lic
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Info_Lic
{
/** TableName=A_Asset_Info_Lic */
public static final String Table_Name = "A_Asset_Info_Lic";
/** AD_Table_ID=53134 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Info_Lic_ID */
public static final String COLUMNNAME_A_Asset_Info_Lic_ID = "A_Asset_Info_Lic_ID";
/** Set A_Asset_Info_Lic_ID */
public void setA_Asset_Info_Lic_ID (int A_Asset_Info_Lic_ID);
/** Get A_Asset_Info_Lic_ID */
public int getA_Asset_Info_Lic_ID();
/** Column name A_Issuing_Agency */
public static final String COLUMNNAME_A_Issuing_Agency = "A_Issuing_Agency";
/** Set A_Issuing_Agency */
public void setA_Issuing_Agency (String A_Issuing_Agency);
/** Get A_Issuing_Agency */
public String getA_Issuing_Agency();
/** Column name A_License_Fee */
public static final String COLUMNNAME_A_License_Fee = "A_License_Fee";
/** Set A_License_Fee */
public void setA_License_Fee (BigDecimal A_License_Fee);
/** Get A_License_Fee */
public BigDecimal getA_License_Fee();
/** Column name A_License_No */
public static final String COLUMNNAME_A_License_No = "A_License_No";
/** Set A_License_No */
public void setA_License_No (String A_License_No);
/** Get A_License_No */
public String getA_License_No();
/** Column name A_Renewal_Date */
public static final String COLUMNNAME_A_Renewal_Date = "A_Renewal_Date";
/** Set A_Renewal_Date */
public void setA_Renewal_Date (Timestamp A_Renewal_Date);
/** Get A_Renewal_Date */
public Timestamp getA_Renewal_Date();
/** Column name A_State */
public static final String COLUMNNAME_A_State = "A_State";
/** Set Account State.
* State of the Credit Card or Account holder
*/
public void setA_State (String A_State);
/** Get Account State.
* State of the Credit Card or Account holder
*/
public String getA_State();
/** Column name Text */
public static final String COLUMNNAME_Text = "Text";
/** Set Text */
public void setText (String Text);
/** Get Text */
public String getText();
}

View File

@ -0,0 +1,224 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Info_Oth
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Info_Oth
{
/** TableName=A_Asset_Info_Oth */
public static final String Table_Name = "A_Asset_Info_Oth";
/** AD_Table_ID=53136 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Info_Oth_ID */
public static final String COLUMNNAME_A_Asset_Info_Oth_ID = "A_Asset_Info_Oth_ID";
/** Set A_Asset_Info_Oth_ID */
public void setA_Asset_Info_Oth_ID (int A_Asset_Info_Oth_ID);
/** Get A_Asset_Info_Oth_ID */
public int getA_Asset_Info_Oth_ID();
/** Column name A_User1 */
public static final String COLUMNNAME_A_User1 = "A_User1";
/** Set A_User1 */
public void setA_User1 (String A_User1);
/** Get A_User1 */
public String getA_User1();
/** Column name A_User10 */
public static final String COLUMNNAME_A_User10 = "A_User10";
/** Set A_User10 */
public void setA_User10 (String A_User10);
/** Get A_User10 */
public String getA_User10();
/** Column name A_User11 */
public static final String COLUMNNAME_A_User11 = "A_User11";
/** Set A_User11 */
public void setA_User11 (String A_User11);
/** Get A_User11 */
public String getA_User11();
/** Column name A_User12 */
public static final String COLUMNNAME_A_User12 = "A_User12";
/** Set A_User12 */
public void setA_User12 (String A_User12);
/** Get A_User12 */
public String getA_User12();
/** Column name A_User13 */
public static final String COLUMNNAME_A_User13 = "A_User13";
/** Set A_User13 */
public void setA_User13 (String A_User13);
/** Get A_User13 */
public String getA_User13();
/** Column name A_User14 */
public static final String COLUMNNAME_A_User14 = "A_User14";
/** Set A_User14 */
public void setA_User14 (String A_User14);
/** Get A_User14 */
public String getA_User14();
/** Column name A_User15 */
public static final String COLUMNNAME_A_User15 = "A_User15";
/** Set A_User15 */
public void setA_User15 (String A_User15);
/** Get A_User15 */
public String getA_User15();
/** Column name A_User2 */
public static final String COLUMNNAME_A_User2 = "A_User2";
/** Set A_User2 */
public void setA_User2 (String A_User2);
/** Get A_User2 */
public String getA_User2();
/** Column name A_User3 */
public static final String COLUMNNAME_A_User3 = "A_User3";
/** Set A_User3 */
public void setA_User3 (String A_User3);
/** Get A_User3 */
public String getA_User3();
/** Column name A_User4 */
public static final String COLUMNNAME_A_User4 = "A_User4";
/** Set A_User4 */
public void setA_User4 (String A_User4);
/** Get A_User4 */
public String getA_User4();
/** Column name A_User5 */
public static final String COLUMNNAME_A_User5 = "A_User5";
/** Set A_User5 */
public void setA_User5 (String A_User5);
/** Get A_User5 */
public String getA_User5();
/** Column name A_User6 */
public static final String COLUMNNAME_A_User6 = "A_User6";
/** Set A_User6 */
public void setA_User6 (String A_User6);
/** Get A_User6 */
public String getA_User6();
/** Column name A_User7 */
public static final String COLUMNNAME_A_User7 = "A_User7";
/** Set A_User7 */
public void setA_User7 (String A_User7);
/** Get A_User7 */
public String getA_User7();
/** Column name A_User8 */
public static final String COLUMNNAME_A_User8 = "A_User8";
/** Set A_User8 */
public void setA_User8 (String A_User8);
/** Get A_User8 */
public String getA_User8();
/** Column name A_User9 */
public static final String COLUMNNAME_A_User9 = "A_User9";
/** Set A_User9 */
public void setA_User9 (String A_User9);
/** Get A_User9 */
public String getA_User9();
/** Column name Text */
public static final String COLUMNNAME_Text = "Text";
/** Set Text */
public void setText (String Text);
/** Get Text */
public String getText();
}

View File

@ -0,0 +1,142 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Info_Tax
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Info_Tax
{
/** TableName=A_Asset_Info_Tax */
public static final String Table_Name = "A_Asset_Info_Tax";
/** AD_Table_ID=53131 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Info_Tax_ID */
public static final String COLUMNNAME_A_Asset_Info_Tax_ID = "A_Asset_Info_Tax_ID";
/** Set A_Asset_Info_Tax_ID */
public void setA_Asset_Info_Tax_ID (int A_Asset_Info_Tax_ID);
/** Get A_Asset_Info_Tax_ID */
public int getA_Asset_Info_Tax_ID();
/** Column name A_Finance_Meth */
public static final String COLUMNNAME_A_Finance_Meth = "A_Finance_Meth";
/** Set A_Finance_Meth */
public void setA_Finance_Meth (String A_Finance_Meth);
/** Get A_Finance_Meth */
public String getA_Finance_Meth();
/** Column name A_Investment_CR */
public static final String COLUMNNAME_A_Investment_CR = "A_Investment_CR";
/** Set A_Investment_CR */
public void setA_Investment_CR (int A_Investment_CR);
/** Get A_Investment_CR */
public int getA_Investment_CR();
/** Column name A_New_Used */
public static final String COLUMNNAME_A_New_Used = "A_New_Used";
/** Set A_New_Used */
public void setA_New_Used (boolean A_New_Used);
/** Get A_New_Used */
public boolean isA_New_Used();
/** Column name A_State */
public static final String COLUMNNAME_A_State = "A_State";
/** Set Account State.
* State of the Credit Card or Account holder
*/
public void setA_State (String A_State);
/** Get Account State.
* State of the Credit Card or Account holder
*/
public String getA_State();
/** Column name A_Tax_Entity */
public static final String COLUMNNAME_A_Tax_Entity = "A_Tax_Entity";
/** Set A_Tax_Entity */
public void setA_Tax_Entity (String A_Tax_Entity);
/** Get A_Tax_Entity */
public String getA_Tax_Entity();
/** Column name TextMsg */
public static final String COLUMNNAME_TextMsg = "TextMsg";
/** Set Text Message.
* Text Message
*/
public void setTextMsg (String TextMsg);
/** Get Text Message.
* Text Message
*/
public String getTextMsg();
}

View File

@ -0,0 +1,273 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Reval_Entry
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Reval_Entry
{
/** TableName=A_Asset_Reval_Entry */
public static final String Table_Name = "A_Asset_Reval_Entry";
/** AD_Table_ID=53119 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_Reval_Entry_ID */
public static final String COLUMNNAME_A_Asset_Reval_Entry_ID = "A_Asset_Reval_Entry_ID";
/** Set A_Asset_Reval_Entry_ID */
public void setA_Asset_Reval_Entry_ID (int A_Asset_Reval_Entry_ID);
/** Get A_Asset_Reval_Entry_ID */
public int getA_Asset_Reval_Entry_ID();
/** Column name A_Effective_Date */
public static final String COLUMNNAME_A_Effective_Date = "A_Effective_Date";
/** Set A_Effective_Date */
public void setA_Effective_Date (Timestamp A_Effective_Date);
/** Get A_Effective_Date */
public Timestamp getA_Effective_Date();
/** Column name A_Rev_Code */
public static final String COLUMNNAME_A_Rev_Code = "A_Rev_Code";
/** Set A_Rev_Code */
public void setA_Rev_Code (String A_Rev_Code);
/** Get A_Rev_Code */
public String getA_Rev_Code();
/** Column name A_Reval_Cal_Method */
public static final String COLUMNNAME_A_Reval_Cal_Method = "A_Reval_Cal_Method";
/** Set A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method);
/** Get A_Reval_Cal_Method */
public String getA_Reval_Cal_Method();
/** Column name A_Reval_Effective_Date */
public static final String COLUMNNAME_A_Reval_Effective_Date = "A_Reval_Effective_Date";
/** Set A_Reval_Effective_Date */
public void setA_Reval_Effective_Date (String A_Reval_Effective_Date);
/** Get A_Reval_Effective_Date */
public String getA_Reval_Effective_Date();
/** Column name A_Reval_Multiplier */
public static final String COLUMNNAME_A_Reval_Multiplier = "A_Reval_Multiplier";
/** Set A_Reval_Multiplier */
public void setA_Reval_Multiplier (String A_Reval_Multiplier);
/** Get A_Reval_Multiplier */
public String getA_Reval_Multiplier();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name C_Currency_ID */
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
/** Set Currency.
* The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID);
/** Get Currency.
* The Currency for this record
*/
public int getC_Currency_ID();
public I_C_Currency getC_Currency() throws Exception;
/** Column name C_DocType_ID */
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
/** Set Document Type.
* Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID);
/** Get Document Type.
* Document type or rules
*/
public int getC_DocType_ID();
public I_C_DocType getC_DocType() throws Exception;
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name DateDoc */
public static final String COLUMNNAME_DateDoc = "DateDoc";
/** Set Document Date.
* Date of the Document
*/
public void setDateDoc (Timestamp DateDoc);
/** Get Document Date.
* Date of the Document
*/
public Timestamp getDateDoc();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name DocumentNo */
public static final String COLUMNNAME_DocumentNo = "DocumentNo";
/** Set Document No.
* Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo);
/** Get Document No.
* Document sequence number of the document
*/
public String getDocumentNo();
/** Column name GL_Category_ID */
public static final String COLUMNNAME_GL_Category_ID = "GL_Category_ID";
/** Set GL Category.
* General Ledger Category
*/
public void setGL_Category_ID (int GL_Category_ID);
/** Get GL Category.
* General Ledger Category
*/
public int getGL_Category_ID();
public I_GL_Category getGL_Category() throws Exception;
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,104 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Reval_Index
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Reval_Index
{
/** TableName=A_Asset_Reval_Index */
public static final String Table_Name = "A_Asset_Reval_Index";
/** AD_Table_ID=53120 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_Reval_Index_ID */
public static final String COLUMNNAME_A_Asset_Reval_Index_ID = "A_Asset_Reval_Index_ID";
/** Set A_Asset_Reval_Index_ID */
public void setA_Asset_Reval_Index_ID (int A_Asset_Reval_Index_ID);
/** Get A_Asset_Reval_Index_ID */
public int getA_Asset_Reval_Index_ID();
/** Column name A_Effective_Date */
public static final String COLUMNNAME_A_Effective_Date = "A_Effective_Date";
/** Set A_Effective_Date */
public void setA_Effective_Date (Timestamp A_Effective_Date);
/** Get A_Effective_Date */
public Timestamp getA_Effective_Date();
/** Column name A_Reval_Code */
public static final String COLUMNNAME_A_Reval_Code = "A_Reval_Code";
/** Set A_Reval_Code */
public void setA_Reval_Code (String A_Reval_Code);
/** Get A_Reval_Code */
public String getA_Reval_Code();
/** Column name A_Reval_Multiplier */
public static final String COLUMNNAME_A_Reval_Multiplier = "A_Reval_Multiplier";
/** Set A_Reval_Multiplier */
public void setA_Reval_Multiplier (String A_Reval_Multiplier);
/** Get A_Reval_Multiplier */
public String getA_Reval_Multiplier();
/** Column name A_Reval_Rate */
public static final String COLUMNNAME_A_Reval_Rate = "A_Reval_Rate";
/** Set A_Reval_Rate */
public void setA_Reval_Rate (BigDecimal A_Reval_Rate);
/** Get A_Reval_Rate */
public BigDecimal getA_Reval_Rate();
}

View File

@ -0,0 +1,241 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Split
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Split
{
/** TableName=A_Asset_Split */
public static final String Table_Name = "A_Asset_Split";
/** AD_Table_ID=53122 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Amount_Split */
public static final String COLUMNNAME_A_Amount_Split = "A_Amount_Split";
/** Set A_Amount_Split */
public void setA_Amount_Split (BigDecimal A_Amount_Split);
/** Get A_Amount_Split */
public BigDecimal getA_Amount_Split();
/** Column name A_Asset_Acct_ID */
public static final String COLUMNNAME_A_Asset_Acct_ID = "A_Asset_Acct_ID";
/** Set A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID);
/** Get A_Asset_Acct_ID */
public int getA_Asset_Acct_ID();
/** Column name A_Asset_Cost */
public static final String COLUMNNAME_A_Asset_Cost = "A_Asset_Cost";
/** Set A_Asset_Cost */
public void setA_Asset_Cost (BigDecimal A_Asset_Cost);
/** Get A_Asset_Cost */
public BigDecimal getA_Asset_Cost();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_ID_To */
public static final String COLUMNNAME_A_Asset_ID_To = "A_Asset_ID_To";
/** Set A_Asset_ID_To */
public void setA_Asset_ID_To (int A_Asset_ID_To);
/** Get A_Asset_ID_To */
public int getA_Asset_ID_To();
/** Column name A_Asset_Split_ID */
public static final String COLUMNNAME_A_Asset_Split_ID = "A_Asset_Split_ID";
/** Set A_Asset_Split_ID */
public void setA_Asset_Split_ID (int A_Asset_Split_ID);
/** Get A_Asset_Split_ID */
public int getA_Asset_Split_ID();
/** Column name A_Depreciation_Workfile_ID */
public static final String COLUMNNAME_A_Depreciation_Workfile_ID = "A_Depreciation_Workfile_ID";
/** Set A_Depreciation_Workfile_ID */
public void setA_Depreciation_Workfile_ID (int A_Depreciation_Workfile_ID);
/** Get A_Depreciation_Workfile_ID */
public int getA_Depreciation_Workfile_ID();
/** Column name A_Percent_Original */
public static final String COLUMNNAME_A_Percent_Original = "A_Percent_Original";
/** Set A_Percent_Original */
public void setA_Percent_Original (BigDecimal A_Percent_Original);
/** Get A_Percent_Original */
public BigDecimal getA_Percent_Original();
/** Column name A_Percent_Split */
public static final String COLUMNNAME_A_Percent_Split = "A_Percent_Split";
/** Set A_Percent_Split */
public void setA_Percent_Split (BigDecimal A_Percent_Split);
/** Get A_Percent_Split */
public BigDecimal getA_Percent_Split();
/** Column name A_QTY_Current */
public static final String COLUMNNAME_A_QTY_Current = "A_QTY_Current";
/** Set A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current);
/** Get A_QTY_Current */
public BigDecimal getA_QTY_Current();
/** Column name A_QTY_Split */
public static final String COLUMNNAME_A_QTY_Split = "A_QTY_Split";
/** Set A_QTY_Split */
public void setA_QTY_Split (BigDecimal A_QTY_Split);
/** Get A_QTY_Split */
public BigDecimal getA_QTY_Split();
/** Column name A_Split_Type */
public static final String COLUMNNAME_A_Split_Type = "A_Split_Type";
/** Set A_Split_Type */
public void setA_Split_Type (String A_Split_Type);
/** Get A_Split_Type */
public String getA_Split_Type();
/** Column name A_Transfer_Balance_IS */
public static final String COLUMNNAME_A_Transfer_Balance_IS = "A_Transfer_Balance_IS";
/** Set A_Transfer_Balance_IS */
public void setA_Transfer_Balance_IS (boolean A_Transfer_Balance_IS);
/** Get A_Transfer_Balance_IS */
public boolean isA_Transfer_Balance_IS();
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,215 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Spread
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Spread
{
/** TableName=A_Asset_Spread */
public static final String Table_Name = "A_Asset_Spread";
/** AD_Table_ID=53126 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_Spread_ID */
public static final String COLUMNNAME_A_Asset_Spread_ID = "A_Asset_Spread_ID";
/** Set A_Asset_Spread_ID */
public void setA_Asset_Spread_ID (int A_Asset_Spread_ID);
/** Get A_Asset_Spread_ID */
public int getA_Asset_Spread_ID();
/** Column name A_Asset_Spread_Type */
public static final String COLUMNNAME_A_Asset_Spread_Type = "A_Asset_Spread_Type";
/** Set A_Asset_Spread_Type */
public void setA_Asset_Spread_Type (String A_Asset_Spread_Type);
/** Get A_Asset_Spread_Type */
public String getA_Asset_Spread_Type();
/** Column name A_Period_1 */
public static final String COLUMNNAME_A_Period_1 = "A_Period_1";
/** Set A_Period_1 */
public void setA_Period_1 (BigDecimal A_Period_1);
/** Get A_Period_1 */
public BigDecimal getA_Period_1();
/** Column name A_Period_10 */
public static final String COLUMNNAME_A_Period_10 = "A_Period_10";
/** Set A_Period_10 */
public void setA_Period_10 (BigDecimal A_Period_10);
/** Get A_Period_10 */
public BigDecimal getA_Period_10();
/** Column name A_Period_11 */
public static final String COLUMNNAME_A_Period_11 = "A_Period_11";
/** Set A_Period_11 */
public void setA_Period_11 (BigDecimal A_Period_11);
/** Get A_Period_11 */
public BigDecimal getA_Period_11();
/** Column name A_Period_12 */
public static final String COLUMNNAME_A_Period_12 = "A_Period_12";
/** Set A_Period_12 */
public void setA_Period_12 (BigDecimal A_Period_12);
/** Get A_Period_12 */
public BigDecimal getA_Period_12();
/** Column name A_Period_13 */
public static final String COLUMNNAME_A_Period_13 = "A_Period_13";
/** Set A_Period_13 */
public void setA_Period_13 (BigDecimal A_Period_13);
/** Get A_Period_13 */
public BigDecimal getA_Period_13();
/** Column name A_Period_14 */
public static final String COLUMNNAME_A_Period_14 = "A_Period_14";
/** Set A_Period_14 */
public void setA_Period_14 (BigDecimal A_Period_14);
/** Get A_Period_14 */
public BigDecimal getA_Period_14();
/** Column name A_Period_2 */
public static final String COLUMNNAME_A_Period_2 = "A_Period_2";
/** Set A_Period_2 */
public void setA_Period_2 (BigDecimal A_Period_2);
/** Get A_Period_2 */
public BigDecimal getA_Period_2();
/** Column name A_Period_3 */
public static final String COLUMNNAME_A_Period_3 = "A_Period_3";
/** Set A_Period_3 */
public void setA_Period_3 (BigDecimal A_Period_3);
/** Get A_Period_3 */
public BigDecimal getA_Period_3();
/** Column name A_Period_4 */
public static final String COLUMNNAME_A_Period_4 = "A_Period_4";
/** Set A_Period_4 */
public void setA_Period_4 (BigDecimal A_Period_4);
/** Get A_Period_4 */
public BigDecimal getA_Period_4();
/** Column name A_Period_5 */
public static final String COLUMNNAME_A_Period_5 = "A_Period_5";
/** Set A_Period_5 */
public void setA_Period_5 (BigDecimal A_Period_5);
/** Get A_Period_5 */
public BigDecimal getA_Period_5();
/** Column name A_Period_6 */
public static final String COLUMNNAME_A_Period_6 = "A_Period_6";
/** Set A_Period_6 */
public void setA_Period_6 (BigDecimal A_Period_6);
/** Get A_Period_6 */
public BigDecimal getA_Period_6();
/** Column name A_Period_7 */
public static final String COLUMNNAME_A_Period_7 = "A_Period_7";
/** Set A_Period_7 */
public void setA_Period_7 (BigDecimal A_Period_7);
/** Get A_Period_7 */
public BigDecimal getA_Period_7();
/** Column name A_Period_8 */
public static final String COLUMNNAME_A_Period_8 = "A_Period_8";
/** Set A_Period_8 */
public void setA_Period_8 (BigDecimal A_Period_8);
/** Get A_Period_8 */
public BigDecimal getA_Period_8();
/** Column name A_Period_9 */
public static final String COLUMNNAME_A_Period_9 = "A_Period_9";
/** Set A_Period_9 */
public void setA_Period_9 (BigDecimal A_Period_9);
/** Get A_Period_9 */
public BigDecimal getA_Period_9();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
}

View File

@ -0,0 +1,344 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Transfer
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Transfer
{
/** TableName=A_Asset_Transfer */
public static final String Table_Name = "A_Asset_Transfer";
/** AD_Table_ID=53128 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Accumdepreciation_Acct */
public static final String COLUMNNAME_A_Accumdepreciation_Acct = "A_Accumdepreciation_Acct";
/** Set A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct);
/** Get A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct();
/** Column name A_Accumdepreciation_Acct_New */
public static final String COLUMNNAME_A_Accumdepreciation_Acct_New = "A_Accumdepreciation_Acct_New";
/** Set A_Accumdepreciation_Acct_New */
public void setA_Accumdepreciation_Acct_New (int A_Accumdepreciation_Acct_New);
/** Get A_Accumdepreciation_Acct_New */
public int getA_Accumdepreciation_Acct_New();
/** Column name A_Accumdepreciation_Acct_Str */
public static final String COLUMNNAME_A_Accumdepreciation_Acct_Str = "A_Accumdepreciation_Acct_Str";
/** Set A_Accumdepreciation_Acct_Str */
public void setA_Accumdepreciation_Acct_Str (String A_Accumdepreciation_Acct_Str);
/** Get A_Accumdepreciation_Acct_Str */
public String getA_Accumdepreciation_Acct_Str();
/** Column name A_Asset_Acct */
public static final String COLUMNNAME_A_Asset_Acct = "A_Asset_Acct";
/** Set A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct);
/** Get A_Asset_Acct */
public int getA_Asset_Acct();
/** Column name A_Asset_Acct_ID */
public static final String COLUMNNAME_A_Asset_Acct_ID = "A_Asset_Acct_ID";
/** Set A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID);
/** Get A_Asset_Acct_ID */
public int getA_Asset_Acct_ID();
/** Column name A_Asset_Acct_New */
public static final String COLUMNNAME_A_Asset_Acct_New = "A_Asset_Acct_New";
/** Set A_Asset_Acct_New */
public void setA_Asset_Acct_New (int A_Asset_Acct_New);
/** Get A_Asset_Acct_New */
public int getA_Asset_Acct_New();
/** Column name A_Asset_Acct_Str */
public static final String COLUMNNAME_A_Asset_Acct_Str = "A_Asset_Acct_Str";
/** Set A_Asset_Acct_Str */
public void setA_Asset_Acct_Str (String A_Asset_Acct_Str);
/** Get A_Asset_Acct_Str */
public String getA_Asset_Acct_Str();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Transfer_ID */
public static final String COLUMNNAME_A_Asset_Transfer_ID = "A_Asset_Transfer_ID";
/** Set A_Asset_Transfer_ID */
public void setA_Asset_Transfer_ID (int A_Asset_Transfer_ID);
/** Get A_Asset_Transfer_ID */
public int getA_Asset_Transfer_ID();
/** Column name A_Depreciation_Acct */
public static final String COLUMNNAME_A_Depreciation_Acct = "A_Depreciation_Acct";
/** Set A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct);
/** Get A_Depreciation_Acct */
public int getA_Depreciation_Acct();
/** Column name A_Depreciation_Acct_New */
public static final String COLUMNNAME_A_Depreciation_Acct_New = "A_Depreciation_Acct_New";
/** Set A_Depreciation_Acct_New */
public void setA_Depreciation_Acct_New (int A_Depreciation_Acct_New);
/** Get A_Depreciation_Acct_New */
public int getA_Depreciation_Acct_New();
/** Column name A_Depreciation_Acct_Str */
public static final String COLUMNNAME_A_Depreciation_Acct_Str = "A_Depreciation_Acct_Str";
/** Set A_Depreciation_Acct_Str */
public void setA_Depreciation_Acct_Str (String A_Depreciation_Acct_Str);
/** Get A_Depreciation_Acct_Str */
public String getA_Depreciation_Acct_Str();
/** Column name A_Disposal_Loss */
public static final String COLUMNNAME_A_Disposal_Loss = "A_Disposal_Loss";
/** Set A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss);
/** Get A_Disposal_Loss */
public int getA_Disposal_Loss();
/** Column name A_Disposal_Loss_New */
public static final String COLUMNNAME_A_Disposal_Loss_New = "A_Disposal_Loss_New";
/** Set A_Disposal_Loss_New */
public void setA_Disposal_Loss_New (int A_Disposal_Loss_New);
/** Get A_Disposal_Loss_New */
public int getA_Disposal_Loss_New();
/** Column name A_Disposal_Loss_Str */
public static final String COLUMNNAME_A_Disposal_Loss_Str = "A_Disposal_Loss_Str";
/** Set A_Disposal_Loss_Str */
public void setA_Disposal_Loss_Str (String A_Disposal_Loss_Str);
/** Get A_Disposal_Loss_Str */
public String getA_Disposal_Loss_Str();
/** Column name A_Disposal_Revenue */
public static final String COLUMNNAME_A_Disposal_Revenue = "A_Disposal_Revenue";
/** Set A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue);
/** Get A_Disposal_Revenue */
public int getA_Disposal_Revenue();
/** Column name A_Disposal_Revenue_New */
public static final String COLUMNNAME_A_Disposal_Revenue_New = "A_Disposal_Revenue_New";
/** Set A_Disposal_Revenue_New */
public void setA_Disposal_Revenue_New (int A_Disposal_Revenue_New);
/** Get A_Disposal_Revenue_New */
public int getA_Disposal_Revenue_New();
/** Column name A_Disposal_Revenue_Str */
public static final String COLUMNNAME_A_Disposal_Revenue_Str = "A_Disposal_Revenue_Str";
/** Set A_Disposal_Revenue_Str */
public void setA_Disposal_Revenue_Str (String A_Disposal_Revenue_Str);
/** Get A_Disposal_Revenue_Str */
public String getA_Disposal_Revenue_Str();
/** Column name A_Period_End */
public static final String COLUMNNAME_A_Period_End = "A_Period_End";
/** Set A_Period_End */
public void setA_Period_End (int A_Period_End);
/** Get A_Period_End */
public int getA_Period_End();
/** Column name A_Period_Start */
public static final String COLUMNNAME_A_Period_Start = "A_Period_Start";
/** Set A_Period_Start */
public void setA_Period_Start (int A_Period_Start);
/** Get A_Period_Start */
public int getA_Period_Start();
/** Column name A_Split_Percent */
public static final String COLUMNNAME_A_Split_Percent = "A_Split_Percent";
/** Set A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent);
/** Get A_Split_Percent */
public BigDecimal getA_Split_Percent();
/** Column name A_Transfer_Balance */
public static final String COLUMNNAME_A_Transfer_Balance = "A_Transfer_Balance";
/** Set A_Transfer_Balance */
public void setA_Transfer_Balance (boolean A_Transfer_Balance);
/** Get A_Transfer_Balance */
public boolean isA_Transfer_Balance();
/** Column name A_Transfer_Balance_IS */
public static final String COLUMNNAME_A_Transfer_Balance_IS = "A_Transfer_Balance_IS";
/** Set A_Transfer_Balance_IS */
public void setA_Transfer_Balance_IS (boolean A_Transfer_Balance_IS);
/** Get A_Transfer_Balance_IS */
public boolean isA_Transfer_Balance_IS();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,116 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Asset_Use
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Asset_Use
{
/** TableName=A_Asset_Use */
public static final String Table_Name = "A_Asset_Use";
/** AD_Table_ID=53138 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Use_ID */
public static final String COLUMNNAME_A_Asset_Use_ID = "A_Asset_Use_ID";
/** Set A_Asset_Use_ID */
public void setA_Asset_Use_ID (int A_Asset_Use_ID);
/** Get A_Asset_Use_ID */
public int getA_Asset_Use_ID();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name UseDate */
public static final String COLUMNNAME_UseDate = "UseDate";
/** Set UseDate */
public void setUseDate (Timestamp UseDate);
/** Get UseDate */
public Timestamp getUseDate();
/** Column name UseUnits */
public static final String COLUMNNAME_UseUnits = "UseUnits";
/** Set Use units.
* Currently used units of the assets
*/
public void setUseUnits (int UseUnits);
/** Get Use units.
* Currently used units of the assets
*/
public int getUseUnits();
}

View File

@ -0,0 +1,124 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation
{
/** TableName=A_Depreciation */
public static final String Table_Name = "A_Depreciation";
/** AD_Table_ID=53112 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_ID */
public static final String COLUMNNAME_A_Depreciation_ID = "A_Depreciation_ID";
/** Set A_Depreciation_ID */
public void setA_Depreciation_ID (int A_Depreciation_ID);
/** Get A_Depreciation_ID */
public int getA_Depreciation_ID();
/** Column name DepreciationType */
public static final String COLUMNNAME_DepreciationType = "DepreciationType";
/** Set DepreciationType */
public void setDepreciationType (String DepreciationType);
/** Get DepreciationType */
public String getDepreciationType();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Text */
public static final String COLUMNNAME_Text = "Text";
/** Set Text */
public void setText (String Text);
/** Get Text */
public String getText();
}

View File

@ -0,0 +1,173 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Build
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Build
{
/** TableName=A_Depreciation_Build */
public static final String Table_Name = "A_Depreciation_Build";
/** AD_Table_ID=53129 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Build_ID */
public static final String COLUMNNAME_A_Depreciation_Build_ID = "A_Depreciation_Build_ID";
/** Set A_Depreciation_Build_ID */
public void setA_Depreciation_Build_ID (int A_Depreciation_Build_ID);
/** Get A_Depreciation_Build_ID */
public int getA_Depreciation_Build_ID();
/** Column name A_End_Asset_ID */
public static final String COLUMNNAME_A_End_Asset_ID = "A_End_Asset_ID";
/** Set A_End_Asset_ID */
public void setA_End_Asset_ID (int A_End_Asset_ID);
/** Get A_End_Asset_ID */
public int getA_End_Asset_ID();
/** Column name A_Start_Asset_ID */
public static final String COLUMNNAME_A_Start_Asset_ID = "A_Start_Asset_ID";
/** Set A_Start_Asset_ID */
public void setA_Start_Asset_ID (int A_Start_Asset_ID);
/** Get A_Start_Asset_ID */
public int getA_Start_Asset_ID();
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name DateDoc */
public static final String COLUMNNAME_DateDoc = "DateDoc";
/** Set Document Date.
* Date of the Document
*/
public void setDateDoc (Timestamp DateDoc);
/** Get Document Date.
* Date of the Document
*/
public Timestamp getDateDoc();
/** Column name PeriodNo */
public static final String COLUMNNAME_PeriodNo = "PeriodNo";
/** Set Period No.
* Unique Period Number
*/
public void setPeriodNo (int PeriodNo);
/** Get Period No.
* Unique Period Number
*/
public int getPeriodNo();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,124 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Convention
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Convention
{
/** TableName=A_Depreciation_Convention */
public static final String Table_Name = "A_Depreciation_Convention";
/** AD_Table_ID=53125 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Convention_ID */
public static final String COLUMNNAME_A_Depreciation_Convention_ID = "A_Depreciation_Convention_ID";
/** Set A_Depreciation_Convention_ID */
public void setA_Depreciation_Convention_ID (int A_Depreciation_Convention_ID);
/** Get A_Depreciation_Convention_ID */
public int getA_Depreciation_Convention_ID();
/** Column name ConventionType */
public static final String COLUMNNAME_ConventionType = "ConventionType";
/** Set ConventionType */
public void setConventionType (String ConventionType);
/** Get ConventionType */
public String getConventionType();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Textmsg */
public static final String COLUMNNAME_Textmsg = "Textmsg";
/** Set Textmsg */
public void setTextmsg (String Textmsg);
/** Get Textmsg */
public String getTextmsg();
}

View File

@ -0,0 +1,237 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Entry
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Entry
{
/** TableName=A_Depreciation_Entry */
public static final String Table_Name = "A_Depreciation_Entry";
/** AD_Table_ID=53121 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Entry_ID */
public static final String COLUMNNAME_A_Depreciation_Entry_ID = "A_Depreciation_Entry_ID";
/** Set A_Depreciation_Entry_ID */
public void setA_Depreciation_Entry_ID (int A_Depreciation_Entry_ID);
/** Get A_Depreciation_Entry_ID */
public int getA_Depreciation_Entry_ID();
/** Column name A_Entry_Type */
public static final String COLUMNNAME_A_Entry_Type = "A_Entry_Type";
/** Set A_Entry_Type */
public void setA_Entry_Type (String A_Entry_Type);
/** Get A_Entry_Type */
public String getA_Entry_Type();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name C_Currency_ID */
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
/** Set Currency.
* The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID);
/** Get Currency.
* The Currency for this record
*/
public int getC_Currency_ID();
public I_C_Currency getC_Currency() throws Exception;
/** Column name C_DocType_ID */
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
/** Set Document Type.
* Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID);
/** Get Document Type.
* Document type or rules
*/
public int getC_DocType_ID();
public I_C_DocType getC_DocType() throws Exception;
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name DateDoc */
public static final String COLUMNNAME_DateDoc = "DateDoc";
/** Set Document Date.
* Date of the Document
*/
public void setDateDoc (Timestamp DateDoc);
/** Get Document Date.
* Date of the Document
*/
public Timestamp getDateDoc();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name DocumentNo */
public static final String COLUMNNAME_DocumentNo = "DocumentNo";
/** Set Document No.
* Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo);
/** Get Document No.
* Document sequence number of the document
*/
public String getDocumentNo();
/** Column name GL_Category_ID */
public static final String COLUMNNAME_GL_Category_ID = "GL_Category_ID";
/** Set GL Category.
* General Ledger Category
*/
public void setGL_Category_ID (int GL_Category_ID);
/** Get GL Category.
* General Ledger Category
*/
public int getGL_Category_ID();
public I_GL_Category getGL_Category() throws Exception;
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,182 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Exp
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Exp
{
/** TableName=A_Depreciation_Exp */
public static final String Table_Name = "A_Depreciation_Exp";
/** AD_Table_ID=53115 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Account_Number */
public static final String COLUMNNAME_A_Account_Number = "A_Account_Number";
/** Set A_Account_Number */
public void setA_Account_Number (int A_Account_Number);
/** Get A_Account_Number */
public int getA_Account_Number();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Depreciation_Exp_ID */
public static final String COLUMNNAME_A_Depreciation_Exp_ID = "A_Depreciation_Exp_ID";
/** Set A_Depreciation_Exp_ID */
public void setA_Depreciation_Exp_ID (int A_Depreciation_Exp_ID);
/** Get A_Depreciation_Exp_ID */
public int getA_Depreciation_Exp_ID();
/** Column name A_Entry_Type */
public static final String COLUMNNAME_A_Entry_Type = "A_Entry_Type";
/** Set A_Entry_Type */
public void setA_Entry_Type (String A_Entry_Type);
/** Get A_Entry_Type */
public String getA_Entry_Type();
/** Column name A_Period */
public static final String COLUMNNAME_A_Period = "A_Period";
/** Set A_Period */
public void setA_Period (int A_Period);
/** Get A_Period */
public int getA_Period();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name Expense */
public static final String COLUMNNAME_Expense = "Expense";
/** Set Expense */
public void setExpense (BigDecimal Expense);
/** Get Expense */
public BigDecimal getExpense();
/** Column name IsDepreciated */
public static final String COLUMNNAME_IsDepreciated = "IsDepreciated";
/** Set Depreciate.
* The asset will be depreciated
*/
public void setIsDepreciated (boolean IsDepreciated);
/** Get Depreciate.
* The asset will be depreciated
*/
public boolean isDepreciated();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
}

View File

@ -0,0 +1,134 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Forecast
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Forecast
{
/** TableName=A_Depreciation_Forecast */
public static final String Table_Name = "A_Depreciation_Forecast";
/** AD_Table_ID=53118 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Forecast_ID */
public static final String COLUMNNAME_A_Depreciation_Forecast_ID = "A_Depreciation_Forecast_ID";
/** Set A_Depreciation_Forecast_ID */
public void setA_Depreciation_Forecast_ID (int A_Depreciation_Forecast_ID);
/** Get A_Depreciation_Forecast_ID */
public int getA_Depreciation_Forecast_ID();
/** Column name A_End_Asset_ID */
public static final String COLUMNNAME_A_End_Asset_ID = "A_End_Asset_ID";
/** Set A_End_Asset_ID */
public void setA_End_Asset_ID (int A_End_Asset_ID);
/** Get A_End_Asset_ID */
public int getA_End_Asset_ID();
/** Column name A_Start_Asset_ID */
public static final String COLUMNNAME_A_Start_Asset_ID = "A_Start_Asset_ID";
/** Set A_Start_Asset_ID */
public void setA_Start_Asset_ID (int A_Start_Asset_ID);
/** Get A_Start_Asset_ID */
public int getA_Start_Asset_ID();
/** Column name DateDoc */
public static final String COLUMNNAME_DateDoc = "DateDoc";
/** Set Document Date.
* Date of the Document
*/
public void setDateDoc (Timestamp DateDoc);
/** Get Document Date.
* Date of the Document
*/
public Timestamp getDateDoc();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -0,0 +1,124 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Method
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Method
{
/** TableName=A_Depreciation_Method */
public static final String Table_Name = "A_Depreciation_Method";
/** AD_Table_ID=53124 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Method_ID */
public static final String COLUMNNAME_A_Depreciation_Method_ID = "A_Depreciation_Method_ID";
/** Set A_Depreciation_Method_ID */
public void setA_Depreciation_Method_ID (int A_Depreciation_Method_ID);
/** Get A_Depreciation_Method_ID */
public int getA_Depreciation_Method_ID();
/** Column name DepreciationType */
public static final String COLUMNNAME_DepreciationType = "DepreciationType";
/** Set DepreciationType */
public void setDepreciationType (String DepreciationType);
/** Get DepreciationType */
public String getDepreciationType();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Text */
public static final String COLUMNNAME_Text = "Text";
/** Set Text */
public void setText (String Text);
/** Get Text */
public String getText();
}

View File

@ -0,0 +1,116 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Table_Detail
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Table_Detail
{
/** TableName=A_Depreciation_Table_Detail */
public static final String Table_Name = "A_Depreciation_Table_Detail";
/** AD_Table_ID=53113 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Rate */
public static final String COLUMNNAME_A_Depreciation_Rate = "A_Depreciation_Rate";
/** Set A_Depreciation_Rate */
public void setA_Depreciation_Rate (BigDecimal A_Depreciation_Rate);
/** Get A_Depreciation_Rate */
public BigDecimal getA_Depreciation_Rate();
/** Column name A_Depreciation_Table_Code */
public static final String COLUMNNAME_A_Depreciation_Table_Code = "A_Depreciation_Table_Code";
/** Set A_Depreciation_Table_Code */
public void setA_Depreciation_Table_Code (String A_Depreciation_Table_Code);
/** Get A_Depreciation_Table_Code */
public String getA_Depreciation_Table_Code();
/** Column name A_Depreciation_Table_Detail_ID */
public static final String COLUMNNAME_A_Depreciation_Table_Detail_ID = "A_Depreciation_Table_Detail_ID";
/** Set A_Depreciation_Table_Detail_ID */
public void setA_Depreciation_Table_Detail_ID (int A_Depreciation_Table_Detail_ID);
/** Get A_Depreciation_Table_Detail_ID */
public int getA_Depreciation_Table_Detail_ID();
/** Column name A_Period */
public static final String COLUMNNAME_A_Period = "A_Period";
/** Set A_Period */
public void setA_Period (int A_Period);
/** Get A_Period */
public int getA_Period();
/** Column name A_Table_Rate_Type */
public static final String COLUMNNAME_A_Table_Rate_Type = "A_Table_Rate_Type";
/** Set A_Table_Rate_Type */
public void setA_Table_Rate_Type (String A_Table_Rate_Type);
/** Get A_Table_Rate_Type */
public String getA_Table_Rate_Type();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
}

View File

@ -0,0 +1,120 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Table_Header
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Table_Header
{
/** TableName=A_Depreciation_Table_Header */
public static final String Table_Name = "A_Depreciation_Table_Header";
/** AD_Table_ID=53114 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Depreciation_Table_Code */
public static final String COLUMNNAME_A_Depreciation_Table_Code = "A_Depreciation_Table_Code";
/** Set A_Depreciation_Table_Code */
public void setA_Depreciation_Table_Code (String A_Depreciation_Table_Code);
/** Get A_Depreciation_Table_Code */
public String getA_Depreciation_Table_Code();
/** Column name A_Depreciation_Table_Header_ID */
public static final String COLUMNNAME_A_Depreciation_Table_Header_ID = "A_Depreciation_Table_Header_ID";
/** Set A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID);
/** Get A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID();
/** Column name A_Table_Rate_Type */
public static final String COLUMNNAME_A_Table_Rate_Type = "A_Table_Rate_Type";
/** Set A_Table_Rate_Type */
public void setA_Table_Rate_Type (String A_Table_Rate_Type);
/** Get A_Table_Rate_Type */
public String getA_Table_Rate_Type();
/** Column name A_Term */
public static final String COLUMNNAME_A_Term = "A_Term";
/** Set A_Term */
public void setA_Term (String A_Term);
/** Get A_Term */
public String getA_Term();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
}

View File

@ -0,0 +1,268 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for A_Depreciation_Workfile
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_A_Depreciation_Workfile
{
/** TableName=A_Depreciation_Workfile */
public static final String Table_Name = "A_Depreciation_Workfile";
/** AD_Table_ID=53116 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name A_Accumulated_Depr */
public static final String COLUMNNAME_A_Accumulated_Depr = "A_Accumulated_Depr";
/** Set A_Accumulated_Depr */
public void setA_Accumulated_Depr (BigDecimal A_Accumulated_Depr);
/** Get A_Accumulated_Depr */
public BigDecimal getA_Accumulated_Depr();
/** Column name A_Asset_Cost */
public static final String COLUMNNAME_A_Asset_Cost = "A_Asset_Cost";
/** Set A_Asset_Cost */
public void setA_Asset_Cost (BigDecimal A_Asset_Cost);
/** Get A_Asset_Cost */
public BigDecimal getA_Asset_Cost();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Life_Current_Year */
public static final String COLUMNNAME_A_Asset_Life_Current_Year = "A_Asset_Life_Current_Year";
/** Set A_Asset_Life_Current_Year */
public void setA_Asset_Life_Current_Year (BigDecimal A_Asset_Life_Current_Year);
/** Get A_Asset_Life_Current_Year */
public BigDecimal getA_Asset_Life_Current_Year();
/** Column name A_Asset_Life_Years */
public static final String COLUMNNAME_A_Asset_Life_Years = "A_Asset_Life_Years";
/** Set A_Asset_Life_Years */
public void setA_Asset_Life_Years (int A_Asset_Life_Years);
/** Get A_Asset_Life_Years */
public int getA_Asset_Life_Years();
/** Column name A_Base_Amount */
public static final String COLUMNNAME_A_Base_Amount = "A_Base_Amount";
/** Set A_Base_Amount */
public void setA_Base_Amount (BigDecimal A_Base_Amount);
/** Get A_Base_Amount */
public BigDecimal getA_Base_Amount();
/** Column name A_Calc_Accumulated_Depr */
public static final String COLUMNNAME_A_Calc_Accumulated_Depr = "A_Calc_Accumulated_Depr";
/** Set A_Calc_Accumulated_Depr */
public void setA_Calc_Accumulated_Depr (BigDecimal A_Calc_Accumulated_Depr);
/** Get A_Calc_Accumulated_Depr */
public BigDecimal getA_Calc_Accumulated_Depr();
/** Column name A_Curr_Dep_Exp */
public static final String COLUMNNAME_A_Curr_Dep_Exp = "A_Curr_Dep_Exp";
/** Set A_Curr_Dep_Exp */
public void setA_Curr_Dep_Exp (BigDecimal A_Curr_Dep_Exp);
/** Get A_Curr_Dep_Exp */
public BigDecimal getA_Curr_Dep_Exp();
/** Column name A_Current_Period */
public static final String COLUMNNAME_A_Current_Period = "A_Current_Period";
/** Set A_Current_Period */
public void setA_Current_Period (int A_Current_Period);
/** Get A_Current_Period */
public int getA_Current_Period();
/** Column name A_Depreciation_Workfile_ID */
public static final String COLUMNNAME_A_Depreciation_Workfile_ID = "A_Depreciation_Workfile_ID";
/** Set A_Depreciation_Workfile_ID */
public void setA_Depreciation_Workfile_ID (int A_Depreciation_Workfile_ID);
/** Get A_Depreciation_Workfile_ID */
public int getA_Depreciation_Workfile_ID();
/** Column name A_Life_Period */
public static final String COLUMNNAME_A_Life_Period = "A_Life_Period";
/** Set A_Life_Period */
public void setA_Life_Period (int A_Life_Period);
/** Get A_Life_Period */
public int getA_Life_Period();
/** Column name A_Period_Forecast */
public static final String COLUMNNAME_A_Period_Forecast = "A_Period_Forecast";
/** Set A_Period_Forecast */
public void setA_Period_Forecast (BigDecimal A_Period_Forecast);
/** Get A_Period_Forecast */
public BigDecimal getA_Period_Forecast();
/** Column name A_Period_Posted */
public static final String COLUMNNAME_A_Period_Posted = "A_Period_Posted";
/** Set A_Period_Posted */
public void setA_Period_Posted (int A_Period_Posted);
/** Get A_Period_Posted */
public int getA_Period_Posted();
/** Column name A_Prior_Year_Accumulated_Depr */
public static final String COLUMNNAME_A_Prior_Year_Accumulated_Depr = "A_Prior_Year_Accumulated_Depr";
/** Set A_Prior_Year_Accumulated_Depr */
public void setA_Prior_Year_Accumulated_Depr (BigDecimal A_Prior_Year_Accumulated_Depr);
/** Get A_Prior_Year_Accumulated_Depr */
public BigDecimal getA_Prior_Year_Accumulated_Depr();
/** Column name A_QTY_Current */
public static final String COLUMNNAME_A_QTY_Current = "A_QTY_Current";
/** Set A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current);
/** Get A_QTY_Current */
public BigDecimal getA_QTY_Current();
/** Column name A_Salvage_Value */
public static final String COLUMNNAME_A_Salvage_Value = "A_Salvage_Value";
/** Set A_Salvage_Value */
public void setA_Salvage_Value (BigDecimal A_Salvage_Value);
/** Get A_Salvage_Value */
public BigDecimal getA_Salvage_Value();
/** Column name AssetDepreciationDate */
public static final String COLUMNNAME_AssetDepreciationDate = "AssetDepreciationDate";
/** Set Asset Depreciation Date.
* Date of last depreciation
*/
public void setAssetDepreciationDate (Timestamp AssetDepreciationDate);
/** Get Asset Depreciation Date.
* Date of last depreciation
*/
public Timestamp getAssetDepreciationDate();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name IsDepreciated */
public static final String COLUMNNAME_IsDepreciated = "IsDepreciated";
/** Set Depreciate.
* The asset will be depreciated
*/
public void setIsDepreciated (boolean IsDepreciated);
/** Get Depreciate.
* The asset will be depreciated
*/
public boolean isDepreciated();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
}

View File

@ -70,6 +70,21 @@ public interface I_C_InvoiceLine
*/ */
public int getAD_OrgTrx_ID(); public int getAD_OrgTrx_ID();
/** Column name A_Asset_Group_ID */
public static final String COLUMNNAME_A_Asset_Group_ID = "A_Asset_Group_ID";
/** Set Asset Group.
* Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID);
/** Get Asset Group.
* Group of Assets
*/
public int getA_Asset_Group_ID();
public I_A_Asset_Group getA_Asset_Group() throws Exception;
/** Column name A_Asset_ID */ /** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID"; public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
@ -85,6 +100,33 @@ public interface I_C_InvoiceLine
public I_A_Asset getA_Asset() throws Exception; public I_A_Asset getA_Asset() throws Exception;
/** Column name A_CapvsExp */
public static final String COLUMNNAME_A_CapvsExp = "A_CapvsExp";
/** Set A_CapvsExp */
public void setA_CapvsExp (String A_CapvsExp);
/** Get A_CapvsExp */
public String getA_CapvsExp();
/** Column name A_CreateAsset */
public static final String COLUMNNAME_A_CreateAsset = "A_CreateAsset";
/** Set A_CreateAsset */
public void setA_CreateAsset (boolean A_CreateAsset);
/** Get A_CreateAsset */
public boolean isA_CreateAsset();
/** Column name A_Processed */
public static final String COLUMNNAME_A_Processed = "A_Processed";
/** Set A_Processed */
public void setA_Processed (boolean A_Processed);
/** Get A_Processed */
public boolean isA_Processed();
/** Column name C_Activity_ID */ /** 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";

View File

@ -57,6 +57,52 @@ public interface I_GL_JournalLine
/** Load Meta Data */ /** Load Meta Data */
/** Column name A_Asset_Group_ID */
public static final String COLUMNNAME_A_Asset_Group_ID = "A_Asset_Group_ID";
/** Set Asset Group.
* Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID);
/** Get Asset Group.
* Group of Assets
*/
public int getA_Asset_Group_ID();
public I_A_Asset_Group getA_Asset_Group() throws Exception;
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_CreateAsset */
public static final String COLUMNNAME_A_CreateAsset = "A_CreateAsset";
/** Set A_CreateAsset */
public void setA_CreateAsset (boolean A_CreateAsset);
/** Get A_CreateAsset */
public boolean isA_CreateAsset();
/** Column name A_Processed */
public static final String COLUMNNAME_A_Processed = "A_Processed";
/** Set A_Processed */
public void setA_Processed (boolean A_Processed);
/** Get A_Processed */
public boolean isA_Processed();
/** Column name AmtAcctCr */ /** Column name AmtAcctCr */
public static final String COLUMNNAME_AmtAcctCr = "AmtAcctCr"; public static final String COLUMNNAME_AmtAcctCr = "AmtAcctCr";

View File

@ -0,0 +1,888 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for I_Asset
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_I_Asset
{
/** TableName=I_Asset */
public static final String Table_Name = "I_Asset";
/** AD_Table_ID=53139 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name 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
*/
public void setAD_User_ID (int AD_User_ID);
/** Get User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID();
/** Column name A_Accumdepreciation_Acct */
public static final String COLUMNNAME_A_Accumdepreciation_Acct = "A_Accumdepreciation_Acct";
/** Set A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct);
/** Get A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct();
/** Column name A_Accumulated_Depr */
public static final String COLUMNNAME_A_Accumulated_Depr = "A_Accumulated_Depr";
/** Set A_Accumulated_Depr */
public void setA_Accumulated_Depr (BigDecimal A_Accumulated_Depr);
/** Get A_Accumulated_Depr */
public BigDecimal getA_Accumulated_Depr();
/** Column name A_Asset_Acct */
public static final String COLUMNNAME_A_Asset_Acct = "A_Asset_Acct";
/** Set A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct);
/** Get A_Asset_Acct */
public int getA_Asset_Acct();
/** Column name A_Asset_Cost */
public static final String COLUMNNAME_A_Asset_Cost = "A_Asset_Cost";
/** Set A_Asset_Cost */
public void setA_Asset_Cost (BigDecimal A_Asset_Cost);
/** Get A_Asset_Cost */
public BigDecimal getA_Asset_Cost();
/** Column name A_Asset_Group_ID */
public static final String COLUMNNAME_A_Asset_Group_ID = "A_Asset_Group_ID";
/** Set Asset Group.
* Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID);
/** Get Asset Group.
* Group of Assets
*/
public int getA_Asset_Group_ID();
public I_A_Asset_Group getA_Asset_Group() throws Exception;
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Asset_Life_Current_Year */
public static final String COLUMNNAME_A_Asset_Life_Current_Year = "A_Asset_Life_Current_Year";
/** Set A_Asset_Life_Current_Year */
public void setA_Asset_Life_Current_Year (int A_Asset_Life_Current_Year);
/** Get A_Asset_Life_Current_Year */
public int getA_Asset_Life_Current_Year();
/** Column name A_Asset_Life_Years */
public static final String COLUMNNAME_A_Asset_Life_Years = "A_Asset_Life_Years";
/** Set A_Asset_Life_Years */
public void setA_Asset_Life_Years (int A_Asset_Life_Years);
/** Get A_Asset_Life_Years */
public int getA_Asset_Life_Years();
/** Column name A_Asset_Spread_Type */
public static final String COLUMNNAME_A_Asset_Spread_Type = "A_Asset_Spread_Type";
/** Set A_Asset_Spread_Type */
public void setA_Asset_Spread_Type (int A_Asset_Spread_Type);
/** Get A_Asset_Spread_Type */
public int getA_Asset_Spread_Type();
/** Column name A_Base_Amount */
public static final String COLUMNNAME_A_Base_Amount = "A_Base_Amount";
/** Set A_Base_Amount */
public void setA_Base_Amount (BigDecimal A_Base_Amount);
/** Get A_Base_Amount */
public BigDecimal getA_Base_Amount();
/** Column name A_Calc_Accumulated_Depr */
public static final String COLUMNNAME_A_Calc_Accumulated_Depr = "A_Calc_Accumulated_Depr";
/** Set A_Calc_Accumulated_Depr */
public void setA_Calc_Accumulated_Depr (BigDecimal A_Calc_Accumulated_Depr);
/** Get A_Calc_Accumulated_Depr */
public BigDecimal getA_Calc_Accumulated_Depr();
/** Column name A_Curr_Dep_Exp */
public static final String COLUMNNAME_A_Curr_Dep_Exp = "A_Curr_Dep_Exp";
/** Set A_Curr_Dep_Exp */
public void setA_Curr_Dep_Exp (BigDecimal A_Curr_Dep_Exp);
/** Get A_Curr_Dep_Exp */
public BigDecimal getA_Curr_Dep_Exp();
/** Column name A_Current_Period */
public static final String COLUMNNAME_A_Current_Period = "A_Current_Period";
/** Set A_Current_Period */
public void setA_Current_Period (int A_Current_Period);
/** Get A_Current_Period */
public int getA_Current_Period();
/** Column name A_Depreciation_Acct */
public static final String COLUMNNAME_A_Depreciation_Acct = "A_Depreciation_Acct";
/** Set A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct);
/** Get A_Depreciation_Acct */
public int getA_Depreciation_Acct();
/** Column name A_Depreciation_Calc_Type */
public static final String COLUMNNAME_A_Depreciation_Calc_Type = "A_Depreciation_Calc_Type";
/** Set A_Depreciation_Calc_Type */
public void setA_Depreciation_Calc_Type (int A_Depreciation_Calc_Type);
/** Get A_Depreciation_Calc_Type */
public int getA_Depreciation_Calc_Type();
/** Column name A_Depreciation_Manual_Amount */
public static final String COLUMNNAME_A_Depreciation_Manual_Amount = "A_Depreciation_Manual_Amount";
/** Set A_Depreciation_Manual_Amount */
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount);
/** Get A_Depreciation_Manual_Amount */
public BigDecimal getA_Depreciation_Manual_Amount();
/** Column name A_Depreciation_Manual_Period */
public static final String COLUMNNAME_A_Depreciation_Manual_Period = "A_Depreciation_Manual_Period";
/** Set A_Depreciation_Manual_Period */
public void setA_Depreciation_Manual_Period (String A_Depreciation_Manual_Period);
/** Get A_Depreciation_Manual_Period */
public String getA_Depreciation_Manual_Period();
/** Column name A_Depreciation_Table_Header_ID */
public static final String COLUMNNAME_A_Depreciation_Table_Header_ID = "A_Depreciation_Table_Header_ID";
/** Set A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID);
/** Get A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID();
/** Column name A_Depreciation_Variable_Perc */
public static final String COLUMNNAME_A_Depreciation_Variable_Perc = "A_Depreciation_Variable_Perc";
/** Set A_Depreciation_Variable_Perc */
public void setA_Depreciation_Variable_Perc (BigDecimal A_Depreciation_Variable_Perc);
/** Get A_Depreciation_Variable_Perc */
public BigDecimal getA_Depreciation_Variable_Perc();
/** Column name A_Disposal_Loss */
public static final String COLUMNNAME_A_Disposal_Loss = "A_Disposal_Loss";
/** Set A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss);
/** Get A_Disposal_Loss */
public int getA_Disposal_Loss();
/** Column name A_Disposal_Revenue */
public static final String COLUMNNAME_A_Disposal_Revenue = "A_Disposal_Revenue";
/** Set A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue);
/** Get A_Disposal_Revenue */
public int getA_Disposal_Revenue();
/** Column name A_Life_Period */
public static final String COLUMNNAME_A_Life_Period = "A_Life_Period";
/** Set A_Life_Period */
public void setA_Life_Period (int A_Life_Period);
/** Get A_Life_Period */
public int getA_Life_Period();
/** Column name A_Parent_Asset_ID */
public static final String COLUMNNAME_A_Parent_Asset_ID = "A_Parent_Asset_ID";
/** Set A_Parent_Asset_ID */
public void setA_Parent_Asset_ID (int A_Parent_Asset_ID);
/** Get A_Parent_Asset_ID */
public int getA_Parent_Asset_ID();
/** Column name A_Period_End */
public static final String COLUMNNAME_A_Period_End = "A_Period_End";
/** Set A_Period_End */
public void setA_Period_End (int A_Period_End);
/** Get A_Period_End */
public int getA_Period_End();
/** Column name A_Period_Posted */
public static final String COLUMNNAME_A_Period_Posted = "A_Period_Posted";
/** Set A_Period_Posted */
public void setA_Period_Posted (int A_Period_Posted);
/** Get A_Period_Posted */
public int getA_Period_Posted();
/** Column name A_Period_Start */
public static final String COLUMNNAME_A_Period_Start = "A_Period_Start";
/** Set A_Period_Start */
public void setA_Period_Start (int A_Period_Start);
/** Get A_Period_Start */
public int getA_Period_Start();
/** Column name A_Prior_Year_Accumulated_Depr */
public static final String COLUMNNAME_A_Prior_Year_Accumulated_Depr = "A_Prior_Year_Accumulated_Depr";
/** Set A_Prior_Year_Accumulated_Depr */
public void setA_Prior_Year_Accumulated_Depr (BigDecimal A_Prior_Year_Accumulated_Depr);
/** Get A_Prior_Year_Accumulated_Depr */
public BigDecimal getA_Prior_Year_Accumulated_Depr();
/** Column name A_QTY_Current */
public static final String COLUMNNAME_A_QTY_Current = "A_QTY_Current";
/** Set A_QTY_Current */
public void setA_QTY_Current (int A_QTY_Current);
/** Get A_QTY_Current */
public int getA_QTY_Current();
/** Column name A_QTY_Original */
public static final String COLUMNNAME_A_QTY_Original = "A_QTY_Original";
/** Set A_QTY_Original */
public void setA_QTY_Original (int A_QTY_Original);
/** Get A_QTY_Original */
public int getA_QTY_Original();
/** Column name A_Reval_Accumdep_Offset_Cur */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Cur = "A_Reval_Accumdep_Offset_Cur";
/** Set A_Reval_Accumdep_Offset_Cur */
public void setA_Reval_Accumdep_Offset_Cur (int A_Reval_Accumdep_Offset_Cur);
/** Get A_Reval_Accumdep_Offset_Cur */
public int getA_Reval_Accumdep_Offset_Cur();
/** Column name A_Reval_Accumdep_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Accumdep_Offset_Prior = "A_Reval_Accumdep_Offset_Prior";
/** Set A_Reval_Accumdep_Offset_Prior */
public void setA_Reval_Accumdep_Offset_Prior (int A_Reval_Accumdep_Offset_Prior);
/** Get A_Reval_Accumdep_Offset_Prior */
public int getA_Reval_Accumdep_Offset_Prior();
/** Column name A_Reval_Cal_Method */
public static final String COLUMNNAME_A_Reval_Cal_Method = "A_Reval_Cal_Method";
/** Set A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method);
/** Get A_Reval_Cal_Method */
public String getA_Reval_Cal_Method();
/** Column name A_Reval_Cost_Offset */
public static final String COLUMNNAME_A_Reval_Cost_Offset = "A_Reval_Cost_Offset";
/** Set A_Reval_Cost_Offset */
public void setA_Reval_Cost_Offset (int A_Reval_Cost_Offset);
/** Get A_Reval_Cost_Offset */
public int getA_Reval_Cost_Offset();
/** Column name A_Reval_Cost_Offset_Prior */
public static final String COLUMNNAME_A_Reval_Cost_Offset_Prior = "A_Reval_Cost_Offset_Prior";
/** Set A_Reval_Cost_Offset_Prior */
public void setA_Reval_Cost_Offset_Prior (int A_Reval_Cost_Offset_Prior);
/** Get A_Reval_Cost_Offset_Prior */
public int getA_Reval_Cost_Offset_Prior();
/** Column name A_Reval_Depexp_Offset */
public static final String COLUMNNAME_A_Reval_Depexp_Offset = "A_Reval_Depexp_Offset";
/** Set A_Reval_Depexp_Offset */
public void setA_Reval_Depexp_Offset (int A_Reval_Depexp_Offset);
/** Get A_Reval_Depexp_Offset */
public int getA_Reval_Depexp_Offset();
/** Column name A_Salvage_Value */
public static final String COLUMNNAME_A_Salvage_Value = "A_Salvage_Value";
/** Set A_Salvage_Value */
public void setA_Salvage_Value (BigDecimal A_Salvage_Value);
/** Get A_Salvage_Value */
public BigDecimal getA_Salvage_Value();
/** Column name A_Split_Percent */
public static final String COLUMNNAME_A_Split_Percent = "A_Split_Percent";
/** Set A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent);
/** Get A_Split_Percent */
public BigDecimal getA_Split_Percent();
/** Column name AssetDepreciationDate */
public static final String COLUMNNAME_AssetDepreciationDate = "AssetDepreciationDate";
/** Set Asset Depreciation Date.
* Date of last depreciation
*/
public void setAssetDepreciationDate (Timestamp AssetDepreciationDate);
/** Get Asset Depreciation Date.
* Date of last depreciation
*/
public Timestamp getAssetDepreciationDate();
/** Column name AssetDisposalDate */
public static final String COLUMNNAME_AssetDisposalDate = "AssetDisposalDate";
/** Set Asset Disposal Date.
* Date when the asset is/was disposed
*/
public void setAssetDisposalDate (Timestamp AssetDisposalDate);
/** Get Asset Disposal Date.
* Date when the asset is/was disposed
*/
public Timestamp getAssetDisposalDate();
/** Column name AssetMarketValueAmt */
public static final String COLUMNNAME_AssetMarketValueAmt = "AssetMarketValueAmt";
/** Set Market value Amount.
* Market value of the asset
*/
public void setAssetMarketValueAmt (BigDecimal AssetMarketValueAmt);
/** Get Market value Amount.
* Market value of the asset
*/
public BigDecimal getAssetMarketValueAmt();
/** Column name AssetServiceDate */
public static final String COLUMNNAME_AssetServiceDate = "AssetServiceDate";
/** Set In Service Date.
* Date when Asset was put into service
*/
public void setAssetServiceDate (Timestamp AssetServiceDate);
/** Get In Service Date.
* Date when Asset was put into service
*/
public Timestamp getAssetServiceDate();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
/** Set Business Partner .
* Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID);
/** Get Business Partner .
* Identifies a Business Partner
*/
public int getC_BPartner_ID();
public I_C_BPartner getC_BPartner() throws Exception;
/** Column name 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
*/
public void setC_BPartner_Location_ID (int C_BPartner_Location_ID);
/** Get Partner Location.
* Identifies the (ship to) address for this Business Partner
*/
public int getC_BPartner_Location_ID();
public I_C_BPartner_Location getC_BPartner_Location() throws Exception;
/** Column name C_Location_ID */
public static final String COLUMNNAME_C_Location_ID = "C_Location_ID";
/** Set Address.
* Location or Address
*/
public void setC_Location_ID (int C_Location_ID);
/** Get Address.
* Location or Address
*/
public int getC_Location_ID();
public I_C_Location getC_Location() throws Exception;
/** Column name ConventionType */
public static final String COLUMNNAME_ConventionType = "ConventionType";
/** Set ConventionType */
public void setConventionType (int ConventionType);
/** Get ConventionType */
public int getConventionType();
/** Column name DepreciationType */
public static final String COLUMNNAME_DepreciationType = "DepreciationType";
/** Set DepreciationType */
public void setDepreciationType (int DepreciationType);
/** Get DepreciationType */
public int getDepreciationType();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name GuaranteeDate */
public static final String COLUMNNAME_GuaranteeDate = "GuaranteeDate";
/** Set Guarantee Date.
* Date when guarantee expires
*/
public void setGuaranteeDate (Timestamp GuaranteeDate);
/** Get Guarantee Date.
* Date when guarantee expires
*/
public Timestamp getGuaranteeDate();
/** Column name Help */
public static final String COLUMNNAME_Help = "Help";
/** Set Comment/Help.
* Comment or Hint
*/
public void setHelp (String Help);
/** Get Comment/Help.
* Comment or Hint
*/
public String getHelp();
/** Column name I_Asset_ID */
public static final String COLUMNNAME_I_Asset_ID = "I_Asset_ID";
/** Set I_Asset_ID */
public void setI_Asset_ID (int I_Asset_ID);
/** Get I_Asset_ID */
public int getI_Asset_ID();
/** Column name I_ErrorMsg */
public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg";
/** Set Import Error Message.
* Messages generated from import process
*/
public void setI_ErrorMsg (String I_ErrorMsg);
/** Get Import Error Message.
* Messages generated from import process
*/
public String getI_ErrorMsg();
/** Column name I_Isimported */
public static final String COLUMNNAME_I_Isimported = "I_Isimported";
/** Set I_Isimported */
public void setI_Isimported (boolean I_Isimported);
/** Get I_Isimported */
public boolean isI_Isimported();
/** Column name IsDepreciated */
public static final String COLUMNNAME_IsDepreciated = "IsDepreciated";
/** Set Depreciate.
* The asset will be depreciated
*/
public void setIsDepreciated (boolean IsDepreciated);
/** Get Depreciate.
* The asset will be depreciated
*/
public boolean isDepreciated();
/** Column name IsDisposed */
public static final String COLUMNNAME_IsDisposed = "IsDisposed";
/** Set Disposed.
* The asset is disposed
*/
public void setIsDisposed (boolean IsDisposed);
/** Get Disposed.
* The asset is disposed
*/
public boolean isDisposed();
/** Column name IsFullyDepreciated */
public static final String COLUMNNAME_IsFullyDepreciated = "IsFullyDepreciated";
/** Set Fully depreciated.
* The asset is fully depreciated
*/
public void setIsFullyDepreciated (boolean IsFullyDepreciated);
/** Get Fully depreciated.
* The asset is fully depreciated
*/
public boolean isFullyDepreciated();
/** Column name IsInPosession */
public static final String COLUMNNAME_IsInPosession = "IsInPosession";
/** Set In Possession.
* The asset is in the possession of the organization
*/
public void setIsInPosession (boolean IsInPosession);
/** Get In Possession.
* The asset is in the possession of the organization
*/
public boolean isInPosession();
/** Column name IsOwned */
public static final String COLUMNNAME_IsOwned = "IsOwned";
/** Set Owned.
* The asset is owned by the organization
*/
public void setIsOwned (boolean IsOwned);
/** Get Owned.
* The asset is owned by the organization
*/
public boolean isOwned();
/** Column name LifeUseUnits */
public static final String COLUMNNAME_LifeUseUnits = "LifeUseUnits";
/** Set Life use.
* Units of use until the asset is not usable anymore
*/
public void setLifeUseUnits (int LifeUseUnits);
/** Get Life use.
* Units of use until the asset is not usable anymore
*/
public int getLifeUseUnits();
/** Column name LocationComment */
public static final String COLUMNNAME_LocationComment = "LocationComment";
/** Set Location comment.
* Additional comments or remarks concerning the location
*/
public void setLocationComment (String LocationComment);
/** Get Location comment.
* Additional comments or remarks concerning the location
*/
public String getLocationComment();
/** Column name Lot */
public static final String COLUMNNAME_Lot = "Lot";
/** Set Lot No.
* Lot number (alphanumeric)
*/
public void setLot (String Lot);
/** Get Lot No.
* Lot number (alphanumeric)
*/
public String getLot();
/** Column name M_AttributeSetInstance_ID */
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
/** Set Attribute Set Instance.
* Product Attribute Set Instance
*/
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID);
/** Get Attribute Set Instance.
* Product Attribute Set Instance
*/
public int getM_AttributeSetInstance_ID();
/** Column name M_Locator_ID */
public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
/** Set Locator.
* Warehouse Locator
*/
public void setM_Locator_ID (int M_Locator_ID);
/** Get Locator.
* Warehouse Locator
*/
public int getM_Locator_ID();
public I_M_Locator getM_Locator() throws Exception;
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
/** Set Product.
* Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID);
/** Get Product.
* Product, Service, Item
*/
public int getM_Product_ID();
public I_M_Product getM_Product() throws Exception;
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";
/** Set Name.
* Alphanumeric identifier of the entity
*/
public void setName (String Name);
/** Get Name.
* Alphanumeric identifier of the entity
*/
public String getName();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
/** Column name SerNo */
public static final String COLUMNNAME_SerNo = "SerNo";
/** Set Serial No.
* Product Serial Number
*/
public void setSerNo (String SerNo);
/** Get Serial No.
* Product Serial Number
*/
public String getSerNo();
/** Column name UseLifeMonths */
public static final String COLUMNNAME_UseLifeMonths = "UseLifeMonths";
/** Set Usable Life - Months.
* Months of the usable life of the asset
*/
public void setUseLifeMonths (int UseLifeMonths);
/** Get Usable Life - Months.
* Months of the usable life of the asset
*/
public int getUseLifeMonths();
/** Column name UseLifeYears */
public static final String COLUMNNAME_UseLifeYears = "UseLifeYears";
/** Set Usable Life - Years.
* Years of the usable life of the asset
*/
public void setUseLifeYears (int UseLifeYears);
/** Get Usable Life - Years.
* Years of the usable life of the asset
*/
public int getUseLifeYears();
/** Column name UseUnits */
public static final String COLUMNNAME_UseUnits = "UseUnits";
/** Set Use units.
* Currently used units of the assets
*/
public void setUseUnits (int UseUnits);
/** Get Use units.
* Currently used units of the assets
*/
public int getUseUnits();
/** Column name Value */
public static final String COLUMNNAME_Value = "Value";
/** Set Search Key.
* Search key for the record in the format required - must be unique
*/
public void setValue (String Value);
/** Get Search Key.
* Search key for the record in the format required - must be unique
*/
public String getValue();
/** Column name VersionNo */
public static final String COLUMNNAME_VersionNo = "VersionNo";
/** Set Version No.
* Version Number
*/
public void setVersionNo (String VersionNo);
/** Get Version No.
* Version Number
*/
public String getVersionNo();
}

View File

@ -0,0 +1,909 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* 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;
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;
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;
if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for I_FAJournal
* @author Trifon Trifonov (generated)
* @version Release 3.5.1a
*/
public interface I_I_FAJournal
{
/** TableName=I_FAJournal */
public static final String Table_Name = "I_FAJournal";
/** AD_Table_ID=53117 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 7 - System - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(7);
/** Load Meta Data */
/** Column name AD_OrgDoc_ID */
public static final String COLUMNNAME_AD_OrgDoc_ID = "AD_OrgDoc_ID";
/** Set Document Org.
* Document Organization (independent from account organization)
*/
public void setAD_OrgDoc_ID (int AD_OrgDoc_ID);
/** Get Document Org.
* Document Organization (independent from account organization)
*/
public int getAD_OrgDoc_ID();
/** Column name AD_OrgTrx_ID */
public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID";
/** Set Trx Organization.
* Performing or initiating organization
*/
public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);
/** Get Trx Organization.
* Performing or initiating organization
*/
public int getAD_OrgTrx_ID();
/** Column name A_Asset_ID */
public static final String COLUMNNAME_A_Asset_ID = "A_Asset_ID";
/** Set Asset.
* Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID);
/** Get Asset.
* Asset used internally or by customers
*/
public int getA_Asset_ID();
/** Column name A_Entry_Type */
public static final String COLUMNNAME_A_Entry_Type = "A_Entry_Type";
/** Set A_Entry_Type */
public void setA_Entry_Type (String A_Entry_Type);
/** Get A_Entry_Type */
public String getA_Entry_Type();
/** Column name AccountValue */
public static final String COLUMNNAME_AccountValue = "AccountValue";
/** Set Account Key.
* Key of Account Element
*/
public void setAccountValue (String AccountValue);
/** Get Account Key.
* Key of Account Element
*/
public String getAccountValue();
/** Column name Account_ID */
public static final String COLUMNNAME_Account_ID = "Account_ID";
/** Set Account.
* Account used
*/
public void setAccount_ID (int Account_ID);
/** Get Account.
* Account used
*/
public int getAccount_ID();
/** Column name AcctSchemaName */
public static final String COLUMNNAME_AcctSchemaName = "AcctSchemaName";
/** Set Account Schema Name.
* Name of the Accounting Schema
*/
public void setAcctSchemaName (String AcctSchemaName);
/** Get Account Schema Name.
* Name of the Accounting Schema
*/
public String getAcctSchemaName();
/** Column name AmtAcctCr */
public static final String COLUMNNAME_AmtAcctCr = "AmtAcctCr";
/** Set Accounted Credit.
* Accounted Credit Amount
*/
public void setAmtAcctCr (BigDecimal AmtAcctCr);
/** Get Accounted Credit.
* Accounted Credit Amount
*/
public BigDecimal getAmtAcctCr();
/** Column name AmtAcctDr */
public static final String COLUMNNAME_AmtAcctDr = "AmtAcctDr";
/** Set Accounted Debit.
* Accounted Debit Amount
*/
public void setAmtAcctDr (BigDecimal AmtAcctDr);
/** Get Accounted Debit.
* Accounted Debit Amount
*/
public BigDecimal getAmtAcctDr();
/** Column name AmtSourceCr */
public static final String COLUMNNAME_AmtSourceCr = "AmtSourceCr";
/** Set Source Credit.
* Source Credit Amount
*/
public void setAmtSourceCr (BigDecimal AmtSourceCr);
/** Get Source Credit.
* Source Credit Amount
*/
public BigDecimal getAmtSourceCr();
/** Column name AmtSourceDr */
public static final String COLUMNNAME_AmtSourceDr = "AmtSourceDr";
/** Set Source Debit.
* Source Debit Amount
*/
public void setAmtSourceDr (BigDecimal AmtSourceDr);
/** Get Source Debit.
* Source Debit Amount
*/
public BigDecimal getAmtSourceDr();
/** Column name BPartnerValue */
public static final String COLUMNNAME_BPartnerValue = "BPartnerValue";
/** Set Business Partner Key.
* Key of the Business Partner
*/
public void setBPartnerValue (String BPartnerValue);
/** Get Business Partner Key.
* Key of the Business Partner
*/
public String getBPartnerValue();
/** Column name BatchDescription */
public static final String COLUMNNAME_BatchDescription = "BatchDescription";
/** Set Batch Description.
* Description of the Batch
*/
public void setBatchDescription (String BatchDescription);
/** Get Batch Description.
* Description of the Batch
*/
public String getBatchDescription();
/** Column name BatchDocumentNo */
public static final String COLUMNNAME_BatchDocumentNo = "BatchDocumentNo";
/** Set Batch Document No.
* Document Number of the Batch
*/
public void setBatchDocumentNo (String BatchDocumentNo);
/** Get Batch Document No.
* Document Number of the Batch
*/
public String getBatchDocumentNo();
/** Column name C_AcctSchema_ID */
public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID";
/** Set Accounting Schema.
* Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID);
/** Get Accounting Schema.
* Rules for accounting
*/
public int getC_AcctSchema_ID();
public I_C_AcctSchema getC_AcctSchema() throws Exception;
/** Column name C_Activity_ID */
public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
/** Set Activity.
* Business Activity
*/
public void setC_Activity_ID (int C_Activity_ID);
/** Get Activity.
* Business Activity
*/
public int getC_Activity_ID();
public I_C_Activity getC_Activity() throws Exception;
/** Column name C_BPartner_ID */
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
/** Set Business Partner .
* Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID);
/** Get Business Partner .
* Identifies a Business Partner
*/
public int getC_BPartner_ID();
public I_C_BPartner getC_BPartner() throws Exception;
/** Column name C_Campaign_ID */
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
/** Set Campaign.
* Marketing Campaign
*/
public void setC_Campaign_ID (int C_Campaign_ID);
/** Get Campaign.
* Marketing Campaign
*/
public int getC_Campaign_ID();
public I_C_Campaign getC_Campaign() throws Exception;
/** Column name C_ConversionType_ID */
public static final String COLUMNNAME_C_ConversionType_ID = "C_ConversionType_ID";
/** Set Currency Type.
* Currency Conversion Rate Type
*/
public void setC_ConversionType_ID (int C_ConversionType_ID);
/** Get Currency Type.
* Currency Conversion Rate Type
*/
public int getC_ConversionType_ID();
/** Column name C_Currency_ID */
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
/** Set Currency.
* The Currency for this record
*/
public void setC_Currency_ID (int C_Currency_ID);
/** Get Currency.
* The Currency for this record
*/
public int getC_Currency_ID();
public I_C_Currency getC_Currency() throws Exception;
/** Column name C_DocType_ID */
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
/** Set Document Type.
* Document type or rules
*/
public void setC_DocType_ID (int C_DocType_ID);
/** Get Document Type.
* Document type or rules
*/
public int getC_DocType_ID();
public I_C_DocType getC_DocType() throws Exception;
/** Column name C_LocFrom_ID */
public static final String COLUMNNAME_C_LocFrom_ID = "C_LocFrom_ID";
/** Set Location From.
* Location that inventory was moved from
*/
public void setC_LocFrom_ID (int C_LocFrom_ID);
/** Get Location From.
* Location that inventory was moved from
*/
public int getC_LocFrom_ID();
/** Column name C_LocTo_ID */
public static final String COLUMNNAME_C_LocTo_ID = "C_LocTo_ID";
/** Set Location To.
* Location that inventory was moved to
*/
public void setC_LocTo_ID (int C_LocTo_ID);
/** Get Location To.
* Location that inventory was moved to
*/
public int getC_LocTo_ID();
/** Column name C_Period_ID */
public static final String COLUMNNAME_C_Period_ID = "C_Period_ID";
/** Set Period.
* Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID);
/** Get Period.
* Period of the Calendar
*/
public int getC_Period_ID();
public I_C_Period getC_Period() throws Exception;
/** Column name C_Project_ID */
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
/** Set Project.
* Financial Project
*/
public void setC_Project_ID (int C_Project_ID);
/** Get Project.
* Financial Project
*/
public int getC_Project_ID();
public I_C_Project getC_Project() throws Exception;
/** Column name C_SalesRegion_ID */
public static final String COLUMNNAME_C_SalesRegion_ID = "C_SalesRegion_ID";
/** Set Sales Region.
* Sales coverage region
*/
public void setC_SalesRegion_ID (int C_SalesRegion_ID);
/** Get Sales Region.
* Sales coverage region
*/
public int getC_SalesRegion_ID();
public I_C_SalesRegion getC_SalesRegion() throws Exception;
/** Column name C_SubAcct_ID */
public static final String COLUMNNAME_C_SubAcct_ID = "C_SubAcct_ID";
/** Set Sub Account.
* Sub account for Element Value
*/
public void setC_SubAcct_ID (int C_SubAcct_ID);
/** Get Sub Account.
* Sub account for Element Value
*/
public int getC_SubAcct_ID();
/** Column name C_UOM_ID */
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
/** Set UOM.
* Unit of Measure
*/
public void setC_UOM_ID (int C_UOM_ID);
/** Get UOM.
* Unit of Measure
*/
public int getC_UOM_ID();
public I_C_UOM getC_UOM() throws Exception;
/** Column name C_ValidCombination_ID */
public static final String COLUMNNAME_C_ValidCombination_ID = "C_ValidCombination_ID";
/** Set Combination.
* Valid Account Combination
*/
public void setC_ValidCombination_ID (int C_ValidCombination_ID);
/** Get Combination.
* Valid Account Combination
*/
public int getC_ValidCombination_ID();
public I_C_ValidCombination getC_ValidCombination() throws Exception;
/** Column name CategoryName */
public static final String COLUMNNAME_CategoryName = "CategoryName";
/** Set Category Name.
* Name of the Category
*/
public void setCategoryName (String CategoryName);
/** Get Category Name.
* Name of the Category
*/
public String getCategoryName();
/** Column name ClientValue */
public static final String COLUMNNAME_ClientValue = "ClientValue";
/** Set Client Key.
* Key of the Client
*/
public void setClientValue (String ClientValue);
/** Get Client Key.
* Key of the Client
*/
public String getClientValue();
/** Column name ConversionTypeValue */
public static final String COLUMNNAME_ConversionTypeValue = "ConversionTypeValue";
/** Set Currency Type Key.
* Key value for the Currency Conversion Rate Type
*/
public void setConversionTypeValue (String ConversionTypeValue);
/** Get Currency Type Key.
* Key value for the Currency Conversion Rate Type
*/
public String getConversionTypeValue();
/** Column name CurrencyRate */
public static final String COLUMNNAME_CurrencyRate = "CurrencyRate";
/** Set Rate.
* Currency Conversion Rate
*/
public void setCurrencyRate (BigDecimal CurrencyRate);
/** Get Rate.
* Currency Conversion Rate
*/
public BigDecimal getCurrencyRate();
/** Column name CurrencyRateType */
public static final String COLUMNNAME_CurrencyRateType = "CurrencyRateType";
/** Set CurrencyRateType */
public void setCurrencyRateType (String CurrencyRateType);
/** Get CurrencyRateType */
public String getCurrencyRateType();
/** Column name DateAcct */
public static final String COLUMNNAME_DateAcct = "DateAcct";
/** Set Account Date.
* Accounting Date
*/
public void setDateAcct (Timestamp DateAcct);
/** Get Account Date.
* Accounting Date
*/
public Timestamp getDateAcct();
/** Column name Description */
public static final String COLUMNNAME_Description = "Description";
/** Set Description.
* Optional short description of the record
*/
public void setDescription (String Description);
/** Get Description.
* Optional short description of the record
*/
public String getDescription();
/** Column name DocTypeName */
public static final String COLUMNNAME_DocTypeName = "DocTypeName";
/** Set Document Type Name.
* Name of the Document Type
*/
public void setDocTypeName (String DocTypeName);
/** Get Document Type Name.
* Name of the Document Type
*/
public String getDocTypeName();
/** Column name GL_Budget_ID */
public static final String COLUMNNAME_GL_Budget_ID = "GL_Budget_ID";
/** Set Budget.
* General Ledger Budget
*/
public void setGL_Budget_ID (int GL_Budget_ID);
/** Get Budget.
* General Ledger Budget
*/
public int getGL_Budget_ID();
public I_GL_Budget getGL_Budget() throws Exception;
/** Column name GL_Category_ID */
public static final String COLUMNNAME_GL_Category_ID = "GL_Category_ID";
/** Set GL Category.
* General Ledger Category
*/
public void setGL_Category_ID (int GL_Category_ID);
/** Get GL Category.
* General Ledger Category
*/
public int getGL_Category_ID();
public I_GL_Category getGL_Category() throws Exception;
/** Column name GL_JournalBatch_ID */
public static final String COLUMNNAME_GL_JournalBatch_ID = "GL_JournalBatch_ID";
/** Set Journal Batch.
* General Ledger Journal Batch
*/
public void setGL_JournalBatch_ID (int GL_JournalBatch_ID);
/** Get Journal Batch.
* General Ledger Journal Batch
*/
public int getGL_JournalBatch_ID();
public I_GL_JournalBatch getGL_JournalBatch() throws Exception;
/** Column name GL_JournalLine_ID */
public static final String COLUMNNAME_GL_JournalLine_ID = "GL_JournalLine_ID";
/** Set Journal Line.
* General Ledger Journal Line
*/
public void setGL_JournalLine_ID (int GL_JournalLine_ID);
/** Get Journal Line.
* General Ledger Journal Line
*/
public int getGL_JournalLine_ID();
public I_GL_JournalLine getGL_JournalLine() throws Exception;
/** Column name GL_Journal_ID */
public static final String COLUMNNAME_GL_Journal_ID = "GL_Journal_ID";
/** Set Journal.
* General Ledger Journal
*/
public void setGL_Journal_ID (int GL_Journal_ID);
/** Get Journal.
* General Ledger Journal
*/
public int getGL_Journal_ID();
public I_GL_Journal getGL_Journal() throws Exception;
/** Column name ISO_Code */
public static final String COLUMNNAME_ISO_Code = "ISO_Code";
/** Set ISO Currency Code.
* Three letter ISO 4217 Code of the Currency
*/
public void setISO_Code (String ISO_Code);
/** Get ISO Currency Code.
* Three letter ISO 4217 Code of the Currency
*/
public String getISO_Code();
/** Column name I_ErrorMsg */
public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg";
/** Set Import Error Message.
* Messages generated from import process
*/
public void setI_ErrorMsg (String I_ErrorMsg);
/** Get Import Error Message.
* Messages generated from import process
*/
public String getI_ErrorMsg();
/** Column name I_FAJournal_ID */
public static final String COLUMNNAME_I_FAJournal_ID = "I_FAJournal_ID";
/** Set I_FAJournal_ID */
public void setI_FAJournal_ID (int I_FAJournal_ID);
/** Get I_FAJournal_ID */
public int getI_FAJournal_ID();
/** Column name I_IsImported */
public static final String COLUMNNAME_I_IsImported = "I_IsImported";
/** Set Imported.
* Has this import been processed
*/
public void setI_IsImported (boolean I_IsImported);
/** Get Imported.
* Has this import been processed
*/
public boolean isI_IsImported();
/** Column name IsDepreciated */
public static final String COLUMNNAME_IsDepreciated = "IsDepreciated";
/** Set Depreciate.
* The asset will be depreciated
*/
public void setIsDepreciated (String IsDepreciated);
/** Get Depreciate.
* The asset will be depreciated
*/
public String getIsDepreciated();
/** Column name JournalDocumentNo */
public static final String COLUMNNAME_JournalDocumentNo = "JournalDocumentNo";
/** Set Journal Document No.
* Document number of the Journal
*/
public void setJournalDocumentNo (String JournalDocumentNo);
/** Get Journal Document No.
* Document number of the Journal
*/
public String getJournalDocumentNo();
/** Column name Line */
public static final String COLUMNNAME_Line = "Line";
/** Set Line No.
* Unique line for this document
*/
public void setLine (int Line);
/** Get Line No.
* Unique line for this document
*/
public int getLine();
/** Column name M_Product_ID */
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
/** Set Product.
* Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID);
/** Get Product.
* Product, Service, Item
*/
public int getM_Product_ID();
public I_M_Product getM_Product() throws Exception;
/** Column name OrgTrxValue */
public static final String COLUMNNAME_OrgTrxValue = "OrgTrxValue";
/** Set Trx Org Key.
* Key of the Transaction Organization
*/
public void setOrgTrxValue (String OrgTrxValue);
/** Get Trx Org Key.
* Key of the Transaction Organization
*/
public String getOrgTrxValue();
/** Column name OrgValue */
public static final String COLUMNNAME_OrgValue = "OrgValue";
/** Set Org Key.
* Key of the Organization
*/
public void setOrgValue (String OrgValue);
/** Get Org Key.
* Key of the Organization
*/
public String getOrgValue();
/** Column name PostingType */
public static final String COLUMNNAME_PostingType = "PostingType";
/** Set PostingType.
* The type of posted amount for the transaction
*/
public void setPostingType (String PostingType);
/** Get PostingType.
* The type of posted amount for the transaction
*/
public String getPostingType();
/** Column name Processed */
public static final String COLUMNNAME_Processed = "Processed";
/** Set Processed.
* The document has been processed
*/
public void setProcessed (boolean Processed);
/** Get Processed.
* The document has been processed
*/
public boolean isProcessed();
/** Column name Processing */
public static final String COLUMNNAME_Processing = "Processing";
/** Set Process Now */
public void setProcessing (boolean Processing);
/** Get Process Now */
public boolean isProcessing();
/** Column name ProductValue */
public static final String COLUMNNAME_ProductValue = "ProductValue";
/** Set Product Key.
* Key of the Product
*/
public void setProductValue (String ProductValue);
/** Get Product Key.
* Key of the Product
*/
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 Qty */
public static final String COLUMNNAME_Qty = "Qty";
/** Set Quantity.
* Quantity
*/
public void setQty (BigDecimal Qty);
/** Get Quantity.
* Quantity
*/
public BigDecimal getQty();
/** Column name SKU */
public static final String COLUMNNAME_SKU = "SKU";
/** Set SKU.
* Stock Keeping Unit
*/
public void setSKU (String SKU);
/** Get SKU.
* Stock Keeping Unit
*/
public String getSKU();
/** Column name UPC */
public static final String COLUMNNAME_UPC = "UPC";
/** Set UPC/EAN.
* Bar Code (Universal Product Code or its superset European Article Number)
*/
public void setUPC (String UPC);
/** Get UPC/EAN.
* Bar Code (Universal Product Code or its superset European Article Number)
*/
public String getUPC();
/** Column name User1_ID */
public static final String COLUMNNAME_User1_ID = "User1_ID";
/** Set User List 1.
* User defined list element #1
*/
public void setUser1_ID (int User1_ID);
/** Get User List 1.
* User defined list element #1
*/
public int getUser1_ID();
/** Column name User2_ID */
public static final String COLUMNNAME_User2_ID = "User2_ID";
/** Set User List 2.
* User defined list element #2
*/
public void setUser2_ID (int User2_ID);
/** Get User List 2.
* User defined list element #2
*/
public int getUser2_ID();
/** Column name UserElement1_ID */
public static final String COLUMNNAME_UserElement1_ID = "UserElement1_ID";
/** Set User Element 1.
* User defined accounting Element
*/
public void setUserElement1_ID (int UserElement1_ID);
/** Get User Element 1.
* User defined accounting Element
*/
public int getUserElement1_ID();
/** Column name UserElement2_ID */
public static final String COLUMNNAME_UserElement2_ID = "UserElement2_ID";
/** Set User Element 2.
* User defined accounting Element
*/
public void setUserElement2_ID (int UserElement2_ID);
/** Get User Element 2.
* User defined accounting Element
*/
public int getUserElement2_ID();
}

View File

@ -88,15 +88,15 @@ public class MAsset extends X_A_Asset
super (ctx, A_Asset_ID, trxName); super (ctx, A_Asset_ID, trxName);
if (A_Asset_ID == 0) if (A_Asset_ID == 0)
{ {
setIsDepreciated (false); // setIsDepreciated (false);
setIsFullyDepreciated (false); // setIsFullyDepreciated (false);
// setValue (null); // setValue (null);
// setName (null); // setName (null);
setIsInPosession (false); // setIsInPosession (false);
setIsOwned (false); // setIsOwned (false);
// setA_Asset_Group_ID (0); // setA_Asset_Group_ID (0);
setIsDisposed (false); // setIsDisposed (false);
setM_AttributeSetInstance_ID(0); // setM_AttributeSetInstance_ID(0);
setQty(Env.ONE); setQty(Env.ONE);
} }
} // MAsset } // MAsset
@ -416,9 +416,352 @@ public class MAsset extends X_A_Asset
protected boolean beforeSave (boolean newRecord) protected boolean beforeSave (boolean newRecord)
{ {
getQty(); // set to 1 getQty(); // set to 1
if (getA_Parent_Asset_ID() < 1 )
{
setA_Parent_Asset_ID(getA_Asset_ID());
}
return true; return true;
} // beforeSave } // beforeSave
/**
* After Save
* @param newRecord new
* @param success success
* @return saved
*/
protected boolean afterSave (boolean newRecord,boolean success)
{
log.info ("afterSave");
int p_A_Asset_ID = 0;
p_A_Asset_ID = getA_Asset_ID();
String sql = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=?";
PreparedStatement pstmt = null;
if (DB.getSQLValue(get_TrxName(),sql, p_A_Asset_ID)== 0)
{
sql ="SELECT * FROM A_Asset_Group_Acct WHERE A_Asset_Group_ID = ? AND IsActive='Y'";
pstmt = null;
pstmt = DB.prepareStatement(sql,get_TrxName());
try {
pstmt.setInt(1, getA_Asset_Group_ID());
ResultSet rs = pstmt.executeQuery();
int uselifemonths = 0;
int uselifeyears = 0;
boolean isdepreciate = false;
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
X_A_Asset asset = new X_A_Asset (getCtx(), p_A_Asset_ID, get_TrxName());
if (getA_Parent_Asset_ID() < 1 )
{
asset.setA_Parent_Asset_ID(getA_Asset_ID());
asset.save();
}
while (rs.next()){
MAssetGroupAcct assetgrpacct = new MAssetGroupAcct (getCtx(), rs, get_TrxName());
MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName());
isdepreciate = assetgrpacct.isProcessing();
if (isDepreciated()== true | isdepreciate == true)
{
assetacct.setPostingType(assetgrpacct.getPostingType());
assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent());
assetacct.setA_Depreciation_Conv_ID(assetgrpacct.getConventionType());
assetacct.setA_Salvage_Value(new BigDecimal(0.0));
assetacct.setA_Asset_ID(p_A_Asset_ID);
assetacct.setA_Depreciation_ID(assetgrpacct.getDepreciationType());
assetacct.setA_Asset_Spread_ID(assetgrpacct.getA_Asset_Spread_Type());
assetacct.setA_Period_Start(1);
if (getUseLifeMonths() == 0 & getUseLifeYears() == 0){
assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths());
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
asset.setIsDepreciated(true);
asset.setIsOwned(true);
asset.save();
uselifemonths = assetgrpacct.getUseLifeMonths();
uselifeyears = assetgrpacct.getUseLifeYears();
}
else if(getUseLifeMonths() == 0){
assetacct.setA_Period_End(getUseLifeYears()*12);
asset.setUseLifeMonths(getUseLifeYears()*12);
asset.setIsDepreciated(true);
asset.setIsOwned(true);
asset.save();
uselifemonths = getUseLifeYears()*12;
uselifeyears = getUseLifeYears();
}
else{
assetacct.setA_Period_End(getUseLifeMonths());
uselifemonths = getUseLifeMonths();
uselifeyears = getUseLifeYears();}
assetacct.setA_Depreciation_Method_ID(assetgrpacct.getA_Depreciation_Calc_Type());
assetacct.setA_Asset_Acct(assetgrpacct.getA_Asset_Acct());
assetacct.setC_AcctSchema_ID(assetgrpacct.getC_AcctSchema_ID());
assetacct.setA_Accumdepreciation_Acct(assetgrpacct.getA_Accumdepreciation_Acct());
assetacct.setA_Depreciation_Acct(assetgrpacct.getA_Depreciation_Acct());
assetacct.setA_Disposal_Revenue(assetgrpacct.getA_Disposal_Revenue());
assetacct.setA_Disposal_Loss(assetgrpacct.getA_Disposal_Loss());
assetacct.setA_Reval_Accumdep_Offset_Cur(assetgrpacct.getA_Reval_Accumdep_Offset_Cur());
assetacct.setA_Reval_Accumdep_Offset_Prior(assetgrpacct.getA_Reval_Accumdep_Offset_Prior());
if (assetgrpacct.getA_Reval_Cal_Method() == null)
assetacct.setA_Reval_Cal_Method("DFT");
else
assetacct.setA_Reval_Cal_Method(assetgrpacct.getA_Reval_Cal_Method());
assetacct.setA_Reval_Cost_Offset(assetgrpacct.getA_Reval_Cost_Offset());
assetacct.setA_Reval_Cost_Offset_Prior(assetgrpacct.getA_Reval_Cost_Offset_Prior());
assetacct.setA_Reval_Depexp_Offset(assetgrpacct.getA_Reval_Depexp_Offset());
assetacct.setA_Depreciation_Manual_Amount(assetgrpacct.getA_Depreciation_Manual_Amount());
assetacct.setA_Depreciation_Manual_Period(assetgrpacct.getA_Depreciation_Manual_Period());
assetacct.setA_Depreciation_Table_Header_ID(assetgrpacct.getA_Depreciation_Table_Header_ID());
assetacct.setA_Depreciation_Variable_Perc(assetgrpacct.getA_Depreciation_Variable_Perc());
assetacct.setProcessing(false);
assetacct.save();
change.setPostingType(assetacct.getPostingType());
change.setA_Split_Percent(assetacct.getA_Split_Percent());
change.setConventionType(assetacct.getA_Depreciation_Conv_ID());
change.setA_Asset_ID(p_A_Asset_ID);
change.setDepreciationType(assetacct.getA_Depreciation_ID());
change.setA_Asset_Spread_Type(assetacct.getA_Asset_Spread_ID());
change.setA_Period_Start(assetacct.getA_Period_Start());
change.setA_Period_End(assetacct.getA_Period_End());
change.setIsInPosession(isOwned());
change.setIsDisposed(isDisposed());
change.setIsDepreciated(isDepreciated());
change.setIsFullyDepreciated(isFullyDepreciated());
change.setA_Depreciation_Calc_Type(assetacct.getA_Depreciation_Method_ID());
change.setA_Asset_Acct(assetacct.getA_Asset_Acct());
change.setC_AcctSchema_ID(assetacct.getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(assetacct.getA_Accumdepreciation_Acct());
change.setA_Depreciation_Acct(assetacct.getA_Depreciation_Acct());
change.setA_Disposal_Revenue(assetacct.getA_Disposal_Revenue());
change.setA_Disposal_Loss(assetacct.getA_Disposal_Loss());
change.setA_Reval_Accumdep_Offset_Cur(assetacct.getA_Reval_Accumdep_Offset_Cur());
change.setA_Reval_Accumdep_Offset_Prior(assetacct.getA_Reval_Accumdep_Offset_Prior());
if (assetacct.getA_Reval_Cal_Method() == null)
change.setA_Reval_Cal_Method("DFT");
else
change.setA_Reval_Cal_Method(assetacct.getA_Reval_Cal_Method());
change.setA_Reval_Cost_Offset(assetacct.getA_Reval_Cost_Offset());
change.setA_Reval_Cost_Offset_Prior(assetacct.getA_Reval_Cost_Offset_Prior());
change.setA_Reval_Depexp_Offset(assetacct.getA_Reval_Depexp_Offset());
change.setA_Depreciation_Manual_Amount(assetacct.getA_Depreciation_Manual_Amount());
change.setA_Depreciation_Manual_Period(assetacct.getA_Depreciation_Manual_Period());
change.setA_Depreciation_Table_Header_ID(assetacct.getA_Depreciation_Table_Header_ID());
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
}
String sql2 = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND PostingType = ?";
if (DB.getSQLValue(get_TrxName(), sql2, asset.getA_Asset_ID(),assetgrpacct.getPostingType())== 0)
{
if (isDepreciated()== true | isdepreciate == true)
{
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName());
assetwk.setA_Asset_ID(p_A_Asset_ID);
assetwk.setA_Life_Period(uselifemonths);
assetwk.setA_Asset_Life_Years(uselifeyears);
assetwk.setIsDepreciated(isDepreciated());
assetwk.setPostingType(assetgrpacct.getPostingType());
assetwk.setA_Accumulated_Depr(new BigDecimal(0.0));
assetwk.setA_QTY_Current(new BigDecimal(0.0));
assetwk.setA_Asset_Cost(new BigDecimal(0.0));
assetwk.setA_Period_Posted(0);
assetwk.save();
}
}
}
change.setA_Asset_ID(p_A_Asset_ID);
change.setA_Parent_Asset_ID(asset.getA_Parent_Asset_ID());
change.setChangeType("CRT");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setIsInPosession(isOwned());
change.setIsDisposed(isDisposed());
change.setIsDepreciated(isDepreciated());
change.setIsFullyDepreciated(isFullyDepreciated());
change.setLot(getLot());
change.setSerno(getSerNo());
change.setVersionno(getVersionNo());
change.setUseLifeMonths(getUseLifeMonths());
change.setUseLifeYears(getUseLifeYears());
change.setLifeUseUnits(getLifeUseUnits());
change.setAssetDisposalDate(getAssetDisposalDate());
change.setAssetServiceDate(getAssetServiceDate());
change.setC_BPartner_Location_ID(getC_BPartner_Location_ID());
change.setC_BPartner_ID(getC_BPartner_ID());
change.setA_QTY_Current(getA_QTY_Current());
change.setA_QTY_Original(getA_QTY_Original());
change.setA_Asset_CreateDate(getA_Asset_CreateDate());
change.setAd_User_ID(getAD_User_ID());
change.setC_Location_ID(getC_Location_ID());
change.save();
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
}
else
{
int uselifemonths = 0;
int uselifeyears = 0;
sql ="SELECT * FROM A_Asset_Acct WHERE A_Asset_ID = ? AND IsActive='Y'";
pstmt = null;
pstmt = DB.prepareStatement(sql,get_TrxName());
try {
pstmt.setInt(1, getA_Asset_ID());
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
MAssetAcct assetacct = new MAssetAcct (getCtx(),rs, get_TrxName());
assetacct.setProcessing(false);
assetacct.setA_Asset_ID(p_A_Asset_ID);
assetacct.setA_Period_Start(1);
if(getUseLifeMonths() == 0){
assetacct.setA_Period_End(getUseLifeYears()*12);
setUseLifeMonths(getUseLifeYears()*12);
uselifemonths = getUseLifeYears()*12;
uselifeyears = getUseLifeYears();
}
else{
assetacct.setA_Period_End(getUseLifeMonths());
uselifemonths = getUseLifeMonths();
uselifeyears = getUseLifeYears();
}
assetacct.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
sql ="SELECT * FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND IsActive='Y'";
pstmt = null;
try
{
pstmt = DB.prepareStatement(sql,get_TrxName());
pstmt.setInt(1, p_A_Asset_ID);
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs, get_TrxName());
assetwk.setA_Asset_ID(p_A_Asset_ID);
assetwk.setA_Life_Period(uselifemonths);
assetwk.setA_Asset_Life_Years(uselifeyears);
assetwk.setIsDepreciated(isDepreciated());
//assetwk.setA_QTY_Current(getA_QTY_Current());
assetwk.save();
if (isProcessing()== true){
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(p_A_Asset_ID);
change.setChangeType("UPD");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "UPD"));
change.setLot(getLot());
change.setSerno(getSerNo());
change.setVersionno(getVersionNo());
change.setA_Parent_Asset_ID(getA_Parent_Asset_ID());
change.setUseLifeMonths(getUseLifeMonths());
change.setUseLifeYears(getUseLifeYears());
change.setLifeUseUnits(getLifeUseUnits());
change.setAssetDisposalDate(getAssetDisposalDate());
change.setAssetServiceDate(getAssetServiceDate());
change.setIsInPosession(isOwned());
change.setA_Reval_Cal_Method("DFT");
change.setIsDisposed(isDisposed());
change.setIsDepreciated(isDepreciated());
change.setIsFullyDepreciated(isFullyDepreciated());
change.setC_BPartner_Location_ID(getC_BPartner_Location_ID());
change.setC_BPartner_ID(getC_BPartner_ID());
change.setPostingType("A");
change.setA_QTY_Current(getA_QTY_Current());
change.setA_QTY_Original(getA_QTY_Original());
change.setA_Asset_CreateDate(getA_Asset_CreateDate());
change.setAd_User_ID(getAD_User_ID());
change.setC_Location_ID(getC_Location_ID());
change.save();
}
else
{
X_A_Asset asset = new X_A_Asset (getCtx(), p_A_Asset_ID, get_TrxName());
asset.setProcessing(true);
asset.save();
}
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
}
return true;
} // afterSave
/************************************************************************* /*************************************************************************
* Confirm Asset EMail Delivery * Confirm Asset EMail Delivery

View File

@ -0,0 +1,161 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.DB;
/**
* Asset Addition Model
*
*
*/
public class MAssetAcct extends X_A_Asset_Acct {
/**
* Default ConstructorX_A_Asset_Group_Acct
*
* @param ctx
* context
* @param M_InventoryLine_ID
* line
*/
public MAssetAcct(Properties ctx, int X_A_Asset_Acct_ID, String trxName) {
super(ctx, X_A_Asset_Acct_ID, trxName);
if (X_A_Asset_Acct_ID == 0) {
//
}
} // MAssetAddition
/**
* Load Constructor
*
* @param ctx
* context
* @param rs
* result set
*/
public MAssetAcct(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
} // MInventoryLine
protected boolean afterSave(boolean newRecord, boolean success) {
log.info("afterSave");
int p_actasset_ID = getA_Asset_Acct_ID();
int p_A_Asset_ID = getA_Asset_ID();
if (isProcessing() == true) {
MAssetChange change = new MAssetChange(getCtx(), 0, null);
change.setChangeType("SET");
MRefList_Ext RefList = new MRefList_Ext(getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription(getCtx(),
"A_Update_Type", "SET"));
change.setPostingType(getPostingType());
change.setA_Split_Percent(getA_Split_Percent());
change.setConventionType(getA_Depreciation_Conv_ID());
change.setA_Salvage_Value(getA_Salvage_Value());
change.setA_Asset_ID(getA_Asset_ID());
change.setDepreciationType(getA_Depreciation_ID());
change.setA_Asset_Spread_Type(getA_Asset_Spread_ID());
change.setA_Period_Start(getA_Period_Start());
change.setA_Period_End(getA_Period_End());
change.setA_Depreciation_Calc_Type(getA_Depreciation_Method_ID());
change.setA_Asset_Acct(getA_Asset_Acct());
change.setC_AcctSchema_ID(getC_AcctSchema_ID());
change.setA_Accumdepreciation_Acct(getA_Accumdepreciation_Acct());
change.setA_Depreciation_Acct(getA_Depreciation_Acct());
change.setA_Disposal_Revenue(getA_Disposal_Revenue());
change.setA_Disposal_Loss(getA_Disposal_Loss());
change.setA_Reval_Accumdep_Offset_Cur(getA_Reval_Accumdep_Offset_Cur());
change.setA_Reval_Accumdep_Offset_Prior(getA_Reval_Accumdep_Offset_Prior());
if (getA_Reval_Cal_Method() == null)
change.setA_Reval_Cal_Method("DFT");
else
change.setA_Reval_Cal_Method(getA_Reval_Cal_Method());
change.setA_Reval_Cost_Offset(getA_Reval_Cost_Offset());
change.setA_Reval_Cost_Offset_Prior(getA_Reval_Cost_Offset_Prior());
change.setA_Reval_Depexp_Offset(getA_Reval_Depexp_Offset());
change.setA_Depreciation_Manual_Amount(getA_Depreciation_Manual_Amount());
change.setA_Depreciation_Manual_Period(getA_Depreciation_Manual_Period());
change.setA_Depreciation_Table_Header_ID(getA_Depreciation_Table_Header_ID());
change.setA_Depreciation_Variable_Perc(getA_Depreciation_Variable_Perc());
change.save();
String sql = "SELECT * FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND IsActive='Y'";
PreparedStatement pstmt = null;
try {
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, p_A_Asset_ID);
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
// MADepreciationWorkfile asset = new MADepreciationWorkfile
// (getCtx(), rs.getInt("A_Depreciation_Workfile_ID"));
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile(
getCtx(), rs, null);
assetwk.setA_Salvage_Value(getA_Salvage_Value());
assetwk.save();
}
rs.close();
pstmt.close();
pstmt = null;
} catch (Exception e) {
log.info("getAssets" + e);
} finally {
try {
if (pstmt != null)
pstmt.close();
} catch (Exception e) {
}
pstmt = null;
}
} else {
X_A_Asset_Acct assetacct = new X_A_Asset_Acct(getCtx(),
p_actasset_ID, null);
assetacct.setPostingType(getPostingType());
assetacct.setA_Split_Percent(getA_Split_Percent());
assetacct.setA_Depreciation_Conv_ID(getA_Depreciation_Conv_ID());
assetacct.setA_Salvage_Value(getA_Salvage_Value());
assetacct.setA_Asset_ID(getA_Asset_ID());
assetacct.setA_Depreciation_ID(getA_Depreciation_ID());
assetacct.setA_Asset_Spread_ID(getA_Asset_Spread_ID());
assetacct.setA_Period_Start(getA_Period_Start());
assetacct.setA_Depreciation_Method_ID(getA_Depreciation_Method_ID());
assetacct.setA_Asset_Acct(getA_Asset_Acct());
assetacct.setC_AcctSchema_ID(getC_AcctSchema_ID());
assetacct.setA_Accumdepreciation_Acct(getA_Accumdepreciation_Acct());
assetacct.setA_Depreciation_Acct(getA_Depreciation_Acct());
assetacct.setA_Disposal_Revenue(getA_Disposal_Revenue());
assetacct.setA_Disposal_Loss(getA_Disposal_Loss());
assetacct.setA_Reval_Accumdep_Offset_Cur(getA_Reval_Accumdep_Offset_Cur());
assetacct.setA_Reval_Accumdep_Offset_Prior(getA_Reval_Accumdep_Offset_Prior());
assetacct.setA_Reval_Cal_Method(getA_Reval_Cal_Method());
assetacct.setA_Reval_Cost_Offset(getA_Reval_Cost_Offset());
assetacct.setA_Reval_Cost_Offset_Prior(getA_Reval_Cost_Offset_Prior());
assetacct.setA_Reval_Depexp_Offset(getA_Reval_Depexp_Offset());
assetacct.setA_Depreciation_Manual_Amount(getA_Depreciation_Manual_Amount());
assetacct.setA_Depreciation_Manual_Period(getA_Depreciation_Manual_Period());
assetacct.setA_Depreciation_Table_Header_ID(getA_Depreciation_Table_Header_ID());
assetacct.setA_Depreciation_Variable_Perc(getA_Depreciation_Variable_Perc());
assetacct.setProcessing(true);
assetacct.save();
}
return true;
}
} // MAssetAddition

View File

@ -0,0 +1,149 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.DB;
/**
* Asset Addition Model
*
*
*/
public class MAssetAddition extends X_A_Asset_Addition
{
/**
* Default Constructor
* @param ctx context
* @param M_InventoryLine_ID line
*/
public MAssetAddition (Properties ctx, int A_Asset_Addition_ID, String trxName)
{
super (ctx, A_Asset_Addition_ID, trxName);
if (A_Asset_Addition_ID == 0)
{
//
}
} // MAssetAddition
/**
* Load Constructor
* @param ctx context
* @param rs result set
*/
public MAssetAddition (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MAAssetAddition
/**
* Before Save
* @param newRecord new
* @return true
*/
protected boolean beforeSave (boolean newRecord)
{
log.info ("beforeSave");
int p_A_Asset_ID = 0;
p_A_Asset_ID = getA_Asset_ID();
String sql = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=?";
if (DB.getSQLValue(null,sql, p_A_Asset_ID) == 0)
{
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, null);
assetwk.setA_Asset_ID(p_A_Asset_ID);
assetwk.setPostingType("A");
assetwk.setA_QTY_Current(getA_QTY_Current());
assetwk.setA_Asset_Cost(getAssetValueAmt());
assetwk.save();
MAsset asset = new MAsset (getCtx(), p_A_Asset_ID, null);
asset.setA_QTY_Original(getA_QTY_Current().add(asset.getA_QTY_Original()));
asset.setA_QTY_Current(getA_QTY_Current().add(asset.getA_QTY_Current()));
asset.save();
MAssetChange change = new MAssetChange (getCtx(), 0,null);
change.setA_Asset_ID(p_A_Asset_ID);
change.setA_QTY_Current(getA_QTY_Current());
change.setChangeType("ADD");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType("A");
change.setAssetValueAmt(getAssetValueAmt());
change.setA_QTY_Current(getA_QTY_Current());
change.save();
}
else
{
sql ="SELECT * FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND IsActive='Y'";
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement(sql,null);
pstmt.setInt(1, p_A_Asset_ID);
ResultSet rs = pstmt.executeQuery();
while (rs.next()){
//MADepreciationWorkfile asset = new MADepreciationWorkfile (getCtx(), rs.getInt("A_Depreciation_Workfile_ID"));
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), rs, null);
assetwk.setA_Asset_Cost(getAssetValueAmt().add(assetwk.getA_Asset_Cost()));
assetwk.setA_QTY_Current(getA_QTY_Current().add(assetwk.getA_QTY_Current()));
assetwk.save();
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setA_Asset_ID(p_A_Asset_ID);
change.setA_QTY_Current(getA_QTY_Current());
change.setChangeType("ADD");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType(rs.getString("PostingType"));
change.setAssetValueAmt(getAssetValueAmt());
change.setA_QTY_Current(getA_QTY_Current());
change.save();
MAsset asset = new MAsset (getCtx(), p_A_Asset_ID, null);
asset.setA_QTY_Original(getA_QTY_Current().add(asset.getA_QTY_Original()));
asset.setA_QTY_Current(getA_QTY_Current().add(asset.getA_QTY_Current()));
asset.setProcessing(false);
asset.save();
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.info("getAssets"+ e);
}
finally
{
try
{
if (pstmt != null)
pstmt.close ();
}
catch (Exception e)
{}
pstmt = null;
}
}
return true;
} // beforeSave
} // MAssetAddition

View File

@ -0,0 +1,63 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/**
* Asset Addition Model
*
*
*/
public class MAssetChange extends X_A_Asset_Change
{
/**
* Default Constructor
* @param ctx context
* @param M_InventoryLine_ID line
*/
public MAssetChange (Properties ctx, int A_Asset_Change_ID, String trxName)
{
super (ctx, A_Asset_Change_ID, trxName);
if (A_Asset_Change_ID == 0)
{
//
}
} // MAssetAddition
/**
* Load Constructor
* @param ctx context
* @param rs result set
*/
public MAssetChange (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MInventoryLine
/**
* Before Save
* @param newRecord new
* @return true
*/
protected boolean beforeSave (boolean newRecord)
{
if (getA_Reval_Cal_Method() == null)
setA_Reval_Cal_Method("DFT");
return true;
} // beforeSave
} // MAssetAddition

View File

@ -0,0 +1,52 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/**
* Asset Addition Model
*
*
*/
public class MAssetGroupAcct extends X_A_Asset_Group_Acct
{
/**
* Default ConstructorX_A_Asset_Group_Acct
* @param ctx context
* @param M_InventoryLine_ID line
*/
public MAssetGroupAcct (Properties ctx, int X_A_Asset_Group_Acct_ID, String trxName)
{
super (ctx,X_A_Asset_Group_Acct_ID, trxName);
if (X_A_Asset_Group_Acct_ID == 0)
{
//
}
} // MAssetAddition
/**
* Load Constructor
* @param ctx context
* @param rs result set
*/
public MAssetGroupAcct (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MInventoryLine
} // MAssetAddition

View File

@ -0,0 +1,53 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
/**
* Asset Trnasfer Model
*
*
*/
public class MAssetTransfer extends X_A_Asset_Transfer
{
/**
* Default ConstructorX_A_Asset_Group_Acct
* @param ctx context
* @param M_InventoryLine_ID line
*/
public MAssetTransfer (Properties ctx, int X_A_Asset_Transfer_ID, String trxName)
{
super (ctx,X_A_Asset_Transfer_ID, trxName);
if (X_A_Asset_Transfer_ID == 0)
{
//
}
} // MAssetAddition
/**
* Load Constructor
* @param ctx context
* @param rs result set
*/
public MAssetTransfer (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MInventoryLine
} // MAssetAddition

View File

@ -0,0 +1,69 @@
package org.compiere.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.DB;
/** Generated Model for A_Asset_Use
** @version $Id: X_A_Asset.java,v 1.88 2004/08/27 21:26:37 jjanke Exp $ */
public class MAssetUse extends X_A_Asset_Use
{
public MAssetUse (Properties ctx, int A_Asset_Use_ID, String trxName)
{
super (ctx, A_Asset_Use_ID, trxName);
if (A_Asset_Use_ID == 0)
{
// empty block
}
} // MAssetUse
/**
* Load Constructor
* @param ctx context
* @param rs result set record
*/
public MAssetUse (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MAssetUse
/**
* After Save
* @param newRecord new
* @return true
*/
protected boolean afterSave (boolean newRecord,boolean success)
{
log.info ("afterSave");
int p_A_Asset_ID = 0;
int total_unitsused = 0;
p_A_Asset_ID = getA_Asset_ID();
String sql = "SELECT SUM(USEUNITS) FROM A_Asset_use WHERE A_Asset_ID=? and usedate <= SYSDATE";
total_unitsused = DB.getSQLValue(null, sql, getA_Asset_ID());
MAsset asset = new MAsset (getCtx(), p_A_Asset_ID, null);
asset.setUseUnits(total_unitsused);
asset.setProcessing(false);
asset.save();
MAssetChange change = new MAssetChange (getCtx(), 0,null);
change.setA_Asset_ID(p_A_Asset_ID);
change.setChangeType("USE");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "USE"));
change.setUseUnits(getUseUnits());
change.save();
return true;
} // afterSave
}

View File

@ -0,0 +1,118 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.DB;
/**
* Depreciation Workfile Model
*
*
*/
public class MDepreciationWorkfile extends X_A_Depreciation_Workfile
{
/**
* Default Constructor X_A_Depreciation_Workfile
* @param ctx context
* @param M_InventoryLine_ID line
*/
public MDepreciationWorkfile (Properties ctx, int A_Depreciation_Workfile_ID, String trxName)
{
super (ctx,A_Depreciation_Workfile_ID, trxName);
if (A_Depreciation_Workfile_ID == 0)
{
//
}
} // MAssetAddition
/**
* Load Constructor
* @param ctx context
* @param rs result set
*/
public MDepreciationWorkfile (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MInventoryLine
protected boolean afterSave (boolean newRecord)
{
log.info ("beforeSave");
//int p_A_Asset_ID = 0;
int p_wkasset_ID = 0;
//p_A_Asset_ID = getA_Asset_ID();
p_wkasset_ID = getA_Depreciation_Workfile_ID();
StringBuffer sqlB = new StringBuffer ("UPDATE A_Depreciation_Workfile "
+ "SET Processing = 'Y'"
+ " WHERE A_Depreciation_Workfile_ID = " + p_wkasset_ID );
int no = DB.executeUpdate (sqlB.toString(),null);
if (no == -1)
log.info("Update to Deprecaition Workfile failed");
return true;
}
/**
* after Save
* @param newRecord new
* @return true
*/
protected boolean beforeSave (boolean newRecord)
{
log.info ("beforeSave");
int p_A_Asset_ID = 0;
//int p_wkasset_ID = 0;
p_A_Asset_ID = getA_Asset_ID();
//p_wkasset_ID = getA_Depreciation_Workfile_ID();
log.info ("afterSave");
X_A_Asset asset = new X_A_Asset (getCtx(), p_A_Asset_ID, null);
asset.setA_QTY_Current(getA_QTY_Current());
asset.setA_QTY_Original(getA_QTY_Current());
asset.save();
if (getA_Accumulated_Depr().equals(null))
setA_Accumulated_Depr(new BigDecimal(0.0));
if (new BigDecimal(getA_Period_Posted()).equals(null))
setA_Period_Posted(0);
MAssetChange change = new MAssetChange (getCtx(), 0,null);
log.info("0");
String sql2 = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND PostingType = ?";
if (DB.getSQLValue(null, sql2, p_A_Asset_ID,getPostingType())!= 0)
{
change.setA_Asset_ID(p_A_Asset_ID);
change.setChangeType("BAL");
MRefList_Ext RefList = new MRefList_Ext (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "BAL"));
change.setPostingType(getPostingType());
change.setAssetValueAmt(getA_Asset_Cost());
change.setA_QTY_Current(getA_QTY_Current());
change.setA_QTY_Original(getA_QTY_Current());
change.setAssetAccumDepreciationAmt(getA_Accumulated_Depr());
change.save();
}
return true;
} // beforeSave
} // MAssetAddition

View File

@ -0,0 +1,142 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Business Solution
* The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
* Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
* created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.compiere.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
import org.compiere.util.CCache;
import org.compiere.util.DB;
import org.compiere.util.Env;
/**
* Reference List Value Extension
*
*
*/
public class MRefList_Ext extends MRefList
{
/**
* Get Reference List Value Description (cached)
* @param ctx context
* @param ListName reference
* @param Value value
* @return List or null
*/
public String getListDescription (Properties ctx, String ListName, String Value)
{
String AD_Language = Env.getAD_Language(ctx);
String key = AD_Language + "_" + ListName + "_" + Value;
String retValue = (String)s_cache.get(key);
if (retValue != null)
return retValue;
boolean isBaseLanguage = Env.isBaseLanguage(AD_Language, "AD_Ref_List");
String sql = isBaseLanguage ?
"SELECT a.Description FROM AD_Ref_List a, AD_Reference b"
+ " WHERE b.Name=? AND a.Value=?"
+ " AND a.AD_Reference_ID = b.AD_Reference_ID" :
"SELECT t.Description FROM AD_Ref_List_Trl t , AD_Reference b"
+ " INNER JOIN AD_Ref_List r ON (r.AD_Ref_List_ID=t.AD_Ref_List_ID) "
+ " WHERE b.Name=? AND a.Value=?"
+ " AND a.AD_Reference_ID = b.AD_Reference_ID AND t.AD_Language=?";
log.info (sql);
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement (sql,null);
pstmt.setString (1, ListName);
pstmt.setString(2, Value);
ResultSet rs = pstmt.executeQuery ();
if (rs.next ())
retValue = rs.getString(1);
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (SQLException ex)
{
log.info("getListDescription - " + sql + " - " + key+ ex);
}
try
{
if (pstmt != null)
pstmt.close ();
}
catch (SQLException ex1)
{
}
pstmt = null;
// Save into Cache
if (retValue == null)
{
retValue = "";
log.info("getListDescription - Not found " + key);
}
s_cache.put(key, retValue);
//
return retValue;
} // getListName
/** Value Cache */
private static CCache s_cache = new CCache("AD_Ref_List", 20);
/**************************************************************************
* Persistency Constructor
* @param ctx context
* @param AD_Ref_List_ID id
*/
public MRefList_Ext (Properties ctx, int AD_Ref_List_ID, String trxName)
{
super (ctx, AD_Ref_List_ID, trxName);
if (AD_Ref_List_ID == 0)
{
// setAD_Reference_ID (0);
// setAD_Ref_List_ID (0);
setEntityType (ENTITYTYPE_UserMaintained); // U
// setName (null);
// setValue (null);
}
} // MRef_List
/**
* Load Contructor
* @param ctx context
* @param rs result
*/
public MRefList_Ext (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
} // MRef_List
/**
* String Representation
* @return Name
*/
public String toString()
{
return getName();
} // toString
} // MRef_List

View File

@ -0,0 +1,81 @@
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
/*******************************************************************************
* Generated Model for A_Asset
*
* @version $Id: X_A_Asset.java,v 1.88 2004/08/27 21:26:37 jjanke Exp $ *
******************************************************************************/
public class MXIFAJournal extends X_I_FAJournal {
public MXIFAJournal(Properties ctx, int I_FAJournal_ID, String trxName) {
super(ctx, I_FAJournal_ID, trxName);
if (I_FAJournal_ID == 0) {
// setIsDepreciated (false);
// setIsFullyDepreciated (false);
// setValue (null);
// setName (null);
// setIsInPosession (false);
// setIsOwned (false);
// setA_Asset_Group_ID (0);
// setIsDisposed (false);
// setM_AttributeSetInstance_ID(0);
}
} // MAsset
/**
* Load Constructor
*
* @param ctx
* context
* @param rs
* result set record
*/
public MXIFAJournal(Properties ctx, ResultSet rs, String trxName) {
super(ctx, rs, trxName);
} // MAsset
public BigDecimal getExpenseDr() {
BigDecimal bd = getAmtAcctDr();
return bd;
}
public BigDecimal getExpenseCr() {
BigDecimal bd = getAmtAcctCr();
return bd;
}
public BigDecimal getAmtAcctTotal() {
BigDecimal dr = getAmtAcctDr();
BigDecimal cr = getAmtAcctCr();
BigDecimal bd = (dr).subtract(cr);
if (bd == null)
return Env.ZERO;
return bd;
}
/**
* Set Currency Type. Currency Conversion Rate Type
*/
public void setC_ConversionType_ID(int C_ConversionType_ID) {
if (C_ConversionType_ID == 0)
set_Value("C_ConversionType_ID", null);
else
set_Value("C_ConversionType_ID", new Integer(C_ConversionType_ID));
}
/**
* Get Currency Type. Currency Conversion Rate Type
*/
public int getC_ConversionType_ID() {
Integer ii = (Integer) get_Value("C_ConversionType_ID");
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -124,6 +124,20 @@ public class X_A_Asset extends PO implements I_A_Asset, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** Set A_Asset_CreateDate.
@param A_Asset_CreateDate A_Asset_CreateDate */
public void setA_Asset_CreateDate (Timestamp A_Asset_CreateDate)
{
set_ValueNoCheck (COLUMNNAME_A_Asset_CreateDate, A_Asset_CreateDate);
}
/** Get A_Asset_CreateDate.
@return A_Asset_CreateDate */
public Timestamp getA_Asset_CreateDate ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Asset_CreateDate);
}
public I_A_Asset_Group getA_Asset_Group() throws Exception public I_A_Asset_Group getA_Asset_Group() throws Exception
{ {
Class<?> clazz = MTable.getClass(I_A_Asset_Group.Table_Name); Class<?> clazz = MTable.getClass(I_A_Asset_Group.Table_Name);
@ -184,6 +198,76 @@ public class X_A_Asset extends PO implements I_A_Asset, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** Set A_Asset_RevalDate.
@param A_Asset_RevalDate A_Asset_RevalDate */
public void setA_Asset_RevalDate (Timestamp A_Asset_RevalDate)
{
set_Value (COLUMNNAME_A_Asset_RevalDate, A_Asset_RevalDate);
}
/** Get A_Asset_RevalDate.
@return A_Asset_RevalDate */
public Timestamp getA_Asset_RevalDate ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Asset_RevalDate);
}
/** A_Parent_Asset_ID AD_Reference_ID=53258 */
public static final int A_PARENT_ASSET_ID_AD_Reference_ID=53258;
/** Set A_Parent_Asset_ID.
@param A_Parent_Asset_ID A_Parent_Asset_ID */
public void setA_Parent_Asset_ID (int A_Parent_Asset_ID)
{
if (A_Parent_Asset_ID < 1)
set_Value (COLUMNNAME_A_Parent_Asset_ID, null);
else
set_Value (COLUMNNAME_A_Parent_Asset_ID, Integer.valueOf(A_Parent_Asset_ID));
}
/** Get A_Parent_Asset_ID.
@return A_Parent_Asset_ID */
public int getA_Parent_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Parent_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_QTY_Current.
@param A_QTY_Current A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current)
{
set_Value (COLUMNNAME_A_QTY_Current, A_QTY_Current);
}
/** Get A_QTY_Current.
@return A_QTY_Current */
public BigDecimal getA_QTY_Current ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_QTY_Current);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_QTY_Original.
@param A_QTY_Original A_QTY_Original */
public void setA_QTY_Original (BigDecimal A_QTY_Original)
{
set_Value (COLUMNNAME_A_QTY_Original, A_QTY_Original);
}
/** Get A_QTY_Original.
@return A_QTY_Original */
public BigDecimal getA_QTY_Original ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_QTY_Original);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Asset Depreciation Date. /** Set Asset Depreciation Date.
@param AssetDepreciationDate @param AssetDepreciationDate
Date of last depreciation Date of last depreciation
@ -235,8 +319,8 @@ public class X_A_Asset extends PO implements I_A_Asset, I_Persistent
return (Timestamp)get_Value(COLUMNNAME_AssetServiceDate); return (Timestamp)get_Value(COLUMNNAME_AssetServiceDate);
} }
/** C_BPartnerSR_ID AD_Reference_ID=353 */ /** C_BPartnerSR_ID AD_Reference_ID=232 */
public static final int C_BPARTNERSR_ID_AD_Reference_ID=353; public static final int C_BPARTNERSR_ID_AD_Reference_ID=232;
/** Set BPartner (Agent). /** Set BPartner (Agent).
@param C_BPartnerSR_ID @param C_BPartnerSR_ID
Business Partner (Agent or Sales Rep) Business Partner (Agent or Sales Rep)
@ -976,6 +1060,27 @@ public class X_A_Asset extends PO implements I_A_Asset, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** 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 Quantity. /** Set Quantity.
@param Qty @param Qty
Quantity Quantity

View File

@ -0,0 +1,686 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.lang.reflect.Constructor;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Acct
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Acct extends PO implements I_A_Asset_Acct, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Acct (Properties ctx, int A_Asset_Acct_ID, String trxName)
{
super (ctx, A_Asset_Acct_ID, trxName);
/** if (A_Asset_Acct_ID == 0)
{
setA_Asset_Acct_ID (0);
setA_Depreciation_Conv_ID (0);
setA_Depreciation_ID (0);
setA_Depreciation_Method_ID (0);
setA_Period_End (0);
setA_Period_Start (0);
setA_Salvage_Value (Env.ZERO);
setA_Split_Percent (Env.ZERO);
setC_AcctSchema_ID (0);
setPostingType (null);
} */
}
/** Load Constructor */
public X_A_Asset_Acct (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Acct[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Accumdepreciation_Acct.
@param A_Accumdepreciation_Acct A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct)
{
set_Value (COLUMNNAME_A_Accumdepreciation_Acct, Integer.valueOf(A_Accumdepreciation_Acct));
}
/** Get A_Accumdepreciation_Acct.
@return A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Accumdepreciation_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Acct.
@param A_Asset_Acct A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct)
{
set_Value (COLUMNNAME_A_Asset_Acct, Integer.valueOf(A_Asset_Acct));
}
/** Get A_Asset_Acct.
@return A_Asset_Acct */
public int getA_Asset_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Acct_ID.
@param A_Asset_Acct_ID A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID)
{
if (A_Asset_Acct_ID < 1)
throw new IllegalArgumentException ("A_Asset_Acct_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Acct_ID, Integer.valueOf(A_Asset_Acct_ID));
}
/** Get A_Asset_Acct_ID.
@return A_Asset_Acct_ID */
public int getA_Asset_Acct_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Acct_ID()));
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, null);
else
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Asset_Spread_ID AD_Reference_ID=53268 */
public static final int A_ASSET_SPREAD_ID_AD_Reference_ID=53268;
/** Set A_Asset_Spread_ID.
@param A_Asset_Spread_ID A_Asset_Spread_ID */
public void setA_Asset_Spread_ID (int A_Asset_Spread_ID)
{
if (A_Asset_Spread_ID < 1)
set_Value (COLUMNNAME_A_Asset_Spread_ID, null);
else
set_Value (COLUMNNAME_A_Asset_Spread_ID, Integer.valueOf(A_Asset_Spread_ID));
}
/** Get A_Asset_Spread_ID.
@return A_Asset_Spread_ID */
public int getA_Asset_Spread_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Spread_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Acct.
@param A_Depreciation_Acct A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct)
{
set_Value (COLUMNNAME_A_Depreciation_Acct, Integer.valueOf(A_Depreciation_Acct));
}
/** Get A_Depreciation_Acct.
@return A_Depreciation_Acct */
public int getA_Depreciation_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Depreciation_Conv_ID AD_Reference_ID=53267 */
public static final int A_DEPRECIATION_CONV_ID_AD_Reference_ID=53267;
/** Set A_Depreciation_Conv_ID.
@param A_Depreciation_Conv_ID A_Depreciation_Conv_ID */
public void setA_Depreciation_Conv_ID (int A_Depreciation_Conv_ID)
{
if (A_Depreciation_Conv_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Conv_ID is mandatory.");
set_Value (COLUMNNAME_A_Depreciation_Conv_ID, Integer.valueOf(A_Depreciation_Conv_ID));
}
/** Get A_Depreciation_Conv_ID.
@return A_Depreciation_Conv_ID */
public int getA_Depreciation_Conv_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Conv_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Depreciation_ID AD_Reference_ID=53264 */
public static final int A_DEPRECIATION_ID_AD_Reference_ID=53264;
/** Set A_Depreciation_ID.
@param A_Depreciation_ID A_Depreciation_ID */
public void setA_Depreciation_ID (int A_Depreciation_ID)
{
if (A_Depreciation_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_ID is mandatory.");
set_Value (COLUMNNAME_A_Depreciation_ID, Integer.valueOf(A_Depreciation_ID));
}
/** Get A_Depreciation_ID.
@return A_Depreciation_ID */
public int getA_Depreciation_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Manual_Amount.
@param A_Depreciation_Manual_Amount A_Depreciation_Manual_Amount */
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount)
{
set_Value (COLUMNNAME_A_Depreciation_Manual_Amount, A_Depreciation_Manual_Amount);
}
/** Get A_Depreciation_Manual_Amount.
@return A_Depreciation_Manual_Amount */
public BigDecimal getA_Depreciation_Manual_Amount ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Depreciation_Manual_Amount);
if (bd == null)
return Env.ZERO;
return bd;
}
/** A_Depreciation_Manual_Period AD_Reference_ID=53256 */
public static final int A_DEPRECIATION_MANUAL_PERIOD_AD_Reference_ID=53256;
/** Period = PR */
public static final String A_DEPRECIATION_MANUAL_PERIOD_Period = "PR";
/** Yearly = YR */
public static final String A_DEPRECIATION_MANUAL_PERIOD_Yearly = "YR";
/** Set A_Depreciation_Manual_Period.
@param A_Depreciation_Manual_Period A_Depreciation_Manual_Period */
public void setA_Depreciation_Manual_Period (String A_Depreciation_Manual_Period)
{
if (A_Depreciation_Manual_Period == null || A_Depreciation_Manual_Period.equals("PR") || A_Depreciation_Manual_Period.equals("YR")); else throw new IllegalArgumentException ("A_Depreciation_Manual_Period Invalid value - " + A_Depreciation_Manual_Period + " - Reference_ID=53256 - PR - YR");
if (A_Depreciation_Manual_Period != null && A_Depreciation_Manual_Period.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Depreciation_Manual_Period = A_Depreciation_Manual_Period.substring(0, 2);
}
set_Value (COLUMNNAME_A_Depreciation_Manual_Period, A_Depreciation_Manual_Period);
}
/** Get A_Depreciation_Manual_Period.
@return A_Depreciation_Manual_Period */
public String getA_Depreciation_Manual_Period ()
{
return (String)get_Value(COLUMNNAME_A_Depreciation_Manual_Period);
}
/** A_Depreciation_Method_ID AD_Reference_ID=53266 */
public static final int A_DEPRECIATION_METHOD_ID_AD_Reference_ID=53266;
/** Set A_Depreciation_Method_ID.
@param A_Depreciation_Method_ID A_Depreciation_Method_ID */
public void setA_Depreciation_Method_ID (int A_Depreciation_Method_ID)
{
if (A_Depreciation_Method_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Method_ID is mandatory.");
set_Value (COLUMNNAME_A_Depreciation_Method_ID, Integer.valueOf(A_Depreciation_Method_ID));
}
/** Get A_Depreciation_Method_ID.
@return A_Depreciation_Method_ID */
public int getA_Depreciation_Method_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Method_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Depreciation_Table_Header_ID AD_Reference_ID=53265 */
public static final int A_DEPRECIATION_TABLE_HEADER_ID_AD_Reference_ID=53265;
/** Set A_Depreciation_Table_Header_ID.
@param A_Depreciation_Table_Header_ID A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID)
{
if (A_Depreciation_Table_Header_ID < 1)
set_Value (COLUMNNAME_A_Depreciation_Table_Header_ID, null);
else
set_Value (COLUMNNAME_A_Depreciation_Table_Header_ID, Integer.valueOf(A_Depreciation_Table_Header_ID));
}
/** Get A_Depreciation_Table_Header_ID.
@return A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Table_Header_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Variable_Perc.
@param A_Depreciation_Variable_Perc A_Depreciation_Variable_Perc */
public void setA_Depreciation_Variable_Perc (BigDecimal A_Depreciation_Variable_Perc)
{
set_Value (COLUMNNAME_A_Depreciation_Variable_Perc, A_Depreciation_Variable_Perc);
}
/** Get A_Depreciation_Variable_Perc.
@return A_Depreciation_Variable_Perc */
public BigDecimal getA_Depreciation_Variable_Perc ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Depreciation_Variable_Perc);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Disposal_Gain.
@param A_Disposal_Gain A_Disposal_Gain */
public void setA_Disposal_Gain (int A_Disposal_Gain)
{
set_Value (COLUMNNAME_A_Disposal_Gain, Integer.valueOf(A_Disposal_Gain));
}
/** Get A_Disposal_Gain.
@return A_Disposal_Gain */
public int getA_Disposal_Gain ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Gain);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Loss.
@param A_Disposal_Loss A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss)
{
set_Value (COLUMNNAME_A_Disposal_Loss, Integer.valueOf(A_Disposal_Loss));
}
/** Get A_Disposal_Loss.
@return A_Disposal_Loss */
public int getA_Disposal_Loss ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Loss);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Revenue.
@param A_Disposal_Revenue A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue)
{
set_Value (COLUMNNAME_A_Disposal_Revenue, Integer.valueOf(A_Disposal_Revenue));
}
/** Get A_Disposal_Revenue.
@return A_Disposal_Revenue */
public int getA_Disposal_Revenue ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Revenue);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Period_End.
@param A_Period_End A_Period_End */
public void setA_Period_End (int A_Period_End)
{
set_Value (COLUMNNAME_A_Period_End, Integer.valueOf(A_Period_End));
}
/** Get A_Period_End.
@return A_Period_End */
public int getA_Period_End ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period_End);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Period_Start.
@param A_Period_Start A_Period_Start */
public void setA_Period_Start (int A_Period_Start)
{
set_Value (COLUMNNAME_A_Period_Start, Integer.valueOf(A_Period_Start));
}
/** Get A_Period_Start.
@return A_Period_Start */
public int getA_Period_Start ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period_Start);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Accumdep_Offset_Cur.
@param A_Reval_Accumdep_Offset_Cur A_Reval_Accumdep_Offset_Cur */
public void setA_Reval_Accumdep_Offset_Cur (int A_Reval_Accumdep_Offset_Cur)
{
set_Value (COLUMNNAME_A_Reval_Accumdep_Offset_Cur, Integer.valueOf(A_Reval_Accumdep_Offset_Cur));
}
/** Get A_Reval_Accumdep_Offset_Cur.
@return A_Reval_Accumdep_Offset_Cur */
public int getA_Reval_Accumdep_Offset_Cur ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Accumdep_Offset_Cur);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Accumdep_Offset_Prior.
@param A_Reval_Accumdep_Offset_Prior A_Reval_Accumdep_Offset_Prior */
public void setA_Reval_Accumdep_Offset_Prior (int A_Reval_Accumdep_Offset_Prior)
{
set_Value (COLUMNNAME_A_Reval_Accumdep_Offset_Prior, Integer.valueOf(A_Reval_Accumdep_Offset_Prior));
}
/** Get A_Reval_Accumdep_Offset_Prior.
@return A_Reval_Accumdep_Offset_Prior */
public int getA_Reval_Accumdep_Offset_Prior ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Accumdep_Offset_Prior);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Reval_Cal_Method AD_Reference_ID=53259 */
public static final int A_REVAL_CAL_METHOD_AD_Reference_ID=53259;
/** Default = DFT */
public static final String A_REVAL_CAL_METHOD_Default = "DFT";
/** Inception to date = IDF */
public static final String A_REVAL_CAL_METHOD_InceptionToDate = "IDF";
/** Year Balances = YBF */
public static final String A_REVAL_CAL_METHOD_YearBalances = "YBF";
/** Set A_Reval_Cal_Method.
@param A_Reval_Cal_Method A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method)
{
if (A_Reval_Cal_Method == null || A_Reval_Cal_Method.equals("DFT") || A_Reval_Cal_Method.equals("IDF") || A_Reval_Cal_Method.equals("YBF")); else throw new IllegalArgumentException ("A_Reval_Cal_Method Invalid value - " + A_Reval_Cal_Method + " - Reference_ID=53259 - DFT - IDF - YBF");
if (A_Reval_Cal_Method != null && A_Reval_Cal_Method.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Reval_Cal_Method = A_Reval_Cal_Method.substring(0, 3);
}
set_Value (COLUMNNAME_A_Reval_Cal_Method, A_Reval_Cal_Method);
}
/** Get A_Reval_Cal_Method.
@return A_Reval_Cal_Method */
public String getA_Reval_Cal_Method ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Cal_Method);
}
/** Set A_Reval_Cost_Offset.
@param A_Reval_Cost_Offset A_Reval_Cost_Offset */
public void setA_Reval_Cost_Offset (int A_Reval_Cost_Offset)
{
set_Value (COLUMNNAME_A_Reval_Cost_Offset, Integer.valueOf(A_Reval_Cost_Offset));
}
/** Get A_Reval_Cost_Offset.
@return A_Reval_Cost_Offset */
public int getA_Reval_Cost_Offset ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Cost_Offset);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Cost_Offset_Prior.
@param A_Reval_Cost_Offset_Prior A_Reval_Cost_Offset_Prior */
public void setA_Reval_Cost_Offset_Prior (int A_Reval_Cost_Offset_Prior)
{
set_Value (COLUMNNAME_A_Reval_Cost_Offset_Prior, Integer.valueOf(A_Reval_Cost_Offset_Prior));
}
/** Get A_Reval_Cost_Offset_Prior.
@return A_Reval_Cost_Offset_Prior */
public int getA_Reval_Cost_Offset_Prior ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Cost_Offset_Prior);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Depexp_Offset.
@param A_Reval_Depexp_Offset A_Reval_Depexp_Offset */
public void setA_Reval_Depexp_Offset (int A_Reval_Depexp_Offset)
{
set_Value (COLUMNNAME_A_Reval_Depexp_Offset, Integer.valueOf(A_Reval_Depexp_Offset));
}
/** Get A_Reval_Depexp_Offset.
@return A_Reval_Depexp_Offset */
public int getA_Reval_Depexp_Offset ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Depexp_Offset);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Salvage_Value.
@param A_Salvage_Value A_Salvage_Value */
public void setA_Salvage_Value (BigDecimal A_Salvage_Value)
{
if (A_Salvage_Value == null)
throw new IllegalArgumentException ("A_Salvage_Value is mandatory.");
set_Value (COLUMNNAME_A_Salvage_Value, A_Salvage_Value);
}
/** Get A_Salvage_Value.
@return A_Salvage_Value */
public BigDecimal getA_Salvage_Value ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Salvage_Value);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Split_Percent.
@param A_Split_Percent A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent)
{
if (A_Split_Percent == null)
throw new IllegalArgumentException ("A_Split_Percent is mandatory.");
set_Value (COLUMNNAME_A_Split_Percent, A_Split_Percent);
}
/** Get A_Split_Percent.
@return A_Split_Percent */
public BigDecimal getA_Split_Percent ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Split_Percent);
if (bd == null)
return Env.ZERO;
return bd;
}
public I_C_AcctSchema getC_AcctSchema() throws Exception
{
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_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 Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory.");
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory");
if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,431 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.lang.reflect.Constructor;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Addition
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Addition extends PO implements I_A_Asset_Addition, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Addition (Properties ctx, int A_Asset_Addition_ID, String trxName)
{
super (ctx, A_Asset_Addition_ID, trxName);
/** if (A_Asset_Addition_ID == 0)
{
setA_Asset_Addition_ID (0);
setA_Asset_ID (0);
setAssetValueAmt (Env.ZERO);
} */
}
/** Load Constructor */
public X_A_Asset_Addition (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Addition[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Asset_Addition_ID.
@param A_Asset_Addition_ID A_Asset_Addition_ID */
public void setA_Asset_Addition_ID (int A_Asset_Addition_ID)
{
if (A_Asset_Addition_ID < 1)
throw new IllegalArgumentException ("A_Asset_Addition_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Addition_ID, Integer.valueOf(A_Asset_Addition_ID));
}
/** Get A_Asset_Addition_ID.
@return A_Asset_Addition_ID */
public int getA_Asset_Addition_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Addition_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Addition_ID()));
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_CapvsExp AD_Reference_ID=53277 */
public static final int A_CAPVSEXP_AD_Reference_ID=53277;
/** Capital = Cap */
public static final String A_CAPVSEXP_Capital = "Cap";
/** Expense = Exp */
public static final String A_CAPVSEXP_Expense = "Exp";
/** Set A_CapvsExp.
@param A_CapvsExp A_CapvsExp */
public void setA_CapvsExp (String A_CapvsExp)
{
if (A_CapvsExp == null || A_CapvsExp.equals("Cap") || A_CapvsExp.equals("Exp")); else throw new IllegalArgumentException ("A_CapvsExp Invalid value - " + A_CapvsExp + " - Reference_ID=53277 - Cap - Exp");
if (A_CapvsExp != null && A_CapvsExp.length() > 3)
{
log.warning("Length > 3 - truncated");
A_CapvsExp = A_CapvsExp.substring(0, 3);
}
set_Value (COLUMNNAME_A_CapvsExp, A_CapvsExp);
}
/** Get A_CapvsExp.
@return A_CapvsExp */
public String getA_CapvsExp ()
{
return (String)get_Value(COLUMNNAME_A_CapvsExp);
}
/** Set A_QTY_Current.
@param A_QTY_Current A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current)
{
set_Value (COLUMNNAME_A_QTY_Current, A_QTY_Current);
}
/** Get A_QTY_Current.
@return A_QTY_Current */
public BigDecimal getA_QTY_Current ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_QTY_Current);
if (bd == null)
return Env.ZERO;
return bd;
}
/** A_SourceType AD_Reference_ID=53276 */
public static final int A_SOURCETYPE_AD_Reference_ID=53276;
/** Imported = IMP */
public static final String A_SOURCETYPE_Imported = "IMP";
/** Invoice = INV */
public static final String A_SOURCETYPE_Invoice = "INV";
/** Journal Entry = JRN */
public static final String A_SOURCETYPE_JournalEntry = "JRN";
/** Manual = MAN */
public static final String A_SOURCETYPE_Manual = "MAN";
/** Set A_SourceType.
@param A_SourceType A_SourceType */
public void setA_SourceType (String A_SourceType)
{
if (A_SourceType == null || A_SourceType.equals("IMP") || A_SourceType.equals("INV") || A_SourceType.equals("JRN") || A_SourceType.equals("MAN")); else throw new IllegalArgumentException ("A_SourceType Invalid value - " + A_SourceType + " - Reference_ID=53276 - IMP - INV - JRN - MAN");
if (A_SourceType != null && A_SourceType.length() > 3)
{
log.warning("Length > 3 - truncated");
A_SourceType = A_SourceType.substring(0, 3);
}
set_Value (COLUMNNAME_A_SourceType, A_SourceType);
}
/** Get A_SourceType.
@return A_SourceType */
public String getA_SourceType ()
{
return (String)get_Value(COLUMNNAME_A_SourceType);
}
/** Set Asset value.
@param AssetValueAmt
Book Value of the asset
*/
public void setAssetValueAmt (BigDecimal AssetValueAmt)
{
if (AssetValueAmt == null)
throw new IllegalArgumentException ("AssetValueAmt is mandatory.");
set_Value (COLUMNNAME_AssetValueAmt, AssetValueAmt);
}
/** Get Asset value.
@return Book Value of the asset
*/
public BigDecimal getAssetValueAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_AssetValueAmt);
if (bd == null)
return Env.ZERO;
return bd;
}
/** C_Invoice_ID AD_Reference_ID=53275 */
public static final int C_INVOICE_ID_AD_Reference_ID=53275;
public I_C_Invoice getC_Invoice() throws Exception
{
Class<?> clazz = MTable.getClass(I_C_Invoice.Table_Name);
I_C_Invoice result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_C_Invoice)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Invoice_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 Invoice.
@param C_Invoice_ID
Invoice Identifier
*/
public void setC_Invoice_ID (int C_Invoice_ID)
{
if (C_Invoice_ID < 1)
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 Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description != null && Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** DocumentNo AD_Reference_ID=53274 */
public static final int DOCUMENTNO_AD_Reference_ID=53274;
/** 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, 30);
}
set_Value (COLUMNNAME_DocumentNo, DocumentNo);
}
/** Get Document No.
@return Document sequence number of the document
*/
public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
public I_GL_JournalBatch getGL_JournalBatch() throws Exception
{
Class<?> clazz = MTable.getClass(I_GL_JournalBatch.Table_Name);
I_GL_JournalBatch result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_GL_JournalBatch)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_JournalBatch_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 Journal Batch.
@param GL_JournalBatch_ID
General Ledger Journal Batch
*/
public void setGL_JournalBatch_ID (int GL_JournalBatch_ID)
{
if (GL_JournalBatch_ID < 1)
set_Value (COLUMNNAME_GL_JournalBatch_ID, null);
else
set_Value (COLUMNNAME_GL_JournalBatch_ID, Integer.valueOf(GL_JournalBatch_ID));
}
/** Get Journal Batch.
@return General Ledger Journal Batch
*/
public int getGL_JournalBatch_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_JournalBatch_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Line No.
@param Line
Unique line for this document
*/
public void setLine (int Line)
{
set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
}
/** Get Line No.
@return Unique line for this document
*/
public int getLine ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Line);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Shipment/Receipt Line.
@param M_InOutLine_ID
Line on Shipment or Receipt document
*/
public void setM_InOutLine_ID (int M_InOutLine_ID)
{
if (M_InOutLine_ID < 1)
set_Value (COLUMNNAME_M_InOutLine_ID, null);
else
set_Value (COLUMNNAME_M_InOutLine_ID, Integer.valueOf(M_InOutLine_ID));
}
/** Get Shipment/Receipt Line.
@return Line on Shipment or Receipt document
*/
public int getM_InOutLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_InOutLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null || PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType != null && PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,363 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Disposed
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Disposed extends PO implements I_A_Asset_Disposed, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Disposed (Properties ctx, int A_Asset_Disposed_ID, String trxName)
{
super (ctx, A_Asset_Disposed_ID, trxName);
/** if (A_Asset_Disposed_ID == 0)
{
setA_Asset_Disposed_ID (0);
setA_Asset_ID (0);
setA_Disposed_Date (new Timestamp(System.currentTimeMillis()));
setA_Disposed_Method (null);
setA_Disposed_Reason (null);
setC_Period_ID (0);
setDateAcct (new Timestamp(System.currentTimeMillis()));
// @Date@
setDateDoc (new Timestamp(System.currentTimeMillis()));
// @Date@
setProcessed (false);
setProcessing (false);
} */
}
/** Load Constructor */
public X_A_Asset_Disposed (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Disposed[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Asset_Disposed_ID.
@param A_Asset_Disposed_ID A_Asset_Disposed_ID */
public void setA_Asset_Disposed_ID (int A_Asset_Disposed_ID)
{
if (A_Asset_Disposed_ID < 1)
throw new IllegalArgumentException ("A_Asset_Disposed_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Disposed_ID, Integer.valueOf(A_Asset_Disposed_ID));
}
/** Get A_Asset_Disposed_ID.
@return A_Asset_Disposed_ID */
public int getA_Asset_Disposed_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Disposed_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Disposed_ID()));
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Asset_Trade_ID AD_Reference_ID=53258 */
public static final int A_ASSET_TRADE_ID_AD_Reference_ID=53258;
/** Set A_Asset_Trade_ID.
@param A_Asset_Trade_ID A_Asset_Trade_ID */
public void setA_Asset_Trade_ID (int A_Asset_Trade_ID)
{
if (A_Asset_Trade_ID < 1)
set_Value (COLUMNNAME_A_Asset_Trade_ID, null);
else
set_Value (COLUMNNAME_A_Asset_Trade_ID, Integer.valueOf(A_Asset_Trade_ID));
}
/** Get A_Asset_Trade_ID.
@return A_Asset_Trade_ID */
public int getA_Asset_Trade_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Trade_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposed_Date.
@param A_Disposed_Date A_Disposed_Date */
public void setA_Disposed_Date (Timestamp A_Disposed_Date)
{
if (A_Disposed_Date == null)
throw new IllegalArgumentException ("A_Disposed_Date is mandatory.");
set_Value (COLUMNNAME_A_Disposed_Date, A_Disposed_Date);
}
/** Get A_Disposed_Date.
@return A_Disposed_Date */
public Timestamp getA_Disposed_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Disposed_Date);
}
/** A_Disposed_Method AD_Reference_ID=53270 */
public static final int A_DISPOSED_METHOD_AD_Reference_ID=53270;
/** Cash = C */
public static final String A_DISPOSED_METHOD_Cash = "C";
/** Simple = S */
public static final String A_DISPOSED_METHOD_Simple = "S";
/** Trade = T1 */
public static final String A_DISPOSED_METHOD_Trade = "T1";
/** Trade w/cash = T2 */
public static final String A_DISPOSED_METHOD_TradeWCash = "T2";
/** Set A_Disposed_Method.
@param A_Disposed_Method A_Disposed_Method */
public void setA_Disposed_Method (String A_Disposed_Method)
{
if (A_Disposed_Method == null) throw new IllegalArgumentException ("A_Disposed_Method is mandatory");
if (A_Disposed_Method.equals("C") || A_Disposed_Method.equals("S") || A_Disposed_Method.equals("T1") || A_Disposed_Method.equals("T2")); else throw new IllegalArgumentException ("A_Disposed_Method Invalid value - " + A_Disposed_Method + " - Reference_ID=53270 - C - S - T1 - T2");
if (A_Disposed_Method.length() > 10)
{
log.warning("Length > 10 - truncated");
A_Disposed_Method = A_Disposed_Method.substring(0, 10);
}
set_Value (COLUMNNAME_A_Disposed_Method, A_Disposed_Method);
}
/** Get A_Disposed_Method.
@return A_Disposed_Method */
public String getA_Disposed_Method ()
{
return (String)get_Value(COLUMNNAME_A_Disposed_Method);
}
/** A_Disposed_Reason AD_Reference_ID=53269 */
public static final int A_DISPOSED_REASON_AD_Reference_ID=53269;
/** Charity = C */
public static final String A_DISPOSED_REASON_Charity = "C";
/** Destroyed = D */
public static final String A_DISPOSED_REASON_Destroyed = "D";
/** Scraped = S */
public static final String A_DISPOSED_REASON_Scraped = "S";
/** Sold = S1 */
public static final String A_DISPOSED_REASON_Sold = "S1";
/** Sold w/Trade = S2 */
public static final String A_DISPOSED_REASON_SoldWTrade = "S2";
/** Theft = T */
public static final String A_DISPOSED_REASON_Theft = "T";
/** Set A_Disposed_Reason.
@param A_Disposed_Reason A_Disposed_Reason */
public void setA_Disposed_Reason (String A_Disposed_Reason)
{
if (A_Disposed_Reason == null) throw new IllegalArgumentException ("A_Disposed_Reason is mandatory");
if (A_Disposed_Reason.equals("C") || A_Disposed_Reason.equals("D") || A_Disposed_Reason.equals("S") || A_Disposed_Reason.equals("S1") || A_Disposed_Reason.equals("S2") || A_Disposed_Reason.equals("T")); else throw new IllegalArgumentException ("A_Disposed_Reason Invalid value - " + A_Disposed_Reason + " - Reference_ID=53269 - C - D - S - S1 - S2 - T");
if (A_Disposed_Reason.length() > 10)
{
log.warning("Length > 10 - truncated");
A_Disposed_Reason = A_Disposed_Reason.substring(0, 10);
}
set_Value (COLUMNNAME_A_Disposed_Reason, A_Disposed_Reason);
}
/** Get A_Disposed_Reason.
@return A_Disposed_Reason */
public String getA_Disposed_Reason ()
{
return (String)get_Value(COLUMNNAME_A_Disposed_Reason);
}
/** Set A_Proceeds.
@param A_Proceeds A_Proceeds */
public void setA_Proceeds (BigDecimal A_Proceeds)
{
set_Value (COLUMNNAME_A_Proceeds, A_Proceeds);
}
/** Get A_Proceeds.
@return A_Proceeds */
public BigDecimal getA_Proceeds ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Proceeds);
if (bd == null)
return Env.ZERO;
return bd;
}
/** C_Period_ID AD_Reference_ID=233 */
public static final int C_PERIOD_ID_AD_Reference_ID=233;
/** Set Period.
@param C_Period_ID
Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID)
{
if (C_Period_ID < 1)
throw new IllegalArgumentException ("C_Period_ID is mandatory.");
set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
}
/** Get Period.
@return Period of the Calendar
*/
public int getC_Period_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Account Date.
@param DateAcct
Accounting Date
*/
public void setDateAcct (Timestamp DateAcct)
{
if (DateAcct == null)
throw new IllegalArgumentException ("DateAcct is mandatory.");
set_Value (COLUMNNAME_DateAcct, DateAcct);
}
/** Get Account Date.
@return Accounting Date
*/
public Timestamp getDateAcct ()
{
return (Timestamp)get_Value(COLUMNNAME_DateAcct);
}
/** Set Document Date.
@param DateDoc
Date of the Document
*/
public void setDateDoc (Timestamp DateDoc)
{
if (DateDoc == null)
throw new IllegalArgumentException ("DateDoc is mandatory.");
set_Value (COLUMNNAME_DateDoc, DateDoc);
}
/** Get Document Date.
@return Date of the Document
*/
public Timestamp getDateDoc ()
{
return (Timestamp)get_Value(COLUMNNAME_DateDoc);
}
/** 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;
}
}

View File

@ -44,8 +44,6 @@ public class X_A_Asset_Group extends PO implements I_A_Asset_Group, I_Persistent
setIsDepreciated (false); setIsDepreciated (false);
setIsOneAssetPerUOM (false); setIsOneAssetPerUOM (false);
setIsOwned (false); setIsOwned (false);
setIsTrackIssues (false);
// N
setName (null); setName (null);
} */ } */
} }
@ -100,6 +98,14 @@ public class X_A_Asset_Group extends PO implements I_A_Asset_Group, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Group_ID()));
}
/** Set Description. /** Set Description.
@param Description @param Description
Optional short description of the record Optional short description of the record
@ -290,12 +296,4 @@ public class X_A_Asset_Group extends PO implements I_A_Asset_Group, I_Persistent
{ {
return (String)get_Value(COLUMNNAME_Name); return (String)get_Value(COLUMNNAME_Name);
} }
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
} }

View File

@ -0,0 +1,697 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.lang.reflect.Constructor;
import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Group_Acct
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Group_Acct extends PO implements I_A_Asset_Group_Acct, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Group_Acct (Properties ctx, int A_Asset_Group_Acct_ID, String trxName)
{
super (ctx, A_Asset_Group_Acct_ID, trxName);
/** if (A_Asset_Group_Acct_ID == 0)
{
setA_Asset_Group_Acct_ID (0);
setA_Asset_Group_ID (0);
setA_Depreciation_Calc_Type (0);
setA_Split_Percent (Env.ZERO);
setC_AcctSchema_ID (0);
setConventionType (0);
setDepreciationType (0);
setPostingType (null);
} */
}
/** Load Constructor */
public X_A_Asset_Group_Acct (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Group_Acct[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Accumdepreciation_Acct.
@param A_Accumdepreciation_Acct A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct)
{
set_Value (COLUMNNAME_A_Accumdepreciation_Acct, Integer.valueOf(A_Accumdepreciation_Acct));
}
/** Get A_Accumdepreciation_Acct.
@return A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Accumdepreciation_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Acct.
@param A_Asset_Acct A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct)
{
set_Value (COLUMNNAME_A_Asset_Acct, Integer.valueOf(A_Asset_Acct));
}
/** Get A_Asset_Acct.
@return A_Asset_Acct */
public int getA_Asset_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Group_Acct_ID.
@param A_Asset_Group_Acct_ID A_Asset_Group_Acct_ID */
public void setA_Asset_Group_Acct_ID (int A_Asset_Group_Acct_ID)
{
if (A_Asset_Group_Acct_ID < 1)
throw new IllegalArgumentException ("A_Asset_Group_Acct_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Group_Acct_ID, Integer.valueOf(A_Asset_Group_Acct_ID));
}
/** Get A_Asset_Group_Acct_ID.
@return A_Asset_Group_Acct_ID */
public int getA_Asset_Group_Acct_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Group_Acct_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Group_Acct_ID()));
}
public I_A_Asset_Group getA_Asset_Group() throws Exception
{
Class<?> clazz = MTable.getClass(I_A_Asset_Group.Table_Name);
I_A_Asset_Group result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_A_Asset_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getA_Asset_Group_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 Asset Group.
@param A_Asset_Group_ID
Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID)
{
if (A_Asset_Group_ID < 1)
throw new IllegalArgumentException ("A_Asset_Group_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Group_ID, Integer.valueOf(A_Asset_Group_ID));
}
/** Get Asset Group.
@return Group of Assets
*/
public int getA_Asset_Group_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Group_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Asset_Spread_Type AD_Reference_ID=53268 */
public static final int A_ASSET_SPREAD_TYPE_AD_Reference_ID=53268;
/** Set A_Asset_Spread_Type.
@param A_Asset_Spread_Type A_Asset_Spread_Type */
public void setA_Asset_Spread_Type (int A_Asset_Spread_Type)
{
set_Value (COLUMNNAME_A_Asset_Spread_Type, Integer.valueOf(A_Asset_Spread_Type));
}
/** Get A_Asset_Spread_Type.
@return A_Asset_Spread_Type */
public int getA_Asset_Spread_Type ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Spread_Type);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Acct.
@param A_Depreciation_Acct A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct)
{
set_Value (COLUMNNAME_A_Depreciation_Acct, Integer.valueOf(A_Depreciation_Acct));
}
/** Get A_Depreciation_Acct.
@return A_Depreciation_Acct */
public int getA_Depreciation_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Depreciation_Calc_Type AD_Reference_ID=53266 */
public static final int A_DEPRECIATION_CALC_TYPE_AD_Reference_ID=53266;
/** Set A_Depreciation_Calc_Type.
@param A_Depreciation_Calc_Type A_Depreciation_Calc_Type */
public void setA_Depreciation_Calc_Type (int A_Depreciation_Calc_Type)
{
set_Value (COLUMNNAME_A_Depreciation_Calc_Type, Integer.valueOf(A_Depreciation_Calc_Type));
}
/** Get A_Depreciation_Calc_Type.
@return A_Depreciation_Calc_Type */
public int getA_Depreciation_Calc_Type ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Calc_Type);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_ID.
@param A_Depreciation_ID A_Depreciation_ID */
public void setA_Depreciation_ID (int A_Depreciation_ID)
{
if (A_Depreciation_ID < 1)
set_Value (COLUMNNAME_A_Depreciation_ID, null);
else
set_Value (COLUMNNAME_A_Depreciation_ID, Integer.valueOf(A_Depreciation_ID));
}
/** Get A_Depreciation_ID.
@return A_Depreciation_ID */
public int getA_Depreciation_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Manual_Amount.
@param A_Depreciation_Manual_Amount A_Depreciation_Manual_Amount */
public void setA_Depreciation_Manual_Amount (BigDecimal A_Depreciation_Manual_Amount)
{
set_Value (COLUMNNAME_A_Depreciation_Manual_Amount, A_Depreciation_Manual_Amount);
}
/** Get A_Depreciation_Manual_Amount.
@return A_Depreciation_Manual_Amount */
public BigDecimal getA_Depreciation_Manual_Amount ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Depreciation_Manual_Amount);
if (bd == null)
return Env.ZERO;
return bd;
}
/** A_Depreciation_Manual_Period AD_Reference_ID=53256 */
public static final int A_DEPRECIATION_MANUAL_PERIOD_AD_Reference_ID=53256;
/** Period = PR */
public static final String A_DEPRECIATION_MANUAL_PERIOD_Period = "PR";
/** Yearly = YR */
public static final String A_DEPRECIATION_MANUAL_PERIOD_Yearly = "YR";
/** Set A_Depreciation_Manual_Period.
@param A_Depreciation_Manual_Period A_Depreciation_Manual_Period */
public void setA_Depreciation_Manual_Period (String A_Depreciation_Manual_Period)
{
if (A_Depreciation_Manual_Period == null || A_Depreciation_Manual_Period.equals("PR") || A_Depreciation_Manual_Period.equals("YR")); else throw new IllegalArgumentException ("A_Depreciation_Manual_Period Invalid value - " + A_Depreciation_Manual_Period + " - Reference_ID=53256 - PR - YR");
if (A_Depreciation_Manual_Period != null && A_Depreciation_Manual_Period.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Depreciation_Manual_Period = A_Depreciation_Manual_Period.substring(0, 2);
}
set_Value (COLUMNNAME_A_Depreciation_Manual_Period, A_Depreciation_Manual_Period);
}
/** Get A_Depreciation_Manual_Period.
@return A_Depreciation_Manual_Period */
public String getA_Depreciation_Manual_Period ()
{
return (String)get_Value(COLUMNNAME_A_Depreciation_Manual_Period);
}
/** A_Depreciation_Table_Header_ID AD_Reference_ID=53265 */
public static final int A_DEPRECIATION_TABLE_HEADER_ID_AD_Reference_ID=53265;
/** Set A_Depreciation_Table_Header_ID.
@param A_Depreciation_Table_Header_ID A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID)
{
if (A_Depreciation_Table_Header_ID < 1)
set_Value (COLUMNNAME_A_Depreciation_Table_Header_ID, null);
else
set_Value (COLUMNNAME_A_Depreciation_Table_Header_ID, Integer.valueOf(A_Depreciation_Table_Header_ID));
}
/** Get A_Depreciation_Table_Header_ID.
@return A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Table_Header_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Variable_Perc.
@param A_Depreciation_Variable_Perc A_Depreciation_Variable_Perc */
public void setA_Depreciation_Variable_Perc (BigDecimal A_Depreciation_Variable_Perc)
{
set_Value (COLUMNNAME_A_Depreciation_Variable_Perc, A_Depreciation_Variable_Perc);
}
/** Get A_Depreciation_Variable_Perc.
@return A_Depreciation_Variable_Perc */
public BigDecimal getA_Depreciation_Variable_Perc ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Depreciation_Variable_Perc);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Disposal_Gain.
@param A_Disposal_Gain A_Disposal_Gain */
public void setA_Disposal_Gain (int A_Disposal_Gain)
{
set_Value (COLUMNNAME_A_Disposal_Gain, Integer.valueOf(A_Disposal_Gain));
}
/** Get A_Disposal_Gain.
@return A_Disposal_Gain */
public int getA_Disposal_Gain ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Gain);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Loss.
@param A_Disposal_Loss A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss)
{
set_Value (COLUMNNAME_A_Disposal_Loss, Integer.valueOf(A_Disposal_Loss));
}
/** Get A_Disposal_Loss.
@return A_Disposal_Loss */
public int getA_Disposal_Loss ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Loss);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Revenue.
@param A_Disposal_Revenue A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue)
{
set_Value (COLUMNNAME_A_Disposal_Revenue, Integer.valueOf(A_Disposal_Revenue));
}
/** Get A_Disposal_Revenue.
@return A_Disposal_Revenue */
public int getA_Disposal_Revenue ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Revenue);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Accumdep_Offset_Cur.
@param A_Reval_Accumdep_Offset_Cur A_Reval_Accumdep_Offset_Cur */
public void setA_Reval_Accumdep_Offset_Cur (int A_Reval_Accumdep_Offset_Cur)
{
set_Value (COLUMNNAME_A_Reval_Accumdep_Offset_Cur, Integer.valueOf(A_Reval_Accumdep_Offset_Cur));
}
/** Get A_Reval_Accumdep_Offset_Cur.
@return A_Reval_Accumdep_Offset_Cur */
public int getA_Reval_Accumdep_Offset_Cur ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Accumdep_Offset_Cur);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Accumdep_Offset_Prior.
@param A_Reval_Accumdep_Offset_Prior A_Reval_Accumdep_Offset_Prior */
public void setA_Reval_Accumdep_Offset_Prior (int A_Reval_Accumdep_Offset_Prior)
{
set_Value (COLUMNNAME_A_Reval_Accumdep_Offset_Prior, Integer.valueOf(A_Reval_Accumdep_Offset_Prior));
}
/** Get A_Reval_Accumdep_Offset_Prior.
@return A_Reval_Accumdep_Offset_Prior */
public int getA_Reval_Accumdep_Offset_Prior ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Accumdep_Offset_Prior);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Reval_Cal_Method AD_Reference_ID=53259 */
public static final int A_REVAL_CAL_METHOD_AD_Reference_ID=53259;
/** Default = DFT */
public static final String A_REVAL_CAL_METHOD_Default = "DFT";
/** Inception to date = IDF */
public static final String A_REVAL_CAL_METHOD_InceptionToDate = "IDF";
/** Year Balances = YBF */
public static final String A_REVAL_CAL_METHOD_YearBalances = "YBF";
/** Set A_Reval_Cal_Method.
@param A_Reval_Cal_Method A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method)
{
if (A_Reval_Cal_Method == null || A_Reval_Cal_Method.equals("DFT") || A_Reval_Cal_Method.equals("IDF") || A_Reval_Cal_Method.equals("YBF")); else throw new IllegalArgumentException ("A_Reval_Cal_Method Invalid value - " + A_Reval_Cal_Method + " - Reference_ID=53259 - DFT - IDF - YBF");
if (A_Reval_Cal_Method != null && A_Reval_Cal_Method.length() > 22)
{
log.warning("Length > 22 - truncated");
A_Reval_Cal_Method = A_Reval_Cal_Method.substring(0, 22);
}
set_Value (COLUMNNAME_A_Reval_Cal_Method, A_Reval_Cal_Method);
}
/** Get A_Reval_Cal_Method.
@return A_Reval_Cal_Method */
public String getA_Reval_Cal_Method ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Cal_Method);
}
/** Set A_Reval_Cost_Offset.
@param A_Reval_Cost_Offset A_Reval_Cost_Offset */
public void setA_Reval_Cost_Offset (int A_Reval_Cost_Offset)
{
set_Value (COLUMNNAME_A_Reval_Cost_Offset, Integer.valueOf(A_Reval_Cost_Offset));
}
/** Get A_Reval_Cost_Offset.
@return A_Reval_Cost_Offset */
public int getA_Reval_Cost_Offset ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Cost_Offset);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Cost_Offset_Prior.
@param A_Reval_Cost_Offset_Prior A_Reval_Cost_Offset_Prior */
public void setA_Reval_Cost_Offset_Prior (int A_Reval_Cost_Offset_Prior)
{
set_Value (COLUMNNAME_A_Reval_Cost_Offset_Prior, Integer.valueOf(A_Reval_Cost_Offset_Prior));
}
/** Get A_Reval_Cost_Offset_Prior.
@return A_Reval_Cost_Offset_Prior */
public int getA_Reval_Cost_Offset_Prior ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Cost_Offset_Prior);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Reval_Depexp_Offset.
@param A_Reval_Depexp_Offset A_Reval_Depexp_Offset */
public void setA_Reval_Depexp_Offset (int A_Reval_Depexp_Offset)
{
set_Value (COLUMNNAME_A_Reval_Depexp_Offset, Integer.valueOf(A_Reval_Depexp_Offset));
}
/** Get A_Reval_Depexp_Offset.
@return A_Reval_Depexp_Offset */
public int getA_Reval_Depexp_Offset ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Reval_Depexp_Offset);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Split_Percent.
@param A_Split_Percent A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent)
{
if (A_Split_Percent == null)
throw new IllegalArgumentException ("A_Split_Percent is mandatory.");
set_Value (COLUMNNAME_A_Split_Percent, A_Split_Percent);
}
/** Get A_Split_Percent.
@return A_Split_Percent */
public BigDecimal getA_Split_Percent ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Split_Percent);
if (bd == null)
return Env.ZERO;
return bd;
}
public I_C_AcctSchema getC_AcctSchema() throws Exception
{
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_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 Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory.");
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** ConventionType AD_Reference_ID=53267 */
public static final int CONVENTIONTYPE_AD_Reference_ID=53267;
/** Set ConventionType.
@param ConventionType ConventionType */
public void setConventionType (int ConventionType)
{
set_Value (COLUMNNAME_ConventionType, Integer.valueOf(ConventionType));
}
/** Get ConventionType.
@return ConventionType */
public int getConventionType ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_ConventionType);
if (ii == null)
return 0;
return ii.intValue();
}
/** DepreciationType AD_Reference_ID=53264 */
public static final int DEPRECIATIONTYPE_AD_Reference_ID=53264;
/** Set DepreciationType.
@param DepreciationType DepreciationType */
public void setDepreciationType (int DepreciationType)
{
set_Value (COLUMNNAME_DepreciationType, Integer.valueOf(DepreciationType));
}
/** Get DepreciationType.
@return DepreciationType */
public int getDepreciationType ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_DepreciationType);
if (ii == null)
return 0;
return ii.intValue();
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory");
if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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 Usable Life - Months.
@param UseLifeMonths
Months of the usable life of the asset
*/
public void setUseLifeMonths (int UseLifeMonths)
{
set_Value (COLUMNNAME_UseLifeMonths, Integer.valueOf(UseLifeMonths));
}
/** Get Usable Life - Months.
@return Months of the usable life of the asset
*/
public int getUseLifeMonths ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UseLifeMonths);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Usable Life - Years.
@param UseLifeYears
Years of the usable life of the asset
*/
public void setUseLifeYears (int UseLifeYears)
{
set_Value (COLUMNNAME_UseLifeYears, Integer.valueOf(UseLifeYears));
}
/** Get Usable Life - Years.
@return Years of the usable life of the asset
*/
public int getUseLifeYears ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UseLifeYears);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -0,0 +1,350 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Info_Fin
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Info_Fin extends PO implements I_A_Asset_Info_Fin, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Info_Fin (Properties ctx, int A_Asset_Info_Fin_ID, String trxName)
{
super (ctx, A_Asset_Info_Fin_ID, trxName);
/** if (A_Asset_Info_Fin_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Info_Fin_ID (0);
} */
}
/** Load Constructor */
public X_A_Asset_Info_Fin (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Info_Fin[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Info_Fin_ID.
@param A_Asset_Info_Fin_ID A_Asset_Info_Fin_ID */
public void setA_Asset_Info_Fin_ID (int A_Asset_Info_Fin_ID)
{
if (A_Asset_Info_Fin_ID < 1)
throw new IllegalArgumentException ("A_Asset_Info_Fin_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Info_Fin_ID, Integer.valueOf(A_Asset_Info_Fin_ID));
}
/** Get A_Asset_Info_Fin_ID.
@return A_Asset_Info_Fin_ID */
public int getA_Asset_Info_Fin_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Info_Fin_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Info_Fin_ID()));
}
/** Set A_Contract_Date.
@param A_Contract_Date A_Contract_Date */
public void setA_Contract_Date (Timestamp A_Contract_Date)
{
set_Value (COLUMNNAME_A_Contract_Date, A_Contract_Date);
}
/** Get A_Contract_Date.
@return A_Contract_Date */
public Timestamp getA_Contract_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Contract_Date);
}
/** A_Due_On AD_Reference_ID=53272 */
public static final int A_DUE_ON_AD_Reference_ID=53272;
/** 15th of every month = 15T */
public static final String A_DUE_ON_15thOfEveryMonth = "15T";
/** 1st of every month = 1st */
public static final String A_DUE_ON_1stOfEveryMonth = "1st";
/** Beginning of every month = BEG */
public static final String A_DUE_ON_BeginningOfEveryMonth = "BEG";
/** Yearly on or before contract date = YER */
public static final String A_DUE_ON_YearlyOnOrBeforeContractDate = "YER";
/** Set A_Due_On.
@param A_Due_On A_Due_On */
public void setA_Due_On (String A_Due_On)
{
if (A_Due_On == null || A_Due_On.equals("15T") || A_Due_On.equals("1st") || A_Due_On.equals("BEG") || A_Due_On.equals("YER")); else throw new IllegalArgumentException ("A_Due_On Invalid value - " + A_Due_On + " - Reference_ID=53272 - 15T - 1st - BEG - YER");
if (A_Due_On != null && A_Due_On.length() > 22)
{
log.warning("Length > 22 - truncated");
A_Due_On = A_Due_On.substring(0, 22);
}
set_Value (COLUMNNAME_A_Due_On, A_Due_On);
}
/** Get A_Due_On.
@return A_Due_On */
public String getA_Due_On ()
{
return (String)get_Value(COLUMNNAME_A_Due_On);
}
/** Set A_Expired_Date.
@param A_Expired_Date A_Expired_Date */
public void setA_Expired_Date (Timestamp A_Expired_Date)
{
set_Value (COLUMNNAME_A_Expired_Date, A_Expired_Date);
}
/** Get A_Expired_Date.
@return A_Expired_Date */
public Timestamp getA_Expired_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Expired_Date);
}
/** A_Finance_Meth AD_Reference_ID=53271 */
public static final int A_FINANCE_METH_AD_Reference_ID=53271;
/** Capitalized Lease = CL */
public static final String A_FINANCE_METH_CapitalizedLease = "CL";
/** Non-Capitalized Lease = NL */
public static final String A_FINANCE_METH_Non_CapitalizedLease = "NL";
/** Owned = OW */
public static final String A_FINANCE_METH_Owned = "OW";
/** Rented = RE */
public static final String A_FINANCE_METH_Rented = "RE";
/** Set A_Finance_Meth.
@param A_Finance_Meth A_Finance_Meth */
public void setA_Finance_Meth (String A_Finance_Meth)
{
if (A_Finance_Meth == null || A_Finance_Meth.equals("CL") || A_Finance_Meth.equals("NL") || A_Finance_Meth.equals("OW") || A_Finance_Meth.equals("RE")); else throw new IllegalArgumentException ("A_Finance_Meth Invalid value - " + A_Finance_Meth + " - Reference_ID=53271 - CL - NL - OW - RE");
if (A_Finance_Meth != null && A_Finance_Meth.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Finance_Meth = A_Finance_Meth.substring(0, 2);
}
set_Value (COLUMNNAME_A_Finance_Meth, A_Finance_Meth);
}
/** Get A_Finance_Meth.
@return A_Finance_Meth */
public String getA_Finance_Meth ()
{
return (String)get_Value(COLUMNNAME_A_Finance_Meth);
}
/** Set A_Monthly_Payment.
@param A_Monthly_Payment A_Monthly_Payment */
public void setA_Monthly_Payment (BigDecimal A_Monthly_Payment)
{
set_Value (COLUMNNAME_A_Monthly_Payment, A_Monthly_Payment);
}
/** Get A_Monthly_Payment.
@return A_Monthly_Payment */
public BigDecimal getA_Monthly_Payment ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Monthly_Payment);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Purchase_Option.
@param A_Purchase_Option A_Purchase_Option */
public void setA_Purchase_Option (boolean A_Purchase_Option)
{
set_Value (COLUMNNAME_A_Purchase_Option, Boolean.valueOf(A_Purchase_Option));
}
/** Get A_Purchase_Option.
@return A_Purchase_Option */
public boolean isA_Purchase_Option ()
{
Object oo = get_Value(COLUMNNAME_A_Purchase_Option);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set A_Purchase_Option_Credit.
@param A_Purchase_Option_Credit A_Purchase_Option_Credit */
public void setA_Purchase_Option_Credit (int A_Purchase_Option_Credit)
{
set_Value (COLUMNNAME_A_Purchase_Option_Credit, Integer.valueOf(A_Purchase_Option_Credit));
}
/** Get A_Purchase_Option_Credit.
@return A_Purchase_Option_Credit */
public int getA_Purchase_Option_Credit ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Purchase_Option_Credit);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Purchase_Option_Credit_Per.
@param A_Purchase_Option_Credit_Per A_Purchase_Option_Credit_Per */
public void setA_Purchase_Option_Credit_Per (BigDecimal A_Purchase_Option_Credit_Per)
{
set_Value (COLUMNNAME_A_Purchase_Option_Credit_Per, A_Purchase_Option_Credit_Per);
}
/** Get A_Purchase_Option_Credit_Per.
@return A_Purchase_Option_Credit_Per */
public BigDecimal getA_Purchase_Option_Credit_Per ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Purchase_Option_Credit_Per);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Purchase_Price.
@param A_Purchase_Price A_Purchase_Price */
public void setA_Purchase_Price (BigDecimal A_Purchase_Price)
{
set_Value (COLUMNNAME_A_Purchase_Price, A_Purchase_Price);
}
/** Get A_Purchase_Price.
@return A_Purchase_Price */
public BigDecimal getA_Purchase_Price ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Purchase_Price);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Business Partner .
@param C_BPartner_ID
Identifies a Business Partner
*/
public void setC_BPartner_ID (int C_BPartner_ID)
{
if (C_BPartner_ID < 1)
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();
}
/** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
if (TextMsg != null && TextMsg.length() > 510)
{
log.warning("Length > 510 - truncated");
TextMsg = TextMsg.substring(0, 510);
}
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
/** Get Text Message.
@return Text Message
*/
public String getTextMsg ()
{
return (String)get_Value(COLUMNNAME_TextMsg);
}
}

View File

@ -0,0 +1,250 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Info_Ins
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Info_Ins extends PO implements I_A_Asset_Info_Ins, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Info_Ins (Properties ctx, int A_Asset_Info_Ins_ID, String trxName)
{
super (ctx, A_Asset_Info_Ins_ID, trxName);
/** if (A_Asset_Info_Ins_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Info_Ins_ID (0);
} */
}
/** Load Constructor */
public X_A_Asset_Info_Ins (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Info_Ins[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Info_Ins_ID.
@param A_Asset_Info_Ins_ID A_Asset_Info_Ins_ID */
public void setA_Asset_Info_Ins_ID (int A_Asset_Info_Ins_ID)
{
if (A_Asset_Info_Ins_ID < 1)
throw new IllegalArgumentException ("A_Asset_Info_Ins_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Info_Ins_ID, Integer.valueOf(A_Asset_Info_Ins_ID));
}
/** Get A_Asset_Info_Ins_ID.
@return A_Asset_Info_Ins_ID */
public int getA_Asset_Info_Ins_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Info_Ins_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Info_Ins_ID()));
}
/** Set A_Ins_Premium.
@param A_Ins_Premium A_Ins_Premium */
public void setA_Ins_Premium (BigDecimal A_Ins_Premium)
{
set_Value (COLUMNNAME_A_Ins_Premium, A_Ins_Premium);
}
/** Get A_Ins_Premium.
@return A_Ins_Premium */
public BigDecimal getA_Ins_Premium ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Ins_Premium);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Ins_Value.
@param A_Ins_Value A_Ins_Value */
public void setA_Ins_Value (BigDecimal A_Ins_Value)
{
set_Value (COLUMNNAME_A_Ins_Value, A_Ins_Value);
}
/** Get A_Ins_Value.
@return A_Ins_Value */
public BigDecimal getA_Ins_Value ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Ins_Value);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Insurance_Co.
@param A_Insurance_Co A_Insurance_Co */
public void setA_Insurance_Co (String A_Insurance_Co)
{
if (A_Insurance_Co != null && A_Insurance_Co.length() > 22)
{
log.warning("Length > 22 - truncated");
A_Insurance_Co = A_Insurance_Co.substring(0, 22);
}
set_Value (COLUMNNAME_A_Insurance_Co, A_Insurance_Co);
}
/** Get A_Insurance_Co.
@return A_Insurance_Co */
public String getA_Insurance_Co ()
{
return (String)get_Value(COLUMNNAME_A_Insurance_Co);
}
/** Set A_Policy_No.
@param A_Policy_No A_Policy_No */
public void setA_Policy_No (String A_Policy_No)
{
if (A_Policy_No != null && A_Policy_No.length() > 100)
{
log.warning("Length > 100 - truncated");
A_Policy_No = A_Policy_No.substring(0, 100);
}
set_Value (COLUMNNAME_A_Policy_No, A_Policy_No);
}
/** Get A_Policy_No.
@return A_Policy_No */
public String getA_Policy_No ()
{
return (String)get_Value(COLUMNNAME_A_Policy_No);
}
/** Set A_Renewal_Date.
@param A_Renewal_Date A_Renewal_Date */
public void setA_Renewal_Date (Timestamp A_Renewal_Date)
{
set_Value (COLUMNNAME_A_Renewal_Date, A_Renewal_Date);
}
/** Get A_Renewal_Date.
@return A_Renewal_Date */
public Timestamp getA_Renewal_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Renewal_Date);
}
/** Set A_Replace_Cost.
@param A_Replace_Cost A_Replace_Cost */
public void setA_Replace_Cost (BigDecimal A_Replace_Cost)
{
set_Value (COLUMNNAME_A_Replace_Cost, A_Replace_Cost);
}
/** Get A_Replace_Cost.
@return A_Replace_Cost */
public BigDecimal getA_Replace_Cost ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Replace_Cost);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Text.
@param Text Text */
public void setText (String Text)
{
if (Text != null && Text.length() > 510)
{
log.warning("Length > 510 - truncated");
Text = Text.substring(0, 510);
}
set_Value (COLUMNNAME_Text, Text);
}
/** Get Text.
@return Text */
public String getText ()
{
return (String)get_Value(COLUMNNAME_Text);
}
}

View File

@ -0,0 +1,239 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Info_Lic
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Info_Lic extends PO implements I_A_Asset_Info_Lic, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Info_Lic (Properties ctx, int A_Asset_Info_Lic_ID, String trxName)
{
super (ctx, A_Asset_Info_Lic_ID, trxName);
/** if (A_Asset_Info_Lic_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Info_Lic_ID (0);
} */
}
/** Load Constructor */
public X_A_Asset_Info_Lic (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Info_Lic[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Info_Lic_ID.
@param A_Asset_Info_Lic_ID A_Asset_Info_Lic_ID */
public void setA_Asset_Info_Lic_ID (int A_Asset_Info_Lic_ID)
{
if (A_Asset_Info_Lic_ID < 1)
throw new IllegalArgumentException ("A_Asset_Info_Lic_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Info_Lic_ID, Integer.valueOf(A_Asset_Info_Lic_ID));
}
/** Get A_Asset_Info_Lic_ID.
@return A_Asset_Info_Lic_ID */
public int getA_Asset_Info_Lic_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Info_Lic_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Info_Lic_ID()));
}
/** Set A_Issuing_Agency.
@param A_Issuing_Agency A_Issuing_Agency */
public void setA_Issuing_Agency (String A_Issuing_Agency)
{
if (A_Issuing_Agency != null && A_Issuing_Agency.length() > 22)
{
log.warning("Length > 22 - truncated");
A_Issuing_Agency = A_Issuing_Agency.substring(0, 22);
}
set_Value (COLUMNNAME_A_Issuing_Agency, A_Issuing_Agency);
}
/** Get A_Issuing_Agency.
@return A_Issuing_Agency */
public String getA_Issuing_Agency ()
{
return (String)get_Value(COLUMNNAME_A_Issuing_Agency);
}
/** Set A_License_Fee.
@param A_License_Fee A_License_Fee */
public void setA_License_Fee (BigDecimal A_License_Fee)
{
set_Value (COLUMNNAME_A_License_Fee, A_License_Fee);
}
/** Get A_License_Fee.
@return A_License_Fee */
public BigDecimal getA_License_Fee ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_License_Fee);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_License_No.
@param A_License_No A_License_No */
public void setA_License_No (String A_License_No)
{
if (A_License_No != null && A_License_No.length() > 120)
{
log.warning("Length > 120 - truncated");
A_License_No = A_License_No.substring(0, 120);
}
set_Value (COLUMNNAME_A_License_No, A_License_No);
}
/** Get A_License_No.
@return A_License_No */
public String getA_License_No ()
{
return (String)get_Value(COLUMNNAME_A_License_No);
}
/** Set A_Renewal_Date.
@param A_Renewal_Date A_Renewal_Date */
public void setA_Renewal_Date (Timestamp A_Renewal_Date)
{
set_Value (COLUMNNAME_A_Renewal_Date, A_Renewal_Date);
}
/** Get A_Renewal_Date.
@return A_Renewal_Date */
public Timestamp getA_Renewal_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Renewal_Date);
}
/** Set Account State.
@param A_State
State of the Credit Card or Account holder
*/
public void setA_State (String A_State)
{
if (A_State != null && A_State.length() > 60)
{
log.warning("Length > 60 - truncated");
A_State = A_State.substring(0, 60);
}
set_Value (COLUMNNAME_A_State, A_State);
}
/** Get Account State.
@return State of the Credit Card or Account holder
*/
public String getA_State ()
{
return (String)get_Value(COLUMNNAME_A_State);
}
/** Set Text.
@param Text Text */
public void setText (String Text)
{
if (Text != null && Text.length() > 510)
{
log.warning("Length > 510 - truncated");
Text = Text.substring(0, 510);
}
set_Value (COLUMNNAME_Text, Text);
}
/** Get Text.
@return Text */
public String getText ()
{
return (String)get_Value(COLUMNNAME_Text);
}
}

View File

@ -0,0 +1,433 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.util.Properties;
/** Generated Model for A_Asset_Info_Oth
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Info_Oth extends PO implements I_A_Asset_Info_Oth, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Info_Oth (Properties ctx, int A_Asset_Info_Oth_ID, String trxName)
{
super (ctx, A_Asset_Info_Oth_ID, trxName);
/** if (A_Asset_Info_Oth_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Info_Oth_ID (0);
} */
}
/** Load Constructor */
public X_A_Asset_Info_Oth (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Info_Oth[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Info_Oth_ID.
@param A_Asset_Info_Oth_ID A_Asset_Info_Oth_ID */
public void setA_Asset_Info_Oth_ID (int A_Asset_Info_Oth_ID)
{
if (A_Asset_Info_Oth_ID < 1)
throw new IllegalArgumentException ("A_Asset_Info_Oth_ID is mandatory.");
set_Value (COLUMNNAME_A_Asset_Info_Oth_ID, Integer.valueOf(A_Asset_Info_Oth_ID));
}
/** Get A_Asset_Info_Oth_ID.
@return A_Asset_Info_Oth_ID */
public int getA_Asset_Info_Oth_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Info_Oth_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_User1.
@param A_User1 A_User1 */
public void setA_User1 (String A_User1)
{
if (A_User1 != null && A_User1.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User1 = A_User1.substring(0, 3);
}
set_Value (COLUMNNAME_A_User1, A_User1);
}
/** Get A_User1.
@return A_User1 */
public String getA_User1 ()
{
return (String)get_Value(COLUMNNAME_A_User1);
}
/** Set A_User10.
@param A_User10 A_User10 */
public void setA_User10 (String A_User10)
{
if (A_User10 != null && A_User10.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User10 = A_User10.substring(0, 3);
}
set_Value (COLUMNNAME_A_User10, A_User10);
}
/** Get A_User10.
@return A_User10 */
public String getA_User10 ()
{
return (String)get_Value(COLUMNNAME_A_User10);
}
/** Set A_User11.
@param A_User11 A_User11 */
public void setA_User11 (String A_User11)
{
if (A_User11 != null && A_User11.length() > 10)
{
log.warning("Length > 10 - truncated");
A_User11 = A_User11.substring(0, 10);
}
set_Value (COLUMNNAME_A_User11, A_User11);
}
/** Get A_User11.
@return A_User11 */
public String getA_User11 ()
{
return (String)get_Value(COLUMNNAME_A_User11);
}
/** Set A_User12.
@param A_User12 A_User12 */
public void setA_User12 (String A_User12)
{
if (A_User12 != null && A_User12.length() > 10)
{
log.warning("Length > 10 - truncated");
A_User12 = A_User12.substring(0, 10);
}
set_Value (COLUMNNAME_A_User12, A_User12);
}
/** Get A_User12.
@return A_User12 */
public String getA_User12 ()
{
return (String)get_Value(COLUMNNAME_A_User12);
}
/** Set A_User13.
@param A_User13 A_User13 */
public void setA_User13 (String A_User13)
{
if (A_User13 != null && A_User13.length() > 10)
{
log.warning("Length > 10 - truncated");
A_User13 = A_User13.substring(0, 10);
}
set_Value (COLUMNNAME_A_User13, A_User13);
}
/** Get A_User13.
@return A_User13 */
public String getA_User13 ()
{
return (String)get_Value(COLUMNNAME_A_User13);
}
/** Set A_User14.
@param A_User14 A_User14 */
public void setA_User14 (String A_User14)
{
if (A_User14 != null && A_User14.length() > 10)
{
log.warning("Length > 10 - truncated");
A_User14 = A_User14.substring(0, 10);
}
set_Value (COLUMNNAME_A_User14, A_User14);
}
/** Get A_User14.
@return A_User14 */
public String getA_User14 ()
{
return (String)get_Value(COLUMNNAME_A_User14);
}
/** Set A_User15.
@param A_User15 A_User15 */
public void setA_User15 (String A_User15)
{
if (A_User15 != null && A_User15.length() > 10)
{
log.warning("Length > 10 - truncated");
A_User15 = A_User15.substring(0, 10);
}
set_Value (COLUMNNAME_A_User15, A_User15);
}
/** Get A_User15.
@return A_User15 */
public String getA_User15 ()
{
return (String)get_Value(COLUMNNAME_A_User15);
}
/** Set A_User2.
@param A_User2 A_User2 */
public void setA_User2 (String A_User2)
{
if (A_User2 != null && A_User2.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User2 = A_User2.substring(0, 3);
}
set_Value (COLUMNNAME_A_User2, A_User2);
}
/** Get A_User2.
@return A_User2 */
public String getA_User2 ()
{
return (String)get_Value(COLUMNNAME_A_User2);
}
/** Set A_User3.
@param A_User3 A_User3 */
public void setA_User3 (String A_User3)
{
if (A_User3 != null && A_User3.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User3 = A_User3.substring(0, 3);
}
set_Value (COLUMNNAME_A_User3, A_User3);
}
/** Get A_User3.
@return A_User3 */
public String getA_User3 ()
{
return (String)get_Value(COLUMNNAME_A_User3);
}
/** Set A_User4.
@param A_User4 A_User4 */
public void setA_User4 (String A_User4)
{
if (A_User4 != null && A_User4.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User4 = A_User4.substring(0, 3);
}
set_Value (COLUMNNAME_A_User4, A_User4);
}
/** Get A_User4.
@return A_User4 */
public String getA_User4 ()
{
return (String)get_Value(COLUMNNAME_A_User4);
}
/** Set A_User5.
@param A_User5 A_User5 */
public void setA_User5 (String A_User5)
{
if (A_User5 != null && A_User5.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User5 = A_User5.substring(0, 3);
}
set_Value (COLUMNNAME_A_User5, A_User5);
}
/** Get A_User5.
@return A_User5 */
public String getA_User5 ()
{
return (String)get_Value(COLUMNNAME_A_User5);
}
/** Set A_User6.
@param A_User6 A_User6 */
public void setA_User6 (String A_User6)
{
if (A_User6 != null && A_User6.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User6 = A_User6.substring(0, 3);
}
set_Value (COLUMNNAME_A_User6, A_User6);
}
/** Get A_User6.
@return A_User6 */
public String getA_User6 ()
{
return (String)get_Value(COLUMNNAME_A_User6);
}
/** Set A_User7.
@param A_User7 A_User7 */
public void setA_User7 (String A_User7)
{
if (A_User7 != null && A_User7.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User7 = A_User7.substring(0, 3);
}
set_Value (COLUMNNAME_A_User7, A_User7);
}
/** Get A_User7.
@return A_User7 */
public String getA_User7 ()
{
return (String)get_Value(COLUMNNAME_A_User7);
}
/** Set A_User8.
@param A_User8 A_User8 */
public void setA_User8 (String A_User8)
{
if (A_User8 != null && A_User8.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User8 = A_User8.substring(0, 3);
}
set_Value (COLUMNNAME_A_User8, A_User8);
}
/** Get A_User8.
@return A_User8 */
public String getA_User8 ()
{
return (String)get_Value(COLUMNNAME_A_User8);
}
/** Set A_User9.
@param A_User9 A_User9 */
public void setA_User9 (String A_User9)
{
if (A_User9 != null && A_User9.length() > 3)
{
log.warning("Length > 3 - truncated");
A_User9 = A_User9.substring(0, 3);
}
set_Value (COLUMNNAME_A_User9, A_User9);
}
/** Get A_User9.
@return A_User9 */
public String getA_User9 ()
{
return (String)get_Value(COLUMNNAME_A_User9);
}
/** Set Text.
@param Text Text */
public void setText (String Text)
{
if (Text != null && Text.length() > 510)
{
log.warning("Length > 510 - truncated");
Text = Text.substring(0, 510);
}
set_Value (COLUMNNAME_Text, Text);
}
/** Get Text.
@return Text */
public String getText ()
{
return (String)get_Value(COLUMNNAME_Text);
}
}

View File

@ -0,0 +1,257 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Info_Tax
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Info_Tax extends PO implements I_A_Asset_Info_Tax, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Info_Tax (Properties ctx, int A_Asset_Info_Tax_ID, String trxName)
{
super (ctx, A_Asset_Info_Tax_ID, trxName);
/** if (A_Asset_Info_Tax_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Info_Tax_ID (0);
} */
}
/** Load Constructor */
public X_A_Asset_Info_Tax (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Info_Tax[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Info_Tax_ID.
@param A_Asset_Info_Tax_ID A_Asset_Info_Tax_ID */
public void setA_Asset_Info_Tax_ID (int A_Asset_Info_Tax_ID)
{
if (A_Asset_Info_Tax_ID < 1)
throw new IllegalArgumentException ("A_Asset_Info_Tax_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Info_Tax_ID, Integer.valueOf(A_Asset_Info_Tax_ID));
}
/** Get A_Asset_Info_Tax_ID.
@return A_Asset_Info_Tax_ID */
public int getA_Asset_Info_Tax_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Info_Tax_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Info_Tax_ID()));
}
/** A_Finance_Meth AD_Reference_ID=53271 */
public static final int A_FINANCE_METH_AD_Reference_ID=53271;
/** Capitalized Lease = CL */
public static final String A_FINANCE_METH_CapitalizedLease = "CL";
/** Non-Capitalized Lease = NL */
public static final String A_FINANCE_METH_Non_CapitalizedLease = "NL";
/** Owned = OW */
public static final String A_FINANCE_METH_Owned = "OW";
/** Rented = RE */
public static final String A_FINANCE_METH_Rented = "RE";
/** Set A_Finance_Meth.
@param A_Finance_Meth A_Finance_Meth */
public void setA_Finance_Meth (String A_Finance_Meth)
{
if (A_Finance_Meth == null || A_Finance_Meth.equals("CL") || A_Finance_Meth.equals("NL") || A_Finance_Meth.equals("OW") || A_Finance_Meth.equals("RE")); else throw new IllegalArgumentException ("A_Finance_Meth Invalid value - " + A_Finance_Meth + " - Reference_ID=53271 - CL - NL - OW - RE");
if (A_Finance_Meth != null && A_Finance_Meth.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Finance_Meth = A_Finance_Meth.substring(0, 2);
}
set_Value (COLUMNNAME_A_Finance_Meth, A_Finance_Meth);
}
/** Get A_Finance_Meth.
@return A_Finance_Meth */
public String getA_Finance_Meth ()
{
return (String)get_Value(COLUMNNAME_A_Finance_Meth);
}
/** Set A_Investment_CR.
@param A_Investment_CR A_Investment_CR */
public void setA_Investment_CR (int A_Investment_CR)
{
set_Value (COLUMNNAME_A_Investment_CR, Integer.valueOf(A_Investment_CR));
}
/** Get A_Investment_CR.
@return A_Investment_CR */
public int getA_Investment_CR ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Investment_CR);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_New_Used.
@param A_New_Used A_New_Used */
public void setA_New_Used (boolean A_New_Used)
{
set_Value (COLUMNNAME_A_New_Used, Boolean.valueOf(A_New_Used));
}
/** Get A_New_Used.
@return A_New_Used */
public boolean isA_New_Used ()
{
Object oo = get_Value(COLUMNNAME_A_New_Used);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Account State.
@param A_State
State of the Credit Card or Account holder
*/
public void setA_State (String A_State)
{
if (A_State != null && A_State.length() > 60)
{
log.warning("Length > 60 - truncated");
A_State = A_State.substring(0, 60);
}
set_Value (COLUMNNAME_A_State, A_State);
}
/** Get Account State.
@return State of the Credit Card or Account holder
*/
public String getA_State ()
{
return (String)get_Value(COLUMNNAME_A_State);
}
/** Set A_Tax_Entity.
@param A_Tax_Entity A_Tax_Entity */
public void setA_Tax_Entity (String A_Tax_Entity)
{
if (A_Tax_Entity != null && A_Tax_Entity.length() > 22)
{
log.warning("Length > 22 - truncated");
A_Tax_Entity = A_Tax_Entity.substring(0, 22);
}
set_Value (COLUMNNAME_A_Tax_Entity, A_Tax_Entity);
}
/** Get A_Tax_Entity.
@return A_Tax_Entity */
public String getA_Tax_Entity ()
{
return (String)get_Value(COLUMNNAME_A_Tax_Entity);
}
/** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
if (TextMsg != null && TextMsg.length() > 510)
{
log.warning("Length > 510 - truncated");
TextMsg = TextMsg.substring(0, 510);
}
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
/** Get Text Message.
@return Text Message
*/
public String getTextMsg ()
{
return (String)get_Value(COLUMNNAME_TextMsg);
}
}

View File

@ -0,0 +1,588 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.lang.reflect.Constructor;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Reval_Entry
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Reval_Entry extends PO implements I_A_Asset_Reval_Entry, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Reval_Entry (Properties ctx, int A_Asset_Reval_Entry_ID, String trxName)
{
super (ctx, A_Asset_Reval_Entry_ID, trxName);
/** if (A_Asset_Reval_Entry_ID == 0)
{
setA_Asset_Reval_Entry_ID (0);
setA_Effective_Date (new Timestamp(System.currentTimeMillis()));
setA_Rev_Code (null);
setA_Reval_Cal_Method (null);
setA_Reval_Effective_Date (null);
setA_Reval_Multiplier (null);
setC_Currency_ID (0);
setDescription (null);
setDocumentNo (null);
setPostingType (null);
setProcessed (false);
setProcessing (false);
} */
}
/** Load Constructor */
public X_A_Asset_Reval_Entry (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Reval_Entry[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Asset_Reval_Entry_ID.
@param A_Asset_Reval_Entry_ID A_Asset_Reval_Entry_ID */
public void setA_Asset_Reval_Entry_ID (int A_Asset_Reval_Entry_ID)
{
if (A_Asset_Reval_Entry_ID < 1)
throw new IllegalArgumentException ("A_Asset_Reval_Entry_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Reval_Entry_ID, Integer.valueOf(A_Asset_Reval_Entry_ID));
}
/** Get A_Asset_Reval_Entry_ID.
@return A_Asset_Reval_Entry_ID */
public int getA_Asset_Reval_Entry_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Reval_Entry_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Reval_Entry_ID()));
}
/** Set A_Effective_Date.
@param A_Effective_Date A_Effective_Date */
public void setA_Effective_Date (Timestamp A_Effective_Date)
{
if (A_Effective_Date == null)
throw new IllegalArgumentException ("A_Effective_Date is mandatory.");
set_Value (COLUMNNAME_A_Effective_Date, A_Effective_Date);
}
/** Get A_Effective_Date.
@return A_Effective_Date */
public Timestamp getA_Effective_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Effective_Date);
}
/** A_Rev_Code AD_Reference_ID=53262 */
public static final int A_REV_CODE_AD_Reference_ID=53262;
/** Revaluation Code #1 = R01 */
public static final String A_REV_CODE_RevaluationCode1 = "R01";
/** Revaluation Code #2 = R02 */
public static final String A_REV_CODE_RevaluationCode2 = "R02";
/** Revaluation Code #3 = R03 */
public static final String A_REV_CODE_RevaluationCode3 = "R03";
/** Set A_Rev_Code.
@param A_Rev_Code A_Rev_Code */
public void setA_Rev_Code (String A_Rev_Code)
{
if (A_Rev_Code == null) throw new IllegalArgumentException ("A_Rev_Code is mandatory");
if (A_Rev_Code.equals("R01") || A_Rev_Code.equals("R02") || A_Rev_Code.equals("R03")); else throw new IllegalArgumentException ("A_Rev_Code Invalid value - " + A_Rev_Code + " - Reference_ID=53262 - R01 - R02 - R03");
if (A_Rev_Code.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Rev_Code = A_Rev_Code.substring(0, 3);
}
set_Value (COLUMNNAME_A_Rev_Code, A_Rev_Code);
}
/** Get A_Rev_Code.
@return A_Rev_Code */
public String getA_Rev_Code ()
{
return (String)get_Value(COLUMNNAME_A_Rev_Code);
}
/** A_Reval_Cal_Method AD_Reference_ID=53259 */
public static final int A_REVAL_CAL_METHOD_AD_Reference_ID=53259;
/** Default = DFT */
public static final String A_REVAL_CAL_METHOD_Default = "DFT";
/** Inception to date = IDF */
public static final String A_REVAL_CAL_METHOD_InceptionToDate = "IDF";
/** Year Balances = YBF */
public static final String A_REVAL_CAL_METHOD_YearBalances = "YBF";
/** Set A_Reval_Cal_Method.
@param A_Reval_Cal_Method A_Reval_Cal_Method */
public void setA_Reval_Cal_Method (String A_Reval_Cal_Method)
{
if (A_Reval_Cal_Method == null) throw new IllegalArgumentException ("A_Reval_Cal_Method is mandatory");
if (A_Reval_Cal_Method.equals("DFT") || A_Reval_Cal_Method.equals("IDF") || A_Reval_Cal_Method.equals("YBF")); else throw new IllegalArgumentException ("A_Reval_Cal_Method Invalid value - " + A_Reval_Cal_Method + " - Reference_ID=53259 - DFT - IDF - YBF");
if (A_Reval_Cal_Method.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Reval_Cal_Method = A_Reval_Cal_Method.substring(0, 3);
}
set_Value (COLUMNNAME_A_Reval_Cal_Method, A_Reval_Cal_Method);
}
/** Get A_Reval_Cal_Method.
@return A_Reval_Cal_Method */
public String getA_Reval_Cal_Method ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Cal_Method);
}
/** A_Reval_Effective_Date AD_Reference_ID=53261 */
public static final int A_REVAL_EFFECTIVE_DATE_AD_Reference_ID=53261;
/** Date Aquired = DA */
public static final String A_REVAL_EFFECTIVE_DATE_DateAquired = "DA";
/** Revaluation Date = RD */
public static final String A_REVAL_EFFECTIVE_DATE_RevaluationDate = "RD";
/** Date Depreciation Started = SD */
public static final String A_REVAL_EFFECTIVE_DATE_DateDepreciationStarted = "SD";
/** Set A_Reval_Effective_Date.
@param A_Reval_Effective_Date A_Reval_Effective_Date */
public void setA_Reval_Effective_Date (String A_Reval_Effective_Date)
{
if (A_Reval_Effective_Date == null) throw new IllegalArgumentException ("A_Reval_Effective_Date is mandatory");
if (A_Reval_Effective_Date.equals("DA") || A_Reval_Effective_Date.equals("RD") || A_Reval_Effective_Date.equals("SD")); else throw new IllegalArgumentException ("A_Reval_Effective_Date Invalid value - " + A_Reval_Effective_Date + " - Reference_ID=53261 - DA - RD - SD");
if (A_Reval_Effective_Date.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Reval_Effective_Date = A_Reval_Effective_Date.substring(0, 2);
}
set_Value (COLUMNNAME_A_Reval_Effective_Date, A_Reval_Effective_Date);
}
/** Get A_Reval_Effective_Date.
@return A_Reval_Effective_Date */
public String getA_Reval_Effective_Date ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Effective_Date);
}
/** A_Reval_Multiplier AD_Reference_ID=53260 */
public static final int A_REVAL_MULTIPLIER_AD_Reference_ID=53260;
/** Factor = FAC */
public static final String A_REVAL_MULTIPLIER_Factor = "FAC";
/** Index = IND */
public static final String A_REVAL_MULTIPLIER_Index = "IND";
/** Set A_Reval_Multiplier.
@param A_Reval_Multiplier A_Reval_Multiplier */
public void setA_Reval_Multiplier (String A_Reval_Multiplier)
{
if (A_Reval_Multiplier == null) throw new IllegalArgumentException ("A_Reval_Multiplier is mandatory");
if (A_Reval_Multiplier.equals("FAC") || A_Reval_Multiplier.equals("IND")); else throw new IllegalArgumentException ("A_Reval_Multiplier Invalid value - " + A_Reval_Multiplier + " - Reference_ID=53260 - FAC - IND");
if (A_Reval_Multiplier.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Reval_Multiplier = A_Reval_Multiplier.substring(0, 3);
}
set_Value (COLUMNNAME_A_Reval_Multiplier, A_Reval_Multiplier);
}
/** Get A_Reval_Multiplier.
@return A_Reval_Multiplier */
public String getA_Reval_Multiplier ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Multiplier);
}
public I_C_AcctSchema getC_AcctSchema() throws Exception
{
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_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 Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
set_Value (COLUMNNAME_C_AcctSchema_ID, null);
else
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_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 < 1)
throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
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 < 1)
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();
}
/** C_Period_ID AD_Reference_ID=233 */
public static final int C_PERIOD_ID_AD_Reference_ID=233;
/** Set Period.
@param C_Period_ID
Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID)
{
if (C_Period_ID < 1)
set_Value (COLUMNNAME_C_Period_ID, null);
else
set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
}
/** Get Period.
@return Period of the Calendar
*/
public int getC_Period_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** 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 Document Date.
@param DateDoc
Date of the Document
*/
public void setDateDoc (Timestamp DateDoc)
{
set_Value (COLUMNNAME_DateDoc, DateDoc);
}
/** Get Document Date.
@return Date of the Document
*/
public Timestamp getDateDoc ()
{
return (Timestamp)get_Value(COLUMNNAME_DateDoc);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description == null)
throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
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 No.
@param DocumentNo
Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo)
{
if (DocumentNo == null)
throw new IllegalArgumentException ("DocumentNo is mandatory.");
if (DocumentNo.length() > 60)
{
log.warning("Length > 60 - truncated");
DocumentNo = DocumentNo.substring(0, 60);
}
set_Value (COLUMNNAME_DocumentNo, DocumentNo);
}
/** Get Document No.
@return Document sequence number of the document
*/
public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
public I_GL_Category getGL_Category() throws Exception
{
Class<?> clazz = MTable.getClass(I_GL_Category.Table_Name);
I_GL_Category result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_GL_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Category_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 GL Category.
@param GL_Category_ID
General Ledger Category
*/
public void setGL_Category_ID (int GL_Category_ID)
{
if (GL_Category_ID < 1)
set_Value (COLUMNNAME_GL_Category_ID, null);
else
set_Value (COLUMNNAME_GL_Category_ID, Integer.valueOf(GL_Category_ID));
}
/** Get GL Category.
@return General Ledger Category
*/
public int getGL_Category_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Category_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory");
if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,197 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Reval_Index
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Reval_Index extends PO implements I_A_Asset_Reval_Index, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Reval_Index (Properties ctx, int A_Asset_Reval_Index_ID, String trxName)
{
super (ctx, A_Asset_Reval_Index_ID, trxName);
/** if (A_Asset_Reval_Index_ID == 0)
{
setA_Asset_Reval_Index_ID (0);
setA_Effective_Date (new Timestamp(System.currentTimeMillis()));
setA_Reval_Code (null);
setA_Reval_Multiplier (null);
setA_Reval_Rate (Env.ZERO);
} */
}
/** Load Constructor */
public X_A_Asset_Reval_Index (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Reval_Index[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Asset_Reval_Index_ID.
@param A_Asset_Reval_Index_ID A_Asset_Reval_Index_ID */
public void setA_Asset_Reval_Index_ID (int A_Asset_Reval_Index_ID)
{
if (A_Asset_Reval_Index_ID < 1)
throw new IllegalArgumentException ("A_Asset_Reval_Index_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Reval_Index_ID, Integer.valueOf(A_Asset_Reval_Index_ID));
}
/** Get A_Asset_Reval_Index_ID.
@return A_Asset_Reval_Index_ID */
public int getA_Asset_Reval_Index_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Reval_Index_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Reval_Index_ID()));
}
/** Set A_Effective_Date.
@param A_Effective_Date A_Effective_Date */
public void setA_Effective_Date (Timestamp A_Effective_Date)
{
if (A_Effective_Date == null)
throw new IllegalArgumentException ("A_Effective_Date is mandatory.");
set_Value (COLUMNNAME_A_Effective_Date, A_Effective_Date);
}
/** Get A_Effective_Date.
@return A_Effective_Date */
public Timestamp getA_Effective_Date ()
{
return (Timestamp)get_Value(COLUMNNAME_A_Effective_Date);
}
/** A_Reval_Code AD_Reference_ID=53262 */
public static final int A_REVAL_CODE_AD_Reference_ID=53262;
/** Revaluation Code #1 = R01 */
public static final String A_REVAL_CODE_RevaluationCode1 = "R01";
/** Revaluation Code #2 = R02 */
public static final String A_REVAL_CODE_RevaluationCode2 = "R02";
/** Revaluation Code #3 = R03 */
public static final String A_REVAL_CODE_RevaluationCode3 = "R03";
/** Set A_Reval_Code.
@param A_Reval_Code A_Reval_Code */
public void setA_Reval_Code (String A_Reval_Code)
{
if (A_Reval_Code == null) throw new IllegalArgumentException ("A_Reval_Code is mandatory");
if (A_Reval_Code.equals("R01") || A_Reval_Code.equals("R02") || A_Reval_Code.equals("R03")); else throw new IllegalArgumentException ("A_Reval_Code Invalid value - " + A_Reval_Code + " - Reference_ID=53262 - R01 - R02 - R03");
if (A_Reval_Code.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Reval_Code = A_Reval_Code.substring(0, 3);
}
set_Value (COLUMNNAME_A_Reval_Code, A_Reval_Code);
}
/** Get A_Reval_Code.
@return A_Reval_Code */
public String getA_Reval_Code ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Code);
}
/** A_Reval_Multiplier AD_Reference_ID=53260 */
public static final int A_REVAL_MULTIPLIER_AD_Reference_ID=53260;
/** Factor = FAC */
public static final String A_REVAL_MULTIPLIER_Factor = "FAC";
/** Index = IND */
public static final String A_REVAL_MULTIPLIER_Index = "IND";
/** Set A_Reval_Multiplier.
@param A_Reval_Multiplier A_Reval_Multiplier */
public void setA_Reval_Multiplier (String A_Reval_Multiplier)
{
if (A_Reval_Multiplier == null) throw new IllegalArgumentException ("A_Reval_Multiplier is mandatory");
if (A_Reval_Multiplier.equals("FAC") || A_Reval_Multiplier.equals("IND")); else throw new IllegalArgumentException ("A_Reval_Multiplier Invalid value - " + A_Reval_Multiplier + " - Reference_ID=53260 - FAC - IND");
if (A_Reval_Multiplier.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Reval_Multiplier = A_Reval_Multiplier.substring(0, 3);
}
set_Value (COLUMNNAME_A_Reval_Multiplier, A_Reval_Multiplier);
}
/** Get A_Reval_Multiplier.
@return A_Reval_Multiplier */
public String getA_Reval_Multiplier ()
{
return (String)get_Value(COLUMNNAME_A_Reval_Multiplier);
}
/** Set A_Reval_Rate.
@param A_Reval_Rate A_Reval_Rate */
public void setA_Reval_Rate (BigDecimal A_Reval_Rate)
{
if (A_Reval_Rate == null)
throw new IllegalArgumentException ("A_Reval_Rate is mandatory.");
set_Value (COLUMNNAME_A_Reval_Rate, A_Reval_Rate);
}
/** Get A_Reval_Rate.
@return A_Reval_Rate */
public BigDecimal getA_Reval_Rate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Reval_Rate);
if (bd == null)
return Env.ZERO;
return bd;
}
}

View File

@ -0,0 +1,477 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Split
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Split extends PO implements I_A_Asset_Split, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Split (Properties ctx, int A_Asset_Split_ID, String trxName)
{
super (ctx, A_Asset_Split_ID, trxName);
/** if (A_Asset_Split_ID == 0)
{
setA_Asset_Acct_ID (0);
// @SQL=SELECT A_Asset_Acct_ID FROM A_Asset_Acct WHERE A_Asset_Acct.A_Asset_Acct_ID=@A_Asset_Acct_ID@
setA_Asset_ID (0);
// @SQL=SELECT A_Asset_ID FROM A_Asset WHERE A_Asset.A_Asset_ID=@A_Asset_ID@
setA_Asset_Split_ID (0);
setA_Depreciation_Workfile_ID (0);
// @SQL=SELECT A_Depreciation_Workfile_ID FROM A_Depreciation_Workfile WHERE A_Depreciation_Workfile.A_Depreciation_Workfile_ID=@A_Depreciation_Workfile_ID@
setA_QTY_Current (Env.ZERO);
// @SQL=SELECT A_QTY_Current FROM A_Depreciation_Workfile WHERE A_Depreciation_Workfile.A_Asset_ID=@A_Asset_ID@ and A_Depreciation_Workfile.PostingType='@PostingType@'
setA_Split_Type (null);
setA_Transfer_Balance_IS (false);
setC_Period_ID (0);
// @Date@
setDateAcct (new Timestamp(System.currentTimeMillis()));
// @Date@
setPostingType (null);
// @SQL=SELECT PostingType FROM A_Depreciation_Workfile WHERE A_Depreciation_Workfile.A_Depreciation_Workfile_ID=@A_Depreciation_Workfile_ID@
setProcessed (false);
setProcessing (false);
} */
}
/** Load Constructor */
public X_A_Asset_Split (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Split[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Amount_Split.
@param A_Amount_Split A_Amount_Split */
public void setA_Amount_Split (BigDecimal A_Amount_Split)
{
set_Value (COLUMNNAME_A_Amount_Split, A_Amount_Split);
}
/** Get A_Amount_Split.
@return A_Amount_Split */
public BigDecimal getA_Amount_Split ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Amount_Split);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Asset_Acct_ID.
@param A_Asset_Acct_ID A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID)
{
if (A_Asset_Acct_ID < 1)
throw new IllegalArgumentException ("A_Asset_Acct_ID is mandatory.");
set_Value (COLUMNNAME_A_Asset_Acct_ID, Integer.valueOf(A_Asset_Acct_ID));
}
/** Get A_Asset_Acct_ID.
@return A_Asset_Acct_ID */
public int getA_Asset_Acct_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Cost.
@param A_Asset_Cost A_Asset_Cost */
public void setA_Asset_Cost (BigDecimal A_Asset_Cost)
{
set_Value (COLUMNNAME_A_Asset_Cost, A_Asset_Cost);
}
/** Get A_Asset_Cost.
@return A_Asset_Cost */
public BigDecimal getA_Asset_Cost ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Asset_Cost);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Asset_ID_To AD_Reference_ID=53258 */
public static final int A_ASSET_ID_TO_AD_Reference_ID=53258;
/** Set A_Asset_ID_To.
@param A_Asset_ID_To A_Asset_ID_To */
public void setA_Asset_ID_To (int A_Asset_ID_To)
{
set_Value (COLUMNNAME_A_Asset_ID_To, Integer.valueOf(A_Asset_ID_To));
}
/** Get A_Asset_ID_To.
@return A_Asset_ID_To */
public int getA_Asset_ID_To ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID_To);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Split_ID.
@param A_Asset_Split_ID A_Asset_Split_ID */
public void setA_Asset_Split_ID (int A_Asset_Split_ID)
{
if (A_Asset_Split_ID < 1)
throw new IllegalArgumentException ("A_Asset_Split_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Split_ID, Integer.valueOf(A_Asset_Split_ID));
}
/** Get A_Asset_Split_ID.
@return A_Asset_Split_ID */
public int getA_Asset_Split_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Split_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Split_ID()));
}
/** Set A_Depreciation_Workfile_ID.
@param A_Depreciation_Workfile_ID A_Depreciation_Workfile_ID */
public void setA_Depreciation_Workfile_ID (int A_Depreciation_Workfile_ID)
{
if (A_Depreciation_Workfile_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Workfile_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Workfile_ID, Integer.valueOf(A_Depreciation_Workfile_ID));
}
/** Get A_Depreciation_Workfile_ID.
@return A_Depreciation_Workfile_ID */
public int getA_Depreciation_Workfile_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Workfile_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Percent_Original.
@param A_Percent_Original A_Percent_Original */
public void setA_Percent_Original (BigDecimal A_Percent_Original)
{
set_Value (COLUMNNAME_A_Percent_Original, A_Percent_Original);
}
/** Get A_Percent_Original.
@return A_Percent_Original */
public BigDecimal getA_Percent_Original ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Percent_Original);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Percent_Split.
@param A_Percent_Split A_Percent_Split */
public void setA_Percent_Split (BigDecimal A_Percent_Split)
{
set_Value (COLUMNNAME_A_Percent_Split, A_Percent_Split);
}
/** Get A_Percent_Split.
@return A_Percent_Split */
public BigDecimal getA_Percent_Split ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Percent_Split);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_QTY_Current.
@param A_QTY_Current A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current)
{
if (A_QTY_Current == null)
throw new IllegalArgumentException ("A_QTY_Current is mandatory.");
set_Value (COLUMNNAME_A_QTY_Current, A_QTY_Current);
}
/** Get A_QTY_Current.
@return A_QTY_Current */
public BigDecimal getA_QTY_Current ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_QTY_Current);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_QTY_Split.
@param A_QTY_Split A_QTY_Split */
public void setA_QTY_Split (BigDecimal A_QTY_Split)
{
set_Value (COLUMNNAME_A_QTY_Split, A_QTY_Split);
}
/** Get A_QTY_Split.
@return A_QTY_Split */
public BigDecimal getA_QTY_Split ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_QTY_Split);
if (bd == null)
return Env.ZERO;
return bd;
}
/** A_Split_Type AD_Reference_ID=53263 */
public static final int A_SPLIT_TYPE_AD_Reference_ID=53263;
/** Amount = AMT */
public static final String A_SPLIT_TYPE_Amount = "AMT";
/** Percentage = PER */
public static final String A_SPLIT_TYPE_Percentage = "PER";
/** Quantity = QTY */
public static final String A_SPLIT_TYPE_Quantity = "QTY";
/** Set A_Split_Type.
@param A_Split_Type A_Split_Type */
public void setA_Split_Type (String A_Split_Type)
{
if (A_Split_Type == null) throw new IllegalArgumentException ("A_Split_Type is mandatory");
if (A_Split_Type.equals("AMT") || A_Split_Type.equals("PER") || A_Split_Type.equals("QTY")); else throw new IllegalArgumentException ("A_Split_Type Invalid value - " + A_Split_Type + " - Reference_ID=53263 - AMT - PER - QTY");
if (A_Split_Type.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Split_Type = A_Split_Type.substring(0, 3);
}
set_Value (COLUMNNAME_A_Split_Type, A_Split_Type);
}
/** Get A_Split_Type.
@return A_Split_Type */
public String getA_Split_Type ()
{
return (String)get_Value(COLUMNNAME_A_Split_Type);
}
/** Set A_Transfer_Balance_IS.
@param A_Transfer_Balance_IS A_Transfer_Balance_IS */
public void setA_Transfer_Balance_IS (boolean A_Transfer_Balance_IS)
{
set_Value (COLUMNNAME_A_Transfer_Balance_IS, Boolean.valueOf(A_Transfer_Balance_IS));
}
/** Get A_Transfer_Balance_IS.
@return A_Transfer_Balance_IS */
public boolean isA_Transfer_Balance_IS ()
{
Object oo = get_Value(COLUMNNAME_A_Transfer_Balance_IS);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** C_Period_ID AD_Reference_ID=233 */
public static final int C_PERIOD_ID_AD_Reference_ID=233;
/** Set Period.
@param C_Period_ID
Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID)
{
if (C_Period_ID < 1)
throw new IllegalArgumentException ("C_Period_ID is mandatory.");
set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
}
/** Get Period.
@return Period of the Calendar
*/
public int getC_Period_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Account Date.
@param DateAcct
Accounting Date
*/
public void setDateAcct (Timestamp DateAcct)
{
if (DateAcct == null)
throw new IllegalArgumentException ("DateAcct is mandatory.");
set_Value (COLUMNNAME_DateAcct, DateAcct);
}
/** Get Account Date.
@return Accounting Date
*/
public Timestamp getDateAcct ()
{
return (Timestamp)get_Value(COLUMNNAME_DateAcct);
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory");
if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_ValueNoCheck (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,424 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Spread
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Spread extends PO implements I_A_Asset_Spread, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Spread (Properties ctx, int A_Asset_Spread_ID, String trxName)
{
super (ctx, A_Asset_Spread_ID, trxName);
/** if (A_Asset_Spread_ID == 0)
{
setA_Asset_Spread_ID (0);
setA_Period_1 (Env.ZERO);
setA_Period_10 (Env.ZERO);
setA_Period_11 (Env.ZERO);
setA_Period_12 (Env.ZERO);
setA_Period_13 (Env.ZERO);
setA_Period_14 (Env.ZERO);
setA_Period_2 (Env.ZERO);
setA_Period_3 (Env.ZERO);
setA_Period_4 (Env.ZERO);
setA_Period_5 (Env.ZERO);
setA_Period_6 (Env.ZERO);
setA_Period_7 (Env.ZERO);
setA_Period_8 (Env.ZERO);
setA_Period_9 (Env.ZERO);
} */
}
/** Load Constructor */
public X_A_Asset_Spread (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Spread[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Asset_Spread_ID.
@param A_Asset_Spread_ID A_Asset_Spread_ID */
public void setA_Asset_Spread_ID (int A_Asset_Spread_ID)
{
if (A_Asset_Spread_ID < 1)
throw new IllegalArgumentException ("A_Asset_Spread_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Spread_ID, Integer.valueOf(A_Asset_Spread_ID));
}
/** Get A_Asset_Spread_ID.
@return A_Asset_Spread_ID */
public int getA_Asset_Spread_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Spread_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Spread_ID()));
}
/** Set A_Asset_Spread_Type.
@param A_Asset_Spread_Type A_Asset_Spread_Type */
public void setA_Asset_Spread_Type (String A_Asset_Spread_Type)
{
if (A_Asset_Spread_Type != null && A_Asset_Spread_Type.length() > 20)
{
log.warning("Length > 20 - truncated");
A_Asset_Spread_Type = A_Asset_Spread_Type.substring(0, 20);
}
set_Value (COLUMNNAME_A_Asset_Spread_Type, A_Asset_Spread_Type);
}
/** Get A_Asset_Spread_Type.
@return A_Asset_Spread_Type */
public String getA_Asset_Spread_Type ()
{
return (String)get_Value(COLUMNNAME_A_Asset_Spread_Type);
}
/** Set A_Period_1.
@param A_Period_1 A_Period_1 */
public void setA_Period_1 (BigDecimal A_Period_1)
{
if (A_Period_1 == null)
throw new IllegalArgumentException ("A_Period_1 is mandatory.");
set_Value (COLUMNNAME_A_Period_1, A_Period_1);
}
/** Get A_Period_1.
@return A_Period_1 */
public BigDecimal getA_Period_1 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_1);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_10.
@param A_Period_10 A_Period_10 */
public void setA_Period_10 (BigDecimal A_Period_10)
{
if (A_Period_10 == null)
throw new IllegalArgumentException ("A_Period_10 is mandatory.");
set_Value (COLUMNNAME_A_Period_10, A_Period_10);
}
/** Get A_Period_10.
@return A_Period_10 */
public BigDecimal getA_Period_10 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_10);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_11.
@param A_Period_11 A_Period_11 */
public void setA_Period_11 (BigDecimal A_Period_11)
{
if (A_Period_11 == null)
throw new IllegalArgumentException ("A_Period_11 is mandatory.");
set_Value (COLUMNNAME_A_Period_11, A_Period_11);
}
/** Get A_Period_11.
@return A_Period_11 */
public BigDecimal getA_Period_11 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_11);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_12.
@param A_Period_12 A_Period_12 */
public void setA_Period_12 (BigDecimal A_Period_12)
{
if (A_Period_12 == null)
throw new IllegalArgumentException ("A_Period_12 is mandatory.");
set_Value (COLUMNNAME_A_Period_12, A_Period_12);
}
/** Get A_Period_12.
@return A_Period_12 */
public BigDecimal getA_Period_12 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_12);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_13.
@param A_Period_13 A_Period_13 */
public void setA_Period_13 (BigDecimal A_Period_13)
{
if (A_Period_13 == null)
throw new IllegalArgumentException ("A_Period_13 is mandatory.");
set_Value (COLUMNNAME_A_Period_13, A_Period_13);
}
/** Get A_Period_13.
@return A_Period_13 */
public BigDecimal getA_Period_13 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_13);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_14.
@param A_Period_14 A_Period_14 */
public void setA_Period_14 (BigDecimal A_Period_14)
{
if (A_Period_14 == null)
throw new IllegalArgumentException ("A_Period_14 is mandatory.");
set_Value (COLUMNNAME_A_Period_14, A_Period_14);
}
/** Get A_Period_14.
@return A_Period_14 */
public BigDecimal getA_Period_14 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_14);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_2.
@param A_Period_2 A_Period_2 */
public void setA_Period_2 (BigDecimal A_Period_2)
{
if (A_Period_2 == null)
throw new IllegalArgumentException ("A_Period_2 is mandatory.");
set_Value (COLUMNNAME_A_Period_2, A_Period_2);
}
/** Get A_Period_2.
@return A_Period_2 */
public BigDecimal getA_Period_2 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_2);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_3.
@param A_Period_3 A_Period_3 */
public void setA_Period_3 (BigDecimal A_Period_3)
{
if (A_Period_3 == null)
throw new IllegalArgumentException ("A_Period_3 is mandatory.");
set_Value (COLUMNNAME_A_Period_3, A_Period_3);
}
/** Get A_Period_3.
@return A_Period_3 */
public BigDecimal getA_Period_3 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_3);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_4.
@param A_Period_4 A_Period_4 */
public void setA_Period_4 (BigDecimal A_Period_4)
{
if (A_Period_4 == null)
throw new IllegalArgumentException ("A_Period_4 is mandatory.");
set_Value (COLUMNNAME_A_Period_4, A_Period_4);
}
/** Get A_Period_4.
@return A_Period_4 */
public BigDecimal getA_Period_4 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_4);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_5.
@param A_Period_5 A_Period_5 */
public void setA_Period_5 (BigDecimal A_Period_5)
{
if (A_Period_5 == null)
throw new IllegalArgumentException ("A_Period_5 is mandatory.");
set_Value (COLUMNNAME_A_Period_5, A_Period_5);
}
/** Get A_Period_5.
@return A_Period_5 */
public BigDecimal getA_Period_5 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_5);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_6.
@param A_Period_6 A_Period_6 */
public void setA_Period_6 (BigDecimal A_Period_6)
{
if (A_Period_6 == null)
throw new IllegalArgumentException ("A_Period_6 is mandatory.");
set_Value (COLUMNNAME_A_Period_6, A_Period_6);
}
/** Get A_Period_6.
@return A_Period_6 */
public BigDecimal getA_Period_6 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_6);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_7.
@param A_Period_7 A_Period_7 */
public void setA_Period_7 (BigDecimal A_Period_7)
{
if (A_Period_7 == null)
throw new IllegalArgumentException ("A_Period_7 is mandatory.");
set_Value (COLUMNNAME_A_Period_7, A_Period_7);
}
/** Get A_Period_7.
@return A_Period_7 */
public BigDecimal getA_Period_7 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_7);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_8.
@param A_Period_8 A_Period_8 */
public void setA_Period_8 (BigDecimal A_Period_8)
{
if (A_Period_8 == null)
throw new IllegalArgumentException ("A_Period_8 is mandatory.");
set_Value (COLUMNNAME_A_Period_8, A_Period_8);
}
/** Get A_Period_8.
@return A_Period_8 */
public BigDecimal getA_Period_8 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_8);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_9.
@param A_Period_9 A_Period_9 */
public void setA_Period_9 (BigDecimal A_Period_9)
{
if (A_Period_9 == null)
throw new IllegalArgumentException ("A_Period_9 is mandatory.");
set_Value (COLUMNNAME_A_Period_9, A_Period_9);
}
/** Get A_Period_9.
@return A_Period_9 */
public BigDecimal getA_Period_9 ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_9);
if (bd == null)
return Env.ZERO;
return bd;
}
/** 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, 255);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
}

View File

@ -0,0 +1,678 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Transfer
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Transfer extends PO implements I_A_Asset_Transfer, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Transfer (Properties ctx, int A_Asset_Transfer_ID, String trxName)
{
super (ctx, A_Asset_Transfer_ID, trxName);
/** if (A_Asset_Transfer_ID == 0)
{
setA_Accumdepreciation_Acct_New (0);
setA_Asset_Acct_New (0);
setA_Asset_Transfer_ID (0);
setA_Depreciation_Acct_New (0);
setA_Disposal_Loss_New (0);
setA_Disposal_Revenue_New (0);
setA_Period_End (0);
// @SQL=SELECT A_Period_End FROM A_Asset_Acct WHERE A_Asset_Acct.A_Asset_Acct_ID=@A_Asset_Acct_ID@
setA_Period_Start (0);
// @SQL=SELECT A_Period_Start FROM A_Asset_Acct WHERE A_Asset_Acct.A_Asset_Acct_ID=@A_Asset_Acct_ID@
setA_Split_Percent (Env.ZERO);
// @SQL=SELECT A_Split_Percent FROM A_Asset_Acct WHERE A_Asset_Acct.A_Asset_Acct_ID=@A_Asset_Acct_ID@
setA_Transfer_Balance (true);
// Y
setA_Transfer_Balance_IS (false);
setDateAcct (new Timestamp(System.currentTimeMillis()));
// @Date@
setProcessed (false);
setProcessing (false);
} */
}
/** Load Constructor */
public X_A_Asset_Transfer (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Transfer[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Accumdepreciation_Acct.
@param A_Accumdepreciation_Acct A_Accumdepreciation_Acct */
public void setA_Accumdepreciation_Acct (int A_Accumdepreciation_Acct)
{
set_Value (COLUMNNAME_A_Accumdepreciation_Acct, Integer.valueOf(A_Accumdepreciation_Acct));
}
/** Get A_Accumdepreciation_Acct.
@return A_Accumdepreciation_Acct */
public int getA_Accumdepreciation_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Accumdepreciation_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Accumdepreciation_Acct_New.
@param A_Accumdepreciation_Acct_New A_Accumdepreciation_Acct_New */
public void setA_Accumdepreciation_Acct_New (int A_Accumdepreciation_Acct_New)
{
set_Value (COLUMNNAME_A_Accumdepreciation_Acct_New, Integer.valueOf(A_Accumdepreciation_Acct_New));
}
/** Get A_Accumdepreciation_Acct_New.
@return A_Accumdepreciation_Acct_New */
public int getA_Accumdepreciation_Acct_New ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Accumdepreciation_Acct_New);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Accumdepreciation_Acct_Str.
@param A_Accumdepreciation_Acct_Str A_Accumdepreciation_Acct_Str */
public void setA_Accumdepreciation_Acct_Str (String A_Accumdepreciation_Acct_Str)
{
if (A_Accumdepreciation_Acct_Str != null && A_Accumdepreciation_Acct_Str.length() > 40)
{
log.warning("Length > 40 - truncated");
A_Accumdepreciation_Acct_Str = A_Accumdepreciation_Acct_Str.substring(0, 40);
}
set_Value (COLUMNNAME_A_Accumdepreciation_Acct_Str, A_Accumdepreciation_Acct_Str);
}
/** Get A_Accumdepreciation_Acct_Str.
@return A_Accumdepreciation_Acct_Str */
public String getA_Accumdepreciation_Acct_Str ()
{
return (String)get_Value(COLUMNNAME_A_Accumdepreciation_Acct_Str);
}
/** Set A_Asset_Acct.
@param A_Asset_Acct A_Asset_Acct */
public void setA_Asset_Acct (int A_Asset_Acct)
{
set_Value (COLUMNNAME_A_Asset_Acct, Integer.valueOf(A_Asset_Acct));
}
/** Get A_Asset_Acct.
@return A_Asset_Acct */
public int getA_Asset_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Acct_ID.
@param A_Asset_Acct_ID A_Asset_Acct_ID */
public void setA_Asset_Acct_ID (int A_Asset_Acct_ID)
{
if (A_Asset_Acct_ID < 1)
set_Value (COLUMNNAME_A_Asset_Acct_ID, null);
else
set_Value (COLUMNNAME_A_Asset_Acct_ID, Integer.valueOf(A_Asset_Acct_ID));
}
/** Get A_Asset_Acct_ID.
@return A_Asset_Acct_ID */
public int getA_Asset_Acct_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Acct_New.
@param A_Asset_Acct_New A_Asset_Acct_New */
public void setA_Asset_Acct_New (int A_Asset_Acct_New)
{
set_Value (COLUMNNAME_A_Asset_Acct_New, Integer.valueOf(A_Asset_Acct_New));
}
/** Get A_Asset_Acct_New.
@return A_Asset_Acct_New */
public int getA_Asset_Acct_New ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Acct_New);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Acct_Str.
@param A_Asset_Acct_Str A_Asset_Acct_Str */
public void setA_Asset_Acct_Str (String A_Asset_Acct_Str)
{
if (A_Asset_Acct_Str != null && A_Asset_Acct_Str.length() > 40)
{
log.warning("Length > 40 - truncated");
A_Asset_Acct_Str = A_Asset_Acct_Str.substring(0, 40);
}
set_Value (COLUMNNAME_A_Asset_Acct_Str, A_Asset_Acct_Str);
}
/** Get A_Asset_Acct_Str.
@return A_Asset_Acct_Str */
public String getA_Asset_Acct_Str ()
{
return (String)get_Value(COLUMNNAME_A_Asset_Acct_Str);
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
set_Value (COLUMNNAME_A_Asset_ID, null);
else
set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Transfer_ID.
@param A_Asset_Transfer_ID A_Asset_Transfer_ID */
public void setA_Asset_Transfer_ID (int A_Asset_Transfer_ID)
{
if (A_Asset_Transfer_ID < 1)
throw new IllegalArgumentException ("A_Asset_Transfer_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Transfer_ID, Integer.valueOf(A_Asset_Transfer_ID));
}
/** Get A_Asset_Transfer_ID.
@return A_Asset_Transfer_ID */
public int getA_Asset_Transfer_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Transfer_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Transfer_ID()));
}
/** Set A_Depreciation_Acct.
@param A_Depreciation_Acct A_Depreciation_Acct */
public void setA_Depreciation_Acct (int A_Depreciation_Acct)
{
set_Value (COLUMNNAME_A_Depreciation_Acct, Integer.valueOf(A_Depreciation_Acct));
}
/** Get A_Depreciation_Acct.
@return A_Depreciation_Acct */
public int getA_Depreciation_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Acct_New.
@param A_Depreciation_Acct_New A_Depreciation_Acct_New */
public void setA_Depreciation_Acct_New (int A_Depreciation_Acct_New)
{
set_Value (COLUMNNAME_A_Depreciation_Acct_New, Integer.valueOf(A_Depreciation_Acct_New));
}
/** Get A_Depreciation_Acct_New.
@return A_Depreciation_Acct_New */
public int getA_Depreciation_Acct_New ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Acct_New);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Acct_Str.
@param A_Depreciation_Acct_Str A_Depreciation_Acct_Str */
public void setA_Depreciation_Acct_Str (String A_Depreciation_Acct_Str)
{
if (A_Depreciation_Acct_Str != null && A_Depreciation_Acct_Str.length() > 40)
{
log.warning("Length > 40 - truncated");
A_Depreciation_Acct_Str = A_Depreciation_Acct_Str.substring(0, 40);
}
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Acct_Str, A_Depreciation_Acct_Str);
}
/** Get A_Depreciation_Acct_Str.
@return A_Depreciation_Acct_Str */
public String getA_Depreciation_Acct_Str ()
{
return (String)get_Value(COLUMNNAME_A_Depreciation_Acct_Str);
}
/** Set A_Disposal_Loss.
@param A_Disposal_Loss A_Disposal_Loss */
public void setA_Disposal_Loss (int A_Disposal_Loss)
{
set_Value (COLUMNNAME_A_Disposal_Loss, Integer.valueOf(A_Disposal_Loss));
}
/** Get A_Disposal_Loss.
@return A_Disposal_Loss */
public int getA_Disposal_Loss ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Loss);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Loss_New.
@param A_Disposal_Loss_New A_Disposal_Loss_New */
public void setA_Disposal_Loss_New (int A_Disposal_Loss_New)
{
set_Value (COLUMNNAME_A_Disposal_Loss_New, Integer.valueOf(A_Disposal_Loss_New));
}
/** Get A_Disposal_Loss_New.
@return A_Disposal_Loss_New */
public int getA_Disposal_Loss_New ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Loss_New);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Loss_Str.
@param A_Disposal_Loss_Str A_Disposal_Loss_Str */
public void setA_Disposal_Loss_Str (String A_Disposal_Loss_Str)
{
if (A_Disposal_Loss_Str != null && A_Disposal_Loss_Str.length() > 40)
{
log.warning("Length > 40 - truncated");
A_Disposal_Loss_Str = A_Disposal_Loss_Str.substring(0, 40);
}
set_ValueNoCheck (COLUMNNAME_A_Disposal_Loss_Str, A_Disposal_Loss_Str);
}
/** Get A_Disposal_Loss_Str.
@return A_Disposal_Loss_Str */
public String getA_Disposal_Loss_Str ()
{
return (String)get_Value(COLUMNNAME_A_Disposal_Loss_Str);
}
/** Set A_Disposal_Revenue.
@param A_Disposal_Revenue A_Disposal_Revenue */
public void setA_Disposal_Revenue (int A_Disposal_Revenue)
{
set_Value (COLUMNNAME_A_Disposal_Revenue, Integer.valueOf(A_Disposal_Revenue));
}
/** Get A_Disposal_Revenue.
@return A_Disposal_Revenue */
public int getA_Disposal_Revenue ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Revenue);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Revenue_New.
@param A_Disposal_Revenue_New A_Disposal_Revenue_New */
public void setA_Disposal_Revenue_New (int A_Disposal_Revenue_New)
{
set_Value (COLUMNNAME_A_Disposal_Revenue_New, Integer.valueOf(A_Disposal_Revenue_New));
}
/** Get A_Disposal_Revenue_New.
@return A_Disposal_Revenue_New */
public int getA_Disposal_Revenue_New ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Disposal_Revenue_New);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Disposal_Revenue_Str.
@param A_Disposal_Revenue_Str A_Disposal_Revenue_Str */
public void setA_Disposal_Revenue_Str (String A_Disposal_Revenue_Str)
{
if (A_Disposal_Revenue_Str != null && A_Disposal_Revenue_Str.length() > 40)
{
log.warning("Length > 40 - truncated");
A_Disposal_Revenue_Str = A_Disposal_Revenue_Str.substring(0, 40);
}
set_ValueNoCheck (COLUMNNAME_A_Disposal_Revenue_Str, A_Disposal_Revenue_Str);
}
/** Get A_Disposal_Revenue_Str.
@return A_Disposal_Revenue_Str */
public String getA_Disposal_Revenue_Str ()
{
return (String)get_Value(COLUMNNAME_A_Disposal_Revenue_Str);
}
/** Set A_Period_End.
@param A_Period_End A_Period_End */
public void setA_Period_End (int A_Period_End)
{
set_Value (COLUMNNAME_A_Period_End, Integer.valueOf(A_Period_End));
}
/** Get A_Period_End.
@return A_Period_End */
public int getA_Period_End ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period_End);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Period_Start.
@param A_Period_Start A_Period_Start */
public void setA_Period_Start (int A_Period_Start)
{
set_Value (COLUMNNAME_A_Period_Start, Integer.valueOf(A_Period_Start));
}
/** Get A_Period_Start.
@return A_Period_Start */
public int getA_Period_Start ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period_Start);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Split_Percent.
@param A_Split_Percent A_Split_Percent */
public void setA_Split_Percent (BigDecimal A_Split_Percent)
{
if (A_Split_Percent == null)
throw new IllegalArgumentException ("A_Split_Percent is mandatory.");
set_Value (COLUMNNAME_A_Split_Percent, A_Split_Percent);
}
/** Get A_Split_Percent.
@return A_Split_Percent */
public BigDecimal getA_Split_Percent ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Split_Percent);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Transfer_Balance.
@param A_Transfer_Balance A_Transfer_Balance */
public void setA_Transfer_Balance (boolean A_Transfer_Balance)
{
set_Value (COLUMNNAME_A_Transfer_Balance, Boolean.valueOf(A_Transfer_Balance));
}
/** Get A_Transfer_Balance.
@return A_Transfer_Balance */
public boolean isA_Transfer_Balance ()
{
Object oo = get_Value(COLUMNNAME_A_Transfer_Balance);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set A_Transfer_Balance_IS.
@param A_Transfer_Balance_IS A_Transfer_Balance_IS */
public void setA_Transfer_Balance_IS (boolean A_Transfer_Balance_IS)
{
set_Value (COLUMNNAME_A_Transfer_Balance_IS, Boolean.valueOf(A_Transfer_Balance_IS));
}
/** Get A_Transfer_Balance_IS.
@return A_Transfer_Balance_IS */
public boolean isA_Transfer_Balance_IS ()
{
Object oo = get_Value(COLUMNNAME_A_Transfer_Balance_IS);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** C_AcctSchema_ID AD_Reference_ID=136 */
public static final int C_ACCTSCHEMA_ID_AD_Reference_ID=136;
/** Set Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
set_Value (COLUMNNAME_C_AcctSchema_ID, null);
else
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** C_Period_ID AD_Reference_ID=233 */
public static final int C_PERIOD_ID_AD_Reference_ID=233;
/** Set Period.
@param C_Period_ID
Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID)
{
if (C_Period_ID < 1)
set_Value (COLUMNNAME_C_Period_ID, null);
else
set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
}
/** Get Period.
@return Period of the Calendar
*/
public int getC_Period_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Account Date.
@param DateAcct
Accounting Date
*/
public void setDateAcct (Timestamp DateAcct)
{
if (DateAcct == null)
throw new IllegalArgumentException ("DateAcct is mandatory.");
set_Value (COLUMNNAME_DateAcct, DateAcct);
}
/** Get Account Date.
@return Accounting Date
*/
public Timestamp getDateAcct ()
{
return (Timestamp)get_Value(COLUMNNAME_DateAcct);
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null || PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType != null && PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,184 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Asset_Use
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Asset_Use extends PO implements I_A_Asset_Use, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Asset_Use (Properties ctx, int A_Asset_Use_ID, String trxName)
{
super (ctx, A_Asset_Use_ID, trxName);
/** if (A_Asset_Use_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Use_ID (0);
setUseDate (new Timestamp(System.currentTimeMillis()));
setUseUnits (0);
} */
}
/** Load Constructor */
public X_A_Asset_Use (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Asset_Use[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Use_ID.
@param A_Asset_Use_ID A_Asset_Use_ID */
public void setA_Asset_Use_ID (int A_Asset_Use_ID)
{
if (A_Asset_Use_ID < 1)
throw new IllegalArgumentException ("A_Asset_Use_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_Use_ID, Integer.valueOf(A_Asset_Use_ID));
}
/** Get A_Asset_Use_ID.
@return A_Asset_Use_ID */
public int getA_Asset_Use_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Use_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Asset_Use_ID()));
}
/** 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, 255);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set UseDate.
@param UseDate UseDate */
public void setUseDate (Timestamp UseDate)
{
if (UseDate == null)
throw new IllegalArgumentException ("UseDate is mandatory.");
set_Value (COLUMNNAME_UseDate, UseDate);
}
/** Get UseDate.
@return UseDate */
public Timestamp getUseDate ()
{
return (Timestamp)get_Value(COLUMNNAME_UseDate);
}
/** Set Use units.
@param UseUnits
Currently used units of the assets
*/
public void setUseUnits (int UseUnits)
{
set_Value (COLUMNNAME_UseUnits, Integer.valueOf(UseUnits));
}
/** Get Use units.
@return Currently used units of the assets
*/
public int getUseUnits ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UseUnits);
if (ii == null)
return 0;
return ii.intValue();
}
}

View File

@ -0,0 +1,208 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.util.Properties;
/** Generated Model for A_Depreciation
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation extends PO implements I_A_Depreciation, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation (Properties ctx, int A_Depreciation_ID, String trxName)
{
super (ctx, A_Depreciation_ID, trxName);
/** if (A_Depreciation_ID == 0)
{
setA_Depreciation_ID (0);
setDepreciationType (null);
setName (null);
setProcessed (true);
// Y
} */
}
/** Load Constructor */
public X_A_Depreciation (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_ID.
@param A_Depreciation_ID A_Depreciation_ID */
public void setA_Depreciation_ID (int A_Depreciation_ID)
{
if (A_Depreciation_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_ID, Integer.valueOf(A_Depreciation_ID));
}
/** Get A_Depreciation_ID.
@return A_Depreciation_ID */
public int getA_Depreciation_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set DepreciationType.
@param DepreciationType DepreciationType */
public void setDepreciationType (String DepreciationType)
{
if (DepreciationType == null)
throw new IllegalArgumentException ("DepreciationType is mandatory.");
if (DepreciationType.length() > 10)
{
log.warning("Length > 10 - truncated");
DepreciationType = DepreciationType.substring(0, 10);
}
set_Value (COLUMNNAME_DepreciationType, DepreciationType);
}
/** Get DepreciationType.
@return DepreciationType */
public String getDepreciationType ()
{
return (String)get_Value(COLUMNNAME_DepreciationType);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description != null && Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
if (Name == null)
throw new IllegalArgumentException ("Name is mandatory.");
if (Name.length() > 120)
{
log.warning("Length > 120 - truncated");
Name = Name.substring(0, 120);
}
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** 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 Text.
@param Text Text */
public void setText (String Text)
{
if (Text != null && Text.length() > 2000)
{
log.warning("Length > 2000 - truncated");
Text = Text.substring(0, 2000);
}
set_Value (COLUMNNAME_Text, Text);
}
/** Get Text.
@return Text */
public String getText ()
{
return (String)get_Value(COLUMNNAME_Text);
}
}

View File

@ -0,0 +1,304 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Build
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Build extends PO implements I_A_Depreciation_Build, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Build (Properties ctx, int A_Depreciation_Build_ID, String trxName)
{
super (ctx, A_Depreciation_Build_ID, trxName);
/** if (A_Depreciation_Build_ID == 0)
{
setA_Depreciation_Build_ID (0);
} */
}
/** Load Constructor */
public X_A_Depreciation_Build (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Build[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Build_ID.
@param A_Depreciation_Build_ID A_Depreciation_Build_ID */
public void setA_Depreciation_Build_ID (int A_Depreciation_Build_ID)
{
if (A_Depreciation_Build_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Build_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Build_ID, Integer.valueOf(A_Depreciation_Build_ID));
}
/** Get A_Depreciation_Build_ID.
@return A_Depreciation_Build_ID */
public int getA_Depreciation_Build_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Build_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Build_ID()));
}
/** A_End_Asset_ID AD_Reference_ID=53258 */
public static final int A_END_ASSET_ID_AD_Reference_ID=53258;
/** Set A_End_Asset_ID.
@param A_End_Asset_ID A_End_Asset_ID */
public void setA_End_Asset_ID (int A_End_Asset_ID)
{
if (A_End_Asset_ID < 1)
set_Value (COLUMNNAME_A_End_Asset_ID, null);
else
set_Value (COLUMNNAME_A_End_Asset_ID, Integer.valueOf(A_End_Asset_ID));
}
/** Get A_End_Asset_ID.
@return A_End_Asset_ID */
public int getA_End_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_End_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Start_Asset_ID AD_Reference_ID=53258 */
public static final int A_START_ASSET_ID_AD_Reference_ID=53258;
/** Set A_Start_Asset_ID.
@param A_Start_Asset_ID A_Start_Asset_ID */
public void setA_Start_Asset_ID (int A_Start_Asset_ID)
{
if (A_Start_Asset_ID < 1)
set_Value (COLUMNNAME_A_Start_Asset_ID, null);
else
set_Value (COLUMNNAME_A_Start_Asset_ID, Integer.valueOf(A_Start_Asset_ID));
}
/** Get A_Start_Asset_ID.
@return A_Start_Asset_ID */
public int getA_Start_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Start_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** C_Period_ID AD_Reference_ID=233 */
public static final int C_PERIOD_ID_AD_Reference_ID=233;
/** Set Period.
@param C_Period_ID
Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID)
{
if (C_Period_ID < 1)
set_Value (COLUMNNAME_C_Period_ID, null);
else
set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
}
/** Get Period.
@return Period of the Calendar
*/
public int getC_Period_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** 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 Document Date.
@param DateDoc
Date of the Document
*/
public void setDateDoc (Timestamp DateDoc)
{
set_Value (COLUMNNAME_DateDoc, DateDoc);
}
/** Get Document Date.
@return Date of the Document
*/
public Timestamp getDateDoc ()
{
return (Timestamp)get_Value(COLUMNNAME_DateDoc);
}
/** Set Period No.
@param PeriodNo
Unique Period Number
*/
public void setPeriodNo (int PeriodNo)
{
set_Value (COLUMNNAME_PeriodNo, Integer.valueOf(PeriodNo));
}
/** Get Period No.
@return Unique Period Number
*/
public int getPeriodNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PeriodNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null || PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType != null && PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,210 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Convention
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Convention extends PO implements I_A_Depreciation_Convention, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Convention (Properties ctx, int A_Depreciation_Convention_ID, String trxName)
{
super (ctx, A_Depreciation_Convention_ID, trxName);
/** if (A_Depreciation_Convention_ID == 0)
{
setA_Depreciation_Convention_ID (0);
setProcessed (false);
} */
}
/** Load Constructor */
public X_A_Depreciation_Convention (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Convention[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Convention_ID.
@param A_Depreciation_Convention_ID A_Depreciation_Convention_ID */
public void setA_Depreciation_Convention_ID (int A_Depreciation_Convention_ID)
{
if (A_Depreciation_Convention_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Convention_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Convention_ID, Integer.valueOf(A_Depreciation_Convention_ID));
}
/** Get A_Depreciation_Convention_ID.
@return A_Depreciation_Convention_ID */
public int getA_Depreciation_Convention_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Convention_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Convention_ID()));
}
/** Set ConventionType.
@param ConventionType ConventionType */
public void setConventionType (String ConventionType)
{
if (ConventionType != null && ConventionType.length() > 10)
{
log.warning("Length > 10 - truncated");
ConventionType = ConventionType.substring(0, 10);
}
set_Value (COLUMNNAME_ConventionType, ConventionType);
}
/** Get ConventionType.
@return ConventionType */
public String getConventionType ()
{
return (String)get_Value(COLUMNNAME_ConventionType);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description != null && Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
if (Name != null && Name.length() > 120)
{
log.warning("Length > 120 - truncated");
Name = Name.substring(0, 120);
}
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** 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 Textmsg.
@param Textmsg Textmsg */
public void setTextmsg (String Textmsg)
{
if (Textmsg != null && Textmsg.length() > 2000)
{
log.warning("Length > 2000 - truncated");
Textmsg = Textmsg.substring(0, 2000);
}
set_Value (COLUMNNAME_Textmsg, Textmsg);
}
/** Get Textmsg.
@return Textmsg */
public String getTextmsg ()
{
return (String)get_Value(COLUMNNAME_Textmsg);
}
}

View File

@ -0,0 +1,499 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.lang.reflect.Constructor;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import java.util.logging.Level;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Entry
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Entry extends PO implements I_A_Depreciation_Entry, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Entry (Properties ctx, int A_Depreciation_Entry_ID, String trxName)
{
super (ctx, A_Depreciation_Entry_ID, trxName);
/** if (A_Depreciation_Entry_ID == 0)
{
setA_Depreciation_Entry_ID (0);
setA_Entry_Type (null);
setC_AcctSchema_ID (0);
setC_Currency_ID (0);
// @$C_CURRENCY_ID@
setC_DocType_ID (0);
setC_Period_ID (0);
setDateAcct (new Timestamp(System.currentTimeMillis()));
// @Date@
setDateDoc (new Timestamp(System.currentTimeMillis()));
// @Date@
setDescription (null);
setDocumentNo (null);
setGL_Category_ID (0);
setPostingType (null);
// A
setProcessed (false);
setProcessing (false);
} */
}
/** Load Constructor */
public X_A_Depreciation_Entry (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Entry[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Entry_ID.
@param A_Depreciation_Entry_ID A_Depreciation_Entry_ID */
public void setA_Depreciation_Entry_ID (int A_Depreciation_Entry_ID)
{
if (A_Depreciation_Entry_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Entry_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Entry_ID, Integer.valueOf(A_Depreciation_Entry_ID));
}
/** Get A_Depreciation_Entry_ID.
@return A_Depreciation_Entry_ID */
public int getA_Depreciation_Entry_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Entry_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Entry_ID()));
}
/** A_Entry_Type AD_Reference_ID=53257 */
public static final int A_ENTRY_TYPE_AD_Reference_ID=53257;
/** Depreciation = DEP */
public static final String A_ENTRY_TYPE_Depreciation = "DEP";
/** Disposals = DIS */
public static final String A_ENTRY_TYPE_Disposals = "DIS";
/** Forecasts = FOR */
public static final String A_ENTRY_TYPE_Forecasts = "FOR";
/** New = NEW */
public static final String A_ENTRY_TYPE_New = "NEW";
/** Splits = SPL */
public static final String A_ENTRY_TYPE_Splits = "SPL";
/** Transfers = TRN */
public static final String A_ENTRY_TYPE_Transfers = "TRN";
/** Set A_Entry_Type.
@param A_Entry_Type A_Entry_Type */
public void setA_Entry_Type (String A_Entry_Type)
{
if (A_Entry_Type == null) throw new IllegalArgumentException ("A_Entry_Type is mandatory");
if (A_Entry_Type.equals("DEP") || A_Entry_Type.equals("DIS") || A_Entry_Type.equals("FOR") || A_Entry_Type.equals("NEW") || A_Entry_Type.equals("SPL") || A_Entry_Type.equals("TRN")); else throw new IllegalArgumentException ("A_Entry_Type Invalid value - " + A_Entry_Type + " - Reference_ID=53257 - DEP - DIS - FOR - NEW - SPL - TRN");
if (A_Entry_Type.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Entry_Type = A_Entry_Type.substring(0, 3);
}
set_Value (COLUMNNAME_A_Entry_Type, A_Entry_Type);
}
/** Get A_Entry_Type.
@return A_Entry_Type */
public String getA_Entry_Type ()
{
return (String)get_Value(COLUMNNAME_A_Entry_Type);
}
public I_C_AcctSchema getC_AcctSchema() throws Exception
{
Class<?> clazz = MTable.getClass(I_C_AcctSchema.Table_Name);
I_C_AcctSchema result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_C_AcctSchema)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_AcctSchema_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 Accounting Schema.
@param C_AcctSchema_ID
Rules for accounting
*/
public void setC_AcctSchema_ID (int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
throw new IllegalArgumentException ("C_AcctSchema_ID is mandatory.");
set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID));
}
/** Get Accounting Schema.
@return Rules for accounting
*/
public int getC_AcctSchema_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_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 < 1)
throw new IllegalArgumentException ("C_Currency_ID is mandatory.");
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)
throw new IllegalArgumentException ("C_DocType_ID is mandatory.");
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();
}
/** C_Period_ID AD_Reference_ID=233 */
public static final int C_PERIOD_ID_AD_Reference_ID=233;
/** Set Period.
@param C_Period_ID
Period of the Calendar
*/
public void setC_Period_ID (int C_Period_ID)
{
if (C_Period_ID < 1)
throw new IllegalArgumentException ("C_Period_ID is mandatory.");
set_Value (COLUMNNAME_C_Period_ID, Integer.valueOf(C_Period_ID));
}
/** Get Period.
@return Period of the Calendar
*/
public int getC_Period_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Period_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Account Date.
@param DateAcct
Accounting Date
*/
public void setDateAcct (Timestamp DateAcct)
{
if (DateAcct == null)
throw new IllegalArgumentException ("DateAcct is mandatory.");
set_Value (COLUMNNAME_DateAcct, DateAcct);
}
/** Get Account Date.
@return Accounting Date
*/
public Timestamp getDateAcct ()
{
return (Timestamp)get_Value(COLUMNNAME_DateAcct);
}
/** Set Document Date.
@param DateDoc
Date of the Document
*/
public void setDateDoc (Timestamp DateDoc)
{
if (DateDoc == null)
throw new IllegalArgumentException ("DateDoc is mandatory.");
set_Value (COLUMNNAME_DateDoc, DateDoc);
}
/** Get Document Date.
@return Date of the Document
*/
public Timestamp getDateDoc ()
{
return (Timestamp)get_Value(COLUMNNAME_DateDoc);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description == null)
throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
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 No.
@param DocumentNo
Document sequence number of the document
*/
public void setDocumentNo (String DocumentNo)
{
if (DocumentNo == null)
throw new IllegalArgumentException ("DocumentNo is mandatory.");
if (DocumentNo.length() > 60)
{
log.warning("Length > 60 - truncated");
DocumentNo = DocumentNo.substring(0, 60);
}
set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo);
}
/** Get Document No.
@return Document sequence number of the document
*/
public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
public I_GL_Category getGL_Category() throws Exception
{
Class<?> clazz = MTable.getClass(I_GL_Category.Table_Name);
I_GL_Category result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_GL_Category)constructor.newInstance(new Object[] {getCtx(), new Integer(getGL_Category_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 GL Category.
@param GL_Category_ID
General Ledger Category
*/
public void setGL_Category_ID (int GL_Category_ID)
{
if (GL_Category_ID < 1)
throw new IllegalArgumentException ("GL_Category_ID is mandatory.");
set_Value (COLUMNNAME_GL_Category_ID, Integer.valueOf(GL_Category_ID));
}
/** Get GL Category.
@return General Ledger Category
*/
public int getGL_Category_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Category_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory");
if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,333 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Exp
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Exp extends PO implements I_A_Depreciation_Exp, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Exp (Properties ctx, int A_Depreciation_Exp_ID, String trxName)
{
super (ctx, A_Depreciation_Exp_ID, trxName);
/** if (A_Depreciation_Exp_ID == 0)
{
setA_Account_Number (0);
setA_Asset_ID (0);
setA_Depreciation_Exp_ID (0);
setA_Entry_Type (null);
setA_Period (0);
setDescription (null);
setExpense (Env.ZERO);
setIsDepreciated (false);
setProcessed (false);
} */
}
/** Load Constructor */
public X_A_Depreciation_Exp (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Exp[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Account_Number.
@param A_Account_Number A_Account_Number */
public void setA_Account_Number (int A_Account_Number)
{
set_Value (COLUMNNAME_A_Account_Number, Integer.valueOf(A_Account_Number));
}
/** Get A_Account_Number.
@return A_Account_Number */
public int getA_Account_Number ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Account_Number);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Exp_ID.
@param A_Depreciation_Exp_ID A_Depreciation_Exp_ID */
public void setA_Depreciation_Exp_ID (int A_Depreciation_Exp_ID)
{
if (A_Depreciation_Exp_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Exp_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Exp_ID, Integer.valueOf(A_Depreciation_Exp_ID));
}
/** Get A_Depreciation_Exp_ID.
@return A_Depreciation_Exp_ID */
public int getA_Depreciation_Exp_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Exp_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Exp_ID()));
}
/** A_Entry_Type AD_Reference_ID=53257 */
public static final int A_ENTRY_TYPE_AD_Reference_ID=53257;
/** Depreciation = DEP */
public static final String A_ENTRY_TYPE_Depreciation = "DEP";
/** Disposals = DIS */
public static final String A_ENTRY_TYPE_Disposals = "DIS";
/** Forecasts = FOR */
public static final String A_ENTRY_TYPE_Forecasts = "FOR";
/** New = NEW */
public static final String A_ENTRY_TYPE_New = "NEW";
/** Splits = SPL */
public static final String A_ENTRY_TYPE_Splits = "SPL";
/** Transfers = TRN */
public static final String A_ENTRY_TYPE_Transfers = "TRN";
/** Set A_Entry_Type.
@param A_Entry_Type A_Entry_Type */
public void setA_Entry_Type (String A_Entry_Type)
{
if (A_Entry_Type == null) throw new IllegalArgumentException ("A_Entry_Type is mandatory");
if (A_Entry_Type.equals("DEP") || A_Entry_Type.equals("DIS") || A_Entry_Type.equals("FOR") || A_Entry_Type.equals("NEW") || A_Entry_Type.equals("SPL") || A_Entry_Type.equals("TRN")); else throw new IllegalArgumentException ("A_Entry_Type Invalid value - " + A_Entry_Type + " - Reference_ID=53257 - DEP - DIS - FOR - NEW - SPL - TRN");
if (A_Entry_Type.length() > 3)
{
log.warning("Length > 3 - truncated");
A_Entry_Type = A_Entry_Type.substring(0, 3);
}
set_Value (COLUMNNAME_A_Entry_Type, A_Entry_Type);
}
/** Get A_Entry_Type.
@return A_Entry_Type */
public String getA_Entry_Type ()
{
return (String)get_Value(COLUMNNAME_A_Entry_Type);
}
/** Set A_Period.
@param A_Period A_Period */
public void setA_Period (int A_Period)
{
set_Value (COLUMNNAME_A_Period, Integer.valueOf(A_Period));
}
/** Get A_Period.
@return A_Period */
public int getA_Period ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period);
if (ii == null)
return 0;
return ii.intValue();
}
/** 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 Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description == null)
throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 255)
{
log.warning("Length > 255 - truncated");
Description = Description.substring(0, 255);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Expense.
@param Expense Expense */
public void setExpense (BigDecimal Expense)
{
if (Expense == null)
throw new IllegalArgumentException ("Expense is mandatory.");
set_Value (COLUMNNAME_Expense, Expense);
}
/** Get Expense.
@return Expense */
public BigDecimal getExpense ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Expense);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Depreciate.
@param IsDepreciated
The asset will be depreciated
*/
public void setIsDepreciated (boolean IsDepreciated)
{
set_Value (COLUMNNAME_IsDepreciated, Boolean.valueOf(IsDepreciated));
}
/** Get Depreciate.
@return The asset will be depreciated
*/
public boolean isDepreciated ()
{
Object oo = get_Value(COLUMNNAME_IsDepreciated);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType != null && PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,246 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Forecast
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Forecast extends PO implements I_A_Depreciation_Forecast, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Forecast (Properties ctx, int A_Depreciation_Forecast_ID, String trxName)
{
super (ctx, A_Depreciation_Forecast_ID, trxName);
/** if (A_Depreciation_Forecast_ID == 0)
{
setA_Depreciation_Forecast_ID (0);
setA_End_Asset_ID (0);
setA_Start_Asset_ID (0);
setDateDoc (new Timestamp(System.currentTimeMillis()));
setPostingType (null);
} */
}
/** Load Constructor */
public X_A_Depreciation_Forecast (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Forecast[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Forecast_ID.
@param A_Depreciation_Forecast_ID A_Depreciation_Forecast_ID */
public void setA_Depreciation_Forecast_ID (int A_Depreciation_Forecast_ID)
{
if (A_Depreciation_Forecast_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Forecast_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Forecast_ID, Integer.valueOf(A_Depreciation_Forecast_ID));
}
/** Get A_Depreciation_Forecast_ID.
@return A_Depreciation_Forecast_ID */
public int getA_Depreciation_Forecast_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Forecast_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Forecast_ID()));
}
/** A_End_Asset_ID AD_Reference_ID=53258 */
public static final int A_END_ASSET_ID_AD_Reference_ID=53258;
/** Set A_End_Asset_ID.
@param A_End_Asset_ID A_End_Asset_ID */
public void setA_End_Asset_ID (int A_End_Asset_ID)
{
if (A_End_Asset_ID < 1)
throw new IllegalArgumentException ("A_End_Asset_ID is mandatory.");
set_Value (COLUMNNAME_A_End_Asset_ID, Integer.valueOf(A_End_Asset_ID));
}
/** Get A_End_Asset_ID.
@return A_End_Asset_ID */
public int getA_End_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_End_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Start_Asset_ID AD_Reference_ID=53258 */
public static final int A_START_ASSET_ID_AD_Reference_ID=53258;
/** Set A_Start_Asset_ID.
@param A_Start_Asset_ID A_Start_Asset_ID */
public void setA_Start_Asset_ID (int A_Start_Asset_ID)
{
if (A_Start_Asset_ID < 1)
throw new IllegalArgumentException ("A_Start_Asset_ID is mandatory.");
set_Value (COLUMNNAME_A_Start_Asset_ID, Integer.valueOf(A_Start_Asset_ID));
}
/** Get A_Start_Asset_ID.
@return A_Start_Asset_ID */
public int getA_Start_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Start_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Document Date.
@param DateDoc
Date of the Document
*/
public void setDateDoc (Timestamp DateDoc)
{
if (DateDoc == null)
throw new IllegalArgumentException ("DateDoc is mandatory.");
set_Value (COLUMNNAME_DateDoc, DateDoc);
}
/** Get Document Date.
@return Date of the Document
*/
public Timestamp getDateDoc ()
{
return (Timestamp)get_Value(COLUMNNAME_DateDoc);
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null) throw new IllegalArgumentException ("PostingType is mandatory");
if (PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -0,0 +1,211 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Method
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Method extends PO implements I_A_Depreciation_Method, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Method (Properties ctx, int A_Depreciation_Method_ID, String trxName)
{
super (ctx, A_Depreciation_Method_ID, trxName);
/** if (A_Depreciation_Method_ID == 0)
{
setA_Depreciation_Method_ID (0);
setProcessed (true);
// Y
} */
}
/** Load Constructor */
public X_A_Depreciation_Method (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Method[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Method_ID.
@param A_Depreciation_Method_ID A_Depreciation_Method_ID */
public void setA_Depreciation_Method_ID (int A_Depreciation_Method_ID)
{
if (A_Depreciation_Method_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Method_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Method_ID, Integer.valueOf(A_Depreciation_Method_ID));
}
/** Get A_Depreciation_Method_ID.
@return A_Depreciation_Method_ID */
public int getA_Depreciation_Method_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Method_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Method_ID()));
}
/** Set DepreciationType.
@param DepreciationType DepreciationType */
public void setDepreciationType (String DepreciationType)
{
if (DepreciationType != null && DepreciationType.length() > 10)
{
log.warning("Length > 10 - truncated");
DepreciationType = DepreciationType.substring(0, 10);
}
set_Value (COLUMNNAME_DepreciationType, DepreciationType);
}
/** Get DepreciationType.
@return DepreciationType */
public String getDepreciationType ()
{
return (String)get_Value(COLUMNNAME_DepreciationType);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description != null && Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
if (Name != null && Name.length() > 120)
{
log.warning("Length > 120 - truncated");
Name = Name.substring(0, 120);
}
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** 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 Text.
@param Text Text */
public void setText (String Text)
{
if (Text != null && Text.length() > 2000)
{
log.warning("Length > 2000 - truncated");
Text = Text.substring(0, 2000);
}
set_Value (COLUMNNAME_Text, Text);
}
/** Get Text.
@return Text */
public String getText ()
{
return (String)get_Value(COLUMNNAME_Text);
}
}

View File

@ -0,0 +1,214 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Table_Detail
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Table_Detail extends PO implements I_A_Depreciation_Table_Detail, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Table_Detail (Properties ctx, int A_Depreciation_Table_Detail_ID, String trxName)
{
super (ctx, A_Depreciation_Table_Detail_ID, trxName);
/** if (A_Depreciation_Table_Detail_ID == 0)
{
setA_Depreciation_Rate (Env.ZERO);
setA_Depreciation_Table_Code (null);
setA_Depreciation_Table_Detail_ID (0);
setA_Period (0);
setProcessed (false);
} */
}
/** Load Constructor */
public X_A_Depreciation_Table_Detail (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Table_Detail[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Rate.
@param A_Depreciation_Rate A_Depreciation_Rate */
public void setA_Depreciation_Rate (BigDecimal A_Depreciation_Rate)
{
if (A_Depreciation_Rate == null)
throw new IllegalArgumentException ("A_Depreciation_Rate is mandatory.");
set_Value (COLUMNNAME_A_Depreciation_Rate, A_Depreciation_Rate);
}
/** Get A_Depreciation_Rate.
@return A_Depreciation_Rate */
public BigDecimal getA_Depreciation_Rate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Depreciation_Rate);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Depreciation_Table_Code.
@param A_Depreciation_Table_Code A_Depreciation_Table_Code */
public void setA_Depreciation_Table_Code (String A_Depreciation_Table_Code)
{
if (A_Depreciation_Table_Code == null)
throw new IllegalArgumentException ("A_Depreciation_Table_Code is mandatory.");
if (A_Depreciation_Table_Code.length() > 20)
{
log.warning("Length > 20 - truncated");
A_Depreciation_Table_Code = A_Depreciation_Table_Code.substring(0, 20);
}
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Table_Code, A_Depreciation_Table_Code);
}
/** Get A_Depreciation_Table_Code.
@return A_Depreciation_Table_Code */
public String getA_Depreciation_Table_Code ()
{
return (String)get_Value(COLUMNNAME_A_Depreciation_Table_Code);
}
/** Set A_Depreciation_Table_Detail_ID.
@param A_Depreciation_Table_Detail_ID A_Depreciation_Table_Detail_ID */
public void setA_Depreciation_Table_Detail_ID (int A_Depreciation_Table_Detail_ID)
{
if (A_Depreciation_Table_Detail_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Table_Detail_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Table_Detail_ID, Integer.valueOf(A_Depreciation_Table_Detail_ID));
}
/** Get A_Depreciation_Table_Detail_ID.
@return A_Depreciation_Table_Detail_ID */
public int getA_Depreciation_Table_Detail_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Table_Detail_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Table_Detail_ID()));
}
/** Set A_Period.
@param A_Period A_Period */
public void setA_Period (int A_Period)
{
set_Value (COLUMNNAME_A_Period, Integer.valueOf(A_Period));
}
/** Get A_Period.
@return A_Period */
public int getA_Period ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Table_Rate_Type AD_Reference_ID=53255 */
public static final int A_TABLE_RATE_TYPE_AD_Reference_ID=53255;
/** Amount = AM */
public static final String A_TABLE_RATE_TYPE_Amount = "AM";
/** Rate = RT */
public static final String A_TABLE_RATE_TYPE_Rate = "RT";
/** Set A_Table_Rate_Type.
@param A_Table_Rate_Type A_Table_Rate_Type */
public void setA_Table_Rate_Type (String A_Table_Rate_Type)
{
if (A_Table_Rate_Type == null || A_Table_Rate_Type.equals("AM") || A_Table_Rate_Type.equals("RT")); else throw new IllegalArgumentException ("A_Table_Rate_Type Invalid value - " + A_Table_Rate_Type + " - Reference_ID=53255 - AM - RT");
if (A_Table_Rate_Type != null && A_Table_Rate_Type.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Table_Rate_Type = A_Table_Rate_Type.substring(0, 2);
}
set_ValueNoCheck (COLUMNNAME_A_Table_Rate_Type, A_Table_Rate_Type);
}
/** Get A_Table_Rate_Type.
@return A_Table_Rate_Type */
public String getA_Table_Rate_Type ()
{
return (String)get_Value(COLUMNNAME_A_Table_Rate_Type);
}
/** 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;
}
}

View File

@ -0,0 +1,229 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Table_Header
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Table_Header extends PO implements I_A_Depreciation_Table_Header, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Table_Header (Properties ctx, int A_Depreciation_Table_Header_ID, String trxName)
{
super (ctx, A_Depreciation_Table_Header_ID, trxName);
/** if (A_Depreciation_Table_Header_ID == 0)
{
setA_Depreciation_Table_Code (null);
setA_Depreciation_Table_Header_ID (0);
setA_Table_Rate_Type (null);
setA_Term (null);
setDescription (null);
setProcessed (false);
} */
}
/** Load Constructor */
public X_A_Depreciation_Table_Header (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Table_Header[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Table_Code.
@param A_Depreciation_Table_Code A_Depreciation_Table_Code */
public void setA_Depreciation_Table_Code (String A_Depreciation_Table_Code)
{
if (A_Depreciation_Table_Code == null)
throw new IllegalArgumentException ("A_Depreciation_Table_Code is mandatory.");
if (A_Depreciation_Table_Code.length() > 20)
{
log.warning("Length > 20 - truncated");
A_Depreciation_Table_Code = A_Depreciation_Table_Code.substring(0, 20);
}
set_Value (COLUMNNAME_A_Depreciation_Table_Code, A_Depreciation_Table_Code);
}
/** Get A_Depreciation_Table_Code.
@return A_Depreciation_Table_Code */
public String getA_Depreciation_Table_Code ()
{
return (String)get_Value(COLUMNNAME_A_Depreciation_Table_Code);
}
/** Set A_Depreciation_Table_Header_ID.
@param A_Depreciation_Table_Header_ID A_Depreciation_Table_Header_ID */
public void setA_Depreciation_Table_Header_ID (int A_Depreciation_Table_Header_ID)
{
if (A_Depreciation_Table_Header_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Table_Header_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Table_Header_ID, Integer.valueOf(A_Depreciation_Table_Header_ID));
}
/** Get A_Depreciation_Table_Header_ID.
@return A_Depreciation_Table_Header_ID */
public int getA_Depreciation_Table_Header_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Table_Header_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Table_Header_ID()));
}
/** A_Table_Rate_Type AD_Reference_ID=53255 */
public static final int A_TABLE_RATE_TYPE_AD_Reference_ID=53255;
/** Amount = AM */
public static final String A_TABLE_RATE_TYPE_Amount = "AM";
/** Rate = RT */
public static final String A_TABLE_RATE_TYPE_Rate = "RT";
/** Set A_Table_Rate_Type.
@param A_Table_Rate_Type A_Table_Rate_Type */
public void setA_Table_Rate_Type (String A_Table_Rate_Type)
{
if (A_Table_Rate_Type == null) throw new IllegalArgumentException ("A_Table_Rate_Type is mandatory");
if (A_Table_Rate_Type.equals("AM") || A_Table_Rate_Type.equals("RT")); else throw new IllegalArgumentException ("A_Table_Rate_Type Invalid value - " + A_Table_Rate_Type + " - Reference_ID=53255 - AM - RT");
if (A_Table_Rate_Type.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Table_Rate_Type = A_Table_Rate_Type.substring(0, 2);
}
set_Value (COLUMNNAME_A_Table_Rate_Type, A_Table_Rate_Type);
}
/** Get A_Table_Rate_Type.
@return A_Table_Rate_Type */
public String getA_Table_Rate_Type ()
{
return (String)get_Value(COLUMNNAME_A_Table_Rate_Type);
}
/** A_Term AD_Reference_ID=53256 */
public static final int A_TERM_AD_Reference_ID=53256;
/** Period = PR */
public static final String A_TERM_Period = "PR";
/** Yearly = YR */
public static final String A_TERM_Yearly = "YR";
/** Set A_Term.
@param A_Term A_Term */
public void setA_Term (String A_Term)
{
if (A_Term == null) throw new IllegalArgumentException ("A_Term is mandatory");
if (A_Term.equals("PR") || A_Term.equals("YR")); else throw new IllegalArgumentException ("A_Term Invalid value - " + A_Term + " - Reference_ID=53256 - PR - YR");
if (A_Term.length() > 2)
{
log.warning("Length > 2 - truncated");
A_Term = A_Term.substring(0, 2);
}
set_Value (COLUMNNAME_A_Term, A_Term);
}
/** Get A_Term.
@return A_Term */
public String getA_Term ()
{
return (String)get_Value(COLUMNNAME_A_Term);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
if (Description == null)
throw new IllegalArgumentException ("Description is mandatory.");
if (Description.length() > 510)
{
log.warning("Length > 510 - truncated");
Description = Description.substring(0, 510);
}
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** 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;
}
}

View File

@ -0,0 +1,482 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 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 *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, 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; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* 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.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
/** Generated Model for A_Depreciation_Workfile
* @author Adempiere (generated)
* @version Release 3.5.1a - $Id$ */
public class X_A_Depreciation_Workfile extends PO implements I_A_Depreciation_Workfile, I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1L;
/** Standard Constructor */
public X_A_Depreciation_Workfile (Properties ctx, int A_Depreciation_Workfile_ID, String trxName)
{
super (ctx, A_Depreciation_Workfile_ID, trxName);
/** if (A_Depreciation_Workfile_ID == 0)
{
setA_Asset_ID (0);
setA_Asset_Life_Years (0);
setA_Depreciation_Workfile_ID (0);
setA_QTY_Current (Env.ZERO);
} */
}
/** Load Constructor */
public X_A_Depreciation_Workfile (Properties ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** AccessLevel
* @return 7 - System - Client - Org
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Workfile[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Accumulated_Depr.
@param A_Accumulated_Depr A_Accumulated_Depr */
public void setA_Accumulated_Depr (BigDecimal A_Accumulated_Depr)
{
set_Value (COLUMNNAME_A_Accumulated_Depr, A_Accumulated_Depr);
}
/** Get A_Accumulated_Depr.
@return A_Accumulated_Depr */
public BigDecimal getA_Accumulated_Depr ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Accumulated_Depr);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Asset_Cost.
@param A_Asset_Cost A_Asset_Cost */
public void setA_Asset_Cost (BigDecimal A_Asset_Cost)
{
set_Value (COLUMNNAME_A_Asset_Cost, A_Asset_Cost);
}
/** Get A_Asset_Cost.
@return A_Asset_Cost */
public BigDecimal getA_Asset_Cost ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Asset_Cost);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
throw new IllegalArgumentException ("A_Asset_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Asset_Life_Current_Year.
@param A_Asset_Life_Current_Year A_Asset_Life_Current_Year */
public void setA_Asset_Life_Current_Year (BigDecimal A_Asset_Life_Current_Year)
{
set_Value (COLUMNNAME_A_Asset_Life_Current_Year, A_Asset_Life_Current_Year);
}
/** Get A_Asset_Life_Current_Year.
@return A_Asset_Life_Current_Year */
public BigDecimal getA_Asset_Life_Current_Year ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Asset_Life_Current_Year);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Asset_Life_Years.
@param A_Asset_Life_Years A_Asset_Life_Years */
public void setA_Asset_Life_Years (int A_Asset_Life_Years)
{
set_Value (COLUMNNAME_A_Asset_Life_Years, Integer.valueOf(A_Asset_Life_Years));
}
/** Get A_Asset_Life_Years.
@return A_Asset_Life_Years */
public int getA_Asset_Life_Years ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Life_Years);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Base_Amount.
@param A_Base_Amount A_Base_Amount */
public void setA_Base_Amount (BigDecimal A_Base_Amount)
{
set_Value (COLUMNNAME_A_Base_Amount, A_Base_Amount);
}
/** Get A_Base_Amount.
@return A_Base_Amount */
public BigDecimal getA_Base_Amount ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Base_Amount);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Calc_Accumulated_Depr.
@param A_Calc_Accumulated_Depr A_Calc_Accumulated_Depr */
public void setA_Calc_Accumulated_Depr (BigDecimal A_Calc_Accumulated_Depr)
{
set_Value (COLUMNNAME_A_Calc_Accumulated_Depr, A_Calc_Accumulated_Depr);
}
/** Get A_Calc_Accumulated_Depr.
@return A_Calc_Accumulated_Depr */
public BigDecimal getA_Calc_Accumulated_Depr ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Calc_Accumulated_Depr);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Curr_Dep_Exp.
@param A_Curr_Dep_Exp A_Curr_Dep_Exp */
public void setA_Curr_Dep_Exp (BigDecimal A_Curr_Dep_Exp)
{
set_Value (COLUMNNAME_A_Curr_Dep_Exp, A_Curr_Dep_Exp);
}
/** Get A_Curr_Dep_Exp.
@return A_Curr_Dep_Exp */
public BigDecimal getA_Curr_Dep_Exp ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Curr_Dep_Exp);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Current_Period.
@param A_Current_Period A_Current_Period */
public void setA_Current_Period (int A_Current_Period)
{
set_Value (COLUMNNAME_A_Current_Period, Integer.valueOf(A_Current_Period));
}
/** Get A_Current_Period.
@return A_Current_Period */
public int getA_Current_Period ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Current_Period);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Depreciation_Workfile_ID.
@param A_Depreciation_Workfile_ID A_Depreciation_Workfile_ID */
public void setA_Depreciation_Workfile_ID (int A_Depreciation_Workfile_ID)
{
if (A_Depreciation_Workfile_ID < 1)
throw new IllegalArgumentException ("A_Depreciation_Workfile_ID is mandatory.");
set_ValueNoCheck (COLUMNNAME_A_Depreciation_Workfile_ID, Integer.valueOf(A_Depreciation_Workfile_ID));
}
/** Get A_Depreciation_Workfile_ID.
@return A_Depreciation_Workfile_ID */
public int getA_Depreciation_Workfile_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Depreciation_Workfile_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getA_Depreciation_Workfile_ID()));
}
/** Set A_Life_Period.
@param A_Life_Period A_Life_Period */
public void setA_Life_Period (int A_Life_Period)
{
set_Value (COLUMNNAME_A_Life_Period, Integer.valueOf(A_Life_Period));
}
/** Get A_Life_Period.
@return A_Life_Period */
public int getA_Life_Period ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Life_Period);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Period_Forecast.
@param A_Period_Forecast A_Period_Forecast */
public void setA_Period_Forecast (BigDecimal A_Period_Forecast)
{
set_Value (COLUMNNAME_A_Period_Forecast, A_Period_Forecast);
}
/** Get A_Period_Forecast.
@return A_Period_Forecast */
public BigDecimal getA_Period_Forecast ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Period_Forecast);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Period_Posted.
@param A_Period_Posted A_Period_Posted */
public void setA_Period_Posted (int A_Period_Posted)
{
set_Value (COLUMNNAME_A_Period_Posted, Integer.valueOf(A_Period_Posted));
}
/** Get A_Period_Posted.
@return A_Period_Posted */
public int getA_Period_Posted ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Period_Posted);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_Prior_Year_Accumulated_Depr.
@param A_Prior_Year_Accumulated_Depr A_Prior_Year_Accumulated_Depr */
public void setA_Prior_Year_Accumulated_Depr (BigDecimal A_Prior_Year_Accumulated_Depr)
{
set_Value (COLUMNNAME_A_Prior_Year_Accumulated_Depr, A_Prior_Year_Accumulated_Depr);
}
/** Get A_Prior_Year_Accumulated_Depr.
@return A_Prior_Year_Accumulated_Depr */
public BigDecimal getA_Prior_Year_Accumulated_Depr ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Prior_Year_Accumulated_Depr);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_QTY_Current.
@param A_QTY_Current A_QTY_Current */
public void setA_QTY_Current (BigDecimal A_QTY_Current)
{
if (A_QTY_Current == null)
throw new IllegalArgumentException ("A_QTY_Current is mandatory.");
set_Value (COLUMNNAME_A_QTY_Current, A_QTY_Current);
}
/** Get A_QTY_Current.
@return A_QTY_Current */
public BigDecimal getA_QTY_Current ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_QTY_Current);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set A_Salvage_Value.
@param A_Salvage_Value A_Salvage_Value */
public void setA_Salvage_Value (BigDecimal A_Salvage_Value)
{
set_Value (COLUMNNAME_A_Salvage_Value, A_Salvage_Value);
}
/** Get A_Salvage_Value.
@return A_Salvage_Value */
public BigDecimal getA_Salvage_Value ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Salvage_Value);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Asset Depreciation Date.
@param AssetDepreciationDate
Date of last depreciation
*/
public void setAssetDepreciationDate (Timestamp AssetDepreciationDate)
{
set_Value (COLUMNNAME_AssetDepreciationDate, AssetDepreciationDate);
}
/** Get Asset Depreciation Date.
@return Date of last depreciation
*/
public Timestamp getAssetDepreciationDate ()
{
return (Timestamp)get_Value(COLUMNNAME_AssetDepreciationDate);
}
/** 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 Depreciate.
@param IsDepreciated
The asset will be depreciated
*/
public void setIsDepreciated (boolean IsDepreciated)
{
set_Value (COLUMNNAME_IsDepreciated, Boolean.valueOf(IsDepreciated));
}
/** Get Depreciate.
@return The asset will be depreciated
*/
public boolean isDepreciated ()
{
Object oo = get_Value(COLUMNNAME_IsDepreciated);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** PostingType AD_Reference_ID=125 */
public static final int POSTINGTYPE_AD_Reference_ID=125;
/** Actual = A */
public static final String POSTINGTYPE_Actual = "A";
/** Budget = B */
public static final String POSTINGTYPE_Budget = "B";
/** Commitment = E */
public static final String POSTINGTYPE_Commitment = "E";
/** Statistical = S */
public static final String POSTINGTYPE_Statistical = "S";
/** Reservation = R */
public static final String POSTINGTYPE_Reservation = "R";
/** Set PostingType.
@param PostingType
The type of posted amount for the transaction
*/
public void setPostingType (String PostingType)
{
if (PostingType == null || PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R");
if (PostingType != null && PostingType.length() > 1)
{
log.warning("Length > 1 - truncated");
PostingType = PostingType.substring(0, 1);
}
set_Value (COLUMNNAME_PostingType, PostingType);
}
/** Get PostingType.
@return The type of posted amount for the transaction
*/
public String getPostingType ()
{
return (String)get_Value(COLUMNNAME_PostingType);
}
/** 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;
}
}

View File

@ -119,6 +119,45 @@ public class X_C_InvoiceLine extends PO implements I_C_InvoiceLine, I_Persistent
return ii.intValue(); return ii.intValue();
} }
public I_A_Asset_Group getA_Asset_Group() throws Exception
{
Class<?> clazz = MTable.getClass(I_A_Asset_Group.Table_Name);
I_A_Asset_Group result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_A_Asset_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getA_Asset_Group_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 Asset Group.
@param A_Asset_Group_ID
Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID)
{
if (A_Asset_Group_ID < 1)
set_Value (COLUMNNAME_A_Asset_Group_ID, null);
else
set_Value (COLUMNNAME_A_Asset_Group_ID, Integer.valueOf(A_Asset_Group_ID));
}
/** Get Asset Group.
@return Group of Assets
*/
public int getA_Asset_Group_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Group_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_A_Asset getA_Asset() throws Exception public I_A_Asset getA_Asset() throws Exception
{ {
Class<?> clazz = MTable.getClass(I_A_Asset.Table_Name); Class<?> clazz = MTable.getClass(I_A_Asset.Table_Name);
@ -158,6 +197,75 @@ public class X_C_InvoiceLine extends PO implements I_C_InvoiceLine, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** A_CapvsExp AD_Reference_ID=53277 */
public static final int A_CAPVSEXP_AD_Reference_ID=53277;
/** Capital = Cap */
public static final String A_CAPVSEXP_Capital = "Cap";
/** Expense = Exp */
public static final String A_CAPVSEXP_Expense = "Exp";
/** Set A_CapvsExp.
@param A_CapvsExp A_CapvsExp */
public void setA_CapvsExp (String A_CapvsExp)
{
if (A_CapvsExp == null || A_CapvsExp.equals("Cap") || A_CapvsExp.equals("Exp")); else throw new IllegalArgumentException ("A_CapvsExp Invalid value - " + A_CapvsExp + " - Reference_ID=53277 - Cap - Exp");
if (A_CapvsExp != null && A_CapvsExp.length() > 3)
{
log.warning("Length > 3 - truncated");
A_CapvsExp = A_CapvsExp.substring(0, 3);
}
set_Value (COLUMNNAME_A_CapvsExp, A_CapvsExp);
}
/** Get A_CapvsExp.
@return A_CapvsExp */
public String getA_CapvsExp ()
{
return (String)get_Value(COLUMNNAME_A_CapvsExp);
}
/** Set A_CreateAsset.
@param A_CreateAsset A_CreateAsset */
public void setA_CreateAsset (boolean A_CreateAsset)
{
set_Value (COLUMNNAME_A_CreateAsset, Boolean.valueOf(A_CreateAsset));
}
/** Get A_CreateAsset.
@return A_CreateAsset */
public boolean isA_CreateAsset ()
{
Object oo = get_Value(COLUMNNAME_A_CreateAsset);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set A_Processed.
@param A_Processed A_Processed */
public void setA_Processed (boolean A_Processed)
{
set_Value (COLUMNNAME_A_Processed, Boolean.valueOf(A_Processed));
}
/** Get A_Processed.
@return A_Processed */
public boolean isA_Processed ()
{
Object oo = get_Value(COLUMNNAME_A_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_C_Activity getC_Activity() throws Exception public I_C_Activity getC_Activity() throws Exception
{ {
Class<?> clazz = MTable.getClass(I_C_Activity.Table_Name); Class<?> clazz = MTable.getClass(I_C_Activity.Table_Name);

View File

@ -92,6 +92,112 @@ public class X_GL_JournalLine extends PO implements I_GL_JournalLine, I_Persiste
return sb.toString(); return sb.toString();
} }
public I_A_Asset_Group getA_Asset_Group() throws Exception
{
Class<?> clazz = MTable.getClass(I_A_Asset_Group.Table_Name);
I_A_Asset_Group result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_A_Asset_Group)constructor.newInstance(new Object[] {getCtx(), new Integer(getA_Asset_Group_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 Asset Group.
@param A_Asset_Group_ID
Group of Assets
*/
public void setA_Asset_Group_ID (int A_Asset_Group_ID)
{
if (A_Asset_Group_ID < 1)
set_Value (COLUMNNAME_A_Asset_Group_ID, null);
else
set_Value (COLUMNNAME_A_Asset_Group_ID, Integer.valueOf(A_Asset_Group_ID));
}
/** Get Asset Group.
@return Group of Assets
*/
public int getA_Asset_Group_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Group_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** A_Asset_ID AD_Reference_ID=53258 */
public static final int A_ASSET_ID_AD_Reference_ID=53258;
/** Set Asset.
@param A_Asset_ID
Asset used internally or by customers
*/
public void setA_Asset_ID (int A_Asset_ID)
{
if (A_Asset_ID < 1)
set_Value (COLUMNNAME_A_Asset_ID, null);
else
set_Value (COLUMNNAME_A_Asset_ID, Integer.valueOf(A_Asset_ID));
}
/** Get Asset.
@return Asset used internally or by customers
*/
public int getA_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set A_CreateAsset.
@param A_CreateAsset A_CreateAsset */
public void setA_CreateAsset (boolean A_CreateAsset)
{
set_Value (COLUMNNAME_A_CreateAsset, Boolean.valueOf(A_CreateAsset));
}
/** Get A_CreateAsset.
@return A_CreateAsset */
public boolean isA_CreateAsset ()
{
Object oo = get_Value(COLUMNNAME_A_CreateAsset);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set A_Processed.
@param A_Processed A_Processed */
public void setA_Processed (boolean A_Processed)
{
set_Value (COLUMNNAME_A_Processed, Boolean.valueOf(A_Processed));
}
/** Get A_Processed.
@return A_Processed */
public boolean isA_Processed ()
{
Object oo = get_Value(COLUMNNAME_A_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Accounted Credit. /** Set Accounted Credit.
@param AmtAcctCr @param AmtAcctCr
Accounted Credit Amount Accounted Credit Amount

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,120 @@
11,11,0,1000002,2005000,1,1,07042004,,07042004,,,,HP Server for Database,08072008,Y,N,N,Y,Y,Headquarters,,,,HP Server for Database,TYDSFJKH,36,3,,,2005000,2005000,5000,2083.33,0,0,500,0,36,15,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000003,,1000000,1000000,,,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000000-Month - Current Period,1000000-FMCON,
11,11,0,1000002,2005001,1,1,07052004,,08042004,,,,HP Server for Application Server,08072008,Y,N,N,Y,Y,Headquarters,,,,HP Server for Application Server,RTELKHJS122,36,3,,,2005001,2005001,8500,3541.66,0,0,500,0,36,15,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000003,,1000002,1000000,,,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000002-Year - Remainder of year,1000000-FMCON,
11,11,0,1000002,2005002,1,1,07052004,,08042004,,,,HP Server for Web Server,08072008,Y,N,N,Y,Y,Headquarters,,,,HP Server for Web Server,RTELKHJS122,36,3,,,2005002,2005002,8500,3541.66,0,0,500,0,36,15,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000003,,1000001,1000000,,,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000000-FMCON,
11,11,0,1000002,2005003,10,10,10292004,,10302004,,,,Computers for Accounting,10042008,Y,N,N,Y,Y,Headquarters,,,,Accounting Computers,,36,3,,,2005003,2005003,5250,1750,0,0,500,0,36,12,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000006,1000001,1000000,1000000,1583.333333,YR,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000000-Month - Current Period,1000000-FMCON,2005003
11,11,0,1000002,2005004,10,10,10292004,,10302004,,,,Computers for Marketing,10042008,Y,N,N,Y,Y,Headquarters,,,,Marketing Computers,,36,3,,,2005004,2005004,5250,1750,0,0,500,0,36,12,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000006,1000000,1000000,1000000,1583.333333,YR,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000000-Month - Current Period,1000000-FMCON,2005004
11,11,0,1000002,2005005,5,5,10292004,,10302004,,,,Computers for Production,10042008,Y,N,N,Y,Y,Headquarters,,,,Production Computers,,36,3,,,2005005,2005005,2625,875,0,0,500,0,36,12,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000006,,1000000,1000000,59.02777778,PR,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005005
11,11,0,1000002,2005006,3,3,10292004,,10302004,,,,Computers for Production,10042008,Y,N,N,Y,Y,Headquarters,,,,Executive Computers,,36,3,,,2005006,2005006,3000,1000,0,0,500,0,36,12,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000006,,1000002,1000000,69.44444444,PR,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000002-Year - Remainder of year,1000000-FMCON,2005006
11,11,0,1000002,2005007,3,3,10292004,,10302004,,,,Computers for Production,10042008,Y,N,N,Y,Y,Headquarters,,,,Executive Computers,,36,3,,,2005007,2005007,3000,1000,0,0,500,0,36,12,0,3,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000006,,1000001,1000000,69.44444444,PR,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000001-Life - Remainder of life,1000000-FMCON,2005007
11,11,0,1000002,2005008,3,3,10292004,,10302004,,,,Computers for Store,10042008,Y,N,N,Y,Y,Headquarters,,,,Store Computers,,36,3,,,2005008,2005008,1500,500,0,0,500,0,36,12,0,3,0,A,1000014,1000039,1000029,266,295,DFT,,,,,,1000006,,1000000,1000001,27.77777778,PR,,,1,36,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000014-Store-Data Processing Equipment-_-_-_-_,1000039-Store-Data Processing Equipment Depreciation-_-_-_-_,1000029-Store-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000000-Month - Current Period,1000001-HYCON,2005008
11,11,0,1000001,2005009,1,1,10292005,,10292005,,,,Delivery Van for Store,,Y,N,N,Y,Y,Store,,,,Delivery Van,,48,4,,,2005009,2005009,15000,,0,0,3000,0,48,0,0,4,0,A,1000013,1000038,1000028,266,295,DFT,,,,,,1000008,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000001-Vehicles,1000013-Store-Vehicles-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000028-Store-Vehicles Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000000-FMCON,2005009
11,11,0,1000001,2005010,1,1,02152002,,03152002,,,,Forklift for Store,,Y,N,N,Y,Y,Store,,,,Fork Lift,,60,5,,,2005010,2005010,25000,20668.93,0,0,7500,0,60,42,0,5,0,A,1000013,1000038,1000028,266,295,DFT,,,,,,1000008,,1000000,1000000,,,,,1,60,1,101,Upload Sample Asset,1000001-Vehicles,1000013-Store-Vehicles-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000028-Store-Vehicles Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000000-FMCON,2005010
11,11,0,1000001,2005011,1,1,10292005,,10292005,,,,Pickup Truck for Store,,Y,N,N,Y,Y,Store,,,,Pickup,,60,5,,,2005011,2005011,22000,0,0,0,2500,0,60,0,0,5,0,A,1000013,1000038,1000028,266,295,DFT,,,,,,1000008,,1000000,1000001,,,,,1,60,1,101,Upload Sample Asset,1000001-Vehicles,1000013-Store-Vehicles-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000028-Store-Vehicles Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000001-HYCON,2005011
11,11,0,1000006,2005012,1,1,10292005,,10292005,,,,Telephone System for Store,,Y,N,N,Y,Y,Store,,,,Telephone System Store,,24,2,,,2005012,2005012,1500,0,0,0,0,0,24,0,0,2,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000008,,1000000,1000002,,,,,1,24,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000002-MMCON,2005012
11,11,0,1000006,2005013,1,1,10292005,,10292005,,,,Telephone System for Greenhouse #1,,Y,N,N,Y,Y,Greenhouse #1,,,,Telephone System GH #1,,24,2,,,2005013,2005013,1500,0,0,0,0,0,24,0,0,2,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000008,,1000000,1000003,,,,,1,24,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000003-MQCON,2005013
11,11,0,1000006,2005014,1,1,10292005,,10292005,,,,Tiller 25 HP,,Y,N,N,Y,Y,Greenhouse #1,,,,Tiller 25 HP #1,,24,2,,,2005014,2005014,2500,0,0,0,0,0,24,0,0,2,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000008,,1000000,1000001,,,,,1,24,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000001-HYCON,2005014
11,11,0,1000006,2005015,1,1,10292005,,10292005,,,,Watering System,,Y,N,N,Y,Y,Greenhouse #1,,,,Watering System #1,,48,4,,,2005015,2005015,12500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000008,,1000000,1000005,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000005-FYCON,2005015
11,11,0,1000006,2005016,1,1,10292005,,10292005,,,,50HP Tractor,,Y,N,N,Y,Y,Greenhouse #1,,,,50HP Tractor #1,,60,5,,,2005016,2005016,8500,0,0,0,1000,0,60,0,0,5,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000008,,1000000,1000004,,,,,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000004-DYCON,2005016
11,11,0,1000006,2005017,1,1,10292005,,10292005,,,,Heating system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Heating System #1,,72,6,,,2005017,2005017,8000,0,0,0,1000,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000008,,1000000,1000000,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000008-Declining Balance 200% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000000-FMCON,2005017
11,11,0,1000006,2005018,1,1,10292005,,10292005,,,,Telephone System for Greenhouse #2,,Y,N,N,Y,Y,Greenhouse #2,,,,Telephone System GH #2,,24,2,,,2005018,2005018,1500,0,0,0,0,0,24,0,0,2,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000000,,1000000,1000002,,,,,1,24,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000000-Declining Balance 200% (DB) Depreciation,,1000000-Month - Current Period,1000002-MMCON,2005018
11,11,0,1000006,2005019,1,1,10292005,,10292005,,,,Telephone System for HQ,,Y,N,N,Y,Y,Headquarters,,,,Telephone System - HQ,,24,2,,,2005019,2005019,1500,0,0,0,0,0,24,0,0,2,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000000,,1000000,1000003,,,,,1,24,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000000-Declining Balance 200% (DB) Depreciation,,1000000-Month - Current Period,1000003-MQCON,2005019
11,11,0,1000006,2005020,1,1,10292005,,10292005,,,,Tiller 25 HP,,Y,N,N,Y,Y,Greenhouse #2,,,,Tiller 25 HP #2,,24,2,,,2005020,2005020,2500,0,0,0,0,0,24,0,0,2,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000000,,1000000,1000001,,,,,1,24,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000000-Declining Balance 200% (DB) Depreciation,,1000000-Month - Current Period,1000001-HYCON,2005020
11,11,0,1000006,2005021,1,1,10292005,,10292005,,,,Watering System,,Y,N,N,Y,Y,Greenhouse #2,,,,Watering System #2,,48,4,,,2005021,2005021,12500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000000,,1000000,1000005,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000000-Declining Balance 200% (DB) Depreciation,,1000000-Month - Current Period,1000005-FYCON,2005021
11,11,0,1000006,2005022,1,1,10292005,,10292005,,,,50HP Tractor,,Y,N,N,Y,Y,Greenhouse #2,,,,50HP Tractor #2,,60,5,,,2005022,2005022,8500,0,0,0,1000,0,60,0,0,5,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000000,,1000000,1000004,,,,,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000000-Declining Balance 200% (DB) Depreciation,,1000000-Month - Current Period,1000004-DYCON,2005022
11,11,0,1000006,2005023,1,1,10292005,,10292005,,,,Heating system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Heating System #2,,72,6,,,2005023,2005023,8000,0,0,0,1000,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000000,,1000000,1000000,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000000-Declining Balance 200% (DB) Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005023
11,11,0,1000006,2005024,1,1,10292005,,10292005,,,,Humidifying system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Humidifier System #1,,72,6,,,2005024,2005024,10000,0,0,0,500,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000009,,1000000,1000000,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000009-Declining Balance 150% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000000-FMCON,2005024
11,11,0,1000006,2005025,1,1,10292005,,10292005,,,,Electrical system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Electrical System #1,,72,6,,,2005025,2005025,12000,0,0,0,500,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000009,,1000000,1000001,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000009-Declining Balance 150% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000001-HYCON,2005025
11,11,0,1000006,2005026,1,1,10292005,,10292005,,,,Hydroponic system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Hydroponic System #1,,72,6,,,2005026,2005026,15000,0,0,0,500,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000009,,1000000,1000002,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000009-Declining Balance 150% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000002-MMCON,2005026
11,11,0,1000006,2005027,1,1,10292005,,10292005,,,,Lighting system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Lighting System #1,,72,6,,,2005027,2005027,5000,0,0,0,500,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000009,,1000000,1000003,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000009-Declining Balance 150% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000003-MQCON,2005027
11,11,0,1000006,2005028,1,1,10292005,,10292005,,,,Cooling system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Cooling System #1,,72,6,,,2005028,2005028,6500,0,0,0,500,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000009,,1000000,1000004,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000009-Declining Balance 150% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000004-DYCON,2005028
11,11,0,1000006,2005029,1,1,10292005,,10292005,,,,Composting system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #1,,,,Cooling System #1,,60,5,,,2005029,2005029,8500,0,0,0,500,0,60,0,0,5,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000009,,1000000,1000005,,,,,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000009-Declining Balance 150% (DB) Depreciation with a switch to Straight Line,,1000000-Month - Current Period,1000005-FYCON,2005029
11,11,0,1000006,2005030,1,1,10292005,,10292005,,,,Humidifying system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Humidifier System #2,,72,6,,,2005030,2005030,10000,0,0,0,500,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000001,,1000000,1000000,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000001-Declining Balance 150% (DB) Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005030
11,11,0,1000006,2005031,1,1,10292005,,10292005,,,,Electrical system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Electrical System #2,,72,6,,,2005031,2005031,12000,0,0,0,500,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000001,,1000000,1000001,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000001-Declining Balance 150% (DB) Depreciation,,1000000-Month - Current Period,1000001-HYCON,2005031
11,11,0,1000006,2005032,1,1,10292005,,10292005,,,,Hydroponic system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Hydroponic System #2,,72,6,,,2005032,2005032,15000,0,0,0,500,0,72,0,0,6,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000001,,1000000,1000002,,,,,1,72,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000001-Declining Balance 150% (DB) Depreciation,,1000000-Month - Current Period,1000002-MMCON,2005032
11,11,0,1000006,2005033,1,1,10292005,,10292005,,,,Lighting system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Lighting System #2,,72,6,,,2005033,2005033,5000,0,0,0,500,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000001,,1000000,1000003,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000001-Declining Balance 150% (DB) Depreciation,,1000000-Month - Current Period,1000003-MQCON,2005033
11,11,0,1000006,2005034,1,1,10292005,,10292005,,,,Cooling system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Cooling System #2,,72,6,,,2005034,2005034,6500,0,0,0,500,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000001,,1000000,1000004,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000001-Declining Balance 150% (DB) Depreciation,,1000000-Month - Current Period,1000004-DYCON,2005034
11,11,0,1000006,2005035,1,1,10292005,,10292005,,,,Composting system for Greenhouse,,Y,N,N,Y,Y,Greenhouse #2,,,,Cooling System #2,,60,5,,,2005035,2005035,8500,0,0,0,500,0,60,0,0,5,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000001,,1000000,1000005,,,,,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000001-Declining Balance 150% (DB) Depreciation,,1000000-Month - Current Period,1000005-FYCON,2005035
11,11,0,1000006,2005036,1,1,10292005,,10292005,,,,Cash Register #1,,Y,N,N,Y,Y,Store,,,,Cash Register #1,,48,4,,,2005036,2005036,1500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000003,,1000000,1000001,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000000-Month - Current Period,1000001-HYCON,
11,11,0,1000006,2005037,1,1,10292005,,10292005,,,,Cash Register #2,,Y,N,N,Y,Y,Store,,,,Cash Register #2,,48,4,,,2005037,2005037,1500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000003,,1000002,1000001,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000002-Year - Remainder of year,1000001-HYCON,
11,11,0,1000006,2005038,1,1,10292005,,10292005,,,,Cash Register #3,,Y,N,N,Y,Y,Store,,,,Cash Register #3,,48,4,,,2005038,2005038,1500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000003,,1000001,1000001,,,,,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000001-HYCON,
11,11,0,1000004,2005039,1,1,10292005,,10292005,,,,Display Counter #1,,Y,N,N,Y,Y,Store,,,,Display Counter #1,,60,5,,,2005039,2005039,2500,0,0,0,0,0,60,0,0,5,0,A,1000011,1000036,1000026,266,295,DFT,,,,,,1000003,,1000000,1000002,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000011-Store-Fixtures-_-_-_-_,1000036-Store-Fixtures Depreciation-_-_-_-_,1000026-Store-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000000-Month - Current Period,1000002-MMCON,
11,11,0,1000004,2005040,1,1,10292005,,10292005,,,,Display Counter #2,,Y,N,N,Y,Y,Store,,,,Display Counter #2,,60,5,,,2005040,2005040,2500,0,0,0,0,0,60,0,0,5,0,A,1000011,1000036,1000026,266,295,DFT,,,,,,1000003,,1000002,1000002,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000011-Store-Fixtures-_-_-_-_,1000036-Store-Fixtures Depreciation-_-_-_-_,1000026-Store-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000002-Year - Remainder of year,1000002-MMCON,
11,11,0,1000004,2005041,1,1,10292005,,10292005,,,,Display Counter #3,,Y,N,N,Y,Y,Store,,,,Display Counter #3,,60,5,,,2005041,2005041,2500,0,0,0,0,0,60,0,0,5,0,A,1000011,1000036,1000026,266,295,DFT,,,,,,1000003,,1000001,1000002,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000011-Store-Fixtures-_-_-_-_,1000036-Store-Fixtures Depreciation-_-_-_-_,1000026-Store-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000002-MMCON,
11,11,0,1000004,2005042,1,1,10292005,,10292005,,,,Store Shelving,,Y,N,N,Y,Y,Store,,,,Shelving,,60,5,,,2005042,2005042,4000,0,0,0,0,0,60,0,0,5,0,A,1000011,1000036,1000026,266,295,DFT,,,,,,1000003,,1000000,1000003,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000011-Store-Fixtures-_-_-_-_,1000036-Store-Fixtures Depreciation-_-_-_-_,1000026-Store-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000000-Month - Current Period,1000003-MQCON,
11,11,0,1000004,2005043,1,1,10292005,,10292005,,,,Counters GH #1,,Y,N,N,Y,Y,Greenhouse #1,,,,Counters GH #1,,60,5,,,2005043,2005043,10000,0,0,0,0,0,60,0,0,5,0,A,1000011,1000036,1000026,266,295,DFT,,,,,,1000003,,1000002,1000003,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000011-Store-Fixtures-_-_-_-_,1000036-Store-Fixtures Depreciation-_-_-_-_,1000026-Store-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000002-Year - Remainder of year,1000003-MQCON,
11,11,0,1000004,2005044,1,1,10292005,,10292005,,,,Counters GH #2,,Y,N,N,Y,Y,Greenhouse #2,,,,Counters GH #2,,60,5,,,2005044,2005044,10000,0,0,0,0,0,60,0,0,5,0,A,1000011,1000036,1000026,266,295,DFT,,,,,,1000003,,1000001,1000003,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000011-Store-Fixtures-_-_-_-_,1000036-Store-Fixtures Depreciation-_-_-_-_,1000026-Store-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000003-MQCON,
11,11,0,1000004,2005045,1,1,10292005,,10292005,,,,Partitions Accounting,,Y,N,N,Y,Y,Headquarters,,,,Partitions Accounting,,60,5,,,2005045,2005045,2500,0,0,0,0,0,60,0,0,5,0,A,1000006,1000042,1000021,266,295,DFT,,,,,,1000003,,1000000,1000004,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000006-HQ-Fixtures-_-_-_-_,1000042-HQ-Fixtures Depreciation-_-_-_-_,1000021-HQ-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000000-Month - Current Period,1000004-DYCON,
11,11,0,1000004,2005046,1,1,10292005,,10292005,,,,Partitions Production,,Y,N,N,Y,Y,Headquarters,,,,Partitions Production,,60,5,,,2005046,2005046,2500,0,0,0,0,0,60,0,0,5,0,A,1000006,1000042,1000021,266,295,DFT,,,,,,1000003,,1000002,1000004,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000006-HQ-Fixtures-_-_-_-_,1000042-HQ-Fixtures Depreciation-_-_-_-_,1000021-HQ-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000002-Year - Remainder of year,1000004-DYCON,
11,11,0,1000004,2005047,1,1,10292005,,10292005,,,,Partitions Marketing,,Y,N,N,Y,Y,Headquarters,,,,Partitions Marketing,,60,5,,,2005047,2005047,2500,0,0,0,0,0,60,0,0,5,0,A,1000006,1000042,1000021,266,295,DFT,,,,,,1000003,,1000001,1000004,,,,,1,60,1,101,Upload Sample Asset,1000004-Fixtures,1000006-HQ-Fixtures-_-_-_-_,1000042-HQ-Fixtures Depreciation-_-_-_-_,1000021-HQ-Fixtures Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000004-DYCON,
11,11,0,1000003,2005048,1,1,10292005,,10292005,,,,Desks Marketing#1,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing,,60,5,,,2005048,2005048,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000003,,1000001,1000005,,,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000005-FYCON
11,11,0,1000003,2005049,1,1,10292005,,10292005,,,,Desks Accounting#1,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting,,60,5,,,2005049,2005049,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000003,,1000001,1000005,,,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000005-FYCON
11,11,0,1000003,2005050,1,1,10292005,,10292005,,,,Desks Production#1,,Y,N,N,Y,Y,Headquarters,,,,Desks Production,,60,5,,,2005050,2005050,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000003,,1000001,1000005,,,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000003-Straight Line Depreciation,,1000001-Life - Remainder of life,1000005-FYCON
11,11,0,1000003,2005051,1,1,10292005,,10292005,,,,Desks Exec ,,Y,N,N,Y,Y,Headquarters,,,,Desks Exec ,,60,5,,,2005051,2005051,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000001,1000000,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000001-Life - Remainder of life,1000000-FMCON
11,11,0,1000003,2005052,1,1,10292005,,10292005,,,,Desks Receptionist,,Y,N,N,Y,Y,Headquarters,,,,Desks Receptionist,,60,5,,,2005052,2005052,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000001,1000000,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000001-Life - Remainder of life,1000000-FMCON
11,11,0,1000003,2005053,1,1,10292005,,10292005,,,,Desks Accounting#2,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#2,,60,5,,,2005053,2005053,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000002,1000000,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000002-Year - Remainder of year,1000000-FMCON
11,11,0,1000003,2005054,1,1,10292005,,10292005,,,,Desks Marketing#2,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005054,2005054,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000002,1000000,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000002-Year - Remainder of year,1000000-FMCON
11,11,0,1000003,2005055,1,1,10292005,,10292005,,,,Desks Accounting#3,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005055,2005055,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000000,1000001,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000000-Month - Current Period,1000001-HYCON
11,11,0,1000003,2005056,1,1,10292005,,10292005,,,,Desks Marketing#3,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005056,2005056,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000000,1000001,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000000-Month - Current Period,1000001-HYCON
11,11,0,1000003,2005057,1,1,10292005,,10292005,,,,Desks Marketing#4,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005057,2005057,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000001,1000001,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000001-Life - Remainder of life,1000001-HYCON
11,11,0,1000003,2005058,1,1,10292005,,10292005,,,,Desks Accounting#4,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005058,2005058,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000001,1000001,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000001-Life - Remainder of life,1000001-HYCON
11,11,0,1000003,2005059,1,1,10292005,,10292005,,,,Desks Production #4,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005059,2005059,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000001,1000001,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000001-Life - Remainder of life,1000001-HYCON
11,11,0,1000003,2005060,1,1,10292005,,10292005,,,,Desks Marketing#5,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005060,2005060,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000002,1000001,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000002-Year - Remainder of year,1000001-HYCON
11,11,0,1000003,2005061,1,1,10292005,,10292005,,,,Desks Accounting#5,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005061,2005061,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000002,1000001,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000002-Year - Remainder of year,1000001-HYCON
11,11,0,1000003,2005062,1,1,10292005,,10292005,,,,Desks Production #5,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005062,2005062,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000002,1000001,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000002-Year - Remainder of year,1000001-HYCON
11,11,0,1000003,2005063,1,1,10292005,,10292005,,,,Desks Marketing#6,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005063,2005063,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000000,1000002,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000000-Month - Current Period,1000002-MMCON
11,11,0,1000003,2005064,1,1,10292005,,10292005,,,,Desks Accounting#6,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005064,2005064,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000000,1000002,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000000-Month - Current Period,1000002-MMCON
11,11,0,1000003,2005065,1,1,10292005,,10292005,,,,Desks Production #6,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005065,2005065,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000000,1000002,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000000-Month - Current Period,1000002-MMCON
11,11,0,1000003,2005066,1,1,10292005,,10292005,,,,Desks Marketing#7,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005066,2005066,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000001,1000002,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000001-Life - Remainder of life,1000002-MMCON
11,11,0,1000003,2005067,1,1,10292005,,10292005,,,,Desks Accounting#7,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005067,2005067,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000001,1000002,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000001-Life - Remainder of life,1000002-MMCON
11,11,0,1000003,2005068,1,1,10292005,,10292005,,,,Desks Production #7,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005068,2005068,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000001,1000002,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000001-Life - Remainder of life,1000002-MMCON
11,11,0,1000003,2005069,1,1,10292005,,10292005,,,,Desks Marketing#8,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005069,2005069,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000002,1000002,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000002-Year - Remainder of year,1000002-MMCON
11,11,0,1000003,2005070,1,1,10292005,,10292005,,,,Desks Accounting#8,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005070,2005070,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000002,1000002,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000002-Year - Remainder of year,1000002-MMCON
11,11,0,1000003,2005071,1,1,10292005,,10292005,,,,Desks Production #8,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005071,2005071,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000002,1000002,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000002-Year - Remainder of year,1000002-MMCON
11,11,0,1000003,2005072,1,1,10292005,,10292005,,,,Desks Marketing#9,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005072,2005072,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000000,1000003,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000000-Month - Current Period,1000003-MQCON
11,11,0,1000003,2005073,1,1,10292005,,10292005,,,,Desks Accounting#9,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005073,2005073,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000000,1000003,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000000-Month - Current Period,1000003-MQCON
11,11,0,1000003,2005074,1,1,10292005,,10292005,,,,Desks Production #9,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005074,2005074,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000000,1000003,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000000-Month - Current Period,1000003-MQCON
11,11,0,1000003,2005075,1,1,10292005,,10292005,,,,Desks Marketing#10,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005075,2005075,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000001,1000003,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000001-Life - Remainder of life,1000003-MQCON
11,11,0,1000003,2005076,1,1,10292005,,10292005,,,,Desks Accounting#10,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005076,2005076,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000001,1000003,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000001-Life - Remainder of life,1000003-MQCON
11,11,0,1000003,2005077,1,1,10292005,,10292005,,,,Desks Production #10,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005077,2005077,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000001,1000003,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000001-Life - Remainder of life,1000003-MQCON
11,11,0,1000003,2005078,1,1,10292005,,10292005,,,,Desks Production #1,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#2,,60,5,,,2005078,2005078,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000002,1000003,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000002-Year - Remainder of year,1000003-MQCON
11,11,0,1000003,2005079,1,1,10292005,,10292005,,,,Desks Production #2,,Y,N,N,Y,Y,Headquarters,,,,Desks Accounting#3,,60,5,,,2005079,2005079,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000002,1000003,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000002-Year - Remainder of year,1000003-MQCON
11,11,0,1000003,2005080,1,1,10292005,,10292005,,,,Desks Production #3,,Y,N,N,Y,Y,Headquarters,,,,Desks Marketing#3,,60,5,,,2005080,2005080,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000002,1000003,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000002-Year - Remainder of year,1000003-MQCON
11,11,0,1000003,2005081,1,1,10292005,,10292005,,,,Computer Racking,,Y,N,N,Y,Y,Headquarters,,,,Computer Racking,,60,5,,,2005081,2005081,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000000,1000004,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000000-Month - Current Period,1000004-DYCON
11,11,0,1000003,2005082,1,1,10292005,,10292005,,,,Desk in Computer Room,,Y,N,N,Y,Y,Headquarters,,,,Desk in Computer Room,,60,5,,,2005082,2005082,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000000,1000004,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000000-Month - Current Period,1000004-DYCON
11,11,0,1000003,2005083,1,1,10292005,,10292005,,,,Meeting Room Table,,Y,N,N,Y,Y,Headquarters,,,,Meeting Room Table,,60,5,,,2005083,2005083,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000000,1000004,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000000-Month - Current Period,1000004-DYCON
11,11,0,1000003,2005084,1,1,10292005,,10292005,,,,Breakroom Table Store,,Y,N,N,Y,Y,Store,,,,Breakroom Table Store,,60,5,,,2005084,2005084,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,,1000001,1000004,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000001-Life - Remainder of life,1000004-DYCON
11,11,0,1000003,2005085,1,1,10292005,,10292005,,,,Breakroom Table GH,,Y,N,N,Y,Y,Greenhouse #1,,,,Breakroom Table GH,,60,5,,,2005085,2005085,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,1000000,1000001,1000004,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000001-Life - Remainder of life,1000004-DYCON
11,11,0,1000003,2005086,1,1,10292005,,10292005,,,,Breakroom Table HQ,,Y,N,N,Y,Y,Headquarters,,,,Breakroom Table HQ,,60,5,,,2005086,2005086,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000001,1000004,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000001-Life - Remainder of life,1000004-DYCON
11,11,0,1000003,2005087,1,1,10292005,,10292005,,,,Worktable #1 GH #1,,Y,N,N,Y,Y,Greenhouse #1,,,,Worktable #1 GH #1,,60,5,,,2005087,2005087,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,,1000002,1000004,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000002-Year - Remainder of year,1000004-DYCON
11,11,0,1000003,2005088,1,1,10292005,,10292005,,,,Worktable #2 GH #1,,Y,N,N,Y,Y,Greenhouse #1,,,,Worktable #2 GH #1,,60,5,,,2005088,2005088,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,1000000,1000002,1000004,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000002-Year - Remainder of year,1000004-DYCON
11,11,0,1000003,2005089,1,1,10292005,,10292005,,,,Worktable #4 GH #1,,Y,N,N,Y,Y,Greenhouse #1,,,,Worktable #4 GH #1,,60,5,,,2005089,2005089,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,1000001,1000002,1000004,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000002-Year - Remainder of year,1000004-DYCON
11,11,0,1000003,2005090,1,1,10292005,,10292005,,,,Worktable #1 GH #2,,Y,N,N,Y,Y,Greenhouse #2,,,,Worktable #1 GH #2,,60,5,,,2005090,2005090,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,,1000000,1000005,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000000-Month - Current Period,1000005-FYCON
11,11,0,1000003,2005091,1,1,10292005,,10292005,,,,Worktable #2 GH #2,,Y,N,N,Y,Y,Greenhouse #2,,,,Worktable #2 GH #2,,60,5,,,2005091,2005091,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,1000000,1000000,1000005,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000000-Month - Current Period,1000005-FYCON
11,11,0,1000003,2005092,1,1,10292005,,10292005,,,,Worktable #4 GH #2,,Y,N,N,Y,Y,Greenhouse #2,,,,Worktable #4 GH #2,,60,5,,,2005092,2005092,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,1000001,1000000,1000005,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000000-Month - Current Period,1000005-FYCON
11,11,0,1000003,2005093,1,1,10292005,,10292005,,,,Chairs for Breakroom Store,,Y,N,N,Y,Y,Store,,,,Chairs for Breakroom Store,,60,5,,,2005093,2005093,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,,1000001,1000005,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000001-Life - Remainder of life,1000005-FYCON
11,11,0,1000003,2005094,1,1,10292005,,10292005,,,,Chairs for Breakroom Greenhouse #1,,Y,N,N,Y,Y,Greenhouse #1,,,,Chairs for Breakroom Greenhouse #1,,60,5,,,2005094,2005094,2500,0,0,0,0,0,60,0,0,5,0,A,1000010,1000035,1000025,266,295,DFT,,,,,,1000006,1000000,1000001,1000005,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000010-Store-Furniture-_-_-_-_,1000035-Store-Furniture Depreciation-_-_-_-_,1000025-Store-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000001-Life - Remainder of life,1000005-FYCON
11,11,0,1000003,2005095,1,1,10292005,,10292005,,,,Chairs for Breakroom HQ,,Y,N,N,Y,Y,Headquarters,,,,Chairs for Breakroom HQ,,60,5,,,2005095,2005095,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000001,1000005,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000001-Life - Remainder of life,1000005-FYCON
11,11,0,1000003,2005096,1,1,10292005,,10292005,,,,Bookcases for Marketing,,Y,N,N,Y,Y,Headquarters,,,,Bookcases for Marketing,,60,5,,,2005096,2005096,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,,1000002,1000005,41.66666667,PR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,,1000002-Year - Remainder of year,1000005-FYCON,
11,11,0,1000003,2005097,1,1,10292005,,10292005,,,,Bookcases for Accounting,,Y,N,N,Y,Y,Headquarters,,,,Bookcases for Accounting,,60,5,,,2005097,2005097,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000000,1000002,1000005,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000000-Quarterly Spread,1000002-Year - Remainder of year,1000005-FYCON,
11,11,0,1000003,2005098,1,1,10292005,,10292005,,,,Bookcases for Production,,Y,N,N,Y,Y,Headquarters,,,,Bookcases for Production,,60,5,,,2005098,2005098,2500,0,0,0,0,0,60,0,0,5,0,A,1000005,1000041,1000020,266,295,DFT,,,,,,1000006,1000001,1000002,1000005,500,YR,,,1,60,1,101,Upload Sample Asset,1000003-Furniture,1000005-HQ-Furniture-_-_-_-_,1000041-HQ-Furniture Depreciation-_-_-_-_,1000020-HQ-Furniture Accumulated Depreciation-_-_-_-_,1000006-Manual Depreciation,1000001-Monthly Spread,1000002-Year - Remainder of year,1000005-FYCON,
11,11,0,1000006,2005099,1,1,10292005,,10292005,,,,Security System for Store,,Y,N,N,Y,Y,Store,,,,Security System for Store,,60,5,,,2005099,2005099,1500,0,0,0,0,0,60,0,0,5,0,A,1000012,1000037,1000027,266,295,DFT,,,,,,1000010,,1000000,1000000,,,,1.25,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000037-Store-Equipment Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000010-Variable Accelerated with a switch to Straight Line,,1000000-Month - Current Period,1000000-FMCON,2005099
11,11,0,1000006,2005100,1,1,10292005,,10292005,,,,Security System for HQ,,Y,N,N,Y,Y,Headquarters,,,,Security System for HQ,,60,5,,,2005100,2005100,1500,0,0,0,0,0,60,0,0,5,0,A,1000007,1000043,1000022,266,295,DFT,,,,,,1000010,,1000000,1000001,,,,1.25,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000007-HQ-Equipment-_-_-_-_,1000043-HQ-Equipment Depreciation-_-_-_-_,1000022-HQ-Equipment Accumulated Depreciation-_-_-_-_,1000010-Variable Accelerated with a switch to Straight Line,,1000000-Month - Current Period,1000001-HYCON,2005100
11,11,0,1000006,2005101,1,1,10292005,,10292005,,,,Security System for GH#1,,Y,N,N,Y,Y,Greenhouse #1,,,,Security System for GH#1,,60,5,,,2005101,2005101,1500,0,0,0,0,0,60,0,0,5,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000010,,1000000,1000002,,,,1.25,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000010-Variable Accelerated with a switch to Straight Line,,1000000-Month - Current Period,1000002-MMCON,2005101
11,11,0,1000006,2005102,1,1,10292005,,10292005,,,,Security System for GH#2,,Y,N,N,Y,Y,Greenhouse #2,,,,Security System for GH#2,,60,5,,,2005102,2005102,1500,0,0,0,0,0,60,0,0,5,0,A,1000012,1000038,1000027,266,295,DFT,,,,,,1000010,,1000000,1000003,,,,1.25,1,60,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000038-Store-Vehicles Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000010-Variable Accelerated with a switch to Straight Line,,1000000-Month - Current Period,1000003-MQCON,2005102
11,11,0,1000006,2005103,1,1,10292005,,10292005,,,,Copier Accounting,,Y,N,N,Y,Y,Headquarters,,,,Copier Accounting,,48,4,,,2005103,2005103,4800,0,0,0,0,0,48,0,0,4,0,A,1000007,1000043,1000022,266,295,DFT,,,,,,1000010,,1000000,1000004,,,,1.75,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000007-HQ-Equipment-_-_-_-_,1000043-HQ-Equipment Depreciation-_-_-_-_,1000022-HQ-Equipment Accumulated Depreciation-_-_-_-_,1000010-Variable Accelerated with a switch to Straight Line,,1000000-Month - Current Period,1000004-DYCON,2005103
11,11,0,1000006,2005104,1,1,10292005,,10292005,,,,Copier Store,,Y,N,N,Y,Y,Headquarters,,,,Copier Store,,48,4,,,2005104,2005104,4800,0,0,0,0,0,48,0,0,4,0,A,1000007,1000043,1000022,266,295,DFT,,,,,,1000010,,1000000,1000005,,,,1.75,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000007-HQ-Equipment-_-_-_-_,1000043-HQ-Equipment Depreciation-_-_-_-_,1000022-HQ-Equipment Accumulated Depreciation-_-_-_-_,1000010-Variable Accelerated with a switch to Straight Line,,1000000-Month - Current Period,1000005-FYCON,2005104
11,11,0,1000006,2005105,1,1,10292005,,10292005,,,,Water Dispensers Store,,Y,N,N,Y,Y,Store,,,,Water Dispensers Store,,48,4,,,2005105,2005105,500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000037,1000027,266,295,DFT,,,,,,1000005,,1000000,1000000,,,,1.25,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000037-Store-Equipment Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000005-Variable Accelerated,,1000000-Month - Current Period,1000000-FMCON,2005105
11,11,0,1000006,2005106,1,1,10292005,,10292005,,,,Water Dispensers HQ,,Y,N,N,Y,Y,Headquarters,,,,Water Dispensers HQ,,48,4,,,2005106,2005106,500,0,0,0,0,0,48,0,0,4,0,A,1000007,1000043,1000022,266,295,DFT,,,,,,1000005,,1000000,1000001,,,,1.25,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000007-HQ-Equipment-_-_-_-_,1000043-HQ-Equipment Depreciation-_-_-_-_,1000022-HQ-Equipment Accumulated Depreciation-_-_-_-_,1000005-Variable Accelerated,,1000000-Month - Current Period,1000001-HYCON,2005106
11,11,0,1000006,2005107,1,1,10292005,,10292005,,,,Water Dispensers GH#1,,Y,N,N,Y,Y,Greenhouse #1,,,,Water Dispensers GH#1,,48,4,,,2005107,2005107,500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000037,1000027,266,295,DFT,,,,,,1000005,,1000000,1000002,,,,1.25,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000037-Store-Equipment Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000005-Variable Accelerated,,1000000-Month - Current Period,1000002-MMCON,2005107
11,11,0,1000006,2005108,1,1,10292005,,10292005,,,,Water Dispensers GH#2,,Y,N,N,Y,Y,Greenhouse #2,,,,Water Dispensers GH#2,,48,4,,,2005108,2005108,500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000037,1000027,266,295,DFT,,,,,,1000005,,1000000,1000003,,,,1.25,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000037-Store-Equipment Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000005-Variable Accelerated,,1000000-Month - Current Period,1000003-MQCON,2005108
11,11,0,1000006,2005109,1,1,10292005,,10292005,,,,Copier Accounting,,Y,N,N,Y,Y,Headquarters,,,,Oven HQ,,48,4,,,2005109,2005109,500,0,0,0,0,0,48,0,0,4,0,A,1000007,1000043,1000022,266,295,DFT,,,,,,1000005,,1000000,1000004,,,,1.75,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000007-HQ-Equipment-_-_-_-_,1000043-HQ-Equipment Depreciation-_-_-_-_,1000022-HQ-Equipment Accumulated Depreciation-_-_-_-_,1000005-Variable Accelerated,,1000000-Month - Current Period,1000004-DYCON,2005109
11,11,0,1000006,2005110,1,1,10292005,,10292005,,,,Copier Store,,Y,N,N,Y,Y,Headquarters,,,,Oven Greenhouse,,48,4,,,2005110,2005110,500,0,0,0,0,0,48,0,0,4,0,A,1000012,1000037,1000027,266,295,DFT,,,,,,1000005,,1000000,1000005,,,,1.75,1,48,1,101,Upload Sample Asset,1000006-Equipment,1000012-Store-Equipment-_-_-_-_,1000037-Store-Equipment Depreciation-_-_-_-_,1000027-Store-Equipment Accumulated Depreciation-_-_-_-_,1000005-Variable Accelerated,,1000000-Month - Current Period,1000005-FYCON,2005110
11,11,0,1000002,2005111,1,1,10292005,,10292005,,,,Printer Accounting,,Y,N,N,Y,Y,Headquarters,,,,Printer Accounting,,48,4,,,2005111,2005111,1500,0,0,0,0,0,48,0,0,4,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000002,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000002-Sum of Year Digits Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005111
11,11,0,1000002,2005112,1,1,10292005,,10292005,,,,Printer Marketing,,Y,N,N,Y,Y,Headquarters,,,,Printer Marketing,,48,4,,,2005112,2005112,1500,0,0,0,0,0,48,0,0,4,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000002,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000002-Sum of Year Digits Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005112
11,11,0,1000002,2005113,1,1,10292005,,10292005,,,,Printer Production,,Y,N,N,Y,Y,Headquarters,,,,Printer Production,,48,4,,,2005113,2005113,1500,0,0,0,0,0,48,0,0,4,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000002,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000002-Sum of Year Digits Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005113
11,11,0,1000002,2005114,1,1,10292005,,10292005,,,,Printer Store,,Y,N,N,Y,Y,Store,,,,Printer Store,,48,4,,,2005114,2005114,1500,0,0,0,0,0,48,0,0,4,0,A,1000014,1000039,1000029,266,295,DFT,,,,,,1000002,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000014-Store-Data Processing Equipment-_-_-_-_,1000039-Store-Data Processing Equipment Depreciation-_-_-_-_,1000029-Store-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000002-Sum of Year Digits Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005114
11,11,0,1000002,2005115,1,1,10292005,,10292005,,,,Printer GH#1,,Y,N,N,Y,Y,Greenhouse #1,,,,Printer GH#1,,48,4,,,2005115,2005115,1500,0,0,0,0,0,48,0,0,4,0,A,1000014,1000039,1000029,266,295,DFT,,,,,,1000002,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000014-Store-Data Processing Equipment-_-_-_-_,1000039-Store-Data Processing Equipment Depreciation-_-_-_-_,1000029-Store-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000002-Sum of Year Digits Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005115
11,11,0,1000002,2005116,1,1,10292005,,10292005,,,,Printer GH#2,,Y,N,N,Y,Y,Greenhouse #2,,,,Printer GH#2,,48,4,,,2005116,2005116,1500,0,0,0,0,0,48,0,0,4,0,A,1000014,1000039,1000029,266,295,DFT,,,,,,1000002,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000014-Store-Data Processing Equipment-_-_-_-_,1000039-Store-Data Processing Equipment Depreciation-_-_-_-_,1000029-Store-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000002-Sum of Year Digits Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005116
11,11,0,1000002,2005117,1,1,10292005,,10292005,,,,Car President,,Y,N,N,Y,Y,Headquarters,,,,Car President,,48,4,100000,,2005117,2005117,26000,0,0,0,0,0,48,0,0,4,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000004,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000004-Units of Production Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005117
11,11,0,1000002,2005118,1,1,10292005,,10292005,,,,Car Controller,,Y,N,N,Y,Y,Headquarters,,,,Car Controller,,48,4,100000,,2005118,2005118,26000,0,0,0,0,0,48,0,0,4,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000004,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000004-Units of Production Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005118
11,11,0,1000002,2005119,1,1,10292005,,10292005,,,,Car Marketing Director,,Y,N,N,Y,Y,Headquarters,,,,Car Marketing Director,,48,4,100000,,2005119,2005119,26000,0,0,0,0,0,48,0,0,4,0,A,1000000,1000002,1000001,266,295,DFT,,,,,,1000004,,1000000,1000000,,,,,1,48,1,101,Upload Sample Asset,1000002-Data Processing Equipment,1000000-HQ-Data Processing Equipment-_-_-_-_,1000002-HQ-Data Processing Equipment Depreciation-_-_-_-_,1000001-HQ-Data Processing Equipment Accumulated Depreciation-_-_-_-_,1000004-Units of Production Depreciation,,1000000-Month - Current Period,1000000-FMCON,2005119
Can't render this file because it has a wrong number of fields in line 49.

Binary file not shown.

View File

@ -25,6 +25,6 @@ BEGIN
WHERE C_CASHLINE_ID = rc.C_CashLine_ID; WHERE C_CASHLINE_ID = rc.C_CashLine_ID;
END LOOP; END LOOP;
END LOOP; END LOOP;
COMMIT;
COMMIT;
END; END;
/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,163 @@
-- oracle fixed asets foreign keys
ALTER TABLE A_ASSET ADD (CONSTRAINT AParentAsset_AAsset FOREIGN KEY (A_Parent_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE A_ASSET_ACCT ADD (CONSTRAINT AAssetSpread_AAssetAcct FOREIGN KEY (A_Asset_Spread_ID) REFERENCES A_ASSET_SPREAD);
ALTER TABLE A_ASSET_ACCT ADD (CONSTRAINT ADepreciationConv_AAssetAcct FOREIGN KEY (A_Depreciation_Conv_ID) REFERENCES A_DEPRECIATION_CONVENTION);
ALTER TABLE A_ASSET_ACCT ADD (CONSTRAINT ADepreciationMethod_AAssetAcct FOREIGN KEY (A_Depreciation_Method_ID) REFERENCES A_DEPRECIATION_METHOD);
ALTER TABLE A_ASSET_ACCT ADD (CONSTRAINT ADepreciationTableHeader_AAsse FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER);
ALTER TABLE A_ASSET_ADDITION ADD (CONSTRAINT CInvoice_AAssetAddition FOREIGN KEY (C_Invoice_ID) REFERENCES C_INVOICE);
ALTER TABLE A_ASSET_ADDITION ADD (CONSTRAINT GLJournalBatch_AAssetAddition FOREIGN KEY (GL_JournalBatch_ID) REFERENCES GL_JOURNALBATCH);
ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT AParentAsset_AAssetChange FOREIGN KEY (A_Parent_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT ADepreciationTableHeader_AAss2 FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER);
ALTER TABLE A_ASSET_GROUP_ACCT ADD (CONSTRAINT ADepreciationTableHeader_AAss3 FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER);
ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT AdUser_AAssetChange FOREIGN KEY (Ad_User_ID) REFERENCES AD_USER);
ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT CAcctSchema_AAssetChange FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);
ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT CBPartnerLocation_AAssetChange FOREIGN KEY (C_BPartner_Location_ID) REFERENCES C_BPARTNER_LOCATION);
ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT CLocation_AAssetChange FOREIGN KEY (C_Location_ID) REFERENCES C_LOCATION);
ALTER TABLE A_ASSET_DISPOSED ADD (CONSTRAINT AAssetTrade_AAssetDisposed FOREIGN KEY (A_Asset_Trade_ID) REFERENCES A_ASSET);
ALTER TABLE A_ASSET_DISPOSED ADD (CONSTRAINT CPeriod_AAssetDisposed FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE A_ASSET_REVAL_ENTRY ADD (CONSTRAINT CAcctSchema_AAssetRevalEntry FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);
ALTER TABLE A_ASSET_REVAL_ENTRY ADD (CONSTRAINT CCurrency_AAssetRevalEntry FOREIGN KEY (C_Currency_ID) REFERENCES C_CURRENCY);
ALTER TABLE A_ASSET_REVAL_ENTRY ADD (CONSTRAINT CDocType_AAssetRevalEntry FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);
ALTER TABLE A_ASSET_REVAL_ENTRY ADD (CONSTRAINT CPeriod_AAssetRevalEntry FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE A_ASSET_REVAL_ENTRY ADD (CONSTRAINT GLCategory_AAssetRevalEntry FOREIGN KEY (GL_Category_ID) REFERENCES GL_CATEGORY);
ALTER TABLE A_ASSET_SPLIT ADD (CONSTRAINT CPeriod_AAssetSplit FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE A_ASSET_TRANSFER ADD (CONSTRAINT CAcctSchema_AAssetTransfer FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);
ALTER TABLE A_ASSET_TRANSFER ADD (CONSTRAINT CPeriod_AAssetTransfer FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE A_DEPRECIATION_BUILD ADD (CONSTRAINT AEndAsset_ADepreciationBuild FOREIGN KEY (A_End_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE A_DEPRECIATION_BUILD ADD (CONSTRAINT AStartAsset_ADepreciationBuild FOREIGN KEY (A_Start_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE A_DEPRECIATION_BUILD ADD (CONSTRAINT CPeriod_ADepreciationBuild FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE A_DEPRECIATION_ENTRY ADD (CONSTRAINT CAcctSchema_ADepreciationEntry FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);
ALTER TABLE A_DEPRECIATION_ENTRY ADD (CONSTRAINT CCurrency_ADepreciationEntry FOREIGN KEY (C_Currency_ID) REFERENCES C_CURRENCY);
ALTER TABLE A_DEPRECIATION_ENTRY ADD (CONSTRAINT CDocType_ADepreciationEntry FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);
ALTER TABLE A_DEPRECIATION_ENTRY ADD (CONSTRAINT CPeriod_ADepreciationEntry FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE A_DEPRECIATION_ENTRY ADD (CONSTRAINT GLCategory_ADepreciationEntry FOREIGN KEY (GL_Category_ID) REFERENCES GL_CATEGORY);
ALTER TABLE A_DEPRECIATION_FORECAST ADD (CONSTRAINT AEndAsset_ADepreciationForecas FOREIGN KEY (A_End_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE A_DEPRECIATION_FORECAST ADD (CONSTRAINT AStartAsset_ADepreciationForec FOREIGN KEY (A_Start_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE C_INVOICELINE ADD (CONSTRAINT AAssetGroup_CInvoiceLine FOREIGN KEY (A_Asset_Group_ID) REFERENCES A_ASSET_GROUP);
ALTER TABLE GL_JOURNALLINE ADD (CONSTRAINT AAsset_GLJournalLine FOREIGN KEY (A_Asset_ID) REFERENCES A_ASSET);
ALTER TABLE GL_JOURNALLINE ADD (CONSTRAINT AAssetGroup_GLJournalLine FOREIGN KEY (A_Asset_Group_ID) REFERENCES A_ASSET_GROUP);
ALTER TABLE I_ASSET ADD (CONSTRAINT AAssetGroup_IAsset FOREIGN KEY (A_Asset_Group_ID) REFERENCES A_ASSET_GROUP);
ALTER TABLE I_ASSET ADD (CONSTRAINT ADepreciationTableHeader_IAsse FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER);
ALTER TABLE I_ASSET ADD (CONSTRAINT CAcctSchema_IAsset FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);
ALTER TABLE I_ASSET ADD (CONSTRAINT CBPartner_IAsset FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);
ALTER TABLE I_ASSET ADD (CONSTRAINT CBPartnerLocation_IAsset FOREIGN KEY (C_BPartner_Location_ID) REFERENCES C_BPARTNER_LOCATION);
ALTER TABLE I_ASSET ADD (CONSTRAINT CLocation_IAsset FOREIGN KEY (C_Location_ID) REFERENCES C_LOCATION);
ALTER TABLE I_ASSET ADD (CONSTRAINT MLocator_IAsset FOREIGN KEY (M_Locator_ID) REFERENCES M_LOCATOR);
ALTER TABLE I_ASSET ADD (CONSTRAINT MProduct_IAsset FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT ADOrgDoc_IFAJournal FOREIGN KEY (AD_OrgDoc_ID) REFERENCES AD_ORG);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT ADOrgTrx_IFAJournal FOREIGN KEY (AD_OrgTrx_ID) REFERENCES AD_ORG);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CAcctSchema_IFAJournal FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CActivity_IFAJournal FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CBPartner_IFAJournal FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CCampaign_IFAJournal FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CCurrency_IFAJournal FOREIGN KEY (C_Currency_ID) REFERENCES C_CURRENCY);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CDocType_IFAJournal FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT Account_IFAJournal FOREIGN KEY (Account_ID) REFERENCES C_ELEMENTVALUE);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT User1_IFAJournal FOREIGN KEY (User1_ID) REFERENCES C_ELEMENTVALUE);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT User2_IFAJournal FOREIGN KEY (User2_ID) REFERENCES C_ELEMENTVALUE);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CPeriod_IFAJournal FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CProject_IFAJournal FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CSalesRegion_IFAJournal FOREIGN KEY (C_SalesRegion_ID) REFERENCES C_SALESREGION);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CUOM_IFAJournal FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT CValidCombination_IFAJournal FOREIGN KEY (C_ValidCombination_ID) REFERENCES C_VALIDCOMBINATION);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT GLBudget_IFAJournal FOREIGN KEY (GL_Budget_ID) REFERENCES GL_BUDGET);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT GLCategory_IFAJournal FOREIGN KEY (GL_Category_ID) REFERENCES GL_CATEGORY);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT GLJournal_IFAJournal FOREIGN KEY (GL_Journal_ID) REFERENCES GL_JOURNAL);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT GLJournalBatch_IFAJournal FOREIGN KEY (GL_JournalBatch_ID) REFERENCES GL_JOURNALBATCH);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT GLJournalLine_IFAJournal FOREIGN KEY (GL_JournalLine_ID) REFERENCES GL_JOURNALLINE);
ALTER TABLE I_FAJOURNAL ADD (CONSTRAINT MProduct_IFAJournal FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT);
-- Errors ORA-02267 - possibly dictionary column definition or database column wrong definition errors
-- ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT AAssetSpreadT_AAssetChange FOREIGN KEY (A_Asset_Spread_Type) REFERENCES A_ASSET_SPREAD);
-- ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT DepreciationT_AAssetChange FOREIGN KEY (DepreciationType) REFERENCES A_DEPRECIATION);
-- ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT ConventionT_AAssetChange FOREIGN KEY (ConventionType) REFERENCES A_DEPRECIATION_CONVENTION);
-- ALTER TABLE A_ASSET_CHANGE ADD (CONSTRAINT ADepreciationCalcT_AAssetChang FOREIGN KEY (A_Depreciation_Calc_Type) REFERENCES A_DEPRECIATION_METHOD);
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD (CONSTRAINT AAssetSpreadT_AAssetGroupAcct FOREIGN KEY (A_Asset_Spread_Type) REFERENCES A_ASSET_SPREAD);
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD (CONSTRAINT DepreciationT_AAssetGroupAcct FOREIGN KEY (DepreciationType) REFERENCES A_DEPRECIATION);
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD (CONSTRAINT ConventionT_AAssetGroupAcct FOREIGN KEY (ConventionType) REFERENCES A_DEPRECIATION_CONVENTION);
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD (CONSTRAINT ADepreciationCalcT_AAssetGroup FOREIGN KEY (A_Depreciation_Calc_Type) REFERENCES A_DEPRECIATION_METHOD);
-- ALTER TABLE A_ASSET_SPLIT ADD (CONSTRAINT AAssetID_AAssetSplit FOREIGN KEY (A_Asset_ID_To) REFERENCES A_ASSET);
-- ALTER TABLE I_ASSET ADD (CONSTRAINT AAssetSpreadT_IAsset FOREIGN KEY (A_Asset_Spread_Type) REFERENCES A_ASSET_SPREAD);
-- ALTER TABLE I_ASSET ADD (CONSTRAINT DepreciationT_IAsset FOREIGN KEY (DepreciationType) REFERENCES A_DEPRECIATION);
-- ALTER TABLE I_ASSET ADD (CONSTRAINT ConventionT_IAsset FOREIGN KEY (ConventionType) REFERENCES A_DEPRECIATION_CONVENTION);
-- ALTER TABLE I_ASSET ADD (CONSTRAINT ADepreciationCalcT_IAsset FOREIGN KEY (A_Depreciation_Calc_Type) REFERENCES A_DEPRECIATION_METHOD);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,163 @@
-- postgresql fixed asets foreign keys
ALTER TABLE A_ASSET ADD CONSTRAINT AParentAsset_AAsset FOREIGN KEY (A_Parent_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE A_ASSET_ACCT ADD CONSTRAINT AAssetSpread_AAssetAcct FOREIGN KEY (A_Asset_Spread_ID) REFERENCES A_ASSET_SPREAD;
ALTER TABLE A_ASSET_ACCT ADD CONSTRAINT ADepreciationConv_AAssetAcct FOREIGN KEY (A_Depreciation_Conv_ID) REFERENCES A_DEPRECIATION_CONVENTION;
ALTER TABLE A_ASSET_ACCT ADD CONSTRAINT ADepreciationMethod_AAssetAcct FOREIGN KEY (A_Depreciation_Method_ID) REFERENCES A_DEPRECIATION_METHOD;
ALTER TABLE A_ASSET_ACCT ADD CONSTRAINT ADepreciationTableHeader_AAsse FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER;
ALTER TABLE A_ASSET_ADDITION ADD CONSTRAINT CInvoice_AAssetAddition FOREIGN KEY (C_Invoice_ID) REFERENCES C_INVOICE;
ALTER TABLE A_ASSET_ADDITION ADD CONSTRAINT GLJournalBatch_AAssetAddition FOREIGN KEY (GL_JournalBatch_ID) REFERENCES GL_JOURNALBATCH;
ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT AParentAsset_AAssetChange FOREIGN KEY (A_Parent_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT ADepreciationTableHeader_AAss2 FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER;
ALTER TABLE A_ASSET_GROUP_ACCT ADD CONSTRAINT ADepreciationTableHeader_AAss3 FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER;
ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT AdUser_AAssetChange FOREIGN KEY (Ad_User_ID) REFERENCES AD_USER;
ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT CAcctSchema_AAssetChange FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA;
ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT CBPartnerLocation_AAssetChange FOREIGN KEY (C_BPartner_Location_ID) REFERENCES C_BPARTNER_LOCATION;
ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT CLocation_AAssetChange FOREIGN KEY (C_Location_ID) REFERENCES C_LOCATION;
ALTER TABLE A_ASSET_DISPOSED ADD CONSTRAINT AAssetTrade_AAssetDisposed FOREIGN KEY (A_Asset_Trade_ID) REFERENCES A_ASSET;
ALTER TABLE A_ASSET_DISPOSED ADD CONSTRAINT CPeriod_AAssetDisposed FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE A_ASSET_REVAL_ENTRY ADD CONSTRAINT CAcctSchema_AAssetRevalEntry FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA;
ALTER TABLE A_ASSET_REVAL_ENTRY ADD CONSTRAINT CCurrency_AAssetRevalEntry FOREIGN KEY (C_Currency_ID) REFERENCES C_CURRENCY;
ALTER TABLE A_ASSET_REVAL_ENTRY ADD CONSTRAINT CDocType_AAssetRevalEntry FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE;
ALTER TABLE A_ASSET_REVAL_ENTRY ADD CONSTRAINT CPeriod_AAssetRevalEntry FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE A_ASSET_REVAL_ENTRY ADD CONSTRAINT GLCategory_AAssetRevalEntry FOREIGN KEY (GL_Category_ID) REFERENCES GL_CATEGORY;
ALTER TABLE A_ASSET_SPLIT ADD CONSTRAINT CPeriod_AAssetSplit FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE A_ASSET_TRANSFER ADD CONSTRAINT CAcctSchema_AAssetTransfer FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA;
ALTER TABLE A_ASSET_TRANSFER ADD CONSTRAINT CPeriod_AAssetTransfer FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE A_DEPRECIATION_BUILD ADD CONSTRAINT AEndAsset_ADepreciationBuild FOREIGN KEY (A_End_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE A_DEPRECIATION_BUILD ADD CONSTRAINT AStartAsset_ADepreciationBuild FOREIGN KEY (A_Start_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE A_DEPRECIATION_BUILD ADD CONSTRAINT CPeriod_ADepreciationBuild FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE A_DEPRECIATION_ENTRY ADD CONSTRAINT CAcctSchema_ADepreciationEntry FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA;
ALTER TABLE A_DEPRECIATION_ENTRY ADD CONSTRAINT CCurrency_ADepreciationEntry FOREIGN KEY (C_Currency_ID) REFERENCES C_CURRENCY;
ALTER TABLE A_DEPRECIATION_ENTRY ADD CONSTRAINT CDocType_ADepreciationEntry FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE;
ALTER TABLE A_DEPRECIATION_ENTRY ADD CONSTRAINT CPeriod_ADepreciationEntry FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE A_DEPRECIATION_ENTRY ADD CONSTRAINT GLCategory_ADepreciationEntry FOREIGN KEY (GL_Category_ID) REFERENCES GL_CATEGORY;
ALTER TABLE A_DEPRECIATION_FORECAST ADD CONSTRAINT AEndAsset_ADepreciationForecas FOREIGN KEY (A_End_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE A_DEPRECIATION_FORECAST ADD CONSTRAINT AStartAsset_ADepreciationForec FOREIGN KEY (A_Start_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE C_INVOICELINE ADD CONSTRAINT AAssetGroup_CInvoiceLine FOREIGN KEY (A_Asset_Group_ID) REFERENCES A_ASSET_GROUP;
ALTER TABLE GL_JOURNALLINE ADD CONSTRAINT AAsset_GLJournalLine FOREIGN KEY (A_Asset_ID) REFERENCES A_ASSET;
ALTER TABLE GL_JOURNALLINE ADD CONSTRAINT AAssetGroup_GLJournalLine FOREIGN KEY (A_Asset_Group_ID) REFERENCES A_ASSET_GROUP;
ALTER TABLE I_ASSET ADD CONSTRAINT AAssetGroup_IAsset FOREIGN KEY (A_Asset_Group_ID) REFERENCES A_ASSET_GROUP;
ALTER TABLE I_ASSET ADD CONSTRAINT ADepreciationTableHeader_IAsse FOREIGN KEY (A_Depreciation_Table_Header_ID) REFERENCES A_DEPRECIATION_TABLE_HEADER;
ALTER TABLE I_ASSET ADD CONSTRAINT CAcctSchema_IAsset FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA;
ALTER TABLE I_ASSET ADD CONSTRAINT CBPartner_IAsset FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER;
ALTER TABLE I_ASSET ADD CONSTRAINT CBPartnerLocation_IAsset FOREIGN KEY (C_BPartner_Location_ID) REFERENCES C_BPARTNER_LOCATION;
ALTER TABLE I_ASSET ADD CONSTRAINT CLocation_IAsset FOREIGN KEY (C_Location_ID) REFERENCES C_LOCATION;
ALTER TABLE I_ASSET ADD CONSTRAINT MLocator_IAsset FOREIGN KEY (M_Locator_ID) REFERENCES M_LOCATOR;
ALTER TABLE I_ASSET ADD CONSTRAINT MProduct_IAsset FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT ADOrgDoc_IFAJournal FOREIGN KEY (AD_OrgDoc_ID) REFERENCES AD_ORG;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT ADOrgTrx_IFAJournal FOREIGN KEY (AD_OrgTrx_ID) REFERENCES AD_ORG;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CAcctSchema_IFAJournal FOREIGN KEY (C_AcctSchema_ID) REFERENCES C_ACCTSCHEMA;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CActivity_IFAJournal FOREIGN KEY (C_Activity_ID) REFERENCES C_ACTIVITY;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CBPartner_IFAJournal FOREIGN KEY (C_BPartner_ID) REFERENCES C_BPARTNER;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CCampaign_IFAJournal FOREIGN KEY (C_Campaign_ID) REFERENCES C_CAMPAIGN;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CCurrency_IFAJournal FOREIGN KEY (C_Currency_ID) REFERENCES C_CURRENCY;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CDocType_IFAJournal FOREIGN KEY (C_DocType_ID) REFERENCES C_DOCTYPE;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT Account_IFAJournal FOREIGN KEY (Account_ID) REFERENCES C_ELEMENTVALUE;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT User1_IFAJournal FOREIGN KEY (User1_ID) REFERENCES C_ELEMENTVALUE;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT User2_IFAJournal FOREIGN KEY (User2_ID) REFERENCES C_ELEMENTVALUE;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CPeriod_IFAJournal FOREIGN KEY (C_Period_ID) REFERENCES C_PERIOD;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CProject_IFAJournal FOREIGN KEY (C_Project_ID) REFERENCES C_PROJECT;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CSalesRegion_IFAJournal FOREIGN KEY (C_SalesRegion_ID) REFERENCES C_SALESREGION;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CUOM_IFAJournal FOREIGN KEY (C_UOM_ID) REFERENCES C_UOM;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT CValidCombination_IFAJournal FOREIGN KEY (C_ValidCombination_ID) REFERENCES C_VALIDCOMBINATION;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT GLBudget_IFAJournal FOREIGN KEY (GL_Budget_ID) REFERENCES GL_BUDGET;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT GLCategory_IFAJournal FOREIGN KEY (GL_Category_ID) REFERENCES GL_CATEGORY;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT GLJournal_IFAJournal FOREIGN KEY (GL_Journal_ID) REFERENCES GL_JOURNAL;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT GLJournalBatch_IFAJournal FOREIGN KEY (GL_JournalBatch_ID) REFERENCES GL_JOURNALBATCH;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT GLJournalLine_IFAJournal FOREIGN KEY (GL_JournalLine_ID) REFERENCES GL_JOURNALLINE;
ALTER TABLE I_FAJOURNAL ADD CONSTRAINT MProduct_IFAJournal FOREIGN KEY (M_Product_ID) REFERENCES M_PRODUCT;
-- Errors ORA-02267 - possibly dictionary column definition or database column wrong definition errors
-- ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT AAssetSpreadT_AAssetChange FOREIGN KEY (A_Asset_Spread_Type) REFERENCES A_ASSET_SPREAD;
-- ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT DepreciationT_AAssetChange FOREIGN KEY (DepreciationType) REFERENCES A_DEPRECIATION;
-- ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT ConventionT_AAssetChange FOREIGN KEY (ConventionType) REFERENCES A_DEPRECIATION_CONVENTION;
-- ALTER TABLE A_ASSET_CHANGE ADD CONSTRAINT ADepreciationCalcT_AAssetChang FOREIGN KEY (A_Depreciation_Calc_Type) REFERENCES A_DEPRECIATION_METHOD;
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD CONSTRAINT AAssetSpreadT_AAssetGroupAcct FOREIGN KEY (A_Asset_Spread_Type) REFERENCES A_ASSET_SPREAD;
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD CONSTRAINT DepreciationT_AAssetGroupAcct FOREIGN KEY (DepreciationType) REFERENCES A_DEPRECIATION;
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD CONSTRAINT ConventionT_AAssetGroupAcct FOREIGN KEY (ConventionType) REFERENCES A_DEPRECIATION_CONVENTION;
-- ALTER TABLE A_ASSET_GROUP_ACCT ADD CONSTRAINT ADepreciationCalcT_AAssetGroup FOREIGN KEY (A_Depreciation_Calc_Type) REFERENCES A_DEPRECIATION_METHOD;
-- ALTER TABLE A_ASSET_SPLIT ADD CONSTRAINT AAssetID_AAssetSplit FOREIGN KEY (A_Asset_ID_To) REFERENCES A_ASSET;
-- ALTER TABLE I_ASSET ADD CONSTRAINT AAssetSpreadT_IAsset FOREIGN KEY (A_Asset_Spread_Type) REFERENCES A_ASSET_SPREAD;
-- ALTER TABLE I_ASSET ADD CONSTRAINT DepreciationT_IAsset FOREIGN KEY (DepreciationType) REFERENCES A_DEPRECIATION;
-- ALTER TABLE I_ASSET ADD CONSTRAINT ConventionT_IAsset FOREIGN KEY (ConventionType) REFERENCES A_DEPRECIATION_CONVENTION;
-- ALTER TABLE I_ASSET ADD CONSTRAINT ADepreciationCalcT_IAsset FOREIGN KEY (A_Depreciation_Calc_Type) REFERENCES A_DEPRECIATION_METHOD;

View File

@ -29,8 +29,10 @@ do
else else
for file in $DIR/*.sql; do for file in $DIR/*.sql; do
echo "SELECT '`basename $file`' AS Filename FROM dual;" echo "SELECT '`basename $file`' AS Filename FROM dual;"
echo
cat $file | dos2unix | sed 's/commit[ ]*;//I' cat $file | dos2unix | sed 's/commit[ ]*;//I'
echo echo
echo
done done
fi fi
done done
@ -38,16 +40,20 @@ if [ -d $DIRINI/../processes_post_migration ]
then then
for file in $DIRINI/../processes_post_migration/*.sql; do for file in $DIRINI/../processes_post_migration/*.sql; do
echo "SELECT '`basename $file`' AS Filename FROM dual;" echo "SELECT '`basename $file`' AS Filename FROM dual;"
echo
cat $file | dos2unix | sed 's/commit[ ]*;//I' cat $file | dos2unix | sed 's/commit[ ]*;//I'
echo echo
echo
done done
fi fi
if [ -d $DIRINI/../my_processes_post_migration ] if [ -d $DIRINI/../my_processes_post_migration ]
then then
for file in $DIRINI/../my_processes_post_migration/*.sql; do for file in $DIRINI/../my_processes_post_migration/*.sql; do
echo "SELECT '`basename $file`' AS Filename FROM dual;" echo "SELECT '`basename $file`' AS Filename FROM dual;"
echo
cat $file | dos2unix | sed 's/commit[ ]*;//I' cat $file | dos2unix | sed 's/commit[ ]*;//I'
echo echo
echo
done done
fi fi
if [ $COMMIT -eq 1 ] if [ $COMMIT -eq 1 ]
@ -57,4 +63,4 @@ else
echo "ROLLBACK;" echo "ROLLBACK;"
fi fi
echo echo
echo "quit" echo "quit"

View File

@ -27,8 +27,10 @@ do
else else
for file in $DIR/postgresql/*.sql; do for file in $DIR/postgresql/*.sql; do
echo "SELECT '`basename $file`' AS Filename;" echo "SELECT '`basename $file`' AS Filename;"
echo
cat $file | dos2unix | sed 's/commit[ ]*;//I' cat $file | dos2unix | sed 's/commit[ ]*;//I'
echo echo
echo
done done
fi fi
done done
@ -36,16 +38,20 @@ if [ -d $DIRINI/../processes_post_migration/postgresql ]
then then
for file in $DIRINI/../processes_post_migration/postgresql/*.sql; do for file in $DIRINI/../processes_post_migration/postgresql/*.sql; do
echo "SELECT '`basename $file`' AS Filename;" echo "SELECT '`basename $file`' AS Filename;"
echo
cat $file | dos2unix | sed 's/commit[ ]*;//I' cat $file | dos2unix | sed 's/commit[ ]*;//I'
echo echo
echo
done done
fi fi
if [ -d $DIRINI/../my_processes_post_migration/postgresql ] if [ -d $DIRINI/../my_processes_post_migration/postgresql ]
then then
for file in $DIRINI/../my_processes_post_migration/postgresql/*.sql; do for file in $DIRINI/../my_processes_post_migration/postgresql/*.sql; do
echo "SELECT '`basename $file`' AS Filename;" echo "SELECT '`basename $file`' AS Filename;"
echo
cat $file | dos2unix | sed 's/commit[ ]*;//I' cat $file | dos2unix | sed 's/commit[ ]*;//I'
echo echo
echo
done done
fi fi
if [ $COMMIT -eq 1 ] if [ $COMMIT -eq 1 ]