Annotation: core.get_cash_account_id

CREATE OR REPLACE FUNCTION core.get_cash_account_id()
RETURNS bigint

Information: core.get_cash_account_id

Schema core
Function Name get_cash_account_id
Arguments
Owner postgres
Result Type bigint
Description This function is now obsolete, core.get_cash_account_id_by_store_id(_store_id integer) should be used instead.

Implementation: core.get_cash_account_id

CREATE OR REPLACE FUNCTION core.get_cash_account_id()
 RETURNS bigint
 LANGUAGE plpgsql
 STABLE
AS $function$
BEGIN
    RETURN account_id
    FROM core.accounts
    WHERE account_master_id = 10101
    ORDER BY account_id ASC
    LIMIT 1;
END
$function$