/// <summary> /// Create element for the new account /// </summary> /// <param name="ctx"></param> /// <param name="m_AD_Org_ID"></param> /// <param name="value"></param> /// <param name="name"></param> /// <param name="isExpenseType"></param> /// <param name="m_C_Element_ID"></param> /// <returns></returns> public int CreateElementValue(Ctx ctx, int m_AD_Org_ID, String value, String name, Boolean isExpenseType, int m_C_Element_ID) { MElementValue ev = new MElementValue(ctx, value, name, null, isExpenseType ? X_C_ElementValue.ACCOUNTTYPE_Expense : X_C_ElementValue.ACCOUNTTYPE_Revenue, X_C_ElementValue.ACCOUNTSIGN_Natural, false, false, null); ev.SetC_Element_ID(m_C_Element_ID); ev.SetAD_Org_ID(m_AD_Org_ID); if (!ev.Save()) { //log.Log(Level.WARNING, "C_ElementValue_ID not created"); Msg = "C_ElementValue_ID not created"; } ID = ev.GetC_ElementValue_ID(); return(ev.GetC_ElementValue_ID()); }