hg merge release-6.2 (merge release6.2 into default)

This commit is contained in:
Carlos Ruiz 2019-05-11 21:43:19 +02:00
commit d1498c7362
13 changed files with 120 additions and 19 deletions

View File

@ -0,0 +1,10 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3961 GL Journal - Switching accounting schema removes PERIOD
-- May 7, 2019, 5:20:41 PM SGT
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.acctSchema',Updated=TO_DATE('2019-05-07 17:20:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1632
;
SELECT register_migration_script('201905071815_IDEMPIERE-3961.sql') FROM dual
;

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- CPH::ERP Comments:
-- 28. apr. 2019 00.04.12 CEST
UPDATE AD_Process_Para SET AD_Reference_Value_ID=141,Updated=TO_DATE('2019-04-28 00:04:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=363
;
-- 1. maj 2019 17.22.57 CEST
UPDATE AD_Column SET AD_Reference_Value_ID=141,Updated=TO_DATE('2019-05-01 17:22:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14091
;
SELECT register_migration_script('201905091233_IDEMPIERE-3958.sql') FROM dual
;

View File

@ -0,0 +1,7 @@
-- IDEMPIERE-3961 GL Journal - Switching accounting schema removes PERIOD
-- May 7, 2019, 5:20:41 PM SGT
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.acctSchema',Updated=TO_TIMESTAMP('2019-05-07 17:20:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1632
;
SELECT register_migration_script('201905071815_IDEMPIERE-3961.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- CPH::ERP Comments:
-- 28. apr. 2019 00.04.12 CEST
UPDATE AD_Process_Para SET AD_Reference_Value_ID=141,Updated=TO_TIMESTAMP('2019-04-28 00:04:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=363
;
-- 1. maj 2019 17.22.57 CEST
UPDATE AD_Column SET AD_Reference_Value_ID=141,Updated=TO_TIMESTAMP('2019-05-01 17:22:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=14091
;
SELECT register_migration_script('201905091233_IDEMPIERE-3958.sql') FROM dual
;

View File

@ -294,4 +294,26 @@ public class CalloutGLJournal extends CalloutEngine
} }
return ""; return "";
} }
/**
* Journal - Acct Schema
* Set Currency from C_AcctSchema_ID
* @param ctx context
* @param WindowNo window no
* @param mTab tab
* @param mField field
* @param value value
* @return null or error message
*/
public String acctSchema(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
if (value == null)
return "";
int C_AcctSchema_ID = Env.getContextAsInt(ctx, WindowNo, "C_AcctSchema_ID");
MAcctSchema as = MAcctSchema.get (ctx, C_AcctSchema_ID);
mTab.setValue("C_Currency_ID", as.getC_Currency_ID());
return "";
}
} // CalloutGLJournal } // CalloutGLJournal

View File

@ -26,6 +26,7 @@ import org.adempiere.exceptions.NoVendorForProductException;
import org.apache.commons.collections.keyvalue.MultiKey; import org.apache.commons.collections.keyvalue.MultiKey;
import org.compiere.model.MBPartner; import org.compiere.model.MBPartner;
import org.compiere.model.MCharge; import org.compiere.model.MCharge;
import org.compiere.model.MConversionType;
import org.compiere.model.MOrder; import org.compiere.model.MOrder;
import org.compiere.model.MOrderLine; import org.compiere.model.MOrderLine;
import org.compiere.model.MProduct; import org.compiere.model.MProduct;
@ -352,6 +353,8 @@ public class RequisitionPOCreate extends SvrProcess
m_order.setC_DocTypeTarget_ID(); m_order.setC_DocTypeTarget_ID();
m_order.setBPartner(m_bpartner); m_order.setBPartner(m_bpartner);
m_order.setM_PriceList_ID(M_PriceList_ID); m_order.setM_PriceList_ID(M_PriceList_ID);
if (MConversionType.getDefault(getAD_Client_ID()) > 0)
m_order.setC_ConversionType_ID(MConversionType.getDefault(getAD_Client_ID()));
// default po document type // default po document type
if (!p_ConsolidateDocument) if (!p_ConsolidateDocument)
{ {

View File

@ -2783,8 +2783,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
{ {
if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - " if (log.isLoggable(Level.FINE)) log.fine(columnName + " changed - "
+ dependentField.getColumnName() + " set to null"); + dependentField.getColumnName() + " set to null");
Object currentValue = dependentField.getValue();
// invalidate current selection // invalidate current selection
setValue(dependentField, null); setValue(dependentField, null);
if (currentValue != null && mLookup.containsKey(currentValue))
setValue(dependentField, currentValue);
} }
} }
// if the field is a Virtual UI Column // if the field is a Virtual UI Column

View File

@ -1681,6 +1681,8 @@ public class MInOut extends X_M_InOut implements DocAction
MInOut dropShipment = createDropShipment(); MInOut dropShipment = createDropShipment();
if (dropShipment != null) if (dropShipment != null)
info.append(" - @DropShipment@: @M_InOut_ID@=").append(dropShipment.getDocumentNo()); info.append(" - @DropShipment@: @M_InOut_ID@=").append(dropShipment.getDocumentNo());
if (dropShipment != null)
addDocsPostProcess(dropShipment);
// User Validation // User Validation
String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
if (valid != null) if (valid != null)

View File

@ -22,6 +22,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
@ -83,8 +84,10 @@ import org.compiere.util.ValueNamePair;
public class MPayment extends X_C_Payment public class MPayment extends X_C_Payment
implements DocAction, ProcessCall, PaymentInterface implements DocAction, ProcessCall, PaymentInterface
{ {
/**
private static final long serialVersionUID = -7179638016937305380L; *
*/
private static final long serialVersionUID = -6268462097642919346L;
/** /**
* Get Payments Of BPartner * Get Payments Of BPartner
@ -2111,6 +2114,16 @@ public class MPayment extends X_C_Payment
return DocAction.STATUS_Completed; return DocAction.STATUS_Completed;
} // completeIt } // completeIt
/* Save array of documents to process AFTER completing this one */
ArrayList<PO> docsPostProcess = new ArrayList<PO>();
protected void addDocsPostProcess(PO doc) {
docsPostProcess.add(doc);
}
public ArrayList<PO> getDocsPostProcess() {
return docsPostProcess;
}
/** /**
* Set the definite document number after completed * Set the definite document number after completed
@ -2289,6 +2302,7 @@ public class MPayment extends X_C_Payment
// added AdempiereException by zuhri // added AdempiereException by zuhri
if (!alloc.processIt(DocAction.ACTION_Complete)) if (!alloc.processIt(DocAction.ACTION_Complete))
throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg()); throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg());
addDocsPostProcess(alloc);
// end added // end added
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo(); m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
return alloc.save(get_TrxName()); return alloc.save(get_TrxName());
@ -2324,6 +2338,7 @@ public class MPayment extends X_C_Payment
// added AdempiereException by zuhri // added AdempiereException by zuhri
if (!alloc.processIt(DocAction.ACTION_Complete)) if (!alloc.processIt(DocAction.ACTION_Complete))
throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg()); throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg());
addDocsPostProcess(alloc);
// end added // end added
alloc.saveEx(get_TrxName()); alloc.saveEx(get_TrxName());
m_justCreatedAllocInv = alloc; m_justCreatedAllocInv = alloc;
@ -2418,10 +2433,12 @@ public class MPayment extends X_C_Payment
else else
{ {
// added Adempiere Exception by zuhri // added Adempiere Exception by zuhri
if(alloc.processIt(DocAction.ACTION_Complete)) if (alloc.processIt(DocAction.ACTION_Complete)) {
addDocsPostProcess(alloc);
ok = alloc.save(get_TrxName()); ok = alloc.save(get_TrxName());
else } else {
throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg()); throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg());
}
// end added by zuhri // end added by zuhri
m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo(); m_processMsg = "@C_AllocationHdr_ID@: " + alloc.getDocumentNo();
} }
@ -2709,6 +2726,7 @@ public class MPayment extends X_C_Payment
// added AdempiereException by zuhri // added AdempiereException by zuhri
if (!alloc.processIt(DocAction.ACTION_Complete)) if (!alloc.processIt(DocAction.ACTION_Complete))
throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg()); throw new AdempiereException(Msg.getMsg(getCtx(), "FailedProcessingDocument") + " - " + alloc.getProcessMsg());
addDocsPostProcess(alloc);
// end added // end added
alloc.saveEx(get_TrxName()); alloc.saveEx(get_TrxName());
// //

View File

@ -420,11 +420,14 @@ public class MSysConfig extends X_AD_SysConfig
public static String getValue(String Name, String defaultValue, int AD_Client_ID, int AD_Org_ID) public static String getValue(String Name, String defaultValue, int AD_Client_ID, int AD_Org_ID)
{ {
String key = ""+AD_Client_ID+"_"+AD_Org_ID+"_"+Name; String key = ""+AD_Client_ID+"_"+AD_Org_ID+"_"+Name;
String str = s_cache.get(key); String str = null;
if (str != null) if (! Name.endsWith("_NOCACHE")) {
return str; str = s_cache.get(key);
if (str == null && s_cache.containsKey(key)) // found null key if (str != null)
return defaultValue; return str;
if (str == null && s_cache.containsKey(key)) // found null key
return defaultValue;
}
// //
String sql = "SELECT Value FROM AD_SysConfig" String sql = "SELECT Value FROM AD_SysConfig"
@ -452,13 +455,15 @@ public class MSysConfig extends X_AD_SysConfig
rs = null; pstmt = null; rs = null; pstmt = null;
} }
// //
if (str != null) { if (str != null) {
s_cache.put(key, str); if (! Name.endsWith("_NOCACHE"))
s_cache.put(key, str);
return str; return str;
} } else {
else {
// anyways, put the not found key as null // anyways, put the not found key as null
s_cache.put(key, null); if (! Name.endsWith("_NOCACHE"))
s_cache.put(key, null);
return defaultValue; return defaultValue;
} }
} }

View File

@ -324,12 +324,13 @@ public class DocumentEngine implements DocAction
{ {
// PostProcess documents when invoice or inout (this is to postprocess the generated MatchPO and MatchInv if any) // PostProcess documents when invoice or inout (this is to postprocess the generated MatchPO and MatchInv if any)
ArrayList<PO> docsPostProcess = new ArrayList<PO>(); ArrayList<PO> docsPostProcess = new ArrayList<PO>();
if (m_document instanceof MInvoice || m_document instanceof MInOut) { if (m_document instanceof MInvoice || m_document instanceof MInOut || m_document instanceof MPayment) {
if (m_document instanceof MInvoice) { if (m_document instanceof MInvoice) {
docsPostProcess = ((MInvoice) m_document).getDocsPostProcess(); docsPostProcess = ((MInvoice) m_document).getDocsPostProcess();
} } else if (m_document instanceof MInOut) {
if (m_document instanceof MInOut) {
docsPostProcess = ((MInOut) m_document).getDocsPostProcess(); docsPostProcess = ((MInOut) m_document).getDocsPostProcess();
} else if (m_document instanceof MPayment) {
docsPostProcess = ((MPayment) m_document).getDocsPostProcess();
} }
} }
if (m_document instanceof PO && docsPostProcess.size() > 0) { if (m_document instanceof PO && docsPostProcess.size() > 0) {

View File

@ -757,7 +757,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
private void setupEmbeddedFindwindow() { private void setupEmbeddedFindwindow() {
findWindow.setTitle(null); findWindow.setTitle(null);
findWindow.setBorder("none"); findWindow.setBorder("none");
findWindow.setStyle("position: absolute; border-bottom: 2px solid #484848; padding: 2px; background-color: #fff;"); findWindow.setStyle("position: absolute;background-color: #fff;");
ZKUpdateUtil.setWidth(findWindow, "100%"); ZKUpdateUtil.setWidth(findWindow, "100%");
if (ClientInfo.maxHeight(ClientInfo.MEDIUM_HEIGHT-1)) if (ClientInfo.maxHeight(ClientInfo.MEDIUM_HEIGHT-1))
ZKUpdateUtil.setHeight(findWindow, "100%"); ZKUpdateUtil.setHeight(findWindow, "100%");

View File

@ -626,7 +626,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
div.appendChild(labelHistory); div.appendChild(labelHistory);
div.appendChild(historyCombo); div.appendChild(historyCombo);
historyCombo.setStyle("margin-left: 3px; margin-right: 3px; position: relative; vertical-align: middle;"); historyCombo.setStyle("margin-left: 3px; margin-right: 3px; position: relative; vertical-align: middle;");
div.setClass("toolbar");
winMain = new MultiTabPart(); winMain = new MultiTabPart();
winMain.createPart(layout); winMain.createPart(layout);
winMain.getComponent().setStyle("position: relative; margin-left: auto; margin-right: auto; margin-top: 3px; margin-bottom: 3px;"); winMain.getComponent().setStyle("position: relative; margin-left: auto; margin-right: auto; margin-top: 3px; margin-bottom: 3px;");
@ -647,6 +647,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
initSimple(); initSimple();
initAdvanced(); initAdvanced();
/** START DEVCOFFEE **/ /** START DEVCOFFEE **/
statusBar.setClass("statusbar");
layout.appendChild(statusBar); layout.appendChild(statusBar);
/** START DEVCOFFEE **/ /** START DEVCOFFEE **/