'Represent a Received Shipment'

@staticmethod
def inv_recv_represent(id, row=None, show_link=True):

    if row:
        id = row.id
        table = current.db.inv_recv
    elif (not id):
        return current.messages['NONE']
    else:
        db = current.db
        table = db.inv_recv
        row = db((table.id == id)).select(table.date, table.recv_ref, table.from_site_id, table.organisation_id, limitby=(0, 1)).first()
    recv_ref_string = table.send_ref.represent(row.recv_ref, show_link=False)
    if row.from_site_id:
        from_string = table.from_site_id.represent(row.from_site_id, show_link=False)
    else:
        from_string = table.organisation_id.represent(row.organisation_id, show_link=False)
    date_string = table.date.represent(row.date)
    T = current.T
    represent = ('%s    (%s:    %s    %s    %s)' % (recv_ref_string, T('From'), from_string, T('on'), date_string))
    if show_link:
        return A(represent, _href=URL(c='inv', f='recv', args=[id]))
    else:
        return represent
