CREATE OR REPLACE FUNCTION food600.getcisloorgmaster(
	cisloorg integer)
    RETURNS character varying
    LANGUAGE 'plpgsql'

    COST 100
    VOLATILE 
    
AS $BODY$
DECLARE cisloorgmaster INTEGER;
BEGIN
SELECT cislo_org_master INTO cisloorgmaster FROM kredit.orgstr WHERE cislo_org=cisloorg;
RETURN btrim(cisloorgmaster::character(20));
END
$BODY$;
