mht_brerp10
.adempiere
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
cof_request_history(integer, boolean)
Parameters
Name
Type
Mode
request_id
integer
IN
internaluser
boolean
IN
Definition
declare r_table RECORD; history TEXT; summary text; user_created text; date_created text; begin history := '<span style="white-space: pre-line">'; FOR r_table in select u.name, cof_getreflistvalue('R_RequestUpdate', 'ConfidentialTypeEntry', ru.confidentialtypeentry) as confidentialtypeentry, ru."result", to_char(ru.created,'dd/MM/YY HH12:MI:SS') as data_hora from r_requestupdate ru left join ad_user u on u.ad_user_id = ru.createdby where ru.r_request_id = request_id and (internaluser or ru.confidentialtypeentry != 'I') order by ru.created desc LOOP history := history || '<b>Usuário:</b> ' || r_table.name || ' - <b>Data:</b> ' || r_table.data_hora || ' - <b>Visibilidade:</b> ' || r_table.confidentialtypeentry || ' - <b>Resultado:</b> <br/>' || r_table.result || '<hr/>'; END LOOP; select coalesce(r.summary,''), u.name, to_char(r.created,'dd/MM/YY HH12:MI:SS') into summary,user_created,date_created from r_request r left join ad_user u on u.ad_user_id = r.createdby where r.r_request_id = request_id ; history := history || '<b>Usuário:</b> ' || user_created|| ' - <b> Data:</b> ' || date_created || ' - <b>Resumo:</b> <br/> ' || summary || '</span>'; RETURN history; END;