Merge release-7.1

This commit is contained in:
Carlos Ruiz 2019-12-12 12:38:45 +01:00
commit b4be53cbaf
9 changed files with 98 additions and 38 deletions

View File

@ -0,0 +1,13 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Dec 10, 2019, 7:14:05 PM CET
ALTER TABLE T_Selection MODIFY ViewID VARCHAR2(2000)
;
ALTER TABLE T_Selection_InfoWindow MODIFY ViewID VARCHAR2(2000)
;
SELECT register_migration_script('201912101914_IDEMPIERE-4129.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- CPH::ERP Comments:
-- 26. okt. 2019 14.51.26 CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Period Open',0,0,'Y',TO_DATE('2019-10-26 14:51:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-10-26 14:51:25','YYYY-MM-DD HH24:MI:SS'),100,200580,'PeriodOpen','D','cb274239-00ed-4a7f-b508-4a00436e6d70')
;
SELECT register_migration_script('201912111530_IDEMPIERE-4078.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
-- IDEMPIERE-4129 Increase field size t_selection.viewid (FHCA-1130)
-- Dec 10, 2019, 7:14:05 PM CET
INSERT INTO t_alter_column values('T_Selection','ViewID','VARCHAR(2000)',null,null)
;
INSERT INTO t_alter_column values('T_Selection_InfoWindow','ViewID','VARCHAR(2000)',null,null)
;
SELECT register_migration_script('201912101914_IDEMPIERE-4129.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- CPH::ERP Comments:
-- 26. okt. 2019 14.51.26 CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Period Open',0,0,'Y',TO_TIMESTAMP('2019-10-26 14:51:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-10-26 14:51:25','YYYY-MM-DD HH24:MI:SS'),100,200580,'PeriodOpen','D','cb274239-00ed-4a7f-b508-4a00436e6d70')
;
SELECT register_migration_script('201912111530_IDEMPIERE-4078.sql') FROM dual
;

View File

@ -22,6 +22,8 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
@ -45,6 +47,7 @@ import org.compiere.model.MMatchInv;
import org.compiere.model.MMatchPO;
import org.compiere.model.MNote;
import org.compiere.model.MPeriod;
import org.compiere.model.MRefList;
import org.compiere.model.ModelValidationEngine;
import org.compiere.model.ModelValidator;
import org.compiere.model.PO;
@ -52,6 +55,7 @@ import org.compiere.process.DocumentEngine;
import org.compiere.util.AdempiereUserError;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Trx;
@ -653,6 +657,8 @@ public abstract class Doc
if (!p_Status.equals(STATUS_Posted) && !p_Status.equals(STATUS_Deferred))
{
// Insert Note
SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date);
DecimalFormat numberFormat = DisplayType.getNumberFormat(DisplayType.Amount);
String AD_MessageValue = "PostingError-" + p_Status;
int AD_User_ID = p_po.getUpdatedBy();
MNote note = new MNote (getCtx(), AD_MessageValue, AD_User_ID,
@ -666,14 +672,14 @@ public abstract class Doc
Text.append(" (").append(p_Error).append(")");
String cn = getClass().getName();
Text.append(" - ").append(cn.substring(cn.lastIndexOf('.')))
.append(" (").append(getDocumentType())
.append(" - DocumentNo=").append(getDocumentNo())
.append(", DateAcct=").append(getDateAcct().toString().substring(0,10))
.append(", Amount=").append(getAmount())
.append(", Sta=").append(p_Status)
.append(" - PeriodOpen=").append(isPeriodOpen())
.append(", Balanced=").append(isBalanced())
.append(", Schema=").append(m_as.getName());
.append(" (").append(getDocumentType())
.append(" - " + Msg.getElement(Env.getCtx(),"DocumentNo") + "=").append(getDocumentNo())
.append(" - " + Msg.getElement(Env.getCtx(),"DateAcct") + "=").append(dateFormat.format(getDateAcct()))
.append(" - " + Msg.getMsg(Env.getCtx(),"Amount") + "=").append(numberFormat.format(getAmount()))
.append(" - " + Msg.getElement(Env.getCtx(),"DocStatus") + "=").append(MRefList.getListName(getCtx(), 131, m_DocStatus))
.append(" - " + Msg.getMsg(Env.getCtx(),"PeriodOpen") + "=").append(Msg.getMsg(Env.getCtx(), String.valueOf(isPeriodOpen())))
.append(" - " + Msg.getElement(Env.getCtx(),"IsBalanced") + "=").append( Msg.getMsg(Env.getCtx(), String.valueOf(isBalanced())))
.append(" - " + Msg.getElement(Env.getCtx(),"C_AcctSchema_ID") + "=").append(m_as.getName());
note.setTextMsg(Text.toString());
note.saveEx();
p_Error = Text.toString();

View File

@ -87,7 +87,7 @@ public class MPayment extends X_C_Payment
/**
*
*/
private static final long serialVersionUID = -6268462097642919346L;
private static final long serialVersionUID = 3236788845265387613L;
/**
* Get Payments Of BPartner
@ -167,13 +167,13 @@ public class MPayment extends X_C_Payment
} // MPayment
/** Temporary Bank Account Processors */
private MBankAccountProcessor[] m_mBankAccountProcessors = null;
protected MBankAccountProcessor[] m_mBankAccountProcessors = null;
/** Temporary Bank Account Processor */
private MBankAccountProcessor m_mBankAccountProcessor = null;
protected MBankAccountProcessor m_mBankAccountProcessor = null;
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MPayment.class);
protected static CLogger s_log = CLogger.getCLogger (MPayment.class);
/** Error Message */
private String m_errorMessage = null;
protected String m_errorMessage = null;
/** Reversal Indicator */
public static String REVERSE_INDICATOR = "^";
@ -1096,7 +1096,7 @@ public class MPayment extends X_C_Payment
* @param CreditCardType credit card Type
* @return pair
*/
private ValueNamePair getCreditCardPair (String CreditCardType)
protected ValueNamePair getCreditCardPair (String CreditCardType)
{
return new ValueNamePair (CreditCardType, getCreditCardName(CreditCardType));
} // getCreditCardPair
@ -1232,7 +1232,7 @@ public class MPayment extends X_C_Payment
* Set DocumentNo to Payment info.
* If there is a R_PnRef that is set automatically
*/
private void setDocumentNo()
protected void setDocumentNo()
{
// Cash Transfer
if ("X".equals(getTenderType()))
@ -1450,7 +1450,7 @@ public class MPayment extends X_C_Payment
/**
* Set Doc Type bases on IsReceipt
*/
private void setC_DocType_ID ()
protected void setC_DocType_ID ()
{
setC_DocType_ID(isReceipt());
} // setC_DocType_ID
@ -1508,7 +1508,7 @@ public class MPayment extends X_C_Payment
* @param pAllocs
* @return true if ok
*/
private boolean verifyDocType(MPaymentAllocate[] pAllocs)
protected boolean verifyDocType(MPaymentAllocate[] pAllocs)
{
if (getC_DocType_ID() == 0)
return false;
@ -1655,7 +1655,7 @@ public class MPayment extends X_C_Payment
* @param pAllocs
* @return true if ok
*/
private boolean verifyPaymentAllocateVsHeader(MPaymentAllocate[] pAllocs) {
protected boolean verifyPaymentAllocateVsHeader(MPaymentAllocate[] pAllocs) {
if (pAllocs.length > 0) {
if (getC_Charge_ID() > 0 || getC_Invoice_ID() > 0 || getC_Order_ID() > 0)
return false;
@ -1668,7 +1668,7 @@ public class MPayment extends X_C_Payment
* @param pAllocs
* @return true if ok
*/
private boolean verifyPaymentAllocateSum(MPaymentAllocate[] pAllocs) {
protected boolean verifyPaymentAllocateSum(MPaymentAllocate[] pAllocs) {
BigDecimal sumPaymentAllocates = Env.ZERO;
if (pAllocs.length > 0) {
for (MPaymentAllocate pAlloc : pAllocs)
@ -1787,11 +1787,11 @@ public class MPayment extends X_C_Payment
} // process
/** Process Message */
private String m_processMsg = null;
protected String m_processMsg = null;
/** Just Prepared Flag */
private boolean m_justPrepared = false;
protected boolean m_justPrepared = false;
@SuppressWarnings("unused")
private IProcessUI m_processUI;
protected IProcessUI m_processUI;
/**
* Unlock Document.
@ -2128,7 +2128,7 @@ public class MPayment extends X_C_Payment
/**
* Set the definite document number after completed
*/
private void setDefiniteDocumentNo() {
protected void setDefiniteDocumentNo() {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (dt.isOverwriteDateOnComplete()) {
setDateTrx(TimeUtil.getDay(0));
@ -2148,7 +2148,7 @@ public class MPayment extends X_C_Payment
* Create Counter Document
* @return payment
*/
private MPayment createCounterDoc()
protected MPayment createCounterDoc()
{
// Is this a counter doc ?
if (getRef_Payment_ID() != 0)
@ -2317,7 +2317,7 @@ public class MPayment extends X_C_Payment
* Allocate single AP/AR Invoice
* @return true if allocated
*/
private boolean allocateInvoice()
protected boolean allocateInvoice()
{
// calculate actual allocation
BigDecimal allocationAmt = getPayAmt(); // underpayment
@ -2364,7 +2364,7 @@ public class MPayment extends X_C_Payment
* Allocate Payment Selection
* @return true if allocated
*/
private boolean allocatePaySelection()
protected boolean allocatePaySelection()
{
MAllocationHdr alloc = new MAllocationHdr(getCtx(), false,
getDateTrx(), getC_Currency_ID(),
@ -2455,7 +2455,7 @@ public class MPayment extends X_C_Payment
* Unkink Invoices and Orders and delete Allocations
* @param accrual
*/
private void deAllocate(boolean accrual)
protected void deAllocate(boolean accrual)
{
// if (getC_Order_ID() != 0) setC_Order_ID(0); // IDEMPIERE-1764
// if (getC_Invoice_ID() == 0)
@ -2634,7 +2634,7 @@ public class MPayment extends X_C_Payment
return true;
} // reverseCorrectionIt
private StringBuilder reverse(boolean accrual) {
protected StringBuilder reverse(boolean accrual) {
if (!voidOnlinePayment())
return null;
@ -2753,7 +2753,7 @@ public class MPayment extends X_C_Payment
* Get Bank Statement Line of payment or 0
* @return id or 0
*/
private int getC_BankStatementLine_ID()
protected int getC_BankStatementLine_ID()
{
String sql = "SELECT C_BankStatementLine_ID FROM C_BankStatementLine WHERE C_Payment_ID=?";
int id = DB.getSQLValue(get_TrxName(), sql, getC_Payment_ID());
@ -2989,7 +2989,7 @@ public class MPayment extends X_C_Payment
return paymentTransaction;
}
private boolean voidOnlinePayment()
protected boolean voidOnlinePayment()
{
if (getTenderType().equals(TENDERTYPE_CreditCard) && isOnline())
{
@ -3048,7 +3048,7 @@ public class MPayment extends X_C_Payment
}
// IDEMPIERE-2588
private MAllocationHdr m_justCreatedAllocInv = null;
protected MAllocationHdr m_justCreatedAllocInv = null;
public MAllocationHdr getJustCreatedAllocInv() {
return m_justCreatedAllocInv;
}

View File

@ -1110,6 +1110,9 @@ public class FinReport extends SvrProcess
private String getLineIDs (int fromID, int toID)
{
if (log.isLoggable(Level.FINEST)) log.finest("From=" + fromID + " To=" + toID);
if (fromID == toID) {
return String.valueOf(fromID);
}
int firstPA_ReportLine_ID = 0;
int lastPA_ReportLine_ID = 0;

View File

@ -24,7 +24,7 @@ FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
@Set VMOPTS=%VMOPTS% -Dosgi.compatibility.bootdelegation=true
@Set VMOPTS=%VMOPTS% -Djetty.home=jettyhome
@Set VMOPTS=%VMOPTS% -Djetty.base=jettyhome
@Set VMOPTS=%VMOPTS% -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml
@Set VMOPTS=%VMOPTS% -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-https.xml
@Set VMOPTS=%VMOPTS% -Dosgi.console=localhost:12612
@Set VMOPTS=%VMOPTS% -Dmail.mime.encodefilename=true
@Set VMOPTS=%VMOPTS% -Dmail.mime.decodefilename=true

View File

@ -25,6 +25,7 @@ import org.adempiere.webui.component.Tabpanel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.process.ProcessInfoLog;
import org.zkoss.zul.Html;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Execution;
@ -53,8 +54,10 @@ public class StatusBar extends Panel implements EventListener<Event>
*
*/
private static final long serialVersionUID = 1519490416637936553L;
private Panel infoPanel;
private Label infoLine;
private Html infoLine;
private Div west;
@ -84,8 +87,10 @@ public class StatusBar extends Panel implements EventListener<Event>
private void init()
{
infoLine = new Label();
infoPanel = new Panel();
infoLine = new Html();
infoPanel.appendChild(infoLine);
east = new Div();
east.setSclass("adwindow-status-docinfo");
east.appendChild(infoLine);
@ -107,9 +112,12 @@ public class StatusBar extends Panel implements EventListener<Event>
*/
public void setInfo (String text)
{
infoLine.setValue(text != null ? text : "");
infoLine.setTooltiptext(text);
infoLine.setStyle("font-weight: bold;");
StringBuilder inflcnt = new StringBuilder();
inflcnt.append("<html>\n<body>\n<div class=\"help-content\">\n");
inflcnt.append(text != null ? text : "");
inflcnt.append("</div>\n</body>\n</html>");
infoLine.setContent(inflcnt.toString());
} // setInfo
/**