hg merge release-1.0c (merge release1 into release2)
This commit is contained in:
commit
e471faf00a
|
@ -0,0 +1,10 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Jan 23, 2014 12:54:26 PM SGT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2014-01-23 12:54:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50152
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201401231413_1003322.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,7 @@
|
|||
-- Jan 23, 2014 12:54:26 PM SGT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2014-01-23 12:54:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50152
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201401231413_1003322.sql') FROM dual
|
||||
;
|
|
@ -90,7 +90,7 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
protected String doIt() throws Exception {
|
||||
StringBuilder sql = new StringBuilder();
|
||||
StringBuilder sqlupd = new StringBuilder();
|
||||
StringBuilder sqldel = new StringBuilder();
|
||||
String sqldel;
|
||||
StringBuilder sqlins = new StringBuilder();
|
||||
int cntu = 0;
|
||||
int cntd = 0;
|
||||
|
@ -233,12 +233,10 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
// Delete Old Data
|
||||
//
|
||||
if (p_DeleteOld.equals("Y")) {
|
||||
sqldel.append("DELETE M_ProductPrice ")
|
||||
.append(" WHERE M_PriceList_Version_ID = ")
|
||||
.append(p_PriceList_Version_ID);
|
||||
cntd = DB.executeUpdate(sqldel.toString(), get_TrxName());
|
||||
sqldel = "DELETE M_ProductPrice WHERE M_PriceList_Version_ID=?";
|
||||
cntd = DB.executeUpdate(sqldel, p_PriceList_Version_ID, get_TrxName());
|
||||
if (cntd == -1)
|
||||
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
|
||||
raiseError(" DELETE M_ProductPrice ", sqldel);
|
||||
totd += cntd;
|
||||
message = new StringBuilder("@Deleted@=").append(cntd).append(" - ");
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||
|
@ -287,12 +285,10 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
//
|
||||
//Clear Temporary Table
|
||||
//
|
||||
sqldel = new StringBuilder("DELETE FROM T_Selection WHERE AD_PInstance_ID=");
|
||||
sqldel.append(m_AD_PInstance_ID);
|
||||
|
||||
cntd = DB.executeUpdate(sqldel.toString(), get_TrxName());
|
||||
sqldel = "DELETE FROM T_Selection WHERE AD_PInstance_ID=?";
|
||||
cntd = DB.executeUpdate(sqldel, m_AD_PInstance_ID, get_TrxName());
|
||||
if (cntd == -1)
|
||||
raiseError(" DELETE T_Selection ", sqldel.toString());
|
||||
raiseError(" DELETE T_Selection ", sqldel);
|
||||
totd += cntd;
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||
//
|
||||
|
@ -404,15 +400,10 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
v_temp = rsCurgen.getInt("M_PriceList_Version_Base_ID");
|
||||
if (rsCurgen.wasNull() || v_temp != p_PriceList_Version_ID) {
|
||||
|
||||
sqldel = new StringBuilder("DELETE M_ProductPrice pp");
|
||||
sqldel.append(" WHERE pp.M_PriceList_Version_ID = ");
|
||||
sqldel.append(p_PriceList_Version_ID);
|
||||
sqldel.append(" AND EXISTS (SELECT t_selection_id FROM T_Selection s WHERE pp.M_Product_ID=s.T_Selection_ID");
|
||||
sqldel.append(" AND s.AD_PInstance_ID=").append(m_AD_PInstance_ID).append(")");
|
||||
|
||||
cntd = DB.executeUpdate(sqldel.toString(), get_TrxName());
|
||||
sqldel = "DELETE M_ProductPrice pp WHERE pp.M_PriceList_Version_ID=? AND EXISTS (SELECT t_selection_id FROM T_Selection s WHERE pp.M_Product_ID=s.T_Selection_ID AND s.AD_PInstance_ID=?)";
|
||||
cntd = DB.executeUpdate(sqldel, new Object[]{p_PriceList_Version_ID, m_AD_PInstance_ID}, false, get_TrxName());
|
||||
if (cntd == -1)
|
||||
raiseError(" DELETE M_ProductPrice ", sqldel.toString());
|
||||
raiseError(" DELETE M_ProductPrice ", sqldel);
|
||||
totd += cntd;
|
||||
message.append(", @Deleted@=").append(cntd);
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||
|
@ -831,10 +822,10 @@ public class M_PriceList_Create extends SvrProcess {
|
|||
//
|
||||
// Delete Temporary Selection
|
||||
//
|
||||
sqldel = new StringBuilder("DELETE FROM T_Selection ");
|
||||
cntd = DB.executeUpdate(sqldel.toString(), get_TrxName());
|
||||
sqldel = "DELETE FROM T_Selection WHERE AD_PInstance_ID=?";
|
||||
cntd = DB.executeUpdate(sqldel, m_AD_PInstance_ID, get_TrxName());
|
||||
if (cntd == -1)
|
||||
raiseError(" DELETE T_Selection ", sqldel.toString());
|
||||
raiseError(" DELETE T_Selection ", sqldel);
|
||||
totd += cntd;
|
||||
if (log.isLoggable(Level.FINE)) log.fine("Deleted " + cntd);
|
||||
|
||||
|
|
|
@ -115,6 +115,8 @@ public class StatementProxy implements InvocationHandler {
|
|||
logOperation = "Delete";
|
||||
}
|
||||
if (logOperation != null) {
|
||||
int idxspace = logSql.indexOf(' ');
|
||||
if (idxspace > 0)
|
||||
logSql = logSql.substring(0, logSql.indexOf(' '));
|
||||
if (log.isLoggable(Level.FINE)) log.fine((DisplayType.getDateFormat(DisplayType.DateTime)).format(new Date(System.currentTimeMillis()))+","+logOperation+","+logSql+","+(p_vo.getTrxName() != null ? p_vo.getTrxName() : "")+" (begin)");
|
||||
}
|
||||
|
|
|
@ -867,7 +867,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
|||
enforce = false;
|
||||
// Check Price Limit?
|
||||
if (enforce && getPriceLimit() != Env.ZERO
|
||||
&& getPriceEntered().compareTo(getPriceLimit()) < 0)
|
||||
&& getPriceActual().compareTo(getPriceLimit()) < 0)
|
||||
{
|
||||
log.saveError("UnderLimitPrice", "PriceEntered=" + getPriceEntered() + ", PriceLimit=" + getPriceLimit());
|
||||
return false;
|
||||
|
|
|
@ -877,7 +877,7 @@ public class MOrderLine extends X_C_OrderLine
|
|||
enforce = false;
|
||||
// Check Price Limit?
|
||||
if (enforce && getPriceLimit() != Env.ZERO
|
||||
&& getPriceEntered().compareTo(getPriceLimit()) < 0)
|
||||
&& getPriceActual().compareTo(getPriceLimit()) < 0)
|
||||
{
|
||||
log.saveError("UnderLimitPrice", "PriceEntered=" + getPriceEntered() + ", PriceLimit=" + getPriceLimit());
|
||||
return false;
|
||||
|
|
|
@ -138,6 +138,7 @@ public class DataEngine
|
|||
*/
|
||||
public PrintData getPrintData (Properties ctx, MPrintFormat format, MQuery query, boolean summary)
|
||||
{
|
||||
MQuery queryCopy = query.deepCopy();
|
||||
|
||||
/** Report Summary FR [ 2011569 ]**/
|
||||
m_summary = summary;
|
||||
|
@ -167,7 +168,7 @@ public class DataEngine
|
|||
// Add WhereClause restriction from AD_ReportView - teo_sarca BF [ 1761891 ]
|
||||
String whereClause = rs.getString(4);
|
||||
if (!Util.isEmpty(whereClause))
|
||||
query.addRestriction(whereClause);
|
||||
queryCopy.addRestriction(whereClause);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
|
@ -196,11 +197,11 @@ public class DataEngine
|
|||
if (hasVT)
|
||||
{
|
||||
tableName += "t";
|
||||
format.setTranslationViewQuery (query);
|
||||
format.setTranslationViewQuery (queryCopy);
|
||||
}
|
||||
}
|
||||
//
|
||||
PrintData pd = getPrintDataInfo (ctx, format, query, reportName, tableName);
|
||||
PrintData pd = getPrintDataInfo (ctx, format, queryCopy, reportName, tableName);
|
||||
if (pd == null)
|
||||
return null;
|
||||
loadPrintData(pd, format);
|
||||
|
|
|
@ -31,7 +31,7 @@ public class PoExporter {
|
|||
try {
|
||||
//default trim to false for print item label since trailing space is commonly use
|
||||
//for formatting purpose
|
||||
if (qName.equalsIgnoreCase("PrintName")) {
|
||||
if (qName.equalsIgnoreCase("PrintName") || qName.equalsIgnoreCase("UserLevel")) {
|
||||
atts.addAttribute("", "", "trim", "CDATA", "false");
|
||||
}
|
||||
transformerHandler.startElement("", "", qName, atts);
|
||||
|
|
Loading…
Reference in New Issue