hg merge release-1.0c (merge release1 into release2)
This commit is contained in:
commit
6c63b156a7
|
@ -21,7 +21,7 @@ AS
|
||||||
CURSOR CUR_BPLoc IS
|
CURSOR CUR_BPLoc IS
|
||||||
SELECT IsRemitTo, C_Location_ID
|
SELECT IsRemitTo, C_Location_ID
|
||||||
FROM C_BPartner_Location
|
FROM C_BPartner_Location
|
||||||
WHERE C_BPartner_ID=p_C_BPartner_ID
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
ORDER BY IsRemitTo DESC;
|
ORDER BY IsRemitTo DESC;
|
||||||
BEGIN
|
BEGIN
|
||||||
FOR l IN CUR_BPLoc LOOP
|
FOR l IN CUR_BPLoc LOOP
|
||||||
|
|
|
@ -9,7 +9,7 @@ BEGIN
|
||||||
FOR l IN
|
FOR l IN
|
||||||
SELECT IsRemitTo, C_Location_ID
|
SELECT IsRemitTo, C_Location_ID
|
||||||
FROM C_BPartner_Location
|
FROM C_BPartner_Location
|
||||||
WHERE C_BPartner_ID=p_C_BPartner_ID
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
ORDER BY IsRemitTo DESC
|
ORDER BY IsRemitTo DESC
|
||||||
LOOP
|
LOOP
|
||||||
IF (v_C_Location_ID IS NULL) THEN
|
IF (v_C_Location_ID IS NULL) THEN
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
CREATE OR REPLACE FUNCTION bpartnerRemitLocation
|
||||||
|
(
|
||||||
|
p_C_BPartner_ID C_BPartner.C_BPartner_ID%TYPE
|
||||||
|
)
|
||||||
|
RETURN NUMBER
|
||||||
|
/*************************************************************************
|
||||||
|
* The contents of this file are subject to the Compiere License. You may
|
||||||
|
* obtain a copy of the License at http://www.compiere.org/license.html
|
||||||
|
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
|
||||||
|
* express or implied. See the License for details. Code: Compiere ERP+CRM
|
||||||
|
* Copyright (C) 1999-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
|
||||||
|
*************************************************************************
|
||||||
|
* $Id: C_BPartner_RemitLocation.SQL,v 1.1 2006/04/21 17:51:58 jjanke Exp $
|
||||||
|
***
|
||||||
|
* Title: Return the first RemitTo C_Location_ID of a Business Partner
|
||||||
|
* Description:
|
||||||
|
*
|
||||||
|
************************************************************************/
|
||||||
|
AS
|
||||||
|
v_C_Location_ID NUMBER := NULL;
|
||||||
|
CURSOR CUR_BPLoc IS
|
||||||
|
SELECT IsRemitTo, C_Location_ID
|
||||||
|
FROM C_BPartner_Location
|
||||||
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
|
ORDER BY IsRemitTo DESC;
|
||||||
|
BEGIN
|
||||||
|
FOR l IN CUR_BPLoc LOOP
|
||||||
|
IF (v_C_Location_ID IS NULL) THEN
|
||||||
|
v_C_Location_ID := l.C_Location_ID;
|
||||||
|
END IF;
|
||||||
|
END LOOP;
|
||||||
|
RETURN v_C_Location_ID;
|
||||||
|
END bpartnerRemitLocation;
|
||||||
|
/
|
||||||
|
|
||||||
|
SELECT register_migration_script('201312110939_IDEMPIERE-1625.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
CREATE OR REPLACE FUNCTION bpartnerRemitLocation(p_C_BPartner_ID C_BPartner.C_BPartner_ID%TYPE)
|
||||||
|
RETURNS numeric AS $body$
|
||||||
|
|
||||||
|
DECLARE
|
||||||
|
v_C_Location_ID NUMERIC := NULL;
|
||||||
|
l RECORD;
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
FOR l IN
|
||||||
|
SELECT IsRemitTo, C_Location_ID
|
||||||
|
FROM C_BPartner_Location
|
||||||
|
WHERE C_BPartner_ID=p_C_BPartner_ID AND IsActive='Y'
|
||||||
|
ORDER BY IsRemitTo DESC
|
||||||
|
LOOP
|
||||||
|
IF (v_C_Location_ID IS NULL) THEN
|
||||||
|
v_C_Location_ID := l.C_Location_ID;
|
||||||
|
END IF;
|
||||||
|
END LOOP;
|
||||||
|
RETURN v_C_Location_ID;
|
||||||
|
|
||||||
|
END;
|
||||||
|
|
||||||
|
$body$ LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201312110939_IDEMPIERE-1625.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -81,8 +81,9 @@ public class ExpenseTypesFromAccounts extends SvrProcess {
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
for (int i = 0; i < para.length; i++) {
|
for (int i = 0; i < para.length; i++) {
|
||||||
String name = para[i].getParameterName();
|
String name = para[i].getParameterName();
|
||||||
if (para[i].getParameter() == null);
|
if (para[i].getParameter() == null) {
|
||||||
else if (name.equals("M_Product_Category_ID")) {
|
// nothing
|
||||||
|
} else if (name.equals("M_Product_Category_ID")) {
|
||||||
m_productCategoryId = para[i].getParameterAsInt();
|
m_productCategoryId = para[i].getParameterAsInt();
|
||||||
} else if (name.equals("C_AcctSchema_ID")) {
|
} else if (name.equals("C_AcctSchema_ID")) {
|
||||||
m_acctSchemaId = para[i].getParameterAsInt();
|
m_acctSchemaId = para[i].getParameterAsInt();
|
||||||
|
|
|
@ -94,6 +94,8 @@ public class MGoal extends X_PA_Goal
|
||||||
DB.close(rs, pstmt);
|
DB.close(rs, pstmt);
|
||||||
rs = null; pstmt = null;
|
rs = null; pstmt = null;
|
||||||
}
|
}
|
||||||
|
if (list.size() == 0)
|
||||||
|
s_log.log (Level.WARNING, Msg.getMsg(ctx, "FindZeroRecords"));
|
||||||
MGoal[] retValue = new MGoal[list.size ()];
|
MGoal[] retValue = new MGoal[list.size ()];
|
||||||
list.toArray (retValue);
|
list.toArray (retValue);
|
||||||
return retValue;
|
return retValue;
|
||||||
|
|
|
@ -862,7 +862,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
||||||
setPrice();
|
setPrice();
|
||||||
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
||||||
// Check PriceLimit
|
// Check PriceLimit
|
||||||
boolean enforce = m_IsSOTrx && m_parent.getM_PriceList().isEnforcePriceLimit();
|
boolean enforce = m_IsSOTrx && getParent().getM_PriceList().isEnforcePriceLimit();
|
||||||
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
||||||
enforce = false;
|
enforce = false;
|
||||||
// Check Price Limit?
|
// Check Price Limit?
|
||||||
|
|
|
@ -872,7 +872,7 @@ public class MOrderLine extends X_C_OrderLine
|
||||||
getProductPricing(m_M_PriceList_ID);
|
getProductPricing(m_M_PriceList_ID);
|
||||||
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
// IDEMPIERE-1574 Sales Order Line lets Price under the Price Limit when updating
|
||||||
// Check PriceLimit
|
// Check PriceLimit
|
||||||
boolean enforce = m_IsSOTrx && m_parent.getM_PriceList().isEnforcePriceLimit();
|
boolean enforce = m_IsSOTrx && getParent().getM_PriceList().isEnforcePriceLimit();
|
||||||
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
if (enforce && MRole.getDefault().isOverwritePriceLimit())
|
||||||
enforce = false;
|
enforce = false;
|
||||||
// Check Price Limit?
|
// Check Price Limit?
|
||||||
|
|
|
@ -608,7 +608,7 @@ public final class DisplayType
|
||||||
if (fieldLength == 1)
|
if (fieldLength == 1)
|
||||||
return "CHAR(" + fieldLength + ")";
|
return "CHAR(" + fieldLength + ")";
|
||||||
else
|
else
|
||||||
return "NVARCHAR2(" + fieldLength + ")";
|
return "VARCHAR2(" + fieldLength + ")";
|
||||||
}
|
}
|
||||||
if (displayType == DisplayType.Color) // this condition is never reached - filtered above in isID
|
if (displayType == DisplayType.Color) // this condition is never reached - filtered above in isID
|
||||||
{
|
{
|
||||||
|
@ -635,7 +635,7 @@ public final class DisplayType
|
||||||
if (!DisplayType.isText(displayType))
|
if (!DisplayType.isText(displayType))
|
||||||
s_log.severe("Unhandled Data Type = " + displayType);
|
s_log.severe("Unhandled Data Type = " + displayType);
|
||||||
|
|
||||||
return "NVARCHAR2(" + fieldLength + ")";
|
return "VARCHAR2(" + fieldLength + ")";
|
||||||
} // getSQLDataType
|
} // getSQLDataType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -547,7 +547,7 @@ public final class EMail implements Serializable
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_from = new InternetAddress (newFrom, true);
|
m_from = new InternetAddress (newFrom, true);
|
||||||
if (MSysConfig.getBooleanValue(MSysConfig.MAIL_SEND_BCC_TO_FROM, false, Env.getAD_Client_ID(Env.getCtx())));
|
if (MSysConfig.getBooleanValue(MSysConfig.MAIL_SEND_BCC_TO_FROM, false, Env.getAD_Client_ID(Env.getCtx())))
|
||||||
addBcc(newFrom);
|
addBcc(newFrom);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -64,6 +64,11 @@ public final class Attachment extends CDialog
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 2497487523050526742L;
|
private static final long serialVersionUID = 2497487523050526742L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the last path selected
|
||||||
|
*/
|
||||||
|
private static String lastPath = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* loads Attachment, if ID <> 0
|
* loads Attachment, if ID <> 0
|
||||||
|
@ -424,7 +429,8 @@ public final class Attachment extends CDialog
|
||||||
private void loadFile()
|
private void loadFile()
|
||||||
{
|
{
|
||||||
log.info("");
|
log.info("");
|
||||||
JFileChooser chooser = new JFileChooser();
|
JFileChooser chooser = new JFileChooser(lastPath);
|
||||||
|
|
||||||
chooser.setDialogType(JFileChooser.OPEN_DIALOG);
|
chooser.setDialogType(JFileChooser.OPEN_DIALOG);
|
||||||
chooser.setDialogTitle(Msg.getMsg(Env.getCtx(), "AttachmentNew"));
|
chooser.setDialogTitle(Msg.getMsg(Env.getCtx(), "AttachmentNew"));
|
||||||
chooser.setMultiSelectionEnabled(true);
|
chooser.setMultiSelectionEnabled(true);
|
||||||
|
@ -463,6 +469,10 @@ public final class Attachment extends CDialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Save path of file
|
||||||
|
if (files.length>0) {
|
||||||
|
lastPath = files[0].getParentFile().getAbsolutePath();
|
||||||
|
}
|
||||||
} // getFileName
|
} // getFileName
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -283,6 +283,7 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
|
|
||||||
// The Editor
|
// The Editor
|
||||||
WEditor editor = WebEditorFactory.getEditor(mField, false);
|
WEditor editor = WebEditorFactory.getEditor(mField, false);
|
||||||
|
editor.setProcessParameter(true);
|
||||||
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
|
editor.getComponent().addEventListener(Events.ON_FOCUS, this);
|
||||||
editor.getComponent().addEventListener(Events.ON_BLUR, this);
|
editor.getComponent().addEventListener(Events.ON_BLUR, this);
|
||||||
editor.addValueChangeListener(this);
|
editor.addValueChangeListener(this);
|
||||||
|
@ -337,6 +338,7 @@ public class ProcessParameterPanel extends Panel implements
|
||||||
m_mFields2.add(mField2);
|
m_mFields2.add(mField2);
|
||||||
// The Editor
|
// The Editor
|
||||||
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
|
WEditor editor2 = WebEditorFactory.getEditor(mField2, false);
|
||||||
|
editor2.setProcessParameter(true);
|
||||||
//override attribute
|
//override attribute
|
||||||
editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
|
editor2.getComponent().setWidgetAttribute("columnName", mField2.getColumnName()+"_To");
|
||||||
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
|
editor2.getComponent().addEventListener(Events.ON_FOCUS, this);
|
||||||
|
|
|
@ -14,6 +14,7 @@ public class WViewPI extends ADForm {
|
||||||
this.setSclass("window-view-pi");
|
this.setSclass("window-view-pi");
|
||||||
WPerformanceIndicator.Options options = new WPerformanceIndicator.Options();
|
WPerformanceIndicator.Options options = new WPerformanceIndicator.Options();
|
||||||
WPAPanel paPanel = WPAPanel.get(options);
|
WPAPanel paPanel = WPAPanel.get(options);
|
||||||
|
if (paPanel != null)
|
||||||
appendChild(paPanel);
|
appendChild(paPanel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,8 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
|
|
||||||
private boolean tableEditor;
|
private boolean tableEditor;
|
||||||
|
|
||||||
|
private boolean isProcessParameter;
|
||||||
|
|
||||||
public WEditor(Component comp, GridField gridField) {
|
public WEditor(Component comp, GridField gridField) {
|
||||||
this(comp, gridField, -1);
|
this(comp, gridField, -1);
|
||||||
}
|
}
|
||||||
|
@ -208,6 +210,7 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
label = new Label("");
|
label = new Label("");
|
||||||
label.setValue(strLabel);
|
label.setValue(strLabel);
|
||||||
label.setTooltiptext(description);
|
label.setTooltiptext(description);
|
||||||
|
label.setMandatory(mandatory);
|
||||||
|
|
||||||
this.setMandatory (mandatory);
|
this.setMandatory (mandatory);
|
||||||
|
|
||||||
|
@ -546,7 +549,7 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMandatoryStyle() {
|
public boolean isMandatoryStyle() {
|
||||||
return mandatory && !readOnly && getGridField().isEditable(true) && isNullOrEmpty();
|
return mandatory && !readOnly && (isProcessParameter || getGridField().isEditable(true)) && isNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNullOrEmpty() {
|
public boolean isNullOrEmpty() {
|
||||||
|
@ -633,6 +636,14 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isProcessParameter() {
|
||||||
|
return isProcessParameter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessParameter(boolean isProcessParameter) {
|
||||||
|
this.isProcessParameter = isProcessParameter;
|
||||||
|
}
|
||||||
|
|
||||||
private static final String STYLE_ZOOMABLE_LABEL = "cursor: pointer; text-decoration: underline;";
|
private static final String STYLE_ZOOMABLE_LABEL = "cursor: pointer; text-decoration: underline;";
|
||||||
private static final String STYLE_NORMAL_LABEL = "color: #333;";
|
private static final String STYLE_NORMAL_LABEL = "color: #333;";
|
||||||
private static final String STYLE_EMPTY_MANDATORY_LABEL = "color: red;";
|
private static final String STYLE_EMPTY_MANDATORY_LABEL = "color: red;";
|
||||||
|
|
Loading…
Reference in New Issue