Annotation: transactions.get_default_currency_code

CREATE OR REPLACE FUNCTION transactions.get_default_currency_code(cash_repository_id integer)
RETURNS character varying

Information: transactions.get_default_currency_code

Schema transactions
Function Name get_default_currency_code
Arguments cash_repository_id integer
Owner postgres
Result Type character varying
Description

Implementation: transactions.get_default_currency_code

CREATE OR REPLACE FUNCTION transactions.get_default_currency_code(cash_repository_id integer)
 RETURNS character varying
 LANGUAGE plpgsql
AS $function$
BEGIN
    RETURN
    (
        SELECT office.offices.currency_code 
        FROM office.cash_repositories
        INNER JOIN office.offices
        ON office.offices.office_id = office.cash_repositories.office_id
        WHERE office.cash_repositories.cash_repository_id=$1
        
    );
END
$function$