(ctp_code, date)
return (amount_list if len(amount_list) > 0 else [0])
Return a list of the previous contributions for 
  a specific CTP code in the older DSN
Return a list of the previous contributions for 
  a specific CTP code in the older DSN
Return a list of the previous contributions for a specific CTP code in the older DSN
def getFeeFromDate(ctp_code, date):
  '''
  Return a list of the previous contributions for 
  a specific CTP code in the older DSN
  '''
  amount_list = []
  aggregated_fee_list = context.DSNReport_getGroupedOlderValues(searched_bloc='S21.G00.23',
                                                                grouping_rubric='S21.G00.11.001',
                                                                from_date=date)
  for dsn_record in aggregated_fee_list:
    for establishment in aggregated_fee_list[dsn_record].keys():
      if establishment != current_establishement_code:
        continue
      for bloc in aggregated_fee_list[dsn_record][establishment]:
        bloc_found = 0
        for rubric, value in bloc:
          value = value.strip('\'')
          if rubric == 'S21.G00.23.001' and value == ctp_code:
            bloc_found = 1
          if rubric == 'S21.G00.23.001' and value != ctp_code:
            bloc_found = 0
          if bloc_found and rubric == 'S21.G00.23.004':
            amount_list.append(float(value))
  return (amount_list if len(amount_list) > 0 else [0])
def getFeeFromDate ( ctp_code , date ) : amount_list = [ ] aggregated_fee_list = context . DSNReport_getGroupedOlderValues ( searched_bloc = 'S21.G00.23' , grouping_rubric = 'S21.G00.11.001' , from_date = date ) for dsn_record in aggregated_fee_list : for establishment in aggregated_fee_list [ dsn_record ] . keys ( ) : if establishment != current_establishement_code : continue for bloc in aggregated_fee_list [ dsn_record ] [ establishment ] : bloc_found = 0 for rubric , value in bloc : value = value . strip ( '\'' ) if rubric == 'S21.G00.23.001' and value == ctp_code : bloc_found = 1 if rubric == 'S21.G00.23.001' and value != ctp_code : bloc_found = 0 if bloc_found and rubric == 'S21.G00.23.004' : amount_list . append ( float ( value ) ) return ( amount_list if len ( amount_list ) > 0 else [ 0 ] )