Merge ed6dd9d38be1
This commit is contained in:
commit
f0810e50c9
|
@ -93,6 +93,7 @@ syntax: regexp
|
|||
^org\.apache\.ecs/bin/.*$
|
||||
^keystore/.*$
|
||||
^log/.*$
|
||||
^PostgreSQL/.*$
|
||||
^.*\.log$
|
||||
^Adempiere.properties$
|
||||
^idempiere.properties$
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
-- Jun 21, 2013 2:31:08 PM COT
|
||||
-- IDEMPIERE-594 Improve positioning on windows
|
||||
UPDATE AD_Field SET IsCentrallyMaintained='N', Help='You can check the valid variables and values at http://wiki.idempiere.org/en/System_Configurator_(Window_ID-50006)', Description='Value for the configuration key', Name='Configured Value',Updated=TO_DATE('2013-06-21 14:31:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50166
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:44:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=730, IsDisplayed='Y', XPosition=5,Updated=TO_DATE('2013-06-21 14:44:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4040
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:44:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0, IsDisplayed='N', XPosition=1,Updated=TO_DATE('2013-06-21 14:44:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52052
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:46:13 PM COT
|
||||
UPDATE AD_Column SET IsSelectionColumn='N',Updated=TO_DATE('2013-06-21 14:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5050
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:51:52 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y', DisplayLogic='@Processed@=Y', IsDisplayedGrid='Y', SeqNoGrid=730,Updated=TO_DATE('2013-06-21 14:51:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4040
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201306211448_IDEMPIERE-594.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
-- Jun 21, 2013 2:31:08 PM COT
|
||||
-- IDEMPIERE-594 Improve positioning on windows
|
||||
UPDATE AD_Field SET IsCentrallyMaintained='N', Help='You can check the valid variables and values at http://wiki.idempiere.org/en/System_Configurator_(Window_ID-50006)', Description='Value for the configuration key', Name='Configured Value',Updated=TO_TIMESTAMP('2013-06-21 14:31:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50166
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:44:12 PM COT
|
||||
UPDATE AD_Field SET SeqNo=730, IsDisplayed='Y', XPosition=5,Updated=TO_TIMESTAMP('2013-06-21 14:44:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4040
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:44:13 PM COT
|
||||
UPDATE AD_Field SET SeqNo=0, IsDisplayed='N', XPosition=1,Updated=TO_TIMESTAMP('2013-06-21 14:44:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=52052
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:46:13 PM COT
|
||||
UPDATE AD_Column SET IsSelectionColumn='N',Updated=TO_TIMESTAMP('2013-06-21 14:46:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5050
|
||||
;
|
||||
|
||||
-- Jun 21, 2013 2:51:52 PM COT
|
||||
UPDATE AD_Field SET IsReadOnly='Y', DisplayLogic='@Processed@=Y', IsDisplayedGrid='Y', SeqNoGrid=730,Updated=TO_TIMESTAMP('2013-06-21 14:51:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4040
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201306211448_IDEMPIERE-594.sql') FROM dual
|
||||
;
|
||||
|
|
@ -21,6 +21,7 @@ import java.sql.ResultSet;
|
|||
import java.sql.Timestamp;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.MAllocationHdr;
|
||||
import org.compiere.util.AdempiereUserError;
|
||||
import org.compiere.util.DB;
|
||||
|
@ -110,6 +111,8 @@ public class AllocationReset extends SvrProcess
|
|||
MAllocationHdr hdr = new MAllocationHdr(getCtx(), p_C_AllocationHdr_ID, m_trx.getTrxName());
|
||||
if (delete(hdr))
|
||||
count++;
|
||||
else
|
||||
throw new AdempiereException("Cannot delete");
|
||||
m_trx.close();
|
||||
StringBuilder msgreturn = new StringBuilder("@Deleted@ #").append(count);
|
||||
return msgreturn.toString();
|
||||
|
|
|
@ -450,6 +450,7 @@ public class GridField
|
|||
keyColumn = "AD_EntityType_ID";
|
||||
if (!keyColumn.endsWith("_ID"))
|
||||
keyColumn += "_ID"; // AD_Language_ID
|
||||
if (getGridTab() != null) {
|
||||
int Record_ID = Env.getContextAsInt(ctx, m_vo.WindowNo, m_vo.TabNo, keyColumn);
|
||||
int AD_Table_ID = m_vo.AD_Table_ID;
|
||||
if (!MRole.getDefault(ctx, false).canUpdate(
|
||||
|
@ -458,6 +459,7 @@ public class GridField
|
|||
if (!MRole.getDefault(ctx, false).isColumnAccess(AD_Table_ID, m_vo.AD_Column_ID, false))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Do we have a readonly rule
|
||||
if (checkContext && m_vo.ReadOnlyLogic.length() > 0)
|
||||
|
@ -487,7 +489,7 @@ public class GridField
|
|||
return true;
|
||||
// BF [ 2910368 ]
|
||||
// Record is not Active
|
||||
if (checkContext && !Env.getContext(ctx, m_vo.WindowNo,m_vo.TabNo, "IsActive").equals("Y"))
|
||||
if (checkContext && getGridTab() != null && !Env.getContext(ctx, m_vo.WindowNo,m_vo.TabNo, "IsActive").equals("Y"))
|
||||
return false;
|
||||
|
||||
// ultimately visibility decides
|
||||
|
|
|
@ -321,6 +321,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
|
|||
}
|
||||
// Mark as Inactive
|
||||
setIsActive(false); // updated DB for line delete/process
|
||||
this.saveEx();
|
||||
|
||||
// Unlink
|
||||
getLines(true);
|
||||
|
@ -406,6 +407,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
|
|||
}
|
||||
|
||||
// Stop the Document Workflow if invoice to allocate is as paid
|
||||
if (!isReversal()) {
|
||||
for (MAllocationLine line :m_lines)
|
||||
{
|
||||
if (line.getC_Invoice_ID() != 0)
|
||||
|
@ -421,6 +423,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
|
|||
throw new AdempiereException("@ValidationError@ @C_Invoice_ID@ @IsPaid@");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add up Amounts & validate
|
||||
BigDecimal approval = Env.ZERO;
|
||||
|
|
|
@ -23,11 +23,11 @@ import javax.xml.transform.sax.TransformerHandler;
|
|||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.pipo2.AbstractElementHandler;
|
||||
import org.adempiere.pipo2.Element;
|
||||
import org.adempiere.pipo2.ElementHandler;
|
||||
import org.adempiere.pipo2.PIPOContext;
|
||||
import org.adempiere.pipo2.PoExporter;
|
||||
import org.adempiere.pipo2.Element;
|
||||
import org.adempiere.pipo2.PackOut;
|
||||
import org.adempiere.pipo2.PoExporter;
|
||||
import org.adempiere.pipo2.PoFiller;
|
||||
import org.adempiere.pipo2.exception.POSaveFailedException;
|
||||
import org.compiere.model.I_AD_PrintFormat;
|
||||
|
@ -36,7 +36,9 @@ import org.compiere.model.I_AD_Reference;
|
|||
import org.compiere.model.I_AD_ReportView;
|
||||
import org.compiere.model.I_AD_Val_Rule;
|
||||
import org.compiere.model.I_AD_Workflow;
|
||||
import org.compiere.model.MAttachment;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.X_AD_Attachment;
|
||||
import org.compiere.model.X_AD_Package_Exp_Detail;
|
||||
import org.compiere.model.X_AD_Package_Imp_Detail;
|
||||
import org.compiere.model.X_AD_Process;
|
||||
|
@ -119,6 +121,17 @@ public class ProcessElementHandler extends AbstractElementHandler {
|
|||
AttributesImpl atts = new AttributesImpl();
|
||||
|
||||
try {
|
||||
// Export attachment if necessary
|
||||
MAttachment attachment = m_Process.getAttachment();
|
||||
if (attachment != null && attachment.get_ID() > 0) {
|
||||
ElementHandler handler = ctx.packOut.getHandler(X_AD_Attachment.Table_Name);
|
||||
try {
|
||||
handler.packOut(ctx.packOut, document, null, attachment.getAD_Attachment_ID());
|
||||
} catch (Exception e) {
|
||||
throw new SAXException(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Process.isReport() && m_Process.getAD_ReportView_ID() > 0)
|
||||
{
|
||||
ElementHandler handler = packOut.getHandler(I_AD_ReportView.Table_Name);
|
||||
|
|
|
@ -416,15 +416,12 @@ public class ReportStarter implements ProcessCall, ClientProcess
|
|||
File reportDir = data.getReportDir();
|
||||
|
||||
String resourcePath = reportDir.getAbsolutePath();
|
||||
String reportdir = reportPath.substring(0, reportPath.lastIndexOf("/"));
|
||||
if (!resourcePath.endsWith("/") && !resourcePath.endsWith("\\"));
|
||||
{
|
||||
resourcePath = resourcePath + "/";
|
||||
reportdir = reportdir + "/";
|
||||
}
|
||||
params.put("SUBREPORT_DIR", resourcePath);
|
||||
params.put("RESOURCE_DIR", resourcePath);
|
||||
params.put("REPORT_DIR", reportdir);
|
||||
|
||||
if (jasperReport != null && pi.getTable_ID() > 0 && Record_ID <= 0 && pi.getRecord_IDs() != null && pi.getRecord_IDs().length > 0)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.adempiere.webui.component.GridFactory;
|
|||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.editor.IZoomableEditor;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WEditorPopupMenu;
|
||||
import org.adempiere.webui.editor.WebEditorFactory;
|
||||
|
@ -54,6 +55,7 @@ import org.zkoss.zk.ui.event.Events;
|
|||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.impl.XulElement;
|
||||
|
||||
/**
|
||||
* Process Parameter Panel, based on existing ProcessParameter dialog. -
|
||||
|
@ -68,7 +70,8 @@ public class ProcessParameterPanel extends Panel implements
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 7163263872945366389L;
|
||||
private static final long serialVersionUID = -5996487688479454715L;
|
||||
|
||||
private String width;
|
||||
|
||||
/**
|
||||
|
@ -291,9 +294,25 @@ public class ProcessParameterPanel extends Panel implements
|
|||
editor.fillHorizontal();
|
||||
// setup editor context menu
|
||||
WEditorPopupMenu popupMenu = editor.getPopupMenu();
|
||||
if (popupMenu != null) {
|
||||
if (popupMenu != null)
|
||||
{
|
||||
popupMenu.addMenuListener((ContextMenuListener)editor);
|
||||
popupMenu.setId(mField.getColumnName()+"-popup");
|
||||
this.appendChild(popupMenu);
|
||||
if (!mField.isFieldOnly())
|
||||
{
|
||||
Label label = editor.getLabel();
|
||||
if (popupMenu.isZoomEnabled() && editor instanceof IZoomableEditor)
|
||||
{
|
||||
label.addEventListener(Events.ON_CLICK, new ZoomListener((IZoomableEditor) editor));
|
||||
}
|
||||
|
||||
popupMenu.addContextElement(label);
|
||||
if (editor.getComponent() instanceof XulElement)
|
||||
{
|
||||
popupMenu.addContextElement((XulElement) editor.getComponent());
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
m_wEditors.add(editor); // add to Editors
|
||||
|
@ -634,6 +653,7 @@ public class ProcessParameterPanel extends Panel implements
|
|||
m_wEditors2.get(i).setVisible(false);
|
||||
}
|
||||
}
|
||||
editor.updateLabelStyle();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -661,5 +681,21 @@ public class ProcessParameterPanel extends Panel implements
|
|||
m_processInfo = processInfo;
|
||||
}
|
||||
|
||||
} // ProcessParameterPanel
|
||||
static class ZoomListener implements EventListener<Event> {
|
||||
|
||||
private IZoomableEditor searchEditor;
|
||||
|
||||
ZoomListener(IZoomableEditor editor) {
|
||||
searchEditor = editor;
|
||||
}
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
if (Events.ON_CLICK.equals(event.getName())) {
|
||||
searchEditor.actionZoom();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // ProcessParameterPanel
|
||||
|
|
|
@ -566,7 +566,8 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
|||
* @return boolean
|
||||
*/
|
||||
protected boolean isShowPreference() {
|
||||
return MRole.getDefault().isShowPreference() && gridField != null && !gridField.isEncrypted() && !gridField.isEncryptedColumn();
|
||||
return MRole.getDefault().isShowPreference() && gridField != null && !gridField.isEncrypted() && !gridField.isEncryptedColumn()
|
||||
&& gridTab != null; // don't show preference for process parameters
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,9 +27,11 @@ import java.sql.SQLException;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.util.Callback;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.ValuePreference;
|
||||
import org.adempiere.webui.adwindow.ADTabpanel;
|
||||
import org.adempiere.webui.adwindow.ADWindow;
|
||||
import org.adempiere.webui.adwindow.ADWindowContent;
|
||||
import org.adempiere.webui.adwindow.IFieldEditorContainer;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Searchbox;
|
||||
|
@ -90,6 +92,8 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
|||
|
||||
private static final String IN_PROGRESS_IMAGE = "~./zk/img/progress3.gif";
|
||||
|
||||
private ADWindow adwindow;
|
||||
|
||||
public WSearchEditor (GridField gridField)
|
||||
{
|
||||
super(new CustomSearchBox(), gridField);
|
||||
|
@ -504,6 +508,11 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
|||
vqe.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
if (adwindow != null)
|
||||
{
|
||||
adwindow.getADWindowContent().hideBusyMask();
|
||||
adwindow = null;
|
||||
}
|
||||
// get result
|
||||
int result = vqe.getRecord_ID();
|
||||
|
||||
|
@ -520,8 +529,16 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
|||
}
|
||||
});
|
||||
|
||||
vqe.setVisible(true);
|
||||
vqe.setSizable(true);
|
||||
adwindow = ADWindow.findADWindow(getComponent());
|
||||
if (adwindow != null) {
|
||||
ADWindowContent content = adwindow.getADWindowContent();
|
||||
content.getComponent().getParent().appendChild(vqe);
|
||||
content.showBusyMask(vqe);
|
||||
LayoutUtils.openOverlappedWindow(content.getComponent().getParent(), vqe, "middle_center");
|
||||
} else {
|
||||
AEnv.showWindow(vqe);
|
||||
}
|
||||
} // actionQuickEntry
|
||||
|
||||
private void actionButton(String queryValue)
|
||||
|
|
|
@ -94,13 +94,13 @@ public abstract class CreateFromBatch extends CreateFrom
|
|||
throws SQLException
|
||||
{
|
||||
// Get StatementDate
|
||||
Timestamp ts = (Timestamp) getGridTab().getValue("StatementDate");
|
||||
if (ts == null)
|
||||
ts = new Timestamp(System.currentTimeMillis());
|
||||
//Timestamp ts = (Timestamp) getGridTab().getValue("StatementDate");
|
||||
//if (ts == null)
|
||||
//ts = new Timestamp(System.currentTimeMillis());
|
||||
|
||||
int index = 1;
|
||||
|
||||
pstmt.setTimestamp(index++, ts);
|
||||
//pstmt.setTimestamp(index++, ts);
|
||||
pstmt.setInt(index++, BankAccount != null ? (Integer) BankAccount : (Integer) getGridTab().getValue("C_BankAccount_ID"));
|
||||
|
||||
if(DocType != null)
|
||||
|
|
|
@ -59,7 +59,7 @@ public abstract class CreateFromStatement extends CreateFromBatch
|
|||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT p.DateTrx,p.C_Payment_ID,p.DocumentNo, p.C_Currency_ID,c.ISO_Code, p.PayAmt,");
|
||||
sql.append("currencyConvert(p.PayAmt,p.C_Currency_ID,ba.C_Currency_ID,?,null,p.AD_Client_ID,p.AD_Org_ID), bp.Name ");
|
||||
sql.append("currencyConvert(p.PayAmt,p.C_Currency_ID,ba.C_Currency_ID,p.DateAcct,p.C_ConversionType_ID,p.AD_Client_ID,p.AD_Org_ID), bp.Name ");
|
||||
sql.append("FROM C_BankAccount ba");
|
||||
sql.append(" INNER JOIN C_Payment_v p ON (p.C_BankAccount_ID=ba.C_BankAccount_ID)");
|
||||
sql.append(" INNER JOIN C_Currency c ON (p.C_Currency_ID=c.C_Currency_ID)");
|
||||
|
|
Loading…
Reference in New Issue