hg merge release-2.1 (merge release2.1 into development)

This commit is contained in:
Carlos Ruiz 2015-07-01 21:05:10 -05:00
commit c30cffc2a6
25 changed files with 243 additions and 113 deletions

View File

@ -0,0 +1,31 @@
update ad_document_action_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_document_action_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_document_action_access.ad_role_id)
;
update ad_form_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_form_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_form_access.ad_role_id)
;
update ad_infowindow_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_infowindow_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_infowindow_access.ad_role_id)
;
update ad_process_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_process_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_process_access.ad_role_id)
;
update ad_task_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_task_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_task_access.ad_role_id)
;
update ad_window_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_window_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_window_access.ad_role_id)
;
update ad_workflow_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_workflow_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_workflow_access.ad_role_id)
;
SELECT register_migration_script('201507010933_IDEMPIERE-2672_fixWrongAccessRecords.sql') FROM dual
;

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-2635
-- Jul 1, 2015 7:54:49 PM COT
UPDATE AD_Column SET FieldLength=255, IsToolbarButton='N',Updated=TO_DATE('2015-07-01 19:54:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745
;
-- Jul 1, 2015 7:54:52 PM COT
ALTER TABLE WS_WebService_Para MODIFY ConstantValue VARCHAR2(255) DEFAULT NULL
;
SELECT register_migration_script('201507011955_IDEMPIERE-2635.sql') FROM dual
;

View File

@ -0,0 +1,31 @@
update ad_document_action_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_document_action_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_document_action_access.ad_role_id)
;
update ad_form_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_form_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_form_access.ad_role_id)
;
update ad_infowindow_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_infowindow_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_infowindow_access.ad_role_id)
;
update ad_process_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_process_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_process_access.ad_role_id)
;
update ad_task_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_task_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_task_access.ad_role_id)
;
update ad_window_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_window_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_window_access.ad_role_id)
;
update ad_workflow_access set ad_client_id=(select ad_client_id from ad_role where ad_role.ad_role_id=ad_workflow_access.ad_role_id)
where ad_client_id<>(select ad_client_id from ad_role where ad_role.ad_role_id=ad_workflow_access.ad_role_id)
;
SELECT register_migration_script('201507010933_IDEMPIERE-2672_fixWrongAccessRecords.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- IDEMPIERE-2635
-- Jul 1, 2015 7:54:49 PM COT
UPDATE AD_Column SET FieldLength=255, IsToolbarButton='N',Updated=TO_TIMESTAMP('2015-07-01 19:54:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56745
;
-- Jul 1, 2015 7:54:52 PM COT
INSERT INTO t_alter_column values('ws_webservice_para','ConstantValue','VARCHAR(255)',null,'NULL')
;
SELECT register_migration_script('201507011955_IDEMPIERE-2635.sql') FROM dual
;

View File

@ -234,8 +234,6 @@ public class CalloutInvoice extends CalloutEngine
s = rs.getString("POReference");
if (s != null && s.length() != 0)
mTab.setValue("POReference", s);
else
mTab.setValue("POReference", null);
// SO Description
s = rs.getString("SO_Description");
if (s != null && s.trim().length() != 0)

View File

@ -387,6 +387,8 @@ public class CalloutInvoiceBatch extends CalloutEngine
}
}
if (TaxAmt == null)
TaxAmt = BigDecimal.ZERO;
//
if (IsTaxIncluded)
{

View File

@ -373,11 +373,6 @@ public class CalloutOrder extends CalloutEngine
String s = rs.getString("POReference");
if (s != null && s.length() != 0)
mTab.setValue("POReference", s);
// should not be reset to null if we entered already value! VHARCQ, accepted YS makes sense that way
// TODO: should get checked and removed if no longer needed!
/*else
mTab.setValue("POReference", null);*/
// SO Description
s = rs.getString("SO_Description");
if (s != null && s.trim().length() != 0)
@ -570,8 +565,6 @@ public class CalloutOrder extends CalloutEngine
String s = rs.getString("POReference");
if (s != null && s.length() != 0)
mTab.setValue("POReference", s);
else
mTab.setValue("POReference", null);
// SO Description
s = rs.getString("SO_Description");
if (s != null && s.trim().length() != 0)

View File

@ -685,54 +685,64 @@ public class M_PriceList_Create extends SvrProcess {
sqlpc.append(" WHERE s.T_Selection_ID=p.M_Product_ID");
sqlpc.append(" AND s.AD_PInstance_ID=").append(m_AD_PInstance_ID + ")");
PreparedStatement ps = DB.prepareStatement(sqlpc.toString(), get_TrxName());
ResultSet rs = ps.executeQuery();
while(rs.next())
{
int M_Product_ID = rs.getInt(MProductPrice.COLUMNNAME_M_Product_ID);
ProductCost m_productCost = new ProductCost (getCtx(), M_Product_ID, 0, get_TrxName());
m_productCost.setQty(BigDecimal.ONE);
BigDecimal costs = m_productCost.getProductCosts(as, rsCurgen.getInt("AD_Org_ID"), null, 0, false);
if (costs == null || costs.signum() == 0) // zero costs OK
PreparedStatement ps = null;
ResultSet rs = null;
try{
ps = DB.prepareStatement(sqlpc.toString(), get_TrxName());
rs = ps.executeQuery();
while(rs.next())
{
MProduct product = new MProduct(getCtx(), M_Product_ID, get_TrxName());
if (product.isStocked())
log.log(Level.WARNING, "No Costs for " + product.getName());
}
else
{
sqlupd = new StringBuilder("UPDATE M_ProductPrice p ");
sqlupd.append(" SET PriceList = (DECODE('").append(rsDiscountLine.getString(MDiscountSchemaLine.COLUMNNAME_List_Base)).append("', 'P', ?, PriceList) + ?) * (1 - ?/100), ");
sqlupd.append(" PriceStd = (DECODE('").append(rsDiscountLine.getString(MDiscountSchemaLine.COLUMNNAME_Std_Base)).append("', 'P', ?, PriceStd) + ?) * (1 - ?/100),");
sqlupd.append(" PriceLimit = (DECODE('").append(rsDiscountLine.getString(MDiscountSchemaLine.COLUMNNAME_Limit_Base)).append("', 'P', ?, PriceLimit) + ?) * (1 - ?/100)");
sqlupd.append(" WHERE M_PriceList_Version_ID=").append(p_PriceList_Version_ID);
sqlupd.append(" AND M_Product_ID = ?");
sqlupd.append(" AND EXISTS (SELECT * FROM T_Selection s");
sqlupd.append(" WHERE s.T_Selection_ID=p.M_Product_ID");
sqlupd.append(" AND s.AD_PInstance_ID=").append(m_AD_PInstance_ID + ")");
int M_Product_ID = rs.getInt(MProductPrice.COLUMNNAME_M_Product_ID);
ProductCost m_productCost = new ProductCost (getCtx(), M_Product_ID, 0, get_TrxName());
m_productCost.setQty(BigDecimal.ONE);
BigDecimal costs = m_productCost.getProductCosts(as, rsCurgen.getInt("AD_Org_ID"), null, 0, false);
pstmu = DB.prepareStatement(sqlupd.toString(),
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, get_TrxName());
pstmu.setBigDecimal(1, costs);
pstmu.setDouble(2, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_List_AddAmt));
pstmu.setDouble(3, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_List_Discount));
pstmu.setBigDecimal(4, costs);
pstmu.setDouble(5, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Std_AddAmt));
pstmu.setDouble(6, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Std_Discount));
pstmu.setBigDecimal(7, costs);
pstmu.setDouble(8, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Limit_AddAmt));
pstmu.setDouble(9, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Limit_Discount));
pstmu.setInt(10, M_Product_ID);
cntu = pstmu.executeUpdate();
if (cntu == -1)
raiseError("Update M_ProductPrice ", sqlupd.toString());
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
if (costs == null || costs.signum() == 0) // zero costs OK
{
MProduct product = new MProduct(getCtx(), M_Product_ID, get_TrxName());
if (product.isStocked())
log.log(Level.WARNING, "No Costs for " + product.getName());
}
else
{
sqlupd = new StringBuilder("UPDATE M_ProductPrice p ");
sqlupd.append(" SET PriceList = (DECODE('").append(rsDiscountLine.getString(MDiscountSchemaLine.COLUMNNAME_List_Base)).append("', 'P', ?, PriceList) + ?) * (1 - ?/100), ");
sqlupd.append(" PriceStd = (DECODE('").append(rsDiscountLine.getString(MDiscountSchemaLine.COLUMNNAME_Std_Base)).append("', 'P', ?, PriceStd) + ?) * (1 - ?/100),");
sqlupd.append(" PriceLimit = (DECODE('").append(rsDiscountLine.getString(MDiscountSchemaLine.COLUMNNAME_Limit_Base)).append("', 'P', ?, PriceLimit) + ?) * (1 - ?/100)");
sqlupd.append(" WHERE M_PriceList_Version_ID=").append(p_PriceList_Version_ID);
sqlupd.append(" AND M_Product_ID = ?");
sqlupd.append(" AND EXISTS (SELECT * FROM T_Selection s");
sqlupd.append(" WHERE s.T_Selection_ID=p.M_Product_ID");
sqlupd.append(" AND s.AD_PInstance_ID=").append(m_AD_PInstance_ID + ")");
pstmu = DB.prepareStatement(sqlupd.toString(),
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE, get_TrxName());
pstmu.setBigDecimal(1, costs);
pstmu.setDouble(2, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_List_AddAmt));
pstmu.setDouble(3, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_List_Discount));
pstmu.setBigDecimal(4, costs);
pstmu.setDouble(5, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Std_AddAmt));
pstmu.setDouble(6, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Std_Discount));
pstmu.setBigDecimal(7, costs);
pstmu.setDouble(8, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Limit_AddAmt));
pstmu.setDouble(9, rsDiscountLine.getDouble(MDiscountSchemaLine.COLUMNNAME_Limit_Discount));
pstmu.setInt(10, M_Product_ID);
cntu = pstmu.executeUpdate();
if (cntu == -1)
raiseError("Update M_ProductPrice ", sqlupd.toString());
if (log.isLoggable(Level.FINE)) log.fine("Updated " + cntu);
}
}
} catch (SQLException e) {
throw e;
} finally {
DB.close(rs, ps);
rs = null; ps = null;
}
}

View File

@ -48,7 +48,7 @@ public class MColumn extends X_AD_Column
/**
*
*/
private static final long serialVersionUID = -4372212315789445915L;
private static final long serialVersionUID = -7470893214933465732L;
/**
* Get MColumn from Cache
@ -830,4 +830,10 @@ public class MColumn extends X_AD_Column
}
}
@Override
public I_AD_Table getAD_Table() throws RuntimeException {
MTable table = MTable.get(getCtx(), getAD_Table_ID());
return table;
}
} // MColumn

View File

@ -1016,13 +1016,13 @@ public class MInvoiceLine extends X_C_InvoiceLine
{
if (isProcessed())
return "Processed";
MLandedCost[] lcs = MLandedCost.getLandedCosts(this);
if (lcs.length == 0)
return "";
StringBuilder sql = new StringBuilder("DELETE C_LandedCostAllocation WHERE C_InvoiceLine_ID=").append(getC_InvoiceLine_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0)
if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no);
MLandedCost[] lcs = MLandedCost.getLandedCosts(this);
if (lcs.length == 0)
return "";
int inserted = 0;
// *** Single Criteria ***

View File

@ -25,7 +25,7 @@ public class MRefTable extends X_AD_Ref_Table
/**
*
*/
private static final long serialVersionUID = 9123965213307214868L;
private static final long serialVersionUID = 380648726485603193L;
/**
* Standard Constructor
@ -57,4 +57,10 @@ public class MRefTable extends X_AD_Ref_Table
super (ctx, rs, trxName);
} // MRefTable
@Override
public I_AD_Table getAD_Table() throws RuntimeException {
MTable table = MTable.get(getCtx(), getAD_Table_ID());
return table;
}
} // MRefTable

View File

@ -707,7 +707,8 @@ public class MUOMConversion extends X_C_UOM_Conversion
if (getM_Product_ID() != 0
&& (newRecord || is_ValueChanged("M_Product_ID")))
{
MProduct product = MProduct.get(getCtx(), getM_Product_ID());
// Check of product must be in the same transaction as the conversion being saved
MProduct product = new MProduct(getCtx(), getM_Product_ID(), get_TrxName());
if (product.getC_UOM_ID() != getC_UOM_ID())
{
MUOM uom = MUOM.get(getCtx(), product.getC_UOM_ID());

View File

@ -19,6 +19,7 @@ import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import org.compiere.util.CCache;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Evaluatee;
@ -60,6 +61,9 @@ public class MZoomCondition extends X_AD_ZoomCondition
super (ctx, rs, trxName);
} // MZoomCondition
/** Cache of Table Conditions Array **/
private static CCache<Integer,MZoomCondition[]> s_conditions = new CCache<Integer,MZoomCondition[]>(Table_Name, 0);
/**
* Retrieve zoom condition record by AD_Table_ID
* @param AD_Table_ID
@ -67,13 +71,18 @@ public class MZoomCondition extends X_AD_ZoomCondition
*/
public static MZoomCondition[] getConditions(int AD_Table_ID)
{
final String whereClauseFinal = "AD_Table_ID=?";
List<MZoomCondition> list = new Query(Env.getCtx(), MZoomCondition.Table_Name, whereClauseFinal, null)
.setParameters(AD_Table_ID)
.setOnlyActiveRecords(true)
.setOrderBy(MZoomCondition.COLUMNNAME_SeqNo)
.list();
return list.toArray(new MZoomCondition[list.size()]);
MZoomCondition[] conditions = s_conditions.get(AD_Table_ID);
if (conditions == null) {
final String whereClauseFinal = "AD_Table_ID=?";
List<MZoomCondition> list = new Query(Env.getCtx(), MZoomCondition.Table_Name, whereClauseFinal, null)
.setParameters(AD_Table_ID)
.setOnlyActiveRecords(true)
.setOrderBy(MZoomCondition.COLUMNNAME_SeqNo)
.list();
conditions = list.toArray(new MZoomCondition[list.size()]);
s_conditions.put(AD_Table_ID, conditions);
}
return conditions;
} // getConditions
private static int findZoomWindowByTableId(int AD_Table_ID, MQuery query)

