IDEMPIERE-1878:Printformat name in login language

This commit is contained in:
hieplq 2014-05-28 00:29:49 +07:00
parent b44121fac6
commit c6b0e769d0
2 changed files with 6 additions and 3 deletions

View File

@ -1166,7 +1166,6 @@ public class MPrintFormat extends X_AD_PrintFormat
String sqlWhere = " WHERE AD_Table_ID=? AND IsTableBased='Y' ";
if (AD_Window_ID > 0)
sqlWhere += "AND (AD_Window_ID=? OR AD_Window_ID IS NULL) ";
sqlWhere = sqlWhere + "ORDER BY AD_Client_ID DESC, IsDefault DESC, Name"; // Own First
//
sqlWhere = MRole.getDefault().addAccessSQL (
sqlWhere, "AD_PrintFormat", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
@ -1186,6 +1185,8 @@ public class MPrintFormat extends X_AD_PrintFormat
query.setParameters(lsParameter);
query.setOrderBy(" ORDER BY AD_Client_ID DESC, IsDefault DESC, Name ");
// query print fomart just in this client
List<MPrintFormat> lsPrintFormat = query.setClient_ID().list();
MPrintFormat newPrintFormat = null;

View File

@ -598,7 +598,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
// fill Report Options
String sql = MRole.getDefault().addAccessSQL(
"SELECT AD_PrintFormat_ID, Name, Description "
"SELECT * "
+ "FROM AD_PrintFormat "
+ "WHERE AD_Table_ID=? "
//Added Lines by Armen
@ -619,7 +619,9 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
rs = pstmt.executeQuery();
while (rs.next())
{
KeyNamePair pp = new KeyNamePair(rs.getInt(1), rs.getString(2));
MPrintFormat printFormat = new MPrintFormat (Env.getCtx(), rs, null);
KeyNamePair pp = new KeyNamePair(printFormat.get_ID(), printFormat.get_Translation(MPrintFormat.COLUMNNAME_Name));
Listitem li = comboReport.appendItem(pp.getName(), pp.getKey());
if (rs.getInt(1) == AD_PrintFormat_ID)
{