Merge with eeb560416950cc9390199dfe448d08c6d9e66b39
This commit is contained in:
commit
cf80ce5f72
|
@ -249,7 +249,7 @@ public class ImmediateBankTransfer extends SvrProcess
|
||||||
MCash cash = createCash();
|
MCash cash = createCash();
|
||||||
MCashLine cashLines[]= createCashLines(cash);
|
MCashLine cashLines[]= createCashLines(cash);
|
||||||
|
|
||||||
StringBuilder processMsg = new StringBuilder(cash.getDocumentNo());
|
StringBuilder processMsg = new StringBuilder().append(cash.getDocumentNo());
|
||||||
|
|
||||||
cash.setDocAction(p_docAction);
|
cash.setDocAction(p_docAction);
|
||||||
if (!cash.processIt(p_docAction))
|
if (!cash.processIt(p_docAction))
|
||||||
|
|
|
@ -22,6 +22,7 @@ import java.sql.ResultSet;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.model.MAttributeSet;
|
import org.compiere.model.MAttributeSet;
|
||||||
import org.compiere.model.MAttributeSetInstance;
|
import org.compiere.model.MAttributeSetInstance;
|
||||||
|
@ -29,6 +30,7 @@ import org.compiere.model.MCost;
|
||||||
import org.compiere.model.MInventory;
|
import org.compiere.model.MInventory;
|
||||||
import org.compiere.model.MInventoryLine;
|
import org.compiere.model.MInventoryLine;
|
||||||
import org.compiere.model.MProduct;
|
import org.compiere.model.MProduct;
|
||||||
|
import org.compiere.model.MProductCategoryAcct;
|
||||||
import org.compiere.model.X_I_Inventory;
|
import org.compiere.model.X_I_Inventory;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.TimeUtil;
|
import org.compiere.util.TimeUtil;
|
||||||
|
@ -356,12 +358,12 @@ public class ImportInventory extends SvrProcess
|
||||||
x_isInternalUse = isInternalUse;
|
x_isInternalUse = isInternalUse;
|
||||||
noInsert++;
|
noInsert++;
|
||||||
}
|
}
|
||||||
|
MProduct product = MProduct.get(getCtx(), imp.getM_Product_ID());
|
||||||
// Line
|
// Line
|
||||||
int M_AttributeSetInstance_ID = 0;
|
int M_AttributeSetInstance_ID = 0;
|
||||||
if ((imp.getLot() != null && imp.getLot().length() > 0) || (imp.getSerNo() != null && imp.getSerNo().length() > 0))
|
if ((imp.getLot() != null && imp.getLot().length() > 0) || (imp.getSerNo() != null && imp.getSerNo().length() > 0))
|
||||||
{
|
{
|
||||||
MProduct product = MProduct.get(getCtx(), imp.getM_Product_ID());
|
|
||||||
if (product.isInstanceAttribute())
|
if (product.isInstanceAttribute())
|
||||||
{
|
{
|
||||||
MAttributeSet mas = product.getAttributeSet();
|
MAttributeSet mas = product.getAttributeSet();
|
||||||
|
@ -394,15 +396,28 @@ public class ImportInventory extends SvrProcess
|
||||||
noInsertLine++;
|
noInsertLine++;
|
||||||
//@Trifon update Product cost record if Update costing is enabled
|
//@Trifon update Product cost record if Update costing is enabled
|
||||||
if (p_UpdateCosting) {
|
if (p_UpdateCosting) {
|
||||||
MCost cost = MCost.get (MProduct.get(getCtx(), imp.getM_Product_ID()), /*M_AttributeSetInstance_ID*/ 0
|
String costingLevel = null;
|
||||||
, acctSchema, p_AD_OrgTrx_ID, p_M_CostElement_ID, get_TrxName());
|
if(product.getM_Product_Category_ID() > 0){
|
||||||
cost.setCurrentCostPrice( imp.getCurrentCostPrice() );
|
MProductCategoryAcct pca = MProductCategoryAcct.get(getCtx(), product.getM_Product_Category_ID(), p_C_AcctSchema_ID, get_TrxName());
|
||||||
if (cost.save()) {
|
costingLevel = pca.getCostingLevel();
|
||||||
// nothing here.
|
if (costingLevel == null) {
|
||||||
} else {
|
costingLevel = acctSchema.getCostingLevel();
|
||||||
log.log(Level.SEVERE, "Cost not saved!");
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int costOrgID = p_AD_OrgTrx_ID;
|
||||||
|
int costASI = line.getM_AttributeSetInstance_ID();
|
||||||
|
if (MAcctSchema.COSTINGLEVEL_Client.equals(costingLevel)){
|
||||||
|
costOrgID = 0;
|
||||||
|
costASI = 0;
|
||||||
|
} else if (MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel)) {
|
||||||
|
costASI = 0;
|
||||||
|
}
|
||||||
|
MCost cost = MCost.get (MProduct.get(getCtx(), imp.getM_Product_ID()), costASI
|
||||||
|
, acctSchema, costOrgID, p_M_CostElement_ID, get_TrxName());
|
||||||
|
cost.setCurrentCostPrice( imp.getCurrentCostPrice() );
|
||||||
|
cost.saveEx();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,7 +427,7 @@ public class ImportInventory extends SvrProcess
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, sql.toString(), e);
|
throw new AdempiereException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Error to indicator to not imported
|
// Set Error to indicator to not imported
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class ImportOrder extends SvrProcess
|
||||||
{
|
{
|
||||||
StringBuilder sql = null;
|
StringBuilder sql = null;
|
||||||
int no = 0;
|
int no = 0;
|
||||||
String clientCheck = " AND AD_Client_ID=" + m_AD_Client_ID;
|
StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(m_AD_Client_ID);
|
||||||
|
|
||||||
// **** Prepare ****
|
// **** Prepare ****
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class ProjectPhaseGenOrder extends SvrProcess
|
||||||
{
|
{
|
||||||
MOrderLine ol = new MOrderLine(order);
|
MOrderLine ol = new MOrderLine(order);
|
||||||
ol.setLine(fromPhase.getSeqNo());
|
ol.setLine(fromPhase.getSeqNo());
|
||||||
StringBuilder sb = new StringBuilder (fromPhase.getName());
|
StringBuilder sb = new StringBuilder ().append(fromPhase.getName());
|
||||||
if (fromPhase.getDescription() != null && fromPhase.getDescription().length() > 0)
|
if (fromPhase.getDescription() != null && fromPhase.getDescription().length() > 0)
|
||||||
sb.append(" - ").append(fromPhase.getDescription());
|
sb.append(" - ").append(fromPhase.getDescription());
|
||||||
ol.setDescription(sb.toString());
|
ol.setDescription(sb.toString());
|
||||||
|
@ -122,7 +122,7 @@ public class ProjectPhaseGenOrder extends SvrProcess
|
||||||
{
|
{
|
||||||
MOrderLine ol = new MOrderLine(order);
|
MOrderLine ol = new MOrderLine(order);
|
||||||
ol.setLine(tasks[i].getSeqNo());
|
ol.setLine(tasks[i].getSeqNo());
|
||||||
StringBuilder sb = new StringBuilder (tasks[i].getName());
|
StringBuilder sb = new StringBuilder ().append(tasks[i].getName());
|
||||||
if (tasks[i].getDescription() != null && tasks[i].getDescription().length() > 0)
|
if (tasks[i].getDescription() != null && tasks[i].getDescription().length() > 0)
|
||||||
sb.append(" - ").append(tasks[i].getDescription());
|
sb.append(" - ").append(tasks[i].getDescription());
|
||||||
ol.setDescription(sb.toString());
|
ol.setDescription(sb.toString());
|
||||||
|
|
|
@ -746,7 +746,7 @@ public class RequestEMailProcessor extends SvrProcess
|
||||||
String deliveryMessage = null;
|
String deliveryMessage = null;
|
||||||
if (content instanceof InputStream)
|
if (content instanceof InputStream)
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
InputStream is = (InputStream)content;
|
InputStream is = (InputStream)content;
|
||||||
int c;
|
int c;
|
||||||
while ((c = is.read()) != -1)
|
while ((c = is.read()) != -1)
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class TaxNotFoundException extends AdempiereException
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
MLocation loc = MLocation.get(Env.getCtx(), C_Location_ID, null);
|
MLocation loc = MLocation.get(Env.getCtx(), C_Location_ID, null);
|
||||||
if (loc == null | loc.get_ID() != C_Location_ID)
|
if (loc == null || loc.get_ID() != C_Location_ID)
|
||||||
{
|
{
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ public class PromotionRule {
|
||||||
//optional promotion code filter
|
//optional promotion code filter
|
||||||
String promotionCode = (String)order.get_Value("PromotionCode");
|
String promotionCode = (String)order.get_Value("PromotionCode");
|
||||||
|
|
||||||
StringBuffer sql = new StringBuffer();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.append(select)
|
sql.append(select)
|
||||||
.append(" WHERE")
|
.append(" WHERE")
|
||||||
.append(" (" + bpFilter + ")")
|
.append(" (" + bpFilter + ")")
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class Doc_AllocationHdr extends Doc
|
||||||
} // Doc_Allocation
|
} // Doc_Allocation
|
||||||
|
|
||||||
/** Tolerance G&L */
|
/** Tolerance G&L */
|
||||||
private static final BigDecimal TOLERANCE = new BigDecimal (0.02);
|
private static final BigDecimal TOLERANCE = BigDecimal.valueOf(0.02);
|
||||||
/** Facts */
|
/** Facts */
|
||||||
private ArrayList<Fact> m_facts = null;
|
private ArrayList<Fact> m_facts = null;
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,7 @@ public class CreateAdempiere
|
||||||
if (def != null)
|
if (def != null)
|
||||||
{
|
{
|
||||||
//jz: replace '' to \', otherwise exception
|
//jz: replace '' to \', otherwise exception
|
||||||
def.replaceAll("''", "\\'");
|
def = def.replaceAll("''", "\\'");
|
||||||
sb.append(" DEFAULT ").append(def);
|
sb.append(" DEFAULT ").append(def);
|
||||||
}
|
}
|
||||||
// Null
|
// Null
|
||||||
|
|
|
@ -214,8 +214,8 @@ public class GridTabVO implements Evaluatee, Serializable
|
||||||
if (vo.WhereClause == null)
|
if (vo.WhereClause == null)
|
||||||
vo.WhereClause = "";
|
vo.WhereClause = "";
|
||||||
//jz col=null not good for Derby
|
//jz col=null not good for Derby
|
||||||
if (vo.WhereClause.indexOf("=null")>0)
|
if (vo.WhereClause.indexOf("=null")>0)
|
||||||
vo.WhereClause.replaceAll("=null", " IS NULL ");
|
vo.WhereClause = vo.WhereClause.replaceAll("=null", " IS NULL ");
|
||||||
// Where Clauses should be surrounded by parenthesis - teo_sarca, BF [ 1982327 ]
|
// Where Clauses should be surrounded by parenthesis - teo_sarca, BF [ 1982327 ]
|
||||||
if (vo.WhereClause.trim().length() > 0) {
|
if (vo.WhereClause.trim().length() > 0) {
|
||||||
vo.WhereClause = "("+vo.WhereClause+")";
|
vo.WhereClause = "("+vo.WhereClause+")";
|
||||||
|
|
|
@ -442,7 +442,7 @@ public class MAsset extends X_A_Asset
|
||||||
MAssetGroupAcct assetgrpacct = new MAssetGroupAcct (getCtx(), rs, get_TrxName());
|
MAssetGroupAcct assetgrpacct = new MAssetGroupAcct (getCtx(), rs, get_TrxName());
|
||||||
MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName());
|
MAssetAcct assetacct = new MAssetAcct (getCtx(), 0, get_TrxName());
|
||||||
isdepreciate = assetgrpacct.isProcessing();
|
isdepreciate = assetgrpacct.isProcessing();
|
||||||
if (isDepreciated()== true | isdepreciate == true)
|
if (isDepreciated()== true || isdepreciate == true)
|
||||||
{
|
{
|
||||||
assetacct.setPostingType(assetgrpacct.getPostingType());
|
assetacct.setPostingType(assetgrpacct.getPostingType());
|
||||||
assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent());
|
assetacct.setA_Split_Percent(assetgrpacct.getA_Split_Percent());
|
||||||
|
@ -454,7 +454,7 @@ public class MAsset extends X_A_Asset
|
||||||
assetacct.setA_Period_Start(1);
|
assetacct.setA_Period_Start(1);
|
||||||
|
|
||||||
|
|
||||||
if (getUseLifeMonths() == 0 & getUseLifeYears() == 0){
|
if (getUseLifeMonths() == 0 && getUseLifeYears() == 0){
|
||||||
assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths());
|
assetacct.setA_Period_End(assetgrpacct.getUseLifeMonths());
|
||||||
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
|
asset.setUseLifeYears(assetgrpacct.getUseLifeYears());
|
||||||
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
|
asset.setUseLifeMonths(assetgrpacct.getUseLifeMonths());
|
||||||
|
@ -541,7 +541,7 @@ public class MAsset extends X_A_Asset
|
||||||
if (DB.getSQLValue(get_TrxName(), sql2, asset.getA_Asset_ID(),assetgrpacct.getPostingType())== 0)
|
if (DB.getSQLValue(get_TrxName(), sql2, asset.getA_Asset_ID(),assetgrpacct.getPostingType())== 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (isDepreciated()== true | isdepreciate == true)
|
if (isDepreciated()== true || isdepreciate == true)
|
||||||
{
|
{
|
||||||
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName());
|
X_A_Depreciation_Workfile assetwk = new X_A_Depreciation_Workfile (getCtx(), 0, get_TrxName());
|
||||||
assetwk.setA_Asset_ID(p_A_Asset_ID);
|
assetwk.setA_Asset_ID(p_A_Asset_ID);
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class MBPGroup extends X_C_BP_Group
|
||||||
BigDecimal bd = super.getCreditWatchPercent();
|
BigDecimal bd = super.getCreditWatchPercent();
|
||||||
if (bd.compareTo(Env.ZERO) != 0)
|
if (bd.compareTo(Env.ZERO) != 0)
|
||||||
return bd.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
|
return bd.divide(Env.ONEHUNDRED, 2, BigDecimal.ROUND_HALF_UP);
|
||||||
return new BigDecimal(0.90);
|
return BigDecimal.valueOf(0.90);
|
||||||
} // getCreditWatchRatio
|
} // getCreditWatchRatio
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -270,12 +270,12 @@ public class MDistribution extends X_GL_Distribution
|
||||||
*/
|
*/
|
||||||
public String validate()
|
public String validate()
|
||||||
{
|
{
|
||||||
StringBuilder retValue = null;
|
String retValue = null;
|
||||||
getLines(true);
|
getLines(true);
|
||||||
if (m_lines.length == 0)
|
if (m_lines.length == 0)
|
||||||
retValue = new StringBuilder("@NoLines@");
|
retValue = "@NoLines@";
|
||||||
else if (getPercentTotal().compareTo(Env.ONEHUNDRED) != 0)
|
else if (getPercentTotal().compareTo(Env.ONEHUNDRED) != 0)
|
||||||
retValue = new StringBuilder("@PercentTotal@ <> 100");
|
retValue = "@PercentTotal@ <> 100";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// More then one line with 0
|
// More then one line with 0
|
||||||
|
@ -286,8 +286,8 @@ public class MDistribution extends X_GL_Distribution
|
||||||
{
|
{
|
||||||
if (lineFound >= 0 && m_lines[i].getPercent().compareTo(Env.ZERO) == 0)
|
if (lineFound >= 0 && m_lines[i].getPercent().compareTo(Env.ZERO) == 0)
|
||||||
{
|
{
|
||||||
retValue = new StringBuilder("@Line@ ").append(lineFound)
|
retValue = "@Line@ " + lineFound
|
||||||
.append(" + ").append(m_lines[i].getLine()).append(": == 0");
|
+ " + " + m_lines[i].getLine() + ": == 0";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lineFound = m_lines[i].getLine();
|
lineFound = m_lines[i].getLine();
|
||||||
|
@ -296,7 +296,7 @@ public class MDistribution extends X_GL_Distribution
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsValid (retValue == null);
|
setIsValid (retValue == null);
|
||||||
return retValue.toString();
|
return retValue;
|
||||||
} // validate
|
} // validate
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -229,145 +229,145 @@ public class MUOMConversion extends X_C_UOM_Conversion
|
||||||
if (from.isMinute())
|
if (from.isMinute())
|
||||||
{
|
{
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(1.0/60.0);
|
return BigDecimal.valueOf(1.0/60.0);
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(1.0/1440.0); // 24 * 60
|
return BigDecimal.valueOf(1.0/1440.0); // 24 * 60
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(1.0/480.0); // 8 * 60
|
return BigDecimal.valueOf(1.0/480.0); // 8 * 60
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(1.0/10080.0); // 7 * 24 * 60
|
return BigDecimal.valueOf(1.0/10080.0); // 7 * 24 * 60
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(1.0/43200.0); // 30 * 24 * 60
|
return BigDecimal.valueOf(1.0/43200.0); // 30 * 24 * 60
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(1.0/9600.0); // 4 * 5 * 8 * 60
|
return BigDecimal.valueOf(1.0/9600.0); // 4 * 5 * 8 * 60
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/525600.0); // 365 * 24 * 60
|
return BigDecimal.valueOf(1.0/525600.0); // 365 * 24 * 60
|
||||||
}
|
}
|
||||||
// Time - Hour
|
// Time - Hour
|
||||||
if (from.isHour())
|
if (from.isHour())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(60.0);
|
return BigDecimal.valueOf(60.0);
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(1.0/24.0);
|
return BigDecimal.valueOf(1.0/24.0);
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(1.0/8.0);
|
return BigDecimal.valueOf(1.0/8.0);
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(1.0/168.0); // 7 * 24
|
return BigDecimal.valueOf(1.0/168.0); // 7 * 24
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(1.0/720.0); // 30 * 24
|
return BigDecimal.valueOf(1.0/720.0); // 30 * 24
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(1.0/160.0); // 4 * 5 * 8
|
return BigDecimal.valueOf(1.0/160.0); // 4 * 5 * 8
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/8760.0); // 365 * 24
|
return BigDecimal.valueOf(1.0/8760.0); // 365 * 24
|
||||||
}
|
}
|
||||||
// Time - Day
|
// Time - Day
|
||||||
if (from.isDay())
|
if (from.isDay())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(1440.0); // 24 * 60
|
return BigDecimal.valueOf(1440.0); // 24 * 60
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(24.0);
|
return BigDecimal.valueOf(24.0);
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(3.0); // 24 / 8
|
return BigDecimal.valueOf(3.0); // 24 / 8
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(1.0/7.0); // 7
|
return BigDecimal.valueOf(1.0/7.0); // 7
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(1.0/30.0); // 30
|
return BigDecimal.valueOf(1.0/30.0); // 30
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(1.0/20.0); // 4 * 5
|
return BigDecimal.valueOf(1.0/20.0); // 4 * 5
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/365.0); // 365
|
return BigDecimal.valueOf(1.0/365.0); // 365
|
||||||
}
|
}
|
||||||
// Time - WorkDay
|
// Time - WorkDay
|
||||||
if (from.isWorkDay())
|
if (from.isWorkDay())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(480.0); // 8 * 60
|
return BigDecimal.valueOf(480.0); // 8 * 60
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(8.0); // 8
|
return BigDecimal.valueOf(8.0); // 8
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(1.0/3.0); // 24 / 8
|
return BigDecimal.valueOf(1.0/3.0); // 24 / 8
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(1.0/5); // 5
|
return BigDecimal.valueOf(1.0/5); // 5
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(1.0/20.0); // 4 * 5
|
return BigDecimal.valueOf(1.0/20.0); // 4 * 5
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(1.0/20.0); // 4 * 5
|
return BigDecimal.valueOf(1.0/20.0); // 4 * 5
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/240.0); // 4 * 5 * 12
|
return BigDecimal.valueOf(1.0/240.0); // 4 * 5 * 12
|
||||||
}
|
}
|
||||||
// Time - Week
|
// Time - Week
|
||||||
if (from.isWeek())
|
if (from.isWeek())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(10080.0); // 7 * 24 * 60
|
return BigDecimal.valueOf(10080.0); // 7 * 24 * 60
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(168.0); // 7 * 24
|
return BigDecimal.valueOf(168.0); // 7 * 24
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(7.0);
|
return BigDecimal.valueOf(7.0);
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(5.0);
|
return BigDecimal.valueOf(5.0);
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(1.0/4.0); // 4
|
return BigDecimal.valueOf(1.0/4.0); // 4
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(1.0/4.0); // 4
|
return BigDecimal.valueOf(1.0/4.0); // 4
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/50.0); // 50
|
return BigDecimal.valueOf(1.0/50.0); // 50
|
||||||
}
|
}
|
||||||
// Time - Month
|
// Time - Month
|
||||||
if (from.isMonth())
|
if (from.isMonth())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(43200.0); // 30 * 24 * 60
|
return BigDecimal.valueOf(43200.0); // 30 * 24 * 60
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(720.0); // 30 * 24
|
return BigDecimal.valueOf(720.0); // 30 * 24
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(30.0); // 30
|
return BigDecimal.valueOf(30.0); // 30
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(20.0); // 4 * 5
|
return BigDecimal.valueOf(20.0); // 4 * 5
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(4.0); // 4
|
return BigDecimal.valueOf(4.0); // 4
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(1.5); // 30 / 20
|
return BigDecimal.valueOf(1.5); // 30 / 20
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/12.0); // 12
|
return BigDecimal.valueOf(1.0/12.0); // 12
|
||||||
}
|
}
|
||||||
// Time - WorkMonth
|
// Time - WorkMonth
|
||||||
if (from.isWorkMonth())
|
if (from.isWorkMonth())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(9600.0); // 4 * 5 * 8 * 60
|
return BigDecimal.valueOf(9600.0); // 4 * 5 * 8 * 60
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(160.0); // 4 * 5 * 8
|
return BigDecimal.valueOf(160.0); // 4 * 5 * 8
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(20.0); // 4 * 5
|
return BigDecimal.valueOf(20.0); // 4 * 5
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(20.0); // 4 * 5
|
return BigDecimal.valueOf(20.0); // 4 * 5
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(4.0); // 4
|
return BigDecimal.valueOf(4.0); // 4
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(20.0/30.0); // 20 / 30
|
return BigDecimal.valueOf(20.0/30.0); // 20 / 30
|
||||||
if (to.isYear())
|
if (to.isYear())
|
||||||
return new BigDecimal(1.0/12.0); // 12
|
return BigDecimal.valueOf(1.0/12.0); // 12
|
||||||
}
|
}
|
||||||
// Time - Year
|
// Time - Year
|
||||||
if (from.isYear())
|
if (from.isYear())
|
||||||
{
|
{
|
||||||
if (to.isMinute())
|
if (to.isMinute())
|
||||||
return new BigDecimal(518400.0); // 12 * 30 * 24 * 60
|
return BigDecimal.valueOf(518400.0); // 12 * 30 * 24 * 60
|
||||||
if (to.isHour())
|
if (to.isHour())
|
||||||
return new BigDecimal(8640.0); // 12 * 30 * 24
|
return BigDecimal.valueOf(8640.0); // 12 * 30 * 24
|
||||||
if (to.isDay())
|
if (to.isDay())
|
||||||
return new BigDecimal(365.0); // 365
|
return BigDecimal.valueOf(365.0); // 365
|
||||||
if (to.isWorkDay())
|
if (to.isWorkDay())
|
||||||
return new BigDecimal(240.0); // 12 * 4 * 5
|
return BigDecimal.valueOf(240.0); // 12 * 4 * 5
|
||||||
if (to.isWeek())
|
if (to.isWeek())
|
||||||
return new BigDecimal(50.0); // 52
|
return BigDecimal.valueOf(50.0); // 52
|
||||||
if (to.isMonth())
|
if (to.isMonth())
|
||||||
return new BigDecimal(12.0); // 12
|
return BigDecimal.valueOf(12.0); // 12
|
||||||
if (to.isWorkMonth())
|
if (to.isWorkMonth())
|
||||||
return new BigDecimal(12.0); // 12
|
return BigDecimal.valueOf(12.0); // 12
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
return null;
|
return null;
|
||||||
|
@ -620,7 +620,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
|
||||||
/** Static Logger */
|
/** Static Logger */
|
||||||
private static final CLogger s_log = CLogger.getCLogger(MUOMConversion.class);
|
private static final CLogger s_log = CLogger.getCLogger(MUOMConversion.class);
|
||||||
/** Indicator for Rate */
|
/** Indicator for Rate */
|
||||||
private static final BigDecimal GETRATE = new BigDecimal(123.456);
|
private static final BigDecimal GETRATE = BigDecimal.valueOf(123.456);
|
||||||
/** Conversion Map: Key=Point(from,to) Value=BigDecimal */
|
/** Conversion Map: Key=Point(from,to) Value=BigDecimal */
|
||||||
private static CCache<Point,BigDecimal> s_conversions = null;
|
private static CCache<Point,BigDecimal> s_conversions = null;
|
||||||
/** Product Conversion Map */
|
/** Product Conversion Map */
|
||||||
|
|
|
@ -291,13 +291,13 @@ public class MWFProcess extends X_AD_WF_Process
|
||||||
//
|
//
|
||||||
if (closedState == null)
|
if (closedState == null)
|
||||||
closedState = activityWFState;
|
closedState = activityWFState;
|
||||||
else if (!closedState.equals(activityState))
|
else if (!closedState.equals(activityState.getState()))
|
||||||
{
|
{
|
||||||
// Overwrite if terminated
|
// Overwrite if terminated
|
||||||
if (WFSTATE_Terminated.equals(activityState))
|
if (activityState.isTerminated())
|
||||||
closedState = activityWFState;
|
closedState = activityWFState;
|
||||||
// Overwrite if activity aborted and no other terminated
|
// Overwrite if activity aborted and no other terminated
|
||||||
else if (WFSTATE_Aborted.equals(activityState) && !WFSTATE_Terminated.equals(closedState))
|
else if (activityState.isAborted() && !WFSTATE_Terminated.equals(closedState))
|
||||||
closedState = activityWFState;
|
closedState = activityWFState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,7 +225,7 @@ public class CashFlow extends SvrProcess {
|
||||||
open = open.subtract(paid);
|
open = open.subtract(paid);
|
||||||
}
|
}
|
||||||
if (open.scale() > curr.getStdPrecision())
|
if (open.scale() > curr.getStdPrecision())
|
||||||
open.setScale(curr.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
open = open.setScale(curr.getStdPrecision(), BigDecimal.ROUND_HALF_UP);
|
||||||
BigDecimal invoiced = order.getGrandTotal().subtract(open);
|
BigDecimal invoiced = order.getGrandTotal().subtract(open);
|
||||||
if (isPaySchedule) {
|
if (isPaySchedule) {
|
||||||
MOrderPaySchedule[] schedule = MOrderPaySchedule.getOrderPaySchedule(getCtx(), order_id, 0, get_TrxName());
|
MOrderPaySchedule[] schedule = MOrderPaySchedule.getOrderPaySchedule(getCtx(), order_id, 0, get_TrxName());
|
||||||
|
|
|
@ -420,7 +420,7 @@ public class ExportHelper {
|
||||||
whereClause.append(" AND ").append(embeddedFormat.getWhereClause());
|
whereClause.append(" AND ").append(embeddedFormat.getWhereClause());
|
||||||
}
|
}
|
||||||
String columnName = "";
|
String columnName = "";
|
||||||
if(formatLine.getAD_Reference_ID()== DisplayType.Table | formatLine.getAD_Reference_ID()==DisplayType.Search)
|
if(formatLine.getAD_Reference_ID()== DisplayType.Table || formatLine.getAD_Reference_ID()==DisplayType.Search)
|
||||||
{
|
{
|
||||||
MColumn column = MColumn.get(masterPO.getCtx(), formatLine.getAD_Column_ID());
|
MColumn column = MColumn.get(masterPO.getCtx(), formatLine.getAD_Column_ID());
|
||||||
columnName = column.getColumnName();
|
columnName = column.getColumnName();
|
||||||
|
|
|
@ -1206,7 +1206,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
|
||||||
{
|
{
|
||||||
CTabbedPane tab = (CTabbedPane) e.getSource();
|
CTabbedPane tab = (CTabbedPane) e.getSource();
|
||||||
|
|
||||||
if(tab.getSelectedIndex() == 4 & warehouseTbl.getRowCount() > 0)
|
if(tab.getSelectedIndex() == 4 && warehouseTbl.getRowCount() > 0)
|
||||||
{
|
{
|
||||||
// If no warehouse row is selected in the warehouse tab, use the first warehouse
|
// If no warehouse row is selected in the warehouse tab, use the first warehouse
|
||||||
// row to prevent array index out of bounds. BF 3051361
|
// row to prevent array index out of bounds. BF 3051361
|
||||||
|
|
|
@ -281,7 +281,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
|
|
||||||
Integer C_BPartner_ID = null;
|
Integer C_BPartner_ID = null;
|
||||||
|
|
||||||
if (fBPartner_ID.getDisplay() != "")
|
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||||
C_BPartner_ID = (Integer)fBPartner_ID.getValue();
|
C_BPartner_ID = (Integer)fBPartner_ID.getValue();
|
||||||
|
|
||||||
if (C_BPartner_ID != null)
|
if (C_BPartner_ID != null)
|
||||||
|
@ -291,7 +291,7 @@ public class InfoAssetPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
|
|
||||||
Integer M_Product_ID = null;
|
Integer M_Product_ID = null;
|
||||||
|
|
||||||
if (fProduct_ID.getDisplay() != "")
|
if (!"".equals(fProduct_ID.getDisplay()))
|
||||||
M_Product_ID = (Integer)fProduct_ID.getValue();
|
M_Product_ID = (Integer)fProduct_ID.getValue();
|
||||||
|
|
||||||
if (M_Product_ID != null)
|
if (M_Product_ID != null)
|
||||||
|
|
|
@ -318,10 +318,10 @@ public class InfoCashLinePanel extends InfoPanel implements ValueChangeListener,
|
||||||
if (fName.getText().length() > 0)
|
if (fName.getText().length() > 0)
|
||||||
sql.append(" AND UPPER(c.Name) LIKE ?");
|
sql.append(" AND UPPER(c.Name) LIKE ?");
|
||||||
|
|
||||||
if (fCashBook_ID.getDisplay() != "")
|
if (!"".equals(fCashBook_ID.getDisplay()))
|
||||||
sql.append(" AND c.C_CashBook_ID=?");
|
sql.append(" AND c.C_CashBook_ID=?");
|
||||||
|
|
||||||
if (fInvoice_ID.getDisplay() != "")
|
if (!"".equals(fInvoice_ID.getDisplay()))
|
||||||
sql.append(" AND cl.C_Invoice_ID=?");
|
sql.append(" AND cl.C_Invoice_ID=?");
|
||||||
|
|
||||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||||
|
|
|
@ -299,7 +299,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
if (fPOReference.getText().length() > 0)
|
if (fPOReference.getText().length() > 0)
|
||||||
sql.append(" AND UPPER(i.POReference) LIKE ?");
|
sql.append(" AND UPPER(i.POReference) LIKE ?");
|
||||||
|
|
||||||
if (fBPartner_ID.getDisplay() != "")
|
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||||
sql.append(" AND i.C_BPartner_ID=?");
|
sql.append(" AND i.C_BPartner_ID=?");
|
||||||
|
|
||||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||||
|
@ -343,7 +343,7 @@ public class InfoInOutPanel extends InfoPanel implements ValueChangeListener, Ev
|
||||||
if (fPOReference.getText().length() > 0)
|
if (fPOReference.getText().length() > 0)
|
||||||
pstmt.setString(index++, getSQLText(fPOReference));
|
pstmt.setString(index++, getSQLText(fPOReference));
|
||||||
|
|
||||||
if (fBPartner_ID.getDisplay() != "")
|
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||||
{
|
{
|
||||||
Integer bp = (Integer)fBPartner_ID.getValue();
|
Integer bp = (Integer)fBPartner_ID.getValue();
|
||||||
pstmt.setInt(index++, bp.intValue());
|
pstmt.setInt(index++, bp.intValue());
|
||||||
|
|
|
@ -1093,6 +1093,9 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
||||||
contentPanel.setSelectedIndex(0);
|
contentPanel.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (event.getName().equals(Events.ON_CHANGE))
|
||||||
|
{
|
||||||
|
}
|
||||||
//default
|
//default
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1108,9 +1111,11 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
||||||
progressWindow.doHighlighted();
|
progressWindow.doHighlighted();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hideBusyDialog() {
|
private void hideBusyDialog() {
|
||||||
progressWindow.dispose();
|
if (progressWindow != null) {
|
||||||
progressWindow = null;
|
progressWindow.dispose();
|
||||||
|
progressWindow = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onQueryCallback()
|
public void onQueryCallback()
|
||||||
|
|
|
@ -306,16 +306,22 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
if (fDocumentNo.getText().length() > 0)
|
if (fDocumentNo.getText().length() > 0)
|
||||||
sql.append(" AND UPPER(p.DocumentNo) LIKE ?");
|
sql.append(" AND UPPER(p.DocumentNo) LIKE ?");
|
||||||
|
|
||||||
if (fBPartner_ID.getDisplay() != "")
|
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||||
sql.append(" AND p.C_BPartner_ID=?");
|
sql.append(" AND p.C_BPartner_ID=?");
|
||||||
|
|
||||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||||
{
|
{
|
||||||
Date f = fDateFrom.getValue();
|
Timestamp from = null;
|
||||||
Timestamp from = new Timestamp(f.getTime());
|
if (fDateFrom.getValue() != null) {
|
||||||
|
Date f = fDateFrom.getValue();
|
||||||
|
from = new Timestamp(f.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
Date t = fDateTo.getValue();
|
Timestamp to = null;
|
||||||
Timestamp to = new Timestamp(t.getTime());
|
if (fDateTo.getValue() != null) {
|
||||||
|
Date t = fDateTo.getValue();
|
||||||
|
to = new Timestamp(t.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
if (from == null && to != null)
|
if (from == null && to != null)
|
||||||
sql.append(" AND TRUNC(p.DateTrx) <= ?");
|
sql.append(" AND TRUNC(p.DateTrx) <= ?");
|
||||||
|
@ -325,7 +331,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
sql.append(" AND TRUNC(p.DateTrx) BETWEEN ? AND ?");
|
sql.append(" AND TRUNC(p.DateTrx) BETWEEN ? AND ?");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fAmtFrom.getText() != "" || fAmtTo.getText() != "")
|
if (!"".equals(fAmtFrom.getText()) || !"".equals(fAmtTo.getText()))
|
||||||
{
|
{
|
||||||
BigDecimal from = new BigDecimal(fAmtFrom.getValue());
|
BigDecimal from = new BigDecimal(fAmtFrom.getValue());
|
||||||
BigDecimal to = new BigDecimal(fAmtTo.getValue());
|
BigDecimal to = new BigDecimal(fAmtTo.getValue());
|
||||||
|
@ -359,7 +365,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
if (fDocumentNo.getText().length() > 0)
|
if (fDocumentNo.getText().length() > 0)
|
||||||
pstmt.setString(index++, getSQLText(fDocumentNo));
|
pstmt.setString(index++, getSQLText(fDocumentNo));
|
||||||
|
|
||||||
if (fBPartner_ID.getDisplay() != "")
|
if (!"".equals(fBPartner_ID.getDisplay()))
|
||||||
{
|
{
|
||||||
Integer bp = (Integer)fBPartner_ID.getValue();
|
Integer bp = (Integer)fBPartner_ID.getValue();
|
||||||
pstmt.setInt(index++, bp.intValue());
|
pstmt.setInt(index++, bp.intValue());
|
||||||
|
@ -368,11 +374,17 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
|
|
||||||
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
if (fDateFrom.getValue() != null || fDateTo.getValue() != null)
|
||||||
{
|
{
|
||||||
Date f = fDateFrom.getValue();
|
Timestamp from = null;
|
||||||
Timestamp from = new Timestamp(f.getTime());
|
if (fDateFrom.getValue() != null) {
|
||||||
|
Date f = fDateFrom.getValue();
|
||||||
|
from = new Timestamp(f.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
Date t = fDateTo.getValue();
|
Timestamp to = null;
|
||||||
Timestamp to = new Timestamp(t.getTime());
|
if (fDateTo.getValue() != null) {
|
||||||
|
Date t = fDateTo.getValue();
|
||||||
|
to = new Timestamp(t.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
log.fine("Date From=" + from + ", To=" + to);
|
log.fine("Date From=" + from + ", To=" + to);
|
||||||
|
|
||||||
|
@ -387,7 +399,7 @@ public class InfoPaymentPanel extends InfoPanel implements ValueChangeListener,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fAmtFrom.getText() != "" || fAmtTo.getText() != "")
|
if (!"".equals(fAmtFrom.getText()) || !"".equals(fAmtTo.getText()))
|
||||||
{
|
{
|
||||||
BigDecimal from = new BigDecimal(fAmtFrom.getValue());
|
BigDecimal from = new BigDecimal(fAmtFrom.getValue());
|
||||||
BigDecimal to = new BigDecimal(fAmtTo.getValue());
|
BigDecimal to = new BigDecimal(fAmtTo.getValue());
|
||||||
|
|
|
@ -34,6 +34,7 @@ import java.util.logging.Level;
|
||||||
import org.adempiere.webui.AdempiereIdGenerator;
|
import org.adempiere.webui.AdempiereIdGenerator;
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
|
import org.adempiere.webui.component.Button;
|
||||||
import org.adempiere.webui.component.Combobox;
|
import org.adempiere.webui.component.Combobox;
|
||||||
import org.adempiere.webui.component.ConfirmPanel;
|
import org.adempiere.webui.component.ConfirmPanel;
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
|
@ -47,6 +48,7 @@ import org.adempiere.webui.theme.ITheme;
|
||||||
import org.adempiere.webui.theme.ThemeManager;
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.util.BrowserToken;
|
import org.adempiere.webui.util.BrowserToken;
|
||||||
import org.adempiere.webui.util.UserPreference;
|
import org.adempiere.webui.util.UserPreference;
|
||||||
|
import org.adempiere.webui.window.FDialog;
|
||||||
import org.adempiere.webui.window.LoginWindow;
|
import org.adempiere.webui.window.LoginWindow;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.model.MClient;
|
import org.compiere.model.MClient;
|
||||||
|
@ -236,8 +238,14 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
|
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||||
ConfirmPanel pnlButtons = new ConfirmPanel(false);
|
ConfirmPanel pnlButtons = new ConfirmPanel();
|
||||||
pnlButtons.addActionListener(this);
|
pnlButtons.addActionListener(this);
|
||||||
|
|
||||||
|
Button helpButton = pnlButtons.createButton(ConfirmPanel.A_HELP);
|
||||||
|
helpButton.addEventListener(Events.ON_CLICK, this);
|
||||||
|
helpButton.setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||||
|
pnlButtons.addComponentsRight(helpButton);
|
||||||
|
|
||||||
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
|
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
|
||||||
pnlButtons.setWidth(null);
|
pnlButtons.setWidth(null);
|
||||||
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||||
|
@ -372,6 +380,10 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
{
|
{
|
||||||
validateLogin();
|
validateLogin();
|
||||||
}
|
}
|
||||||
|
else if (event.getTarget().getId().equals(ConfirmPanel.A_HELP))
|
||||||
|
{
|
||||||
|
openLoginHelp();
|
||||||
|
}
|
||||||
else if (event.getName().equals(Events.ON_SELECT))
|
else if (event.getName().equals(Events.ON_SELECT))
|
||||||
{
|
{
|
||||||
if(eventComp.getId().equals(lstLanguage.getId())) {
|
if(eventComp.getId().equals(lstLanguage.getId())) {
|
||||||
|
@ -405,6 +417,17 @@ public class LoginPanel extends Window implements EventListener<Event>
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openLoginHelp() {
|
||||||
|
String helpURL = MSysConfig.getValue("LOGIN_HELP_URL", "http://wiki.idempiere.org/wiki/Login_Help");
|
||||||
|
try {
|
||||||
|
Executions.getCurrent().sendRedirect(helpURL, "_blank");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
String message = e.getMessage();
|
||||||
|
FDialog.warn(0, this, "URLnotValid", message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onUserIdChange(int AD_User_ID) {
|
private void onUserIdChange(int AD_User_ID) {
|
||||||
String userName = txtUserId.getValue();
|
String userName = txtUserId.getValue();
|
||||||
if (userName != null && userName.length() > 0 && AD_User_ID < 0)
|
if (userName != null && userName.length() > 0 && AD_User_ID < 0)
|
||||||
|
|
|
@ -1385,7 +1385,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
||||||
m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
|
m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
|
||||||
infoName, infoDisplay, infoDisplay_to, and, openBrackets);
|
infoName, infoDisplay, infoDisplay_to, and, openBrackets);
|
||||||
}
|
}
|
||||||
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op)) {
|
else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].getValue().equals(Operator)) {
|
||||||
if (!(parsedValue instanceof Integer)) {
|
if (!(parsedValue instanceof Integer)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -24,48 +24,40 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
<span class="section-head">Initially you can log into the system with the following users:
|
<span class="section-head">Initially you can log into the system with the following users:
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<table border="thin" cellpadding="5" cellspacing="0" style="margin-top: 10px; font-size: 8pt; background-color: transparent; border: 1px solid lightgray; border-collapse: collapse;">
|
<table cellpadding="5" cellspacing="0" style="margin-top: 10px; font-size: 8pt; background-color: transparent;">
|
||||||
|
|
||||||
<tbody><tr valign="top">
|
<tbody><tr valign="top">
|
||||||
<th ><i><b>Usage</b></i>
|
|
||||||
</th><th><i><b>User</b></i>
|
</th><th><i><b>User</b></i>
|
||||||
|
</th><th><i><b>EMail</b></i>
|
||||||
</th><th><i><b>Password</b></i>
|
</th><th><i><b>Password</b></i>
|
||||||
</th></tr>
|
</th></tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>System Management
|
</td><td>GardenAdmin
|
||||||
</td><td>System
|
</td><td>admin @ gardenworld.com
|
||||||
</td><td>System
|
</td><td>GardenAdmin
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
<tr valign="top">
|
||||||
|
</td><td>GardenUser
|
||||||
|
</td><td>user @ gardenworld.com
|
||||||
|
</td><td>GardenUser
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>System Management or any role/company
|
|
||||||
</td><td>SuperUser
|
</td><td>SuperUser
|
||||||
|
</td><td>superuser @ idempiere.com
|
||||||
</td><td>System
|
</td><td>System
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
|
</td><td>System
|
||||||
<td>Sample Client Administration
|
</td><td>system @ idempiere.com
|
||||||
</td><td>GardenAdmin
|
</td><td>System
|
||||||
</td><td>GardenAdmin
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr valign="top">
|
|
||||||
<td>Sample Client User
|
|
||||||
</td><td>GardenUser
|
|
||||||
</td><td>GardenUser
|
|
||||||
</td></tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
]]>
|
]]>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -9,7 +9,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
<?component name="loginLinks" inline="true" macroURI="login-links.zul"?>
|
<?component name="loginLinks" inline="true" macroURI="login-links.zul"?>
|
||||||
<div>
|
<div>
|
||||||
<vendorLogo/>
|
<vendorLogo/>
|
||||||
<loginInfo if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName == "127.0.0.1"}"/>
|
<loginInfo if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}"/>
|
||||||
<versionInfo/>
|
<versionInfo/>
|
||||||
<loginLinks/>
|
<loginLinks/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="loginLinksBox" if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName == "127.0.0.1"}"
|
<div class="loginLinksBox" if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}"
|
||||||
style="position: absolute; bottom: 5px;">
|
style="position: absolute; bottom: 5px;">
|
||||||
|
|
||||||
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
||||||
|
@ -25,11 +25,11 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
image="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png"
|
image="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
/>
|
/>
|
||||||
<button href="http://www.adempiere.org" image="images/AD32.png"
|
<button href="http://www.idempiere.org" image="images/AD32.png"
|
||||||
tooltiptext="ADempiere Community" style="height:32px; width:32px" target="_blank"/>
|
tooltiptext="iDempiere Community" style="height:32px; width:32px" target="_blank"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<zscript if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName == "127.0.0.1"}">
|
<zscript if="${desktop.execution.localName == "ip-10-8-0-1.ec2.internal" or desktop.execution.localName.startsWith("demo.")}">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
||||||
]]>
|
]]>
|
||||||
|
|
|
@ -14,7 +14,16 @@ Copyright (C) 2009 Idalica Corporation
|
||||||
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1em; font-weight: bold;" />
|
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1em; font-weight: bold;" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 90px" if="${desktop.execution.localName != "ip-10-8-0-1.ec2.internal"}">
|
<div style="background-color: #E5E5E5; margin: 5px;"
|
||||||
|
if="${desktop.execution.localName.startsWith("demo.")}">
|
||||||
|
<hbox align="center">
|
||||||
|
<toolbarbutton
|
||||||
|
href="http://www.idempiere.org" image="http://www.idempiere.org/_/rsrc/1341897488671/config/customLogo.gif?revision=2" target="_blank"/>
|
||||||
|
<label value="iDempiere Online Demonstration"
|
||||||
|
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1.5em; font-weight: bold;" />
|
||||||
|
</hbox>
|
||||||
|
</div>
|
||||||
|
<div style="height: 90px" if="${desktop.execution.localName != "ip-10-8-0-1.ec2.internal" and ! desktop.execution.localName.startsWith("demo.")}">
|
||||||
<space/>
|
<space/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue