Exemple #1
0
def getSubmittedReqs(agency, year, month):
    #monthly requirements
    submitted_reqs = []
    if isMonthlyRepSubmitted(agency, year, month-1):
        submitted_reqs.append({'name':stringify_month(month-1)+' Performance Report of Operation'})
    #quarterly requirements
    quarter = quarterofMonth(month)
    if quarter==4:
        year-=1
    qrs = getQuarterReqSubmitted(agency, year, quarter)
    for qr in qrs:
        submitted_reqs.append({'name': qr.requirement.name,
                               'date_submitted' : qr.date_submitted})
    
    return submitted_reqs
Exemple #2
0
def getLackingReqs(agency, year, month):
    lacking_reqs = []
    required_month = 1
    if month==1:
        required_month = 12
        year -=1
    else:
        required_month = month-1
        
    if not isMonthlyRepSubmitted(agency, year, required_month):
        lacking_reqs.append(stringify_month(required_month)+ '-' + str(year) +' Performance Report of Operation')
    #quarter requirements
    quarter = quarterofMonth(month)
    quarter_reqs = getLackingQuarterReqs(agency, year, quarter)
    for req in quarter_reqs:
        lacking_reqs.append(str(year)+'-'+quarters[quarter]+' '+req['name'])
    return lacking_reqs
Exemple #3
0
def getLackingReqs(agency, year, month):
    lacking_reqs = []
    required_month = 1
    if month==1:
        required_month = 12
        year -=1
    else:
        required_month = month-1
        
    for i in range(1, required_month+1):
        if not isMonthlyRepSubmitted(agency, year, i):
            lacking_reqs.append(stringify_month(i)+ '-' + str(year) +' Performance Report of Operation')

    #quarter requirements
    quarter = quarterofMonth(month)
    q_year_req = year-1 if month <=3 and month >= 2 else year
    for i in range(1, quarter+1):
        quarter_reqs = getLackingQuarterReqs(agency, q_year_req, i)
        for req in quarter_reqs:
            lacking_reqs.append(str(q_year_req)+'-'+quarters[i]+' '+req['name'])
    return lacking_reqs