src-db/database/model/views/C_ORDER_OPEN.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
<?xml version="1.0"?>
  <database name="VIEW C_ORDER_OPEN">
    <view name="C_ORDER_OPEN"><![CDATA[SELECT l.ad_client_id, l.ad_org_id, l.isactive, l.created, l.createdby,  l.updated, l.updatedby, o.c_order_id, o.docstatus, o.docaction,  o.c_doctype_id, o.salesrep_id, o.c_bpartner_id, o.c_bpartner_location_id,  o.ad_user_id, o.poreference, o.c_currency_id, o.issotrx, l.c_orderline_id,  l.dateordered, l.datepromised, l.m_product_id, l.m_warehouse_id,  l.directship, l.c_uom_id, l.qtyordered, l.qtyreserved, l.qtydelivered,  l.qtyinvoiced, l.priceactual, l.qtyordered - l.qtydelivered AS qtytodeliver,  l.qtyordered - l.qtyinvoiced AS qtytoinvoice,  (l.qtyordered - l.qtyinvoiced) * l.priceactual AS netamttoinvoice FROM c_order o, c_orderline l WHERE o.c_order_id = l.c_order_id AND (l.qtyordered <> l.qtydelivered OR l.qtyordered <> l.qtyinvoiced)]]></view>
  </database>