====== pears.CollectionGetItemTypeName ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."CollectionGetItemTypeName" IS
{create function CollectionGetItemTypeName
/* Application Maintained Function / Procedure - DO NOT EDIT*/
(in ItemType char(2))
returns varchar(20)
begin
declare rv varchar(20);
/* Item Types P -person, C -company, E -employment, L -placement, R -progress, T -timesheet, I -Invoice, V -vacancy, Q -timesheet query, 0 -contact event, */
case ItemType
when 'O' then set rv = wpkgetswitchvalue('cename', 'Global');
when 'H' then set rv = 'Header';
when 'E' then set rv = wpkgetswitchvalue('copersonname', 'Global');
when 'P' then set rv = wpkgetswitchvalue('appname', 'Global');
when 'Q' then set rv = 'Timesheet Query';
when 'T' then set rv = 'Timesheet';
when 'Z' then set rv = 'Prov. Timesheet';
when 'S' then set rv = 'Shift';
when 'R' then set rv = 'Progress';
when 'C' then set rv = wpkgetswitchvalue('coname', 'Global');
when 'I' then set rv = 'Invoice';
when 'V' then set rv = wpkgetswitchvalue('vacname', 'Global');
when 'L' then set rv = wpkgetswitchvalue('placname', 'Global');
end case;
return rv
end
}