Merge bug fixes from release into trunk

merge -r 11666:11670 -r 11677:11680 -r 11682:11684

11666-11670 -> Fix Eclipse warnings/ERROR
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2970867

11677 -> Fix - Firstof Function Week Constant
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2079794

11678 -> The revision 7509 introduced a bug because of bad programming
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2001910

11679 -> Integrate fix contributed by mcicchelli for [2514168] Port missing connect for Test.sql
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2514168

11680 -> minor - fix typos in comments

11682 -> [2971637] DB.executeUpdate working as autocommit if trx is not opened
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2971637

11683 -> Client Accounting Processor - fix a problem found, it was not updating Posted status on posting failure
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2857289

11684 -> Firstof Function Week Constant - scripts swapped - thanks to Armen by the peer review
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2079794
This commit is contained in:
tspc 2010-03-17 10:57:46 +00:00
parent 5be63716af
commit 478075d45d
50 changed files with 656 additions and 227 deletions

View File

@ -25,7 +25,7 @@
* *
* Sponsors: *
* - Company (http://www.globalqss.com) *
***********************************************************************/
**********************************************************************/
package org.adempiere.process;
@ -220,9 +220,10 @@ public class ClientAcctProcessor extends SvrProcess
// Run every posting document in own transaction
String innerTrxName = Trx.createTrxName("CAP");
Trx innerTrx = Trx.get(innerTrxName, true);
String postStatus = Doc.STATUS_NotPosted;
Doc doc = Doc.get (m_ass, AD_Table_ID, rs, innerTrxName);
try
{
Doc doc = Doc.get (m_ass, AD_Table_ID, rs, innerTrxName);
if (doc == null)
{
log.severe(getName() + ": No Doc for " + TableName);
@ -232,6 +233,7 @@ public class ClientAcctProcessor extends SvrProcess
{
String error = doc.post(false, false); // post no force/repost
ok = (error == null);
postStatus = doc.getPostStatus();
}
}
catch (Exception e)
@ -243,8 +245,16 @@ public class ClientAcctProcessor extends SvrProcess
{
if (ok)
innerTrx.commit();
else
else {
innerTrx.rollback();
// save the posted status error (out of trx)
StringBuffer sqlupd = new StringBuffer("UPDATE ")
.append(doc.get_TableName()).append(" SET Posted='").append(postStatus)
.append("',Processing='N' ")
.append("WHERE ")
.append(doc.get_TableName()).append("_ID=").append(doc.get_ID());
DB.executeUpdateEx(sqlupd.toString(), null);
}
innerTrx.close();
innerTrx = null;
}

View File

@ -673,7 +673,7 @@ public class ImportHelper {
if(values.size()<=0)//Means that is a new record
{
PO po = po = MTable.get(ctx, expFormat.getAD_Table_ID()).getPO(0,trxName);
PO po = MTable.get(ctx, expFormat.getAD_Table_ID()).getPO(0,trxName);
if (replication_id > 0 )
{

View File

@ -17,14 +17,14 @@ import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.compiere.model.MAsset;
import org.compiere.model.MAssetAcct;
import org.compiere.model.MAssetAddition;
import org.compiere.model.MAssetChange;
import org.compiere.model.MDepreciationWorkfile;
import org.compiere.model.MRefList;
import org.compiere.model.X_A_Asset;
import org.compiere.model.X_A_Asset_Acct;
import org.compiere.model.X_A_Asset_Addition;
import org.compiere.model.X_A_Asset_Split;
import org.compiere.model.X_A_Depreciation_Exp;
import org.compiere.model.X_A_Depreciation_Workfile;
import org.compiere.process.SvrProcess;
import org.compiere.util.DB;
@ -82,9 +82,9 @@ public class AssetSplit extends SvrProcess
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);
MAsset Asset = new MAsset (getCtx(), AssetSplit.getA_Asset_ID(), null);
MDepreciationWorkfile assetwk = new MDepreciationWorkfile (getCtx(), AssetSplit.getA_Depreciation_Workfile_ID(), null);
MAssetAcct assetacct = new MAssetAcct (getCtx(), AssetSplit.getA_Asset_Acct_ID(), null);
v_AccumBalance_Org = assetwk.getA_Accumulated_Depr();
v_SalvageValue_Org = assetwk.getA_Salvage_Value();
@ -136,7 +136,7 @@ public class AssetSplit extends SvrProcess
if (AssetSplit.getA_Asset_ID_To() == 0)
{
//Insert New Asset
X_A_Asset AssetNew = new X_A_Asset (getCtx(), 0, null);
MAsset AssetNew = new MAsset (getCtx(), 0, null);
AssetNew.setValue(Asset.getValue());
AssetNew.setA_Parent_Asset_ID(Asset.getA_Asset_ID());
AssetNew.setName(Asset.getName());
@ -167,7 +167,7 @@ public class AssetSplit extends SvrProcess
v_AssetNumber = AssetNew.getA_Asset_ID();
//Create Asset Addition Record
X_A_Asset_Addition assetadd = new X_A_Asset_Addition (getCtx(), 0, null);
MAssetAddition assetadd = new MAssetAddition (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());
@ -188,7 +188,7 @@ public class AssetSplit extends SvrProcess
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);
MAssetAcct assetacctnew = new MAssetAcct (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());
@ -226,7 +226,7 @@ public class AssetSplit extends SvrProcess
//Insert the New Asset in the Deprecation Workfile
X_A_Depreciation_Workfile assetwknew = new X_A_Depreciation_Workfile (getCtx(), v_NewWorkfileID, null);
MDepreciationWorkfile assetwknew = new MDepreciationWorkfile (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);
@ -286,8 +286,7 @@ public class AssetSplit extends SvrProcess
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(Asset.getA_Parent_Asset_ID());
change.setChangeType("SPL");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change.setLot(AssetNew.getLot());
change.setSerNo(AssetNew.getSerNo());
change.setVersionNo(AssetNew.getVersionNo());
@ -313,13 +312,13 @@ public class AssetSplit extends SvrProcess
v_AssetNumber = AssetSplit.getA_Asset_ID_To();
//Update Target Asset Record
X_A_Asset AssetNew = new X_A_Asset (getCtx(), v_AssetNumber, null);
MAsset AssetNew = new MAsset (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);
MAssetAddition assetadd = new MAssetAddition (getCtx(), 0, null);
assetadd.setA_Asset_ID(v_AssetNumber);
assetadd.setAssetValueAmt(v_CostBalance_New );
assetadd.setDescription("Split from Asset #" + AssetSplit.getA_Asset_ID());
@ -340,7 +339,7 @@ public class AssetSplit extends SvrProcess
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);
MAssetAcct assetacctnew = new MAssetAcct (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();
@ -357,7 +356,7 @@ public class AssetSplit extends SvrProcess
//Update Target Asset in the Deprecation Workfile
X_A_Depreciation_Workfile assetwknew = new X_A_Depreciation_Workfile (getCtx(), v_NewWorkfileID, null);
MDepreciationWorkfile assetwknew = new MDepreciationWorkfile (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));
@ -410,8 +409,7 @@ public class AssetSplit extends SvrProcess
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(Asset.getA_Parent_Asset_ID());
change.setChangeType("SPL");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change.setLot(AssetNew.getLot());
change.setSerNo(AssetNew.getSerNo());
change.setVersionNo(AssetNew.getVersionNo());
@ -439,7 +437,7 @@ public class AssetSplit extends SvrProcess
Asset.save();
// Update original asset for the split
X_A_Asset_Addition assetaddold = new X_A_Asset_Addition (getCtx(), 0, null);
MAssetAddition assetaddold = new MAssetAddition (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);
@ -464,8 +462,7 @@ public class AssetSplit extends SvrProcess
MAssetChange change1 = new MAssetChange (getCtx(), 0, null);
change1.setChangeType("SPL");
MRefList RefList = new MRefList (getCtx(), 0, null);
change1.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "SPL"));
change1.setTextDetails(MRefList.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)

View File

@ -18,8 +18,8 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.compiere.model.MAssetChange;
import org.compiere.model.MAssetTransfer;
import org.compiere.model.MRefList;
import org.compiere.model.X_A_Asset_Transfer;
import org.compiere.model.X_A_Depreciation_Exp;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
@ -72,7 +72,7 @@ public class AssetTransfer extends SvrProcess
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);
MAssetTransfer AssetTransfer = new MAssetTransfer (getCtx(), p_Asset_Transfer_ID, null);
//X_C_Period Period = new X_C_Period (getCtx(), AssetTransfer.getC_Period_ID(), null);
String sql = null;
@ -233,8 +233,7 @@ public class AssetTransfer extends SvrProcess
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setChangeType("TRN");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "TRN"));
change.setTextDetails(MRefList.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());

