src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
author RM packaging bot <staff.rm@openbravo.com>
Thu, 03 Jan 2013 11:56:05 +0100
changeset 19144 792728467ed0
parent 18488 86519330809e
child 19172 b6cf1812e397
permissions -rw-r--r--
CI: update AD_MODULE to version 19143
david@18488
     1
<?xml version='1.0' encoding='UTF-8'?>
david@18488
     2
<data>
david@18488
     3
<!--11D052605994493E905FF9A45591D84D--><OBCQL_WIDGET_QUERY>
david@18488
     4
<!--11D052605994493E905FF9A45591D84D-->  <OBCQL_WIDGET_QUERY_ID><![CDATA[11D052605994493E905FF9A45591D84D]]></OBCQL_WIDGET_QUERY_ID>
david@18488
     5
<!--11D052605994493E905FF9A45591D84D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
david@18488
     6
<!--11D052605994493E905FF9A45591D84D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
david@18488
     7
<!--11D052605994493E905FF9A45591D84D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
david@18488
     8
<!--11D052605994493E905FF9A45591D84D-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[7EE694CFF8B94B4C9B9CE69C9D292CC4]]></OBKMO_WIDGET_CLASS_ID>
david@18488
     9
<!--11D052605994493E905FF9A45591D84D-->  <HQL><![CDATA[select q.documentStatus as Status, case when count(*) > 0 then round((cast((count(*) *100) as big_decimal)/
david@18488
    10
  (select count(*)
david@18488
    11
  from Order q2
david@18488
    12
  where q2.documentStatus in ('CA', 'CJ') 
david@18488
    13
    and q2.organization.id IN (:organizationList)
david@18488
    14
    and @optional_filters@))) else round(cast(0 as big_decimal)) end || '%' as Percentage,
david@18488
    15
  count(*) as Total
david@18488
    16
from Order q
david@18488
    17
where q.documentStatus in ('CA', 'CJ')
david@18488
    18
  and q.organization.id IN (:organizationList)
david@18488
    19
  and @optional_filters@
david@18488
    20
group by q.documentStatus]]></HQL>
david@18488
    21
<!--11D052605994493E905FF9A45591D84D--></OBCQL_WIDGET_QUERY>
david@18488
    22
david@18488
    23
</data>