Merge with 953e38a41ffdc47e8890daf31c1ec60ff8cf3b05
This commit is contained in:
commit
1ca7cd5112
|
@ -107,7 +107,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3825605601192688998L;
|
||||
private static final long serialVersionUID = 6841849146086698231L;
|
||||
|
||||
public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate";
|
||||
|
||||
|
@ -2342,10 +2342,19 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
e.Record_ID = getValue(m_keyColumnName);
|
||||
// Info
|
||||
StringBuffer info = new StringBuffer(getTableName());
|
||||
|
||||
/* get UUID */
|
||||
PO po = m_mTable.getPO(m_currentRow);
|
||||
if (po != null) {
|
||||
String uuidcol = po.getUUIDColumnName();
|
||||
String uuid = po.get_ValueAsString(uuidcol);
|
||||
info.append("\n ").append(uuidcol).append("=").append(uuid);
|
||||
}
|
||||
|
||||
// We have a key column
|
||||
if (m_keyColumnName != null && m_keyColumnName.length() > 0)
|
||||
{
|
||||
info.append(" - ")
|
||||
info.append("\n ")
|
||||
.append(m_keyColumnName).append("=").append(e.Record_ID);
|
||||
}
|
||||
else // we have multiple parents
|
||||
|
@ -2353,7 +2362,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
for (int i = 0; i < m_parents.size(); i++)
|
||||
{
|
||||
String keyCol = (String)m_parents.get(i);
|
||||
info.append(" - ")
|
||||
info.append(i == 0 ? "\n " : " - ")
|
||||
.append(keyCol).append("=").append(getValue(keyCol));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,9 +90,9 @@ public class GridTable extends AbstractTableModel
|
|||
implements Serializable, SystemIDs
|
||||
{
|
||||
/**
|
||||
* generated
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7799823493936826600L;
|
||||
private static final long serialVersionUID = 4648364477309024202L;
|
||||
|
||||
public static final String DATA_REFRESH_MESSAGE = "Refreshed";
|
||||
|
||||
|
@ -2568,13 +2568,7 @@ public class GridTable extends AbstractTableModel
|
|||
MSort sort = (MSort)m_sort.get(row);
|
||||
Object[] rowData = getDataAtRow(row);
|
||||
//
|
||||
MTable table = MTable.get (m_ctx, m_AD_Table_ID);
|
||||
PO po = null;
|
||||
int Record_ID = getKeyID(row);
|
||||
if (Record_ID != -1)
|
||||
po = table.getPO(Record_ID, null);
|
||||
else // Multi - Key
|
||||
po = table.getPO(getWhereClause(rowData), null);
|
||||
PO po = getPO(row);
|
||||
|
||||
// Delete via PO
|
||||
if (po != null)
|
||||
|
@ -3699,4 +3693,15 @@ public class GridTable extends AbstractTableModel
|
|||
return bChanged;
|
||||
}
|
||||
|
||||
public PO getPO(int row) {
|
||||
MTable table = MTable.get (m_ctx, m_AD_Table_ID);
|
||||
PO po = null;
|
||||
int Record_ID = getKeyID(row);
|
||||
if (Record_ID != -1)
|
||||
po = table.getPO(Record_ID, null);
|
||||
else // Multi - Key
|
||||
po = table.getPO(getWhereClause(getDataAtRow(row)), null);
|
||||
return po;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2112,6 +2112,8 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
// Void Confirmations
|
||||
setDocStatus(DOCSTATUS_Reversed); // need to set & save docstatus to be able to check it in MInOutConfirm.voidIt()
|
||||
saveEx();
|
||||
//FR1948157
|
||||
this.setReversal_ID(reversal.getM_InOut_ID());
|
||||
voidConfirmations();
|
||||
|
||||
// After reverseCorrect
|
||||
|
@ -2120,8 +2122,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
return false;
|
||||
|
||||
m_processMsg = reversal.getDocumentNo();
|
||||
//FR1948157
|
||||
this.setReversal_ID(reversal.getM_InOut_ID());
|
||||
setProcessed(true);
|
||||
setDocStatus(DOCSTATUS_Reversed); // may come from void
|
||||
setDocAction(DOCACTION_None);
|
||||
|
|
|
@ -116,7 +116,7 @@ public class MRecentItem extends X_AD_RecentItem
|
|||
}
|
||||
//
|
||||
MRecentItem retValue = null;
|
||||
String sql = "SELECT * FROM AD_RecentItem WHERE AD_Table_ID=? AND Record_ID=? AND AD_User_ID=?";
|
||||
String sql = "SELECT * FROM AD_RecentItem WHERE AD_Table_ID=? AND Record_ID=? AND NVL(AD_User_ID,0)=?";
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
|
@ -185,10 +185,10 @@ public class MRecentItem extends X_AD_RecentItem
|
|||
int maxri = MSysConfig.getIntValue("RecentItems_MaxSaved", 50, AD_Client_ID);
|
||||
if (maxri < 0)
|
||||
maxri = 0;
|
||||
int cntri = DB.getSQLValue(null, "SELECT COUNT(*) FROM AD_RecentItem WHERE AD_User_ID=? AND AD_Client_ID=?", AD_User_ID, AD_Client_ID);
|
||||
int cntri = DB.getSQLValue(null, "SELECT COUNT(*) FROM AD_RecentItem WHERE NVL(AD_User_ID,0)=? AND AD_Client_ID=?", AD_User_ID, AD_Client_ID);
|
||||
if (cntri > maxri) {
|
||||
int cntdel = cntri - maxri;
|
||||
String sql = "SELECT AD_Table_ID, Record_ID FROM AD_RecentItem WHERE AD_User_ID=? AND AD_Client_ID=? ORDER BY Updated";
|
||||
String sql = "SELECT AD_Table_ID, Record_ID FROM AD_RecentItem WHERE NVL(AD_User_ID,0)=? AND AD_Client_ID=? ORDER BY Updated";
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
|
@ -226,7 +226,7 @@ public class MRecentItem extends X_AD_RecentItem
|
|||
}
|
||||
|
||||
public static List<MRecentItem> getFromUser(Properties ctx, int AD_User_ID) {
|
||||
List<MRecentItem> ris = new Query(ctx, MRecentItem.Table_Name, "AD_User_ID=?", null)
|
||||
List<MRecentItem> ris = new Query(ctx, MRecentItem.Table_Name, "NVL(AD_User_ID,0)=?", null)
|
||||
.setOnlyActiveRecords(true)
|
||||
.setClient_ID()
|
||||
.setParameters(AD_User_ID)
|
||||
|
|
|
@ -444,7 +444,7 @@ public final class VPanel extends CTabbedPane
|
|||
{
|
||||
CLabel label = new CLabel(fieldGroup, CLabel.LEADING);
|
||||
label.setFont(AdempierePLAF.getFont_Label().deriveFont(Font.BOLDITALIC, AdempierePLAF.getFont_Label().getSize2D()));
|
||||
m_main.add(label, "newline, alignx leading");
|
||||
m_main.add(label, "newline, spanx, growx");
|
||||
m_main.add(new JSeparator(), "newline, spanx, growx");
|
||||
// reset
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class VMemo extends CTextArea
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -1589654941310687511L;
|
||||
private static final long serialVersionUID = -7168406072766858933L;
|
||||
|
||||
/**
|
||||
* Mouse Listener
|
||||
|
@ -156,7 +156,7 @@ public class VMemo extends CTextArea
|
|||
|
||||
private String m_columnName;
|
||||
private String m_oldText = "";
|
||||
private boolean m_firstChange;
|
||||
private volatile boolean m_setting = false;
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(VMemo.class);
|
||||
|
||||
|
@ -167,7 +167,8 @@ public class VMemo extends CTextArea
|
|||
public void setValue(Object value)
|
||||
{
|
||||
super.setValue(value);
|
||||
m_firstChange = true;
|
||||
if (m_setting)
|
||||
return;
|
||||
// Always position Top
|
||||
setCaretPosition(0);
|
||||
} // setValue
|
||||
|
@ -266,14 +267,13 @@ public class VMemo extends CTextArea
|
|||
*/
|
||||
public void focusLost (FocusEvent e)
|
||||
{
|
||||
// Indicate Change
|
||||
log.fine( "focusLost");
|
||||
m_setting = true;
|
||||
try
|
||||
{
|
||||
String text = getText();
|
||||
fireVetoableChange(m_columnName, text, null); // No data committed - done when focus lost !!!
|
||||
fireVetoableChange(m_columnName, m_oldText, getText());
|
||||
}
|
||||
catch (PropertyVetoException pve) {}
|
||||
m_setting = false;
|
||||
} // focusLost
|
||||
|
||||
/*************************************************************************/
|
||||
|
|
|
@ -130,7 +130,7 @@ public class Viewer extends CFrame
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7306392362119021781L;
|
||||
private static final long serialVersionUID = 3453340777183200393L;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
|
@ -451,9 +451,14 @@ public class Viewer extends CFrame
|
|||
{
|
||||
log.log(Level.SEVERE, sql, e);
|
||||
}
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.addItem(pp);
|
||||
// IDEMPIERE-297 - Check for Table Access and Window Access for New Report
|
||||
if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false)
|
||||
&& MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))
|
||||
{
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.addItem(pp);
|
||||
}
|
||||
if (selectValue != null)
|
||||
comboReport.setSelectedItem(selectValue);
|
||||
comboReport.addActionListener(this);
|
||||
|
|
|
@ -110,8 +110,8 @@ public final class UserPreference implements Serializable {
|
|||
* save user preference
|
||||
*/
|
||||
public void savePreference() {
|
||||
if (m_AD_User_ID > 0) {
|
||||
Query query = new Query(Env.getCtx(), I_AD_Preference.Table_Name, "AD_User_ID = ? AND Attribute = ? AND AD_Window_ID Is NULL", null);
|
||||
if (m_AD_User_ID >= 0) {
|
||||
Query query = new Query(Env.getCtx(), I_AD_Preference.Table_Name, "NVL(AD_User_ID,0) = ? AND Attribute = ? AND AD_Window_ID Is NULL", null);
|
||||
for (int i = 0; i < PROPERTIES.length; i++) {
|
||||
String attribute = PROPERTIES[i];
|
||||
String value = props.getProperty(attribute);
|
||||
|
@ -137,11 +137,11 @@ public final class UserPreference implements Serializable {
|
|||
* @param AD_User_ID
|
||||
*/
|
||||
public void loadPreference(int AD_User_ID) {
|
||||
if (AD_User_ID > 0) {
|
||||
if (AD_User_ID >= 0) {
|
||||
m_AD_User_ID = AD_User_ID;
|
||||
props = new Properties();
|
||||
|
||||
Query query = new Query(Env.getCtx(), I_AD_Preference.Table_Name, "AD_User_ID = ? AND Attribute = ? AND AD_Window_ID Is NULL", null);
|
||||
Query query = new Query(Env.getCtx(), I_AD_Preference.Table_Name, "NVL(AD_User_ID,0) = ? AND Attribute = ? AND AD_Window_ID Is NULL", null);
|
||||
|
||||
for (int i = 0; i < PROPERTIES.length; i++) {
|
||||
String attribute = PROPERTIES[i];
|
||||
|
|
|
@ -77,13 +77,13 @@ import org.zkoss.zk.ui.ext.render.DynamicMedia;
|
|||
import org.zkoss.zul.A;
|
||||
import org.zkoss.zul.Borderlayout;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.North;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Filedownload;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Iframe;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Menuitem;
|
||||
import org.zkoss.zul.North;
|
||||
import org.zkoss.zul.Separator;
|
||||
import org.zkoss.zul.South;
|
||||
import org.zkoss.zul.Tab;
|
||||
|
@ -115,7 +115,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7554542090648903080L;
|
||||
private static final long serialVersionUID = 2079827289589862794L;
|
||||
|
||||
/** Window No */
|
||||
private int m_WindowNo = -1;
|
||||
|
@ -547,9 +547,14 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
{
|
||||
log.log(Level.SEVERE, sql, e);
|
||||
}
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.appendItem(pp.getName(), pp.getKey());
|
||||
// IDEMPIERE-297 - Check for Table Access and Window Access for New Report
|
||||
if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false)
|
||||
&& MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))
|
||||
{
|
||||
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **");
|
||||
KeyNamePair pp = new KeyNamePair(-1, sb.toString());
|
||||
comboReport.appendItem(pp.getName(), pp.getKey());
|
||||
}
|
||||
comboReport.addEventListener(Events.ON_SELECT, this);
|
||||
} // fillComboReport
|
||||
|
||||
|
|
Loading…
Reference in New Issue