/// <summary>
        /// Retrieves the first financial period of the year corresponding
        /// to the financial period specified.
        /// If no such period exists, returns <c>null</c>.
        /// </summary>
        public string GetFirstPeriodOfYear(string financialPeriodID)
        {
            if (financialPeriodID == null)
            {
                return(null);
            }

            PXGraph graph = PXGraph.CreateInstance <MasterFinPeriodMaint>();

            string firstPeriodOfYear = FinPeriodUtils.GetFirstFinPeriodIDOfYear(financialPeriodID);

            IFinPeriodRepository finPeriodRepository = graph.GetService <IFinPeriodRepository>();

            if (!finPeriodRepository.PeriodExists(financialPeriodID, FinPeriod.organizationID.MasterValue))
            {
                return(null);
            }

            return(FinPeriodIDFormattingAttribute.FormatForDisplay(firstPeriodOfYear));
        }