parameters: (node_uid, section_uid, mirror_section_uid)
docstring: max_date = max([l.date for l in line_list])
    for line in line_list:
      assert line.getGroupingDate() in (max_date, None)
docstring_summary: max_date = max([l.date for l in line_list])
    for line in line_list:
      assert line.getGroupingDate() in (max_date, None)
docstring_tokens: max_date = max ( [ l . date for l in line_list ] ) for line in line_list : assert line . getGroupingDate () in ( max_date None )
function: def check(node_uid, section_uid, mirror_section_uid):
    precision = precision_by_section_uid[section_uid]
    if mirror_section_uid is None:
      mirror_section_uid = SimpleQuery(mirror_section_uid=None)
    line_list = portal.portal_simulation.getMovementHistoryList(
                    portal_type=portal.getPortalAccountingMovementTypeList(),
                    grouping_reference=context.getGroupingReference(),
                    node_uid=node_uid,
                    section_uid=section_uid,
                    mirror_section_uid=mirror_section_uid)
    if not line_list:
      return
    total = round(sum([(l.total_price or 0) for l in line_list]), precision)
    if total != 0:
      # XXX if n transactions that do not match are grouped together, the same
      # problem will be reported n times.
      portal.restrictedTraverse(active_process).postResult(
       ActiveResult(summary=script.getId(),
           detail='%s has wrong grouping (%s)' % (context.getRelativeUrl(), total),
           result='',
           severity=100))
           
    # XXX we could check this as well
    """
    max_date = max([l.date for l in line_list])
    for line in line_list:
      assert line.getGroupingDate() in (max_date, None)
    """
function_tokens: def check ( node_uid , section_uid , mirror_section_uid ) : precision = precision_by_section_uid [ section_uid ] if mirror_section_uid is None : mirror_section_uid = SimpleQuery ( mirror_section_uid = None ) line_list = portal . portal_simulation . getMovementHistoryList ( portal_type = portal . getPortalAccountingMovementTypeList ( ) , grouping_reference = context . getGroupingReference ( ) , node_uid = node_uid , section_uid = section_uid , mirror_section_uid = mirror_section_uid ) if not line_list : return total = round ( sum ( [ ( l . total_price or 0 ) for l in line_list ] ) , precision ) if total != 0 : # XXX if n transactions that do not match are grouped together, the same # problem will be reported n times. portal . restrictedTraverse ( active_process ) . postResult ( ActiveResult ( summary = script . getId ( ) , detail = '%s has wrong grouping (%s)' % ( context . getRelativeUrl ( ) , total ) , result = '' , severity = 100 ) ) # XXX we could check this as well