コード例 #1
0
        public virtual IEnumerable previousperiod(PXAdapter adapter)
        {
            InventoryTranSumEnqFilter filter = Filter.Current as InventoryTranSumEnqFilter;

            FinPeriod prevPeriod = FinPeriodRepository.FindPrevPeriod(FinPeriod.organizationID.MasterValue, filter.FinPeriodID, looped: true);

            filter.FinPeriodID = prevPeriod?.FinPeriodID;
            return(adapter.Get());
        }
コード例 #2
0
        public virtual IEnumerable PreviousPeriod(PXAdapter adapter)
        {
            DiscrepancyEnqFilter filter = Filter.Current as DiscrepancyEnqFilter;

            filter.UseMasterCalendar = filter.OrganizationID == null && filter.BranchID == null;
            int?calendarOrganizationID = FinPeriodRepository.GetCalendarOrganizationID(filter.OrganizationID, filter.BranchID, filter.UseMasterCalendar);

            FinPeriod prevPeriodFrom = FinPeriodRepository.FindPrevPeriod(calendarOrganizationID, filter.PeriodFrom, looped: true);

            filter.PeriodFrom = prevPeriodFrom != null ? prevPeriodFrom.FinPeriodID : null;

            FinPeriod prevPeriodTo = FinPeriodRepository.FindPrevPeriod(calendarOrganizationID, filter.PeriodTo, looped: true);

            filter.PeriodTo      = prevPeriodTo != null ? prevPeriodTo.FinPeriodID : null;
            filter.FilterDetails = null;
            return(adapter.Get());
        }