Merge ced6213e57fb
This commit is contained in:
commit
b0fe14d87e
|
@ -0,0 +1,13 @@
|
|||
-- Jan 18, 2013 11:37:40 AM PST
|
||||
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
|
||||
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_DATE('2013-01-18 11:37:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50023
|
||||
;
|
||||
|
||||
-- Jan 18, 2013 11:37:44 AM PST
|
||||
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
|
||||
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_DATE('2013-01-18 11:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50022
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201301181138_IDEMPIERE-567.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
-- Jan 18, 2013 11:37:40 AM PST
|
||||
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
|
||||
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_TIMESTAMP('2013-01-18 11:37:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50023
|
||||
;
|
||||
|
||||
-- Jan 18, 2013 11:37:44 AM PST
|
||||
-- IDEMPIERE-567 Move ProductUOMConversionRateValidate sysconfig key to be client configurable
|
||||
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_TIMESTAMP('2013-01-18 11:37:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=50022
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201301181138_IDEMPIERE-567.sql') FROM dual
|
||||
;
|
||||
|
|
@ -476,6 +476,7 @@ public class MCost extends X_M_Cost
|
|||
sql.append(" ORDER BY i.DateInvoiced DESC, il.Line DESC");
|
||||
//
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement (sql.toString(), product.get_TrxName());
|
||||
|
@ -485,26 +486,18 @@ public class MCost extends X_M_Cost
|
|||
pstmt.setInt (3, AD_Org_ID);
|
||||
else if (M_ASI_ID != 0)
|
||||
pstmt.setInt(3, M_ASI_ID);
|
||||
ResultSet rs = pstmt.executeQuery ();
|
||||
rs = pstmt.executeQuery ();
|
||||
if (rs.next ())
|
||||
retValue = rs.getBigDecimal(1);
|
||||
rs.close ();
|
||||
pstmt.close ();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
s_log.log (Level.SEVERE, sql.toString(), e);
|
||||
}
|
||||
try
|
||||
finally
|
||||
{
|
||||
if (pstmt != null)
|
||||
pstmt.close ();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
pstmt = null;
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
|
||||
if (retValue != null)
|
||||
|
@ -653,11 +646,12 @@ public class MCost extends X_M_Cost
|
|||
+ " AND EXISTS (SELECT * FROM M_CostDetail cd "
|
||||
+ "WHERE p.M_Product_ID=cd.M_Product_ID AND Processed='N')";
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement (sql, trxNameUsed);
|
||||
pstmt.setInt (1, client.getAD_Client_ID());
|
||||
ResultSet rs = pstmt.executeQuery ();
|
||||
rs = pstmt.executeQuery ();
|
||||
while (rs.next ())
|
||||
{
|
||||
MProduct product = new MProduct (client.getCtx(), rs, trxNameUsed);
|
||||
|
@ -668,24 +662,16 @@ public class MCost extends X_M_Cost
|
|||
s_log.info(product.getName() + " = " + cost);
|
||||
}
|
||||
}
|
||||
rs.close ();
|
||||
pstmt.close ();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
s_log.log (Level.SEVERE, sql, e);
|
||||
success = false;
|
||||
}
|
||||
try
|
||||
finally
|
||||
{
|
||||
if (pstmt != null)
|
||||
pstmt.close ();
|
||||
pstmt = null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
pstmt = null;
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
// Transaction
|
||||
if (trx != null)
|
||||
|
|
|
@ -702,7 +702,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
|
|||
return false;
|
||||
}
|
||||
// Enforce Product UOM
|
||||
if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionUOMValidate, true))
|
||||
if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionUOMValidate, true, getAD_Client_ID()))
|
||||
{
|
||||
if (getM_Product_ID() != 0
|
||||
&& (newRecord || is_ValueChanged("M_Product_ID")))
|
||||
|
@ -718,7 +718,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
|
|||
}
|
||||
|
||||
// The Product UoM needs to be the smallest UoM - Multiplier must be < 0; Divider must be > 0
|
||||
if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionRateValidate, true))
|
||||
if (MSysConfig.getBooleanValue(MSysConfig.ProductUOMConversionRateValidate, true, getAD_Client_ID()))
|
||||
{
|
||||
if (getM_Product_ID() != 0 && getDivideRate().compareTo(Env.ONE) < 0)
|
||||
{
|
||||
|
|
|
@ -13,12 +13,13 @@
|
|||
*****************************************************************************/
|
||||
package org.adempiere.webui.dashboard;
|
||||
|
||||
import static org.compiere.model.SystemIDs.TREE_MENUPRIMARY;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
import org.adempiere.util.Callback;
|
||||
import org.adempiere.webui.adwindow.ADWindow;
|
||||
import org.adempiere.webui.exception.ApplicationException;
|
||||
import org.adempiere.webui.panel.TreeSearchPanel;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.model.GridTab;
|
||||
|
@ -26,7 +27,6 @@ import org.compiere.model.MMenu;
|
|||
import org.compiere.model.MQuery;
|
||||
import org.compiere.model.MTree;
|
||||
import org.compiere.model.MTreeNode;
|
||||
import static org.compiere.model.SystemIDs.*;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
|
@ -38,7 +38,6 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.A;
|
||||
import org.zkoss.zul.Box;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Image;
|
||||
import org.zkoss.zul.Label;
|
||||
|
@ -217,24 +216,6 @@ public class DPFavourites extends DashboardPanel implements EventListener<Event>
|
|||
|
||||
addItem(treeitem);
|
||||
}
|
||||
else if(dragged instanceof Combobox)
|
||||
{
|
||||
TreeSearchPanel tsp = null;
|
||||
Component parent = dragged.getParent();
|
||||
while(tsp == null && parent != null) {
|
||||
if (parent instanceof TreeSearchPanel) {
|
||||
tsp = (TreeSearchPanel) parent;
|
||||
} else {
|
||||
parent = parent.getParent();
|
||||
}
|
||||
}
|
||||
if (tsp != null) {
|
||||
Treeitem treeitem = tsp.getSelectedItem();
|
||||
if (treeitem != null) {
|
||||
addItem(treeitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(comp instanceof Image)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue