Annotation: core.get_currency_code_by_party_code

CREATE OR REPLACE FUNCTION core.get_currency_code_by_party_code(_party_code character varying)
RETURNS text

Information: core.get_currency_code_by_party_code

Schema core
Function Name get_currency_code_by_party_code
Arguments _party_code character varying
Owner postgres
Result Type text
Description

Implementation: core.get_currency_code_by_party_code

CREATE OR REPLACE FUNCTION core.get_currency_code_by_party_code(_party_code character varying)
 RETURNS text
 LANGUAGE plpgsql
 STABLE
AS $function$
BEGIN
    RETURN core.accounts.currency_code
    FROM core.accounts
    INNER JOIN core.parties
    ON core.accounts.account_id = core.parties.account_id
    AND core.parties.party_code=$1;
END
$function$