View: core.account_scrud_view

Schema core
Materialized View Name account_scrud_view
Owner postgres
Tablespace DEFAULT
Description
 CREATE OR REPLACE VIEW core.account_scrud_view
 AS
 SELECT accounts.account_id,
    ((account_masters.account_master_code::text || ' ('::text) || account_masters.account_master_name::text) || ')'::text AS account_master,
    accounts.account_number,
    accounts.external_code,
    ((currencies.currency_code::text || ' ('::text) || currencies.currency_name::text) || ')'::text AS currency,
    accounts.account_name,
    accounts.description,
    accounts.confidential,
    accounts.is_transaction_node,
    accounts.sys_type,
    ((parent_account.account_number::text || ' ('::text) || parent_account.account_name::text) || ')'::text AS parent
   FROM core.accounts
   JOIN core.account_masters ON account_masters.account_master_id = accounts.account_master_id
   JOIN core.currencies ON accounts.currency_code::text = currencies.currency_code::text
   LEFT JOIN core.accounts parent_account ON parent_account.account_id = accounts.parent_account_id
  WHERE NOT accounts.sys_type;