def dvr_case_status_filter_opts(closed=None):
 table = current.s3db.dvr_case_status
 query = (table.deleted != True)
 if (closed is not None):
  if closed:
   query &= (table.is_closed == True)
  else:
   query &= ((table.is_closed == False) | (table.is_closed == None))
 rows = current.db(query).select(table.id, table.name, orderby='workflow_position')
 if (not rows):
  return {}
 T = current.T
 return OrderedDict(((row.id, T(row.name)) for row in rows))

def dvr_case_status_filter_opts ( closed = None ) : table = current . s3db . dvr_case_status query = ( table . deleted != True ) if ( closed is not None ) : if closed : query &= ( table . is_closed == True ) else : query &= ( ( table . is_closed == False ) | ( table . is_closed == None ) ) rows = current . db ( query ) . select ( table . id , table . name , orderby = 'workflow_position' ) if ( not rows ) : return { } T = current . T return OrderedDict ( ( ( row . id , T ( row . name ) ) for row in rows ) )
get filter options for case status .