View File

@ -470,6 +470,10 @@ public abstract class Doc
/** Actual Document Status */
protected String p_Status = null;
public String getPostStatus() {
return p_Status;
}
/** Error Message */
protected String p_Error = null;
@ -581,6 +585,7 @@ public abstract class Doc
if (p_Error != null)
return p_Error;
Trx trx = Trx.get(getTrxName(), true);
// Delete existing Accounting
if (repost)
{
@ -588,6 +593,7 @@ public abstract class Doc
{
log.log(Level.SEVERE, toString() + " - Period Closed for already posed document");
unlock();
trx.commit(); trx.close();
return "PeriodClosed";
}
// delete it
@ -597,6 +603,7 @@ public abstract class Doc
{
log.log(Level.SEVERE, toString() + " - Document already posted");
unlock();
trx.commit(); trx.close();
return "AlreadyPosted";
}

View File

@ -22,8 +22,6 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.RowSet;
import oracle.jdbc.pool.OracleDataSource;
//import oracle.jdbc.rowset.*;
@ -375,62 +373,6 @@ Connection Cache Threads=10 Yield=true ms= 12813 each= 1281 CacheSize=2,
}
} // statementTiming
/**
* Row Set Timing
*/
private static void rowSetTiming()
{
try
{
long startConnection = System.currentTimeMillis();
RowSet rowset = null;
/**
if (s_rType == R_JDBC_ROWSET)
rowset = new OracleJDBCRowSet ();
else if (s_rType == R_CACHED_ROWSET)
rowset = new OracleCachedRowSet();
**/
rowset.setUrl (CONNECTION);
rowset.setUsername (UID);
rowset.setPassword (PWD);
rowset.setFetchSize(s_fetchSize);
long startStatement = System.currentTimeMillis();
rowset.setCommand (STATEMENT);
long startQuery = System.currentTimeMillis();
rowset.execute ();
long startRetrieve = System.currentTimeMillis();
while (rowset.next ())
{
}
long endRetrieve = System.currentTimeMillis();
long endQuery = System.currentTimeMillis();
rowset.close();
long endStatement = System.currentTimeMillis();
long endConnection = System.currentTimeMillis();
//
System.out.println(R_INFO[s_rType]
+ "Fetch=" + s_fetchSize
+ " \tConn=" + (startStatement - startConnection)
+ " \tStmt=" + (startQuery - startStatement)
+ " \tQuery=" + (startRetrieve - startQuery)
+ " \tRetrieve=" + (endRetrieve - startRetrieve)
+ " \tClRs=" + (endQuery - endRetrieve)
+ " \tClStmt=" + (endStatement - endQuery)
+ " \tClConn=" + (endConnection - endStatement)
+ " \t- Total=" + (endConnection - startConnection)
+ " \tStmt=" + (endStatement - startStatement)
+ " \tQuery=" + (endQuery - startQuery));
}
catch (SQLException e)
{
e.printStackTrace();
}
} // rowSetTiming
/*************************************************************************/
/**

View File

@ -592,8 +592,7 @@ public class MAsset extends X_A_Asset
change.setA_Asset_ID(p_A_Asset_ID);
change.setA_Parent_Asset_ID(asset.getA_Parent_Asset_ID());
change.setChangeType("CRT");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setIsInPosession(isOwned());
change.setIsDisposed(isDisposed());
change.setIsDepreciated(isDepreciated());
@ -710,8 +709,7 @@ public class MAsset extends X_A_Asset
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(p_A_Asset_ID);
change.setChangeType("UPD");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "UPD"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "UPD"));
change.setLot(getLot());
change.setSerNo(getSerNo());
change.setVersionNo(getVersionNo());

View File

@ -68,8 +68,7 @@ public class MAssetAcct extends X_A_Asset_Acct {
if (isProcessing() == true) {
MAssetChange change = new MAssetChange(getCtx(), 0, null);
change.setChangeType("SET");
MRefList RefList = new MRefList(getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription(getCtx(),
change.setTextDetails(MRefList.getListDescription(getCtx(),
"A_Update_Type", "SET"));
change.setPostingType(getPostingType());
change.setA_Split_Percent(getA_Split_Percent());

View File

@ -87,8 +87,7 @@ public class MAssetAddition extends X_A_Asset_Addition
change.setA_Asset_ID(p_A_Asset_ID);
change.setA_QTY_Current(getA_QTY_Current());
change.setChangeType("ADD");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType("A");
change.setAssetValueAmt(getAssetValueAmt());
change.setA_QTY_Current(getA_QTY_Current());
@ -117,8 +116,7 @@ public class MAssetAddition extends X_A_Asset_Addition
change.setA_Asset_ID(p_A_Asset_ID);
change.setA_QTY_Current(getA_QTY_Current());
change.setChangeType("ADD");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType(rs.getString("PostingType"));
change.setAssetValueAmt(getAssetValueAmt());
change.setA_QTY_Current(getA_QTY_Current());

View File

@ -77,8 +77,7 @@ protected boolean afterSave (boolean newRecord,boolean success)
change.setA_Asset_ID(p_A_Asset_ID);
change.setChangeType("USE");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "USE"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "USE"));
change.setUseUnits(getUseUnits());
change.save();

View File

@ -107,8 +107,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile
{
change.setA_Asset_ID(p_A_Asset_ID);
change.setChangeType("BAL");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "BAL"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "BAL"));
change.setPostingType(getPostingType());
change.setAssetValueAmt(getA_Asset_Cost());
change.setA_QTY_Current(getA_QTY_Current());

View File

@ -469,7 +469,10 @@ public class MInventory extends X_M_Inventory implements DocAction
if(QtyMA.signum() != 0)
{
String err = createCostDetail(line, ma.getM_AttributeSetInstance_ID() , QtyMA.negate());
if(err != null && err.length() > 0) return err;
if (err != null && err.length() > 0) {
m_processMsg = err;
return DocAction.STATUS_Invalid;
}
}
qtyDiff = QtyNew;
@ -525,7 +528,10 @@ public class MInventory extends X_M_Inventory implements DocAction
if(qtyDiff.signum() != 0)
{
String err = createCostDetail(line, line.getM_AttributeSetInstance_ID(), qtyDiff);
if(err != null && err.length() > 0) return err;
if (err != null && err.length() > 0) {
m_processMsg = err;
return DocAction.STATUS_Invalid;
}
}
} // Fallback
} // stock movement

View File

@ -2006,7 +2006,7 @@ public abstract class PO
// Creating and starting the transaction right here, but please note
// that this is not a good practice
trx = Trx.get(m_trxName, true);
log.warning("Transaction closed or never opened ("+m_trxName+") => starting now");
log.severe("Transaction closed or never opened ("+m_trxName+") => starting now --> " + toString());
}
}

View File

@ -532,7 +532,7 @@ public class ImportInvoice extends SvrProcess
// Same Location Info
else if (imp.getC_Location_ID() == 0)
{
MLocation loc = bpl.getLocation(false);
MLocation loc = bpls[i].getLocation(false);
if (loc.equals(imp.getC_Country_ID(), imp.getC_Region_ID(),
imp.getPostal(), "", imp.getCity(),
imp.getAddress1(), imp.getAddress2()))

View File

@ -548,7 +548,7 @@ public class ImportOrder extends SvrProcess
// Same Location Info
else if (imp.getC_Location_ID() == 0)
{
MLocation loc = bpl.getLocation(false);
MLocation loc = bpls[i].getLocation(false);
if (loc.equals(imp.getC_Country_ID(), imp.getC_Region_ID(),
imp.getPostal(), "", imp.getCity(),
imp.getAddress1(), imp.getAddress2()))

View File

@ -1001,6 +1001,7 @@ public final class DB
{
if (sql == null || sql.length() == 0)
throw new IllegalArgumentException("Required parameter missing - " + sql);
verifyTrx(trxName, sql);
//
int no = -1;
CPreparedStatement cs = ProxyFactory.newCPreparedStatement(ResultSet.TYPE_FORWARD_ONLY,
@ -1075,6 +1076,7 @@ public final class DB
if (sql == null || sql.length() == 0)
throw new IllegalArgumentException("Required parameter missing - " + sql);
//
verifyTrx(trxName, sql);
int no = -1;
CPreparedStatement cs = ProxyFactory.newCPreparedStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_UPDATABLE, sql, trxName); // converted in call
@ -2242,5 +2244,14 @@ public final class DB
DB.executeUpdateEx(insert.toString(), trxName);
}
}
private static void verifyTrx(String trxName, String sql) {
if (trxName != null && Trx.get(trxName, false) == null) {
// Using a trx that was previously closed or never opened
// this is equivalent to commit without trx (autocommit)
log.severe("Transaction closed or never opened ("+trxName+") => this is equivalent to commit without trx (autocommit) --> " + sql); // severe?
}
}
} // DB

View File

@ -453,10 +453,10 @@ public class VMatch extends Match
+ "# = " + xMatchedToTable.getRowCount(),
xMatchedToTable.getRowCount() == 0);
statusBar.setStatusDB(0);
} // cmd_seachTo
} // cmd_searchTo
/***************************************************************************
* Table Model Listener - calculate matchd Qty
* Table Model Listener - calculate matched Qty
* @param e event
*/
public void tableChanged (TableModelEvent e)
@ -493,7 +493,7 @@ public class VMatch extends Match
}
}
}
// update qualtities
// update quantities
m_xMatchedTo = new BigDecimal(qty);
xMatchedTo.setValue(m_xMatchedTo);
difference.setValue(m_xMatched.subtract(m_xMatchedTo));

