View: office.store_scrud_view
Schema | office |
Materialized View Name | store_scrud_view |
Owner | postgres |
Tablespace | DEFAULT |
Description | |
CREATE OR REPLACE VIEW office.store_scrud_view
AS
SELECT stores.store_id,
((offices.office_code::text || '('::text) || offices.office_name::text) || ')'::text AS office,
stores.store_code,
stores.store_name,
stores.address,
((store_types.store_type_code::text || '('::text) || store_types.store_type_name::text) || ')'::text AS store_type,
stores.allow_sales,
((sales_taxes.sales_tax_code::text || '('::text) || sales_taxes.sales_tax_name::text) || ')'::text AS sales_tax,
((accounts.account_number::text || '('::text) || accounts.account_name::text) || ')'::text AS account,
((cash_repositories.cash_repository_code::text || '('::text) || cash_repositories.cash_repository_name::text) || ')'::text AS cash_repository
FROM office.stores
JOIN office.offices ON stores.office_id = offices.office_id
JOIN office.store_types ON stores.store_type_id = store_types.store_type_id
JOIN core.sales_taxes ON stores.sales_tax_id = sales_taxes.sales_tax_id
JOIN core.accounts ON stores.default_cash_account_id = accounts.account_id
JOIN office.cash_repositories ON stores.default_cash_repository_id = cash_repositories.cash_repository_id;