View File

@ -6,5 +6,3 @@
DATE=`date +%Y%m%d_%H%M%S`
mv $IDEMPIERE_HOME/data/ExpDat.jar $IDEMPIERE_HOME/data/ExpDat$DATE.jar
echo copy $IDEMPIERE_HOME/data/ExpDat$DATE.jar to backup media
sleep 30

View File

@ -18,6 +18,3 @@ ren ExpDat.jar "ExpDat%DATETIME%.jar"
@dir ExpDat%DATETIME%.jar
@Echo copy %IDEMPIERE_HOME%\data\ExpDat%DATETIME%.jar to backup media
@Rem Sleep 30
@CHOICE /C YN /T 30 /D N > NUL

View File

@ -527,8 +527,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
setActiveTab(gridWindow.getTabIndex(gTab), null);
gTab.navigate(i);
if (gc.isGridView())
gc.switchRowPresentation();
return true;
}
}

View File

@ -890,8 +890,10 @@ public class CompositeADTabbox extends AbstractADTabbox
if (!tabPanel.isVisible()) {
tabPanel.setVisible(true);
}
boolean wasForm = false;
if (!tabPanel.isGridView()) {
tabPanel.switchRowPresentation();
tabPanel.switchRowPresentation(); // required to avoid NPE on GridTabRowRenderer.getCurrentRow below
wasForm = true;
}
tabPanel.setDetailPaneMode(true);
headerTab.getDetailPane().setVflex("true");
@ -904,7 +906,9 @@ public class CompositeADTabbox extends AbstractADTabbox
Row row = gtr.getCurrentRow();
if (row != null)
gtr.setCurrentRow(row);
}
}
if (wasForm && tabPanel.getTabLevel() == 0 && headerTab.getTabLevel() != 0) // maintain form on header when zooming to a detail tab
tabPanel.switchRowPresentation();
}
private void showLastError() {

View File

@ -15,9 +15,7 @@ import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListItem;
import org.adempiere.webui.component.ListModelTable;
import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Row;
@ -37,8 +35,10 @@ import org.adempiere.webui.panel.IFormController;
import org.adempiere.webui.session.SessionManager;
import org.compiere.apps.form.FactReconcile;
import org.compiere.model.MClient;
import org.compiere.model.MColumn;
import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory;
import org.compiere.model.X_C_ElementValue;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -94,7 +94,7 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
private Label labelReconciled = new Label();
private Checkbox isReconciled = new Checkbox();
private Label labelAccount = new Label();
private Listbox fieldAccount = null;
private WTableDirEditor fieldAccount = null;
private Label labelBPartner = new Label();
private WSearchEditor fieldBPartner = null;
@ -184,8 +184,8 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
row.appendCellChild(fieldOrg.getComponent(), 2);
row = rows.newRow();
row.appendCellChild(labelAccount.rightAlign());
fieldAccount.setHflex("true");
row.appendCellChild(fieldAccount, 2);
fieldAccount.getComponent().setHflex("true");
row.appendCellChild(fieldAccount.getComponent(), 2);
row.appendCellChild(labelReconciled);
row.appendCellChild(isReconciled, 2);
row = rows.newRow();
@ -252,6 +252,7 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
fieldAcctSchema = new WTableDirEditor("C_AcctSchema_ID", true, false, true, lookupAS);
fieldAcctSchema.setValue(MClient.get(Env.getCtx()).getAcctSchema().getC_AcctSchema_ID());
fieldAcctSchema.addValueChangeListener(this);
m_C_AcctSchema_ID = (Integer)fieldAcctSchema.getValue();
// Organization
AD_Column_ID = FactReconcile.col_AD_Org_ID; //C_Period.AD_Org_ID (needed to allow org 0)
@ -273,25 +274,25 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
fieldProduct = new WSearchEditor("M_Product_ID", false, false, true, lookupProduct);
// Account
Vector<KeyNamePair> vector = getAccount();
KeyNamePair[] listAccount = new KeyNamePair[vector.size()];
for(int i=0;i<vector.size();i++)
listAccount[i] = vector.get(i);
fieldAccount = new Listbox(listAccount);
fieldAccount.setMold("select");
fieldAccount.setSelectedIndex(0);
AD_Column_ID = MColumn.getColumn_ID(X_C_ElementValue.Table_Name, X_C_ElementValue.COLUMNNAME_C_ElementValue_ID);
MLookup lookupAccount = MLookupFactory.get(Env.getCtx(), form.getWindowNo(), AD_Column_ID, DisplayType.TableDir, Env.getLanguage(Env.getCtx()),
X_C_ElementValue.COLUMNNAME_C_ElementValue_ID, 0, true,
" C_ElementValue.IsActive='Y' AND C_ElementValue.IsSummary='N' "
+ "AND EXISTS (SELECT 1 FROM C_AcctSchema_Element ase "
+ "WHERE ase.C_Element_ID=C_ElementValue.C_Element_ID AND ase.ElementType='AC' "
+ "AND ase.C_AcctSchema_ID=@C_AcctSchema_ID@ AND ase.AD_Client_ID=@AD_Client_ID@) ");
fieldAccount = new WTableDirEditor("C_ElementValue_ID", false, false, true, lookupAccount);
}
public void loadData(){
ListItem listAccount = fieldAccount.getSelectedItem();
int Account_ID = 0;
if(listAccount!=null){
Account_ID = (Integer)listAccount.getValue();
}
if (Account_ID != 0)
m_Account_ID = Account_ID;
if(fieldAcctSchema.getValue()!=null)
m_C_AcctSchema_ID = (Integer)fieldAcctSchema.getValue();
else
m_C_AcctSchema_ID = 0;
if(fieldAccount.getValue()!=null)
m_Account_ID = (Integer)fieldAccount.getValue();
else
m_Account_ID = 0;
@ -299,11 +300,6 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
m_AD_Org_ID = (Integer)fieldOrg.getValue();
else
m_AD_Org_ID = 0;
if(fieldAcctSchema.getValue()!=null)
m_C_AcctSchema_ID = (Integer)fieldAcctSchema.getValue();
else
m_C_AcctSchema_ID = 0;
m_isReconciled = isReconciled.isChecked();
@ -375,8 +371,19 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
@Override
public void valueChange(ValueChangeEvent evt) {
// TODO Auto-generated method stub
String name = evt.getPropertyName();
Object value = evt.getNewValue();
if (log.isLoggable(Level.CONFIG)) log.config(name + "=" + value);
if (value == null)
return;
if (name.equals("C_AcctSchema_ID")) {
m_C_AcctSchema_ID = ((Integer)value).intValue();
Env.setContext(Env.getCtx(), form.getWindowNo(), "C_AcctSchema_ID", m_C_AcctSchema_ID);
Env.setContext(Env.getCtx(), form.getWindowNo(), "AD_Client_ID", Env.getAD_Client_ID(Env.getCtx()));
fieldAccount.actionRefresh();
}
}
@Override

View File

@ -64,6 +64,7 @@ import org.compiere.util.Msg;
import org.compiere.util.ValueNamePair;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.SuspendNotAllowedException;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.Clients;
@ -174,7 +175,9 @@ public class WPaySelect extends PaySelect
dataStatus.setPre(true);
onlyDue.addActionListener(this);
fieldPayDate.addValueChangeListener(this);
//
//IDEMPIERE-2657, pritesh shah
bGenerate.setEnabled(false);
bGenerate.addActionListener(this);
bCancel.addActionListener(this);
//
@ -289,6 +292,11 @@ public class WPaySelect extends PaySelect
private void loadTableInfo()
{
Timestamp payDate = (Timestamp)fieldPayDate.getValue();
//IDEMPIERE-2657, pritesh shah
if(payDate == null){
throw new WrongValueException(fieldPayDate.getComponent(), Msg.getMsg(Env.getCtx(), "FillMandatory") + labelPayDate.getValue());
}
miniTable.setColorCompare(payDate);
if (log.isLoggable(Level.CONFIG)) log.config("PayDate=" + payDate);

View File

@ -195,6 +195,7 @@ public class WGraph extends Div implements IdSpace {
if (m_renderTable) {
if (m_renderChart) {
East east = new East();
east.setAutoscroll(true);
layout.appendChild(east);
renderTable(east);
} else {

View File

@ -260,8 +260,9 @@ public class FactReconcile {
"SELECT ev.C_ElementValue_ID, ev.Value || ' ' || ev.Name FROM C_ElementValue ev", "ev",
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO)
+ "AND ev.IsActive='Y' AND ev.IsSummary='N' "
+ "AND ev.C_Element_ID IN (SELECT C_Element_ID FROM C_AcctSchema_Element ase "
+ "WHERE ase.ElementType='AC' AND ase.AD_Client_ID=" + m_AD_Client_ID + ") "
+ "AND EXISTS (SELECT 1 FROM C_AcctSchema_Element ase "
+ "WHERE ase.C_Element_ID=ev.C_Element_ID AND ase.ElementType='AC' "
+ "AND ase.C_AcctSchema_ID=" + m_C_AcctSchema_ID + " AND ase.AD_Client_ID=" + m_AD_Client_ID + ") "
+ "ORDER BY 2";
PreparedStatement pstmt = null;

View File

@ -1,4 +1,5 @@
@Title ... p2 director
@Echo off
java -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 %1
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
java -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true %1

View File

@ -3,7 +3,7 @@
cd %~dp0
cp idempiere.ini idempiere.ini.sav
copy idempiere.ini idempiere.ini.sav
if exist jetty.xml.sav del /q jetty.xml.sav
if exist jettyhome/etc/jetty.xml (
@ -20,9 +20,10 @@ if exist jettyhome/etc/jetty-selector.xml (
copy jettyhome/etc/jetty-selector.xml jetty-selector.xml.sav
)
java -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 org.adempiere.server.product -i org.adempiere.server.product
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
java -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u org.adempiere.server.product -i org.adempiere.server.product
cp idempiere.ini.sav idempiere.ini
copy idempiere.ini.sav idempiere.ini
if exist jetty.xml.sav (
copy jetty.xml.sav jettyhome/etc/jetty.xml

View File

@ -232,7 +232,7 @@ public class Service {
// Get Login Info
String loginInfo = null;
// Verify existance of User/Client/Org/Role and User's acces to Client & Org
String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name || ' [' || INITCAP(USER) || ']' AS Text "
String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name AS Text "
+ "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur "
+ "WHERE u.AD_User_ID=?" // #1
+ " AND c.AD_Client_ID=?" // #2

View File

@ -178,8 +178,8 @@ public class CompiereService {
{
// Get Login Info
String loginInfo = null;
// Verify existance of User/Client/Org/Role and User's acces to Client & Org
String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name || ' [' || INITCAP(USER) || ']' AS Text "
// Verify existence of User/Client/Org/Role and User's acces to Client & Org
String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name AS Text "
+ "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur "
+ "WHERE u.AD_User_ID=?" // #1
+ " AND c.AD_Client_ID=?" // #2