modules/org.openbravo.client.widgets/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
author RM packaging bot <staff.rm@openbravo.com>
Thu, 30 Mar 2017 15:14:00 +0000
changeset 31764 fbf76c4a22c1
parent 31528 a28822293fdd
permissions -rw-r--r--
CI: update AD_MODULE to version 31761
asier@10719
     1
<?xml version='1.0' encoding='UTF-8'?>
asier@10719
     2
<data>
sandra@20242
     3
<!--53389C2060AD4DBEA1F9009A3C82B63F--><OBCQL_WIDGET_QUERY>
sandra@20242
     4
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <OBCQL_WIDGET_QUERY_ID><![CDATA[53389C2060AD4DBEA1F9009A3C82B63F]]></OBCQL_WIDGET_QUERY_ID>
sandra@20242
     5
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
sandra@20242
     6
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
sandra@20242
     7
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
sandra@20242
     8
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[5B41A19E11494C519BE33BBED6012DAE]]></OBKMO_WIDGET_CLASS_ID>
sandra@20242
     9
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <HQL><![CDATA[select Organization.name as store, Warehouse.name as warehouse,Organization.id as orgid, Product.searchKey as identifier,Product.name as product,Product.id as pid, ProductCategory.name as category, ProductCategory.id as pcid,UOM.name as uom, sum(ps.quantityOnHand) as qtyonhand,AttributeSetInstance.description as attr,Warehouse.id as whid
sandra@20242
    10
from ProductStockView ps left outer join ps.product as Product
sandra@20242
    11
left outer join ps.storageBin as Locator
sandra@20242
    12
left outer join Locator.warehouse as Warehouse
sandra@20242
    13
left outer join Product.productCategory as ProductCategory
sandra@20242
    14
left outer join Warehouse.organization as Organization
sandra@20242
    15
left outer join ps.uOM as UOM
sandra@20242
    16
left outer join ps.attributeSetValue as AttributeSetInstance
sandra@20242
    17
where ps.client.id=:client
sandra@20242
    18
and ps.organization.id IN (:organizationList)
sandra@20242
    19
and Product.stocked='Y'
sandra@20242
    20
and @optional_filters@
sandra@20242
    21
group by Organization.name, Warehouse.name, Organization.id, Product.searchKey, Product.name, Product.id, ProductCategory.name, ProductCategory.id, UOM.name, AttributeSetInstance.description,Warehouse.id
sandra@20242
    22
order by Warehouse.name, Product.name, sum(ps.quantityOnHand) desc]]></HQL>
sandra@20242
    23
<!--53389C2060AD4DBEA1F9009A3C82B63F-->  <TYPE><![CDATA[HQL]]></TYPE>
sandra@20242
    24
<!--53389C2060AD4DBEA1F9009A3C82B63F--></OBCQL_WIDGET_QUERY>
sandra@20242
    25
atul@30450
    26
<!--97FD9C124D5D409DB94BB6500A418A60--><OBCQL_WIDGET_QUERY>
atul@30450
    27
<!--97FD9C124D5D409DB94BB6500A418A60-->  <OBCQL_WIDGET_QUERY_ID><![CDATA[97FD9C124D5D409DB94BB6500A418A60]]></OBCQL_WIDGET_QUERY_ID>
atul@30450
    28
<!--97FD9C124D5D409DB94BB6500A418A60-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
atul@30450
    29
<!--97FD9C124D5D409DB94BB6500A418A60-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
atul@30450
    30
<!--97FD9C124D5D409DB94BB6500A418A60-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
atul@30450
    31
<!--97FD9C124D5D409DB94BB6500A418A60-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[5291D3D3B07B4CFC87928071377740E8]]></OBKMO_WIDGET_CLASS_ID>
atul@30450
    32
<!--97FD9C124D5D409DB94BB6500A418A60-->  <HQL><![CDATA[select orgname as store, warehouseName as warehouse, organization.id as orgid, searchKey as identifier, productName as product, product.id as pid, productCategoryName as category, productCategory.id as pcid, uOMName as uom, quantityOnHand as qtyonhand, description as attr, warehouse.id as whid
atul@30450
    33
from OBWCL_StockByWarehouseView sbw
atul@30450
    34
where sbw.client.id=:client
atul@30450
    35
and sbw.organization.id IN (:organizationList)
atul@30450
    36
and @optional_filters@
atul@30450
    37
order by qtyonhand desc]]></HQL>
atul@30450
    38
<!--97FD9C124D5D409DB94BB6500A418A60-->  <TYPE><![CDATA[HQL]]></TYPE>
atul@30450
    39
<!--97FD9C124D5D409DB94BB6500A418A60--></OBCQL_WIDGET_QUERY>
atul@30450
    40
asier@10719
    41
<!--CFDF8EE593F04CFE9709F5AD19A3A573--><OBCQL_WIDGET_QUERY>
asier@10719
    42
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <OBCQL_WIDGET_QUERY_ID><![CDATA[CFDF8EE593F04CFE9709F5AD19A3A573]]></OBCQL_WIDGET_QUERY_ID>
asier@10719
    43
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
asier@10719
    44
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
asier@10719
    45
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
asier@10719
    46
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[CD1B06C4ED974B5F905A5A01B097DF4E]]></OBKMO_WIDGET_CLASS_ID>
asier@10719
    47
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <HQL><![CDATA[select product.id as id,product.name as pname, sum(orderedQuantity) as qty, product.uOM.name as uom, product.uOM.id as uomid
asier@10719
    48
from OrderLine ol
asier@10719
    49
where ol.salesOrder.documentStatus = 'CO'
asier@10719
    50
and ol.salesOrder.salesTransaction = 'Y'
asier@10719
    51
and @optional_filters@
asier@10719
    52
and ol.client.id = :client
asier@10719
    53
and ol.product.name like :pname
victor@31528
    54
and ol.organization.id in (:organizationList)
asier@10719
    55
group by product.name, product.uOM.name, product.id, product.uOM.id 
asier@10719
    56
order by sum(orderedQuantity) desc]]></HQL>
augusto@19172
    57
<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <TYPE><![CDATA[HQL]]></TYPE>
asier@10719
    58
<!--CFDF8EE593F04CFE9709F5AD19A3A573--></OBCQL_WIDGET_QUERY>
asier@10719
    59
asier@10719
    60
<!--D2003CD3F9984BF39457BA1F2FFF01C9--><OBCQL_WIDGET_QUERY>
asier@10719
    61
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <OBCQL_WIDGET_QUERY_ID><![CDATA[D2003CD3F9984BF39457BA1F2FFF01C9]]></OBCQL_WIDGET_QUERY_ID>
asier@10719
    62
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
asier@10719
    63
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
asier@10719
    64
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
asier@10719
    65
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[862EEC18D6FC4FA68E7867E3CF337CC7]]></OBKMO_WIDGET_CLASS_ID>
asier@10719
    66
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <HQL><![CDATA[select 
asier@10719
    67
       tel.expenseSheet.documentNo as documentNo,
asier@10719
    68
       tel.expenseSheet.id as expenseSheetId,
asier@10719
    69
       tel.description as description,
asier@10719
    70
       case when tel.expenseDate is not null then tel.expenseDate  else tel.expenseSheet.reportDate end as expenseDate,
asier@10719
    71
       tel.product.id as productId,
asier@10719
    72
       tel.product.name as productName,
asier@10719
    73
       tel.quantity as quantity,
asier@10719
    74
       tel.uOM.name as uomName,
asier@10719
    75
       p.id as projectId,
asier@10719
    76
       p.name as projectName,
asier@10719
    77
       tel.expenseSheet.processed as processed
asier@10719
    78
from
asier@10719
    79
	TimeAndExpenseSheetLine as tel
asier@10719
    80
	LEFT JOIN tel.project as p,
asier@10719
    81
	ADUser as u
asier@10719
    82
	where (month(current_date()) = month(tel.expenseDate) or (month(current_date()) = month(tel.expenseSheet.reportDate) and tel.expenseDate = null))
miguel@13665
    83
	and (year(current_date()) = year(tel.expenseDate) or (year(current_date()) = year(tel.expenseSheet.reportDate) and tel.expenseDate = null))
miguel@13665
    84
	and tel.timeSheet = 'Y'
asier@10719
    85
	and tel.client.id=:client
asier@10719
    86
	and tel.expenseSheet.businessPartner=u.businessPartner
asier@10719
    87
	and u.id=:user
miguel@13665
    88
order by  tel.expenseSheet.reportDate, tel.expenseSheet.documentNo]]></HQL>
augusto@19172
    89
<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <TYPE><![CDATA[HQL]]></TYPE>
asier@10719
    90
<!--D2003CD3F9984BF39457BA1F2FFF01C9--></OBCQL_WIDGET_QUERY>
asier@10719
    91
asier@10719
    92
</data>