project QadFinancials > class BPeriod > business logic query GetPeriodsOfDateRange

Description

Thiis query has has input 2 dates (mostly a to and from date) and the query returns all periods which cover these dates based on start- and end date


Parameters


iiCompanyIdintegerCompany id
itToDatedate
itFromDatedate


query condition


  each Period where
Period.Company_Id = iiCompanyId AND
(Period.Company_ID = iiCompanyId and
Period.PeriodStartDate >= itFromDate and
Period.PeriodEndDate <= itToDate ) or
(Period.Company_ID = iiCompanyId and
Period.PeriodStartDate <= itFromDate and
Period.PeriodEndDate >= itFromDate ) or
(Period.Company_ID = iiCompanyId and
Period.PeriodStartDate <= itToDate and
Period.PeriodEndDate >= itToDate )


query resultset tqGetPeriodsOfDateRange


field namedata typedb fielddescription
tiCompany_IDintegerPeriod.Company_IDLink to Company
tiPeriod_IDintegerPeriod.Period_IDRecord ID
ttPeriodEndDatedatePeriod.PeriodEndDateEnd Date
tiPeriodMark_IDintegerPeriod.PeriodMark_IDMark
tiPeriodPeriodintegerPeriod.PeriodPeriodGL Period
ttPeriodStartDatedatePeriod.PeriodStartDateStart Date
tcPeriodStatuscharacterPeriod.PeriodStatusStatus
tcPeriodTypeCodecharacterPeriod.PeriodTypeCodeGL Period Type
tiPeriodYearintegerPeriod.PeriodYearGL Calendar Year
tiPeriodYearPeriodintegerPeriod.PeriodYearPeriodGL Calendar Year/GL Period


Internal usage


QadFinancials
method BPeriod.GetPeriodsOfRange
dataset BAnalyticalReport.ttSelectedPeriods
dataset BGLReport.ttSelectedPeriod
dataset BPeriod.tSelectedPeriods