Merge release-7.1 into master
This commit is contained in:
commit
02647cc5ee
|
@ -26,10 +26,12 @@
|
||||||
package org.compiere.process;
|
package org.compiere.process;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
import java.sql.DatabaseMetaData;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.db.AdempiereDatabase;
|
||||||
import org.compiere.model.MColumn;
|
import org.compiere.model.MColumn;
|
||||||
import org.compiere.model.MTable;
|
import org.compiere.model.MTable;
|
||||||
import org.compiere.util.AdempiereUserError;
|
import org.compiere.util.AdempiereUserError;
|
||||||
|
@ -308,7 +310,7 @@ public class ColumnEncryption extends SvrProcess {
|
||||||
StringBuilder selectSql = new StringBuilder();
|
StringBuilder selectSql = new StringBuilder();
|
||||||
selectSql.append("SELECT ").append(idColumnName).append(",").append(columnName).append(",AD_Client_ID");
|
selectSql.append("SELECT ").append(idColumnName).append(",").append(columnName).append(",AD_Client_ID");
|
||||||
selectSql.append(" FROM ").append(tableName);
|
selectSql.append(" FROM ").append(tableName);
|
||||||
selectSql.append(" ORDER BY ").append(idColumnName);
|
selectSql.append(" ORDER BY 1");
|
||||||
|
|
||||||
StringBuilder updateSql = new StringBuilder();
|
StringBuilder updateSql = new StringBuilder();
|
||||||
updateSql.append("UPDATE ").append(tableName);
|
updateSql.append("UPDATE ").append(tableName);
|
||||||
|
@ -464,11 +466,29 @@ public class ColumnEncryption extends SvrProcess {
|
||||||
// Select SQL
|
// Select SQL
|
||||||
String selectSql = "SELECT FieldLength FROM AD_Column WHERE AD_Column_ID=?";
|
String selectSql = "SELECT FieldLength FROM AD_Column WHERE AD_Column_ID=?";
|
||||||
|
|
||||||
|
String dataType = "NVARCHAR2";
|
||||||
|
if (DB.isOracle()) {
|
||||||
|
Connection conn = Trx.get(get_TrxName(), false).getConnection();
|
||||||
|
AdempiereDatabase db = DB.getDatabase();
|
||||||
|
DatabaseMetaData md = conn.getMetaData();
|
||||||
|
String catalog = db.getCatalog();
|
||||||
|
String schema = db.getSchema();
|
||||||
|
ResultSet rs = null;
|
||||||
|
try {
|
||||||
|
rs = md.getColumns(catalog, schema, tableName.toUpperCase(), columnName.toUpperCase());
|
||||||
|
if (rs.next()) {
|
||||||
|
dataType = rs.getString ("TYPE_NAME");
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
DB.close(rs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Alter SQL
|
// Alter SQL
|
||||||
StringBuilder alterSql = new StringBuilder();
|
StringBuilder alterSql = new StringBuilder();
|
||||||
alterSql.append("ALTER TABLE ").append(tableName);
|
alterSql.append("ALTER TABLE ").append(tableName);
|
||||||
alterSql.append(" MODIFY ").append(columnName);
|
alterSql.append(" MODIFY ").append(columnName);
|
||||||
alterSql.append(" NVARCHAR2(");
|
alterSql.append(" ").append(dataType).append("(");
|
||||||
alterSql.append(length).append(") ");
|
alterSql.append(length).append(") ");
|
||||||
|
|
||||||
// Update SQL
|
// Update SQL
|
||||||
|
|
|
@ -313,12 +313,12 @@ public class FinReport extends SvrProcess
|
||||||
int PA_ReportLineSet_ID = m_report.getLineSet().getPA_ReportLineSet_ID();
|
int PA_ReportLineSet_ID = m_report.getLineSet().getPA_ReportLineSet_ID();
|
||||||
StringBuffer sql = new StringBuffer ("INSERT INTO T_Report "
|
StringBuffer sql = new StringBuffer ("INSERT INTO T_Report "
|
||||||
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID, SeqNo,LevelNo, Name,Description) "
|
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID, SeqNo,LevelNo, Name,Description) "
|
||||||
+ "SELECT ").append(getAD_PInstance_ID()).append(", rl.PA_ReportLine_ID, 0,0, rl.SeqNo,0, COALESCE(trl.Name, rl.Name) as Name, COALESCE(trl.Description,rl.Description) as Description "
|
+ "SELECT ").append(getAD_PInstance_ID()).append(", rl.PA_ReportLine_ID, 0,0, rl.SeqNo,0, NVL(trl.Name, rl.Name) as Name, NVL(trl.Description,rl.Description) as Description "
|
||||||
+ "FROM PA_ReportLine rl "
|
+ "FROM PA_ReportLine rl "
|
||||||
+ "LEFT JOIN PA_ReportLine_Trl trl ON trl.PA_ReportLine_ID = rl.PA_ReportLine_ID AND trl.AD_Language = '" + Env.getAD_Language(Env.getCtx()) + "' "
|
+ "LEFT JOIN PA_ReportLine_Trl trl ON trl.PA_ReportLine_ID = rl.PA_ReportLine_ID AND trl.AD_Language = '" + Env.getAD_Language(Env.getCtx()) + "' "
|
||||||
+ "WHERE rl.IsActive='Y' AND rl.PA_ReportLineSet_ID=").append(PA_ReportLineSet_ID);
|
+ "WHERE rl.IsActive='Y' AND rl.PA_ReportLineSet_ID=").append(PA_ReportLineSet_ID);
|
||||||
|
|
||||||
int no = DB.executeUpdate(sql.toString(), get_TrxName());
|
int no = DB.executeUpdateEx(sql.toString(), get_TrxName());
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Report Lines = " + no);
|
if (log.isLoggable(Level.FINE)) log.fine("Report Lines = " + no);
|
||||||
|
|
||||||
// ** Get Data ** Segment Values
|
// ** Get Data ** Segment Values
|
||||||
|
@ -890,10 +890,10 @@ public class FinReport extends SvrProcess
|
||||||
continue;
|
continue;
|
||||||
String colsql = "SELECT a." + oper2col + " FROM T_Report a " +
|
String colsql = "SELECT a." + oper2col + " FROM T_Report a " +
|
||||||
" INNER JOIN PA_ReportLine b ON a.PA_ReportLine_ID = b.PA_ReportLine_ID " +
|
" INNER JOIN PA_ReportLine b ON a.PA_ReportLine_ID = b.PA_ReportLine_ID " +
|
||||||
" LEFT JOIN PA_ReportLine trlb ON trlb.PA_ReportLine_ID = b.PA_ReportLine_ID AND trlb.AD_Language = '" + Env.getLanguage(Env.getCtx()) + "' " +
|
" LEFT JOIN PA_ReportLine_Trl trlb ON trlb.PA_ReportLine_ID = b.PA_ReportLine_ID AND trlb.AD_Language = ? " +
|
||||||
" WHERE a.AD_PInstance_ID = " + getAD_PInstance_ID() +
|
" WHERE a.AD_PInstance_ID = " + getAD_PInstance_ID() +
|
||||||
" AND COALESCE(trlb.Name, b.Name) = ?";
|
" AND (trlb.Name = ? OR b.Name = ?)";
|
||||||
BigDecimal value2 = DB.getSQLValueBD(get_TrxName(), colsql, oper2Line);
|
BigDecimal value2 = DB.getSQLValueBDEx(get_TrxName(), colsql, Env.getAD_Language(Env.getCtx()), oper2Line, oper2Line);
|
||||||
if (value2 != null && value2.signum() != 0)
|
if (value2 != null && value2.signum() != 0)
|
||||||
oper2 = value2.toPlainString();
|
oper2 = value2.toPlainString();
|
||||||
|
|
||||||
|
@ -1030,16 +1030,16 @@ public class FinReport extends SvrProcess
|
||||||
boolean lteq = true; //less than or equal to
|
boolean lteq = true; //less than or equal to
|
||||||
String seqsql = "SELECT b.seqNo FROM T_Report a " +
|
String seqsql = "SELECT b.seqNo FROM T_Report a " +
|
||||||
" INNER JOIN PA_ReportLine b ON a.PA_ReportLine_ID = b.PA_ReportLine_ID " +
|
" INNER JOIN PA_ReportLine b ON a.PA_ReportLine_ID = b.PA_ReportLine_ID " +
|
||||||
" LEFT JOIN PA_ReportLine trlb ON trlb.PA_ReportLine_ID = b.PA_ReportLine_ID AND trlb.AD_Language = '" + Env.getLanguage(Env.getCtx()) + "' " +
|
" LEFT JOIN PA_ReportLine_Trl trlb ON trlb.PA_ReportLine_ID = b.PA_ReportLine_ID AND trlb.AD_Language = ? " +
|
||||||
" WHERE a.AD_PInstance_ID = " + getAD_PInstance_ID() +
|
" WHERE a.AD_PInstance_ID = " + getAD_PInstance_ID() +
|
||||||
" AND COALESCE(trlb.Name,b.Name) = ?";
|
" AND (trlb.Name = ? OR b.Name = ?)";
|
||||||
int seqNo = -1;
|
int seqNo = -1;
|
||||||
try {
|
try {
|
||||||
seqNo = Integer.parseInt(multi[0].trim());
|
seqNo = Integer.parseInt(multi[0].trim());
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {}
|
||||||
if (seqNo == -1)
|
if (seqNo == -1)
|
||||||
{
|
{
|
||||||
seqNo = DB.getSQLValue(get_TrxName(), seqsql, multi[0].trim());
|
seqNo = DB.getSQLValueEx(get_TrxName(), seqsql, Env.getAD_Language(Env.getCtx()), multi[0].trim(), multi[0].trim());
|
||||||
}
|
}
|
||||||
if (seqNo < 0)
|
if (seqNo < 0)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1063,7 +1063,7 @@ public class FinReport extends SvrProcess
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {}
|
||||||
if (seqNo == -1)
|
if (seqNo == -1)
|
||||||
{
|
{
|
||||||
seqNo = DB.getSQLValue(get_TrxName(), seqsql, multi[i].trim());
|
seqNo = DB.getSQLValueEx(get_TrxName(), seqsql, Env.getAD_Language(Env.getCtx()), multi[i].trim(), multi[i].trim());
|
||||||
}
|
}
|
||||||
if (seqNo < 0)
|
if (seqNo < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -341,13 +341,20 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
appendRecordLogInfo(pi.getLogs(), infoResultContent);
|
appendRecordLogInfo(pi.getLogs(), infoResultContent);
|
||||||
|
|
||||||
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
|
||||||
bOK.setImage(ThemeManager.getThemeResource("images/Reset16.png"));
|
|
||||||
bOK.setDisabled(false);
|
bOK.setDisabled(false);
|
||||||
|
|
||||||
bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Close"));
|
bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Close"));
|
||||||
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
|
|
||||||
bCancel.setDisabled(false);
|
bCancel.setDisabled(false);
|
||||||
|
|
||||||
|
if (ThemeManager.isUseFontIconForImage()) {
|
||||||
|
String iconSclass = "z-icon-Reset";
|
||||||
|
bOK.setIconSclass(iconSclass);
|
||||||
|
LayoutUtils.addSclass("font-icon-toolbar-button", bOK);
|
||||||
|
} else {
|
||||||
|
bOK.setImage(ThemeManager.getThemeResource("images/Reset16.png"));
|
||||||
|
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
|
||||||
|
}
|
||||||
|
|
||||||
isParameterPage = false;
|
isParameterPage = false;
|
||||||
|
|
||||||
m_ids = pi.getIDs();
|
m_ids = pi.getIDs();
|
||||||
|
@ -458,10 +465,17 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
|
||||||
isParameterPage = true;
|
isParameterPage = true;
|
||||||
|
|
||||||
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Start"));
|
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Start"));
|
||||||
bOK.setImage(ThemeManager.getThemeResource("images/Ok16.png"));
|
|
||||||
|
|
||||||
bCancel.setLabel(Util.cleanAmp(Msg.translate(Env.getCtx(), ConfirmPanel.A_CANCEL)));
|
bCancel.setLabel(Util.cleanAmp(Msg.translate(Env.getCtx(), ConfirmPanel.A_CANCEL)));
|
||||||
|
|
||||||
|
if (ThemeManager.isUseFontIconForImage()) {
|
||||||
|
String iconSclass = "z-icon-Ok";
|
||||||
|
bOK.setIconSclass(iconSclass);
|
||||||
|
LayoutUtils.addSclass("font-icon-toolbar-button", bOK);
|
||||||
|
} else {
|
||||||
|
bOK.setImage(ThemeManager.getThemeResource("images/Ok16.png"));
|
||||||
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
|
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
|
||||||
|
}
|
||||||
|
|
||||||
//recreate process info
|
//recreate process info
|
||||||
ProcessInfo m_pi = new WProcessInfo(getName(), getAD_Process_ID());
|
ProcessInfo m_pi = new WProcessInfo(getName(), getAD_Process_ID());
|
||||||
|
|
|
@ -11,5 +11,5 @@ cd %~dp0
|
||||||
|
|
||||||
@FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
|
@FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
|
||||||
@echo JARFILE = %JARFILE%
|
@echo JARFILE = %JARFILE%
|
||||||
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %REPO% -u %PACK%
|
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -profile DefaultProfile -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %REPO% -u %PACK%
|
||||||
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %REPO% -i %PACK%
|
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -profile DefaultProfile -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %REPO% -i %PACK%
|
||||||
|
|
|
@ -5,5 +5,5 @@ cd $(dirname "${0}")
|
||||||
DESTINATION=$(pwd)
|
DESTINATION=$(pwd)
|
||||||
|
|
||||||
VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true"
|
VMOPTS="-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true"
|
||||||
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u $2
|
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -profile DefaultProfile -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u $2
|
||||||
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i $2
|
java $VMOPTS -jar plugins/org.eclipse.equinox.launcher_1.*.jar -install director -profile DefaultProfile -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i $2
|
Loading…
Reference in New Issue