CREATE OR REPLACE VIEW public.vw_utility_price_curve AS
 SELECT pp.id AS "intPriceCurveId",
    pp.price_desc AS "strPriceDescription",
    pp.price_index AS "strPriceIndex",
    cc.name AS "strCurrency",
    pu.name AS "strUnit",
    pp.price_curve_type AS "strPriceCurveType",
    COALESCE(pa.name, ''::character varying) AS "strPriceArea",
    COALESCE(pc.name, ''::character varying) AS "strPriceCalendar",
    COALESCE(pft.name, ''::character varying) AS "strPricingType",
    pm.beg_date AS "dtmPricingStartDate",
    pm.end_date AS "dtmPricingEndDate",
    pm.month_name AS "strPricingMonth"
   FROM ((((((price_price pp
     JOIN currency_currency cc ON ((pp.price_currency = cc.id)))
     LEFT JOIN price_area pa ON ((pp.price_area = pa.id)))
     LEFT JOIN price_calendar pc ON ((pp.price_calendar = pc.id)))
     LEFT JOIN product_uom pu ON ((pp.price_unit = pu.id)))
     LEFT JOIN product_month pm ON ((pp.price_period = pm.id)))
     LEFT JOIN price_fixtype pft ON ((pp.price_type = pft.id)))
  WHERE ((1 = 1) AND (pp.active = true));;
