IDEMPIERE-2450 Enable Zoom for Record_ID on HTML Reports / thanks to Deepak Pansheriya and Adaxa for seed patch
This commit is contained in:
parent
ee91d259f6
commit
ac0845314c
|
@ -39,7 +39,7 @@ public class PrintDataElement implements Serializable
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 2177482817458457236L;
|
private static final long serialVersionUID = -2121125127301364735L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print Data Element Constructor
|
* Print Data Element Constructor
|
||||||
|
@ -129,6 +129,13 @@ public class PrintDataElement implements Serializable
|
||||||
return m_foreignColumnName;
|
return m_foreignColumnName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set ForeignName
|
||||||
|
* @return name
|
||||||
|
*/
|
||||||
|
public void setForeignColumnName(String foreignColumnName) {
|
||||||
|
m_foreignColumnName = foreignColumnName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Node Value
|
* Get Node Value
|
||||||
|
|
|
@ -72,6 +72,7 @@ import org.compiere.model.MPaySelectionCheck;
|
||||||
import org.compiere.model.MProject;
|
import org.compiere.model.MProject;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
import org.compiere.model.MRfQResponse;
|
import org.compiere.model.MRfQResponse;
|
||||||
|
import org.compiere.model.MTable;
|
||||||
import org.compiere.model.PrintInfo;
|
import org.compiere.model.PrintInfo;
|
||||||
|
|
||||||
import static org.compiere.model.SystemIDs.*;
|
import static org.compiere.model.SystemIDs.*;
|
||||||
|
@ -660,7 +661,25 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
||||||
if (cssPrefix != null)
|
if (cssPrefix != null)
|
||||||
href.setClass(cssPrefix + "-href");
|
href.setClass(cssPrefix + "-href");
|
||||||
|
|
||||||
|
if (item.getColumnName().equals("Record_ID")) {
|
||||||
|
Object tablePDE = m_printData.getNode("AD_Table_ID");
|
||||||
|
if (tablePDE != null && tablePDE instanceof PrintDataElement) {
|
||||||
|
int tableID = -1;
|
||||||
|
try {
|
||||||
|
tableID = Integer.parseInt(((PrintDataElement)tablePDE).getValueAsString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
tableID = -1;
|
||||||
|
}
|
||||||
|
if (tableID > 0) {
|
||||||
|
MTable mTable = MTable.get(getCtx(), tableID);
|
||||||
|
String foreignColumnName = mTable.getTableName() + "_ID";
|
||||||
|
pde.setForeignColumnName(foreignColumnName);
|
||||||
extension.extendIDColumn(row, td, href, pde);
|
extension.extendIDColumn(row, td, href, pde);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
extension.extendIDColumn(row, td, href, pde);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue