src-db/database/model/views/C_PROJECT_DETAILS_V.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Mon, 04 Feb 2013 09:27:53 +0100
changeset 9910 6767429386d8
parent 7031 2aac4501bbd5
child 9911 444911e2b851
permissions -rw-r--r--
Changes required to support PostgreSQL 9.2
adrian@94
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="VIEW C_PROJECT_DETAILS_V">
antonio@9910
     3
    <view name="C_PROJECT_DETAILS_V"><![CDATA[SELECT pl.ad_client_id, pl.ad_org_id, pl.isactive, pl.created, pl.createdby,  pl.updated, pl.updatedby, to_char('en_US') AS ad_language,  pj.c_project_id, pl.c_projectline_id, pl.line, pl.plannedqty,  pl.plannedprice, pl.plannedamt, pl.plannedmarginamt, pl.committedamt,  pl.m_product_id, COALESCE(p.name, pl.description) AS name,  CASE WHEN p.name IS NOT NULL THEN pl.description ELSE NULL END AS description,  p.documentnote, p.upc, p.sku, p.value AS productvalue,  pl.m_product_category_id, pl.invoicedamt, pl.invoicedqty, pl.committedqty FROM c_projectline pl JOIN c_project pj ON pl.c_project_id = pj.c_project_id LEFT JOIN m_product p ON pl.m_product_id = p.m_product_id WHERE pl.isprinted = 'Y']]></view>
adrian@94
     4
  </database>