use of org.compiere.model.MElementValue in project adempiere by adempiere.
the class Charge method createElementValue.
// dynInit
/**************************************************************************
* Create ElementValue for primary AcctSchema
* @param value value
* @param name name
* @param isExpenseType is expense
* @return element value
*/
protected int createElementValue(String value, String name, boolean isExpenseType) {
log.config(name);
//
MElementValue ev = new MElementValue(Env.getCtx(), value, name, null, isExpenseType ? MElementValue.ACCOUNTTYPE_Expense : MElementValue.ACCOUNTTYPE_Revenue, MElementValue.ACCOUNTSIGN_Natural, false, false, null);
ev.setAD_Org_ID(m_AD_Org_ID);
ev.setC_Element_ID(m_C_Element_ID);
if (!ev.save())
log.log(Level.WARNING, "C_ElementValue_ID not created");
return ev.getC_ElementValue_ID();
}
Aggregations