BF [ 1789949 ] VPayment: is displaying just "CashNotCreated"

This commit is contained in:
teo_sarca 2007-09-07 09:30:17 +00:00
parent 42fc2ba250
commit f7f9a949ed
2 changed files with 18 additions and 2 deletions

View File

@ -149,6 +149,20 @@ public class CLogger extends Logger implements Serializable
s_lastError = null;
return vp;
} // retrieveError
/**
* Get Error message from stack
* @param defaultMsg default message (used when there are no errors on stack)
* @return error message, or defaultMsg if there is not error message saved
* @see #retrieveError()
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
*/
public static String retrieveErrorString(String defaultMsg) {
ValueNamePair vp = retrieveError();
if (vp == null)
return defaultMsg;
return vp.getName();
}
/**
* Get Error from Stack

View File

@ -60,7 +60,9 @@ import org.compiere.util.*;
* @author Jorg Janke
* @version $Id: VPayment.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
*
* @author Teo Sarca, SC ARHIPAC SERVICE SRL - BF [ 1763488 ]
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
* <li>BF [ 1763488 ] Error on cash payment
* <li>BF [ 1789949 ] VPayment: is displaying just "CashNotCreated"
*/
public class VPayment extends CDialog
implements ActionListener
@ -1035,7 +1037,7 @@ public class VPayment extends CDialog
else // Default
cash = MCash.get (Env.getCtx(), m_AD_Org_ID, newDateAcct, C_Currency_ID, null);
if (cash == null || cash.get_ID() == 0)
ADialog.error(m_WindowNo, this, "PaymentError", "CashNotCreated");
ADialog.error(m_WindowNo, this, "PaymentError", CLogger.retrieveErrorString("CashNotCreated"));
else
{
MCashLine cl = new MCashLine (cash);