src-db/database/model/views/C_ORDER_HEADER_VT.xml
changeset 9910 6767429386d8
parent 7031 2aac4501bbd5
child 9911 444911e2b851
--- a/src-db/database/model/views/C_ORDER_HEADER_VT.xml	Thu Jan 24 13:16:12 2013 +0100
+++ b/src-db/database/model/views/C_ORDER_HEADER_VT.xml	Mon Feb 04 09:27:53 2013 +0100
@@ -1,15 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW C_ORDER_HEADER_VT">
-    <view name="C_ORDER_HEADER_VT"><![CDATA[SELECT o.ad_client_id, o.ad_org_id, o.isactive, o.created, o.createdby, o.updated, o.updatedby, dt.ad_language, o.c_order_id, o.issotrx, o.documentno, o.docstatus, o.c_doctype_id, o.c_bpartner_id, bp.value AS bpvalue, oi.c_location_id AS org_location_id, oi.taxid, dt.printname AS documenttype, dt.documentnote AS documenttypenote, o.salesrep_id, COALESCE(ubp.name, u.name) AS salesrep_name, o.dateordered, o.datepromised, bpg.name AS bpgreeting, bp.name, bp.name2, bpcg.name AS bpcontactgreeting, bpc.title, NULLIF(bpc.name, bp.name) AS contactname, bpl.c_location_id, bp.referenceno, o.description, o.poreference, o.c_currency_id, pt.name AS paymentterm, pt.documentnote AS paymenttermnote, o.c_charge_id, o.chargeamt, o.totallines, o.grandtotal, o.m_pricelist_id, o.istaxincluded, o.c_campaign_id, o.c_project_id, o.c_activity_id, o.m_shipper_id, o.deliveryrule, o.deliveryviarule, o.priorityrule, o.invoicerule
-FROM c_order o
-JOIN c_doctype_trl dt ON o.c_doctype_id = dt.c_doctype_id
-JOIN c_paymentterm_trl pt ON o.c_paymentterm_id = pt.c_paymentterm_id AND dt.ad_language = pt.ad_language
-JOIN c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id
-LEFT JOIN c_greeting_trl bpg ON bp.c_greeting_id = bpg.c_greeting_id AND dt.ad_language = bpg.ad_language
-JOIN c_bpartner_location bpl ON o.c_bpartner_location_id = bpl.c_bpartner_location_id
-LEFT JOIN ad_user bpc ON o.ad_user_id = bpc.ad_user_id
-LEFT JOIN c_greeting_trl bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id AND dt.ad_language = bpcg.ad_language
-JOIN ad_orginfo oi ON o.ad_org_id = oi.ad_org_id
-LEFT JOIN ad_user u ON o.salesrep_id = u.ad_user_id
-LEFT JOIN c_bpartner ubp ON u.c_bpartner_id = ubp.c_bpartner_id]]></view>
+    <view name="C_ORDER_HEADER_VT"><![CDATA[SELECT o.ad_client_id, o.ad_org_id, o.isactive, o.created, o.createdby,  o.updated, o.updatedby, dt.ad_language, o.c_order_id, o.issotrx,  o.documentno, o.docstatus, o.c_doctype_id, o.c_bpartner_id,  bp.value AS bpvalue, oi.c_location_id AS org_location_id, oi.taxid,  dt.printname AS documenttype, dt.documentnote AS documenttypenote,  o.salesrep_id, COALESCE(ubp.name, u.name) AS salesrep_name, o.dateordered,  o.datepromised, bpg.name AS bpgreeting, bp.name, bp.name2,  bpcg.name AS bpcontactgreeting, bpc.title,  NULLIF(bpc.name, bp.name) AS contactname, bpl.c_location_id,  bp.referenceno, o.description, o.poreference, o.c_currency_id,  pt.name AS paymentterm, pt.documentnote AS paymenttermnote, o.c_charge_id,  o.chargeamt, o.totallines, o.grandtotal, o.m_pricelist_id, o.istaxincluded,  o.c_campaign_id, o.c_project_id, o.c_activity_id, o.m_shipper_id,  o.deliveryrule, o.deliveryviarule, o.priorityrule, o.invoicerule FROM c_order o JOIN c_doctype_trl dt ON o.c_doctype_id = dt.c_doctype_id JOIN c_paymentterm_trl pt ON o.c_paymentterm_id = pt.c_paymentterm_id AND dt.ad_language = pt.ad_language JOIN c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id LEFT JOIN c_greeting_trl bpg ON bp.c_greeting_id = bpg.c_greeting_id AND dt.ad_language = bpg.ad_language JOIN c_bpartner_location bpl ON o.c_bpartner_location_id = bpl.c_bpartner_location_id LEFT JOIN ad_user bpc ON o.ad_user_id = bpc.ad_user_id LEFT JOIN c_greeting_trl bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id AND dt.ad_language = bpcg.ad_language JOIN ad_orginfo oi ON o.ad_org_id = oi.ad_org_id LEFT JOIN ad_user u ON o.salesrep_id = u.ad_user_id LEFT JOIN c_bpartner ubp ON u.c_bpartner_id = ubp.c_bpartner_id]]></view>
   </database>