'Represent a Sent Shipment'

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

    if row:
        id = row.id
        table = current.db.inv_send
    elif (not id):
        return current.messages['NONE']
    else:
        db = current.db
        table = db.inv_send
        row = db((table.id == id)).select(table.date, table.send_ref, table.to_site_id, limitby=(0, 1)).first()
    try:
        send_ref_string = table.send_ref.represent(row.send_ref, show_link=False)
        to_string = table.to_site_id.represent(row.to_site_id, show_link=False)
        date_string = table.date.represent(row.date)
        T = current.T
        represent = ('%s    (%s:    %s    %s    %s)' % (send_ref_string, T('To'), to_string, T('on'), date_string))
        if show_link:
            return A(represent, _href=URL(c='inv', f='send', args=[id]))
        else:
            return represent
    except:
        return current.messages.UNKNOWN_OPT
