if (!p_Status.equals(STATUS_Posted))
{
// Insert Note
String AD_MessageValue = "PostingError-" + p_Status;
int AD_User_ID = p_po.getUpdatedBy();
MNote note = new MNote (getCtx(), AD_MessageValue, AD_User_ID,
getAD_Client_ID(), getAD_Org_ID(), null);
note.setRecord(p_po.get_Table_ID(), p_po.get_ID());
// Reference
note.setReference(toString()); // Document
// Text
StringBuffer Text = new StringBuffer (Msg.getMsg(Env.getCtx(), AD_MessageValue));
if (p_Error != null)
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());
note.setTextMsg(Text.toString());
note.save();
p_Error = Text.toString();
}
// dispose facts
for (int i = 0; i < m_fact.size(); i++)