/** * Before Save * @param newRecord new * @return true */ protected override bool BeforeSave(bool newRecord) { if (GetAD_User_ID() == -1) // Summary Project in Dimensions { SetAD_User_ID(0); } // Set Currency if (Is_ValueChanged("M_PriceList_Version_ID") && GetM_PriceList_Version_ID() != 0) { MPriceList pl = MPriceList.Get(GetCtx(), GetM_PriceList_ID(), null); if (pl != null && pl.Get_ID() != 0) { SetC_Currency_ID(pl.GetC_Currency_ID()); } } return(true); }
} // getDoc_User_ID /// <summary> /// Get Document Currency /// </summary> /// <returns>C_Currency_ID</returns> public int GetC_Currency_ID() { MPriceList pl = MPriceList.Get(GetCtx(), GetM_PriceList_ID(), Get_TrxName()); return(pl.GetC_Currency_ID()); } // getC_Currency_ID