/// <summary>
        /// Process
        /// </summary>
        /// <returns>info</returns>
        protected override string DoIt()
        {
            if (!Env.IsModuleInstalled("FRPT_"))
            {
                return(Msg.GetMsg(GetCtx(), "InstallFinancialManagement"));
            }
            String msg = "";
            MRevenueRecognition mRevenueRecognition = null;

            if (_RecognitionDate <= DateTime.Now)
            {
                if (_RevenueRecognition_ID > 0)
                {
                    mRevenueRecognition = new MRevenueRecognition(GetCtx(), _RevenueRecognition_ID, Get_TrxName());
                    msg = CreateJournals(mRevenueRecognition);
                }
                else
                {
                    MRevenueRecognition[] RevenueRecognitions = MRevenueRecognition.GetRecognitions(GetCtx(), Get_TrxName());
                    if (RevenueRecognitions != null && RevenueRecognitions.Length > 0)
                    {
                        for (int i = 0; i < RevenueRecognitions.Length; i++)
                        {
                            mRevenueRecognition = RevenueRecognitions[i];
                            msg = CreateJournals(mRevenueRecognition);
                        }
                    }
                }
            }
            else
            {
                msg = Msg.GetMsg(GetCtx(), "AccountDateGreater");
            }
            return(msg);
        }
Exemplo n.º 2
0
        protected override string DoIt()
        {
            String msg = "";
            MRevenueRecognition mRevenueRecognition = null;

            if (_RevenueRecognition_ID > 0)
            {
                mRevenueRecognition = new MRevenueRecognition(GetCtx(), _RevenueRecognition_ID, Get_Trx());
                msg = createJournals(mRevenueRecognition);
            }
            else
            {
                MRevenueRecognition[] RevenueRecognitions = MRevenueRecognition.GetRecognitions(GetCtx(), Get_Trx());
                if (RevenueRecognitions != null && RevenueRecognitions.Length > 0)
                {
                    for (int i = 0; i < RevenueRecognitions.Length; i++)
                    {
                        mRevenueRecognition = RevenueRecognitions[i];
                        msg = createJournals(mRevenueRecognition);
                    }
                }
            }
            return(msg);
        }