BF [ 1789949 ] VPayment: is displaying just "CashNotCreated"
This commit is contained in:
parent
42fc2ba250
commit
f7f9a949ed
|
@ -150,6 +150,20 @@ public class CLogger extends Logger implements Serializable
|
||||||
return vp;
|
return vp;
|
||||||
} // retrieveError
|
} // 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
|
* Get Error from Stack
|
||||||
* @return last exception
|
* @return last exception
|
||||||
|
|
|
@ -60,7 +60,9 @@ import org.compiere.util.*;
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: VPayment.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
|
* @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
|
public class VPayment extends CDialog
|
||||||
implements ActionListener
|
implements ActionListener
|
||||||
|
@ -1035,7 +1037,7 @@ public class VPayment extends CDialog
|
||||||
else // Default
|
else // Default
|
||||||
cash = MCash.get (Env.getCtx(), m_AD_Org_ID, newDateAcct, C_Currency_ID, null);
|
cash = MCash.get (Env.getCtx(), m_AD_Org_ID, newDateAcct, C_Currency_ID, null);
|
||||||
if (cash == null || cash.get_ID() == 0)
|
if (cash == null || cash.get_ID() == 0)
|
||||||
ADialog.error(m_WindowNo, this, "PaymentError", "CashNotCreated");
|
ADialog.error(m_WindowNo, this, "PaymentError", CLogger.retrieveErrorString("CashNotCreated"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MCashLine cl = new MCashLine (cash);
|
MCashLine cl = new MCashLine (cash);
|
||||||
|
|
Loading…
Reference in New Issue