'Represent an Inventory Adjustment Item'

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

    if row:
        table = current.db.inv_adj_item
    elif (not id):
        return current.messages['NONE']
    else:
        db = current.db
        table = db.inv_adj_item
        row = db((table.id == id)).select(table.item_id, table.old_quantity, table.new_quantity, table.item_pack_id, limitby=(0, 1)).first()
    changed_quantity = 0
    try:
        if (row.new_quantity and row.old_quantity):
            changed_quantity = (row.new_quantity - row.old_quantity)
        repr = ('%s:%s    %s' % (table.item_id.represent(row.item_id, show_link=show_link), changed_quantity, table.item_pack_id.represent(row.item_pack_id)))
    except:
        return current.messages.UNKNOWN_OPT
    else:
        if show_link:
            return SPAN(repr)
        else:
            return repr
