def commit_item_json():
 ctable = s3db.req_commit
 itable = s3db.req_commit_item
 stable = s3db.org_site
 query = ((((itable.req_item_id == request.args[0]) & (ctable.id == itable.commit_id)) & (ctable.site_id == stable.id)) & (itable.deleted == False))
 records = db(query).select(ctable.id, ctable.date, stable.name, itable.quantity, orderby=db.req_commit.date)
 json_str = ('[%s,%s' % (json.dumps(dict(id=str(T('Committed')), quantity='#')), records.json()[1:]))
 response.headers['Content-Type'] = 'application/json'
 return json_str

def commit_item_json ( ) : ctable = s3db . req_commit itable = s3db . req_commit_item stable = s3db . org_site query = ( ( ( ( itable . req_item_id == request . args [ 0 ] ) & ( ctable . id == itable . commit_id ) ) & ( ctable . site_id == stable . id ) ) & ( itable . deleted == False ) ) records = db ( query ) . select ( ctable . id , ctable . date , stable . name , itable . quantity , orderby = db . req_commit . date ) json_str = ( '[%s,%s' % ( json . dumps ( dict ( id = str ( T ( 'Committed' ) ) , quantity = '#' ) ) , records . json ( ) [ 1 : ] ) ) response . headers [ 'Content-Type' ] = 'application/json' return json_str
used by s3 .