View File

@ -35,6 +35,11 @@ import org.compiere.util.Trx;
*/
public class AdempiereTreeModel extends DefaultTreeModel {
/**
*
*/
private static final long serialVersionUID = 8503954687681402088L;
/** Logger */
private static CLogger log = CLogger.getCLogger(AdempiereTreeModel.class);

View File

@ -84,6 +84,11 @@ public class VInOutInvoiceGen extends CPanel
implements FormPanel, ActionListener, VetoableChangeListener,
ChangeListener, TableModelListener, ASyncProcess
{
/**
*
*/
private static final long serialVersionUID = -2327667535691916715L;
/**
* Initialize Panel
* @param WindowNo window

View File

@ -26,13 +26,15 @@ SET search_path = adempiere, pg_catalog;
CREATE OR REPLACE FUNCTION firstOf (
IN TIMESTAMP WITH TIME ZONE, -- $1 date
IN VARCHAR -- $2 part of date
) RETURNS TIMESTAMP WITH TIME ZONE AS
) RETURNS DATE AS
$$
DECLARE
datepart VARCHAR;
datetime TIMESTAMP WITH TIME ZONE;
offset INTEGER;
BEGIN
datepart = $2;
offset = 0;
IF $2 IN ('') THEN
datepart = 'millennium';
ELSEIF $2 IN ('') THEN
@ -54,7 +56,9 @@ BEGIN
ELSEIF $2 IN ('DDD','DD','J') THEN
datepart = 'day';
ELSEIF $2 IN ('DAY','DY','D') THEN
datepart = 'day';
datepart = 'week';
-- move to sunday to make it compatible with oracle and SQLJ
offset = -1;
ELSEIF $2 IN ('HH','HH12','HH24') THEN
datepart = 'hour';
ELSEIF $2 IN ('MI') THEN
@ -67,6 +71,6 @@ BEGIN
datepart = 'microseconds';
END IF;
datetime = date_trunc(datepart, $1);
RETURN datetime;
RETURN cast(datetime as date) + offset;
END;
$$ LANGUAGE plpgsql;

View File

@ -385,7 +385,9 @@ public class ConfigOracle extends Config
// TNS Name Info via sqlplus
String sqlplus = "sqlplus system/" + systemPassword + "@"
+ databaseServer.getHostName() + "/" + databaseName
+ "//" + databaseServer.getHostName()
+ ":" + databasePort
+ "/" + databaseName
+ " @utils/oracle/Test.sql";
log.config(sqlplus);
pass = testSQL(sqlplus);

View File

@ -0,0 +1 @@
-- just for postgresql

View File

@ -0,0 +1,76 @@
/*
*This file is part of Adempiere ERP Bazaar
*http://www.adempiere.org
*
*Copyright (C) 2006 Gavin Dunse
*Copyright (C) 1999-2006 ComPiere, inc
*
*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.of
*/
/** Get Character at Position */
SET search_path = adempiere, pg_catalog;
CREATE OR REPLACE FUNCTION firstOf (
IN TIMESTAMP WITH TIME ZONE, -- $1 date
IN VARCHAR -- $2 part of date
) RETURNS DATE AS
$$
DECLARE
datepart VARCHAR;
datetime TIMESTAMP WITH TIME ZONE;
offset INTEGER;
BEGIN
datepart = $2;
offset = 0;
IF $2 IN ('') THEN
datepart = 'millennium';
ELSEIF $2 IN ('') THEN
datepart = 'century';
ELSEIF $2 IN ('') THEN
datepart = 'decade';
ELSEIF $2 IN ('IYYY','IY','I') THEN
datepart = 'year';
ELSEIF $2 IN ('SYYYY','YYYY','YEAR','SYEAR','YYY','YY','Y') THEN
datepart = 'year';
ELSEIF $2 IN ('Q') THEN
datepart = 'quarter';
ELSEIF $2 IN ('MONTH','MON','MM','RM') THEN
datepart = 'month';
ELSEIF $2 IN ('IW') THEN
datepart = 'week';
ELSEIF $2 IN ('W') THEN
datepart = 'week';
ELSEIF $2 IN ('DDD','DD','J') THEN
datepart = 'day';
ELSEIF $2 IN ('DAY','DY','D') THEN
datepart = 'week';
-- move to sunday to make it compatible with oracle and SQLJ
offset = -1;
ELSEIF $2 IN ('HH','HH12','HH24') THEN
datepart = 'hour';
ELSEIF $2 IN ('MI') THEN
datepart = 'minute';
ELSEIF $2 IN ('') THEN
datepart = 'second';
ELSEIF $2 IN ('') THEN
datepart = 'milliseconds';
ELSEIF $2 IN ('') THEN
datepart = 'microseconds';
END IF;
datetime = date_trunc(datepart, $1);
RETURN cast(datetime as date) + offset;
END;
$$ LANGUAGE plpgsql;

View File

@ -350,7 +350,7 @@ public class PrintManager
}
// Overwrite printing arguments with arguments supplied
if (args != null || args.trim().length() != 0)
if (args != null && args.trim().length() > 0)
{
printingArgs = args;
}
@ -368,7 +368,7 @@ public class PrintManager
// Construct a new instance for the formatter
formatter = (IPrintFormatter) constructor.newInstance(parameters);
String data = formatter.format(ctx, C_Order_ID, null);
String data = formatter.format(ctx, C_Order_ID, (Object[]) null);
// Print no of copies
int noOfCopies = re.getPrintInfo().getCopies();

View File

@ -1223,7 +1223,7 @@ public class CustomerManager
StringBuffer sql = new StringBuffer();
if(name != null || name.length() > 0)
if(name != null && name.length() > 0)
{
name = name.toUpperCase();
sql.append(" UPPER(name)='" + name + "'");

View File

@ -16,12 +16,24 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.compiere.util.*;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
public class Test extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -8474219907861637179L;
public void init(ServletConfig config)
throws ServletException
{

View File

@ -16,13 +16,26 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.compiere.util.*;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
public class Test2 extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -6839830507472511719L;
public void init(ServletConfig config) throws ServletException
{
super.init(config);

View File

@ -34,7 +34,6 @@ import org.apache.ecs.xhtml.th;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.GridField;
import org.compiere.model.Lookup;
import org.compiere.model.MField;
import org.compiere.util.CLogger;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
@ -45,7 +44,12 @@ import org.compiere.util.WebUtil;
public class WAccount extends HttpServlet
{
private static final String FIELD_NAME = "FieldName";
/**
*
*/
private static final long serialVersionUID = 7932467581955114222L;
private static final String FIELD_NAME = "FieldName";
private static final String FIELD_VALUE = "FieldValue";
private static final String P_Command = "PCommand";
private static final String P_FORM_NAME = "PForm";

View File

@ -16,14 +16,35 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.ecs.*;
import org.apache.ecs.xhtml.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.io.IOException;
import java.util.Properties;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.ecs.AlignType;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.br;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.label;
import org.apache.ecs.xhtml.p;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.textarea;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.MAttachment;
import org.compiere.model.MAttachmentEntry;
import org.compiere.util.CLogger;
import org.compiere.util.FileUpload;
import org.compiere.util.Msg;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
/**
@ -34,6 +55,11 @@ import org.compiere.util.*;
*/
public class WAttachment extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -5720154824503276682L;
/** Logger */
private static CLogger log = CLogger.getCLogger(WAttachment.class);

View File

@ -16,10 +16,13 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ecs.AlignType;
import org.apache.ecs.Element;
@ -32,7 +35,13 @@ import org.apache.ecs.xhtml.tr;
import org.compiere.model.GridField;
import org.compiere.model.MChat;
import org.compiere.model.MChatEntry;
import org.compiere.util.*;
import org.compiere.util.CLogger;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
@ -43,6 +52,11 @@ import org.compiere.util.*;
*/
public class WChat extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 6826855534161342772L;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());
private MChat m_chat;

View File

@ -16,12 +16,22 @@
*****************************************************************************/
package org.compiere.www;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class WError extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 7940367932646085428L;
static final private String CONTENT_TYPE = "text/html";
static final private String DOC_TYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n" +
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";

View File

@ -16,12 +16,27 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.ecs.xhtml.*;
import org.compiere.util.*;
import java.io.IOException;
import java.util.Properties;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ecs.xhtml.body;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.p;
import org.apache.ecs.xhtml.script;
import org.compiere.util.CLogger;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Login;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
* Dynamic Field Updates.
@ -32,6 +47,11 @@ import org.compiere.util.*;
*/
public class WFieldUpdate extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -1576213475379404148L;
/** Static Logger */
private static CLogger log = CLogger.getCLogger (WFieldUpdate.class);

View File

@ -2,7 +2,6 @@ package org.compiere.www;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@ -11,11 +10,9 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.ecs.AlignType;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.body;
import org.apache.ecs.xhtml.br;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.h2;
import org.apache.ecs.xhtml.head;
@ -31,9 +28,7 @@ import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.textarea;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.GridField;
import org.compiere.util.Msg;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
@ -41,8 +36,12 @@ import org.compiere.util.WebUtil;
public class WFindAdv extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -763641668438890217L;
public static final String EQUAL = "=";
public static final String EQUAL = "=";
public static final String NOT_EQUAL = "!=";
public static final String LIKE = "LIKE";
public static final String NOT_LIKE = "NOT LIKE";

View File

@ -30,6 +30,11 @@ import org.compiere.util.WebUtil;
public class WForm extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -3168260837305771442L;
public void init(ServletConfig config)
throws ServletException
{

View File

@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
@ -32,6 +33,11 @@ import org.compiere.util.WebUtil;
public class WHelp extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 2586562865823315494L;
protected CLogger log = CLogger.getCLogger(getClass());
public void init(ServletConfig config)
@ -49,7 +55,7 @@ public class WHelp extends HttpServlet
WebDoc doc = null;
if (ws == null) {
doc = WebDoc.createPopup("No Context");
doc.addPopupClose(ws.ctx);
doc.addPopupClose(Env.getCtx());
} else
doc = ws.mWindow.getHelpDoc(false);
WebUtil.createResponse(request, response, this, null, doc, false);

View File

@ -67,6 +67,11 @@ import org.compiere.util.WebUtil;
*/
public class WLocation extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 285780594700749274L;
/** Logger */
protected static CLogger log = CLogger.getCLogger(WLocation.class);

View File

@ -16,15 +16,46 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.security.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.ecs.*;
import org.apache.ecs.xhtml.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.io.IOException;
import java.security.Principal;
import java.util.Properties;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.ecs.AlignType;
import org.apache.ecs.HtmlColor;
import org.apache.ecs.xhtml.b;
import org.apache.ecs.xhtml.font;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.img;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.label;
import org.apache.ecs.xhtml.option;
import org.apache.ecs.xhtml.p;
import org.apache.ecs.xhtml.script;
import org.apache.ecs.xhtml.select;
import org.apache.ecs.xhtml.strong;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.MSession;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Login;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
* Web Login Page.
@ -48,6 +79,11 @@ import org.compiere.util.*;
*/
public class WLogin extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -407753489095758837L;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());

View File

@ -16,19 +16,37 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.io.IOException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.logging.Level;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ecs.xhtml.*;
import org.compiere.model.*;
import org.compiere.util.*;
import org.apache.ecs.xhtml.button;
import org.apache.ecs.xhtml.div;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.th;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.GridField;
import org.compiere.model.MProcess;
import org.compiere.model.MProcessPara;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
* WLookup Servlet.
@ -49,6 +67,11 @@ import org.compiere.util.*;
*/
public class WLookup extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 4835226093865297019L;
/** Logger */
protected static CLogger log = CLogger.getCLogger(WLookup.class);

View File

@ -16,16 +16,46 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.ecs.*;
import org.apache.ecs.xhtml.*;
import org.compiere.model.*;
import org.compiere.util.*;
import java.io.IOException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Enumeration;
import java.util.Properties;
import java.util.logging.Level;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ecs.Element;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.base;
import org.apache.ecs.xhtml.body;
import org.apache.ecs.xhtml.head;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.link;
import org.apache.ecs.xhtml.script;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.MForm;
import org.compiere.model.MTree;
import org.compiere.model.MTreeNode;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Login;
import org.compiere.util.Msg;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
* Web Menu
@ -35,6 +65,10 @@ import org.compiere.util.*;
*/
public class WMenu extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -6357775290362135602L;
/** Logger */
protected CLogger log = CLogger.getCLogger (getClass ());

View File

@ -16,20 +16,62 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.math.*;
import java.sql.*;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.logging.*;
import java.util.logging.Level;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.ecs.*;
import org.apache.ecs.xhtml.*;
import org.compiere.model.*;
import org.compiere.print.*;
import org.compiere.process.*;
import org.compiere.util.*;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ecs.AlignType;
import org.apache.ecs.Element;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.i;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.option;
import org.apache.ecs.xhtml.p;
import org.apache.ecs.xhtml.select;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.GridTab;
import org.compiere.model.MAllocationHdr;
import org.compiere.model.MBankStatement;
import org.compiere.model.MInOut;
import org.compiere.model.MInventory;
import org.compiere.model.MInvoice;
import org.compiere.model.MJournal;
import org.compiere.model.MJournalBatch;
import org.compiere.model.MMovement;
import org.compiere.model.MOrder;
import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.model.MPayment;
import org.compiere.model.MProcess;
import org.compiere.model.MProcessPara;
import org.compiere.print.ReportEngine;
import org.compiere.process.DocumentEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.util.ASyncProcess;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Trx;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
import org.compiere.wf.MWFActivity;
@ -41,6 +83,11 @@ import org.compiere.wf.MWFActivity;
*/
public class WProcess extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 3937980012432969521L;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());
//Modified by Rob Klein 4/29/07

View File

@ -57,6 +57,11 @@ import org.compiere.util.WebUtil;
*/
public class WReport extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -6281182537210181407L;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());
/** Current MTab */

View File

@ -16,10 +16,16 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.compiere.util.*;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
/**
* Application Start Page
@ -42,6 +48,12 @@ import org.compiere.util.*;
*/
public class WStart extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -3520310916249390852L;
/**
* Set UI directory to Servlet init param
*/

View File

@ -16,10 +16,17 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.compiere.util.*;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
/**
* Status Servlet
@ -29,6 +36,11 @@ import org.compiere.util.*;
*/
public class WStatus extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -6029799149174591507L;
/**
* Initialize global variables
* This servlet is also loaded on startup to initialize the system

View File

@ -30,6 +30,11 @@ import org.compiere.util.WebUtil;
public class WTask extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 4088461230847084532L;
public void init(ServletConfig config)
throws ServletException
{

View File

@ -16,10 +16,19 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.compiere.util.*;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebUtil;
/**
* Web (window) Help
@ -29,6 +38,11 @@ import org.compiere.util.*;
*/
public class WTest extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = -669477433080711028L;
/** Logger */
protected CLogger log = CLogger.getCLogger(WTest.class);

View File

@ -56,6 +56,11 @@ import org.compiere.util.WebUtil;
*/
public class WValuePreference extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 6283213348834944668L;
/** Logger */
protected CLogger log = CLogger.getCLogger(getClass());
//Modified by Rob Klein 4/29/07

View File

@ -16,20 +16,54 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.math.*;
import java.sql.*;
import java.util.*;
import java.util.logging.*;
import java.io.IOException;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Enumeration;
import java.util.logging.Level;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.adempiere.exceptions.DBException;
import org.apache.ecs.*;
import org.apache.ecs.xhtml.*;
import org.compiere.model.*;
import org.compiere.util.*;
import org.apache.ecs.AlignType;
import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.button;
import org.apache.ecs.xhtml.div;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.hr;
import org.apache.ecs.xhtml.i;
import org.apache.ecs.xhtml.img;
import org.apache.ecs.xhtml.input;
import org.apache.ecs.xhtml.script;
import org.apache.ecs.xhtml.span;
import org.apache.ecs.xhtml.table;
import org.apache.ecs.xhtml.td;
import org.apache.ecs.xhtml.th;
import org.apache.ecs.xhtml.thead;
import org.apache.ecs.xhtml.tr;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.GridWindowVO;
import org.compiere.model.Lookup;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
import org.compiere.model.MSession;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
* Web Window Servlet
@ -39,6 +73,11 @@ import org.compiere.util.*;
*/
public class WWindow extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 2565659091166594270L;
/** Logger */
protected static CLogger log = CLogger.getCLogger(WWindow.class);

View File

@ -33,7 +33,6 @@ import javax.servlet.http.HttpSession;
import org.apache.ecs.xhtml.body;
import org.apache.ecs.xhtml.br;
import org.apache.ecs.xhtml.form;
import org.apache.ecs.xhtml.h2;
import org.apache.ecs.xhtml.h6;
import org.apache.ecs.xhtml.head;
import org.apache.ecs.xhtml.hr;
@ -65,6 +64,10 @@ import org.compiere.wf.MWorkflow;
*/
public class WWorkflow extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 7220553249782175533L;
/**
* Initialize global variables

View File

@ -16,18 +16,30 @@
*****************************************************************************/
package org.compiere.www;
import java.io.*;
import java.io.IOException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.Properties;
import java.util.logging.Level;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.compiere.model.*;
import org.compiere.util.*;
import org.compiere.model.GridWindowVO;
import org.compiere.model.MQuery;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.WebDoc;
import org.compiere.util.WebEnv;
import org.compiere.util.WebSessionCtx;
import org.compiere.util.WebUtil;
/**
@ -38,6 +50,11 @@ import org.compiere.util.*;
*/
public class WZoom extends HttpServlet
{
/**
*
*/
private static final long serialVersionUID = 7075820778158654964L;
/** Logger */
private static CLogger log = CLogger.getCLogger(WAttachment.class);

View File

@ -34,6 +34,11 @@ import org.zkoss.zkex.zul.South;
*/
public class FolderBrowser extends Window implements EventListener
{
/**
*
*/
private static final long serialVersionUID = -923063158885832812L;
private Textbox txtPath = new Textbox();
private Listbox listDir = new Listbox();
private ConfirmPanel confirmPanel = new ConfirmPanel(true);