diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java index fefb3c228b..fe688a8d93 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java @@ -26,10 +26,12 @@ package org.compiere.process; import java.sql.Connection; +import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.logging.Level; +import org.compiere.db.AdempiereDatabase; import org.compiere.model.MColumn; import org.compiere.model.MTable; import org.compiere.util.AdempiereUserError; @@ -308,7 +310,7 @@ public class ColumnEncryption extends SvrProcess { StringBuilder selectSql = new StringBuilder(); selectSql.append("SELECT ").append(idColumnName).append(",").append(columnName).append(",AD_Client_ID"); selectSql.append(" FROM ").append(tableName); - selectSql.append(" ORDER BY ").append(idColumnName); + selectSql.append(" ORDER BY 1"); StringBuilder updateSql = new StringBuilder(); updateSql.append("UPDATE ").append(tableName); @@ -464,11 +466,29 @@ public class ColumnEncryption extends SvrProcess { // Select SQL 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 StringBuilder alterSql = new StringBuilder(); alterSql.append("ALTER TABLE ").append(tableName); alterSql.append(" MODIFY ").append(columnName); - alterSql.append(" NVARCHAR2("); + alterSql.append(" ").append(dataType).append("("); alterSql.append(length).append(") "); // Update SQL diff --git a/org.adempiere.base/src/org/compiere/report/FinReport.java b/org.adempiere.base/src/org/compiere/report/FinReport.java index 7fc00af44f..b0a81e7db7 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReport.java +++ b/org.adempiere.base/src/org/compiere/report/FinReport.java @@ -313,12 +313,12 @@ public class FinReport extends SvrProcess int PA_ReportLineSet_ID = m_report.getLineSet().getPA_ReportLineSet_ID(); StringBuffer sql = new StringBuffer ("INSERT INTO T_Report " + "(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 " + "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); - 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); // ** Get Data ** Segment Values @@ -890,10 +890,10 @@ public class FinReport extends SvrProcess continue; String colsql = "SELECT a." + oper2col + " FROM T_Report a " + " 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() + - " AND COALESCE(trlb.Name, b.Name) = ?"; - BigDecimal value2 = DB.getSQLValueBD(get_TrxName(), colsql, oper2Line); + " AND (trlb.Name = ? OR b.Name = ?)"; + BigDecimal value2 = DB.getSQLValueBDEx(get_TrxName(), colsql, Env.getAD_Language(Env.getCtx()), oper2Line, oper2Line); if (value2 != null && value2.signum() != 0) oper2 = value2.toPlainString(); @@ -1030,16 +1030,16 @@ public class FinReport extends SvrProcess boolean lteq = true; //less than or equal to String seqsql = "SELECT b.seqNo FROM T_Report a " + " 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() + - " AND COALESCE(trlb.Name,b.Name) = ?"; + " AND (trlb.Name = ? OR b.Name = ?)"; int seqNo = -1; try { seqNo = Integer.parseInt(multi[0].trim()); } catch (Exception e) {} 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) continue; @@ -1063,7 +1063,7 @@ public class FinReport extends SvrProcess } catch (Exception e) {} 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) continue; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index 281f85a737..3cb0b98746 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -341,13 +341,20 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene appendRecordLogInfo(pi.getLogs(), infoResultContent); bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter")); - bOK.setImage(ThemeManager.getThemeResource("images/Reset16.png")); bOK.setDisabled(false); bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Close")); - bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png")); 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; m_ids = pi.getIDs(); @@ -458,10 +465,17 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene isParameterPage = true; 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.setImage(ThemeManager.getThemeResource("images/Cancel16.png")); + + 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")); + } //recreate process info ProcessInfo m_pi = new WProcessInfo(getName(), getAD_Process_ID()); diff --git a/org.idempiere.equinox.p2.director-feature/update-prd.bat b/org.idempiere.equinox.p2.director-feature/update-prd.bat index dfdcffea4c..0feca56ba7 100644 --- a/org.idempiere.equinox.p2.director-feature/update-prd.bat +++ b/org.idempiere.equinox.p2.director-feature/update-prd.bat @@ -11,5 +11,5 @@ cd %~dp0 @FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c @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 -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% -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% -i %PACK% diff --git a/org.idempiere.equinox.p2.director-feature/update-prd.sh b/org.idempiere.equinox.p2.director-feature/update-prd.sh index a8aa4e76b5..8ea34aacaf 100644 --- a/org.idempiere.equinox.p2.director-feature/update-prd.sh +++ b/org.idempiere.equinox.p2.director-feature/update-prd.sh @@ -5,5 +5,5 @@ cd $(dirname "${0}") DESTINATION=$(pwd) 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 -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i $2 \ No newline at end of file +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 -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 \ No newline at end of file