fixed bug 18160: Pending Goods Receipt Widget does not show data
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 21 Oct 2011 12:02:09 +0200
changeset 14053 e996b0a6cac7
parent 14052 543a424c1293
child 14054 8b7b533e0855
fixed bug 18160: Pending Goods Receipt Widget does not show data

Added missing alias to the query
modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Thu Oct 20 23:09:15 2011 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Fri Oct 21 12:02:09 2011 +0200
@@ -63,7 +63,40 @@
 <!--F5DEE669DD8047FB831A12064BB277BE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F5DEE669DD8047FB831A12064BB277BE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F5DEE669DD8047FB831A12064BB277BE-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></OBKMO_WIDGET_CLASS_ID>
-<!--F5DEE669DD8047FB831A12064BB277BE-->  <HQL><![CDATA[select ol.salesOrder.id as orderId, ol.salesOrder.organization.name as organizationName, ol.salesOrder.orderDate as dateordered,  ol.salesOrder.scheduledDeliveryDate as plannedDeliveryDate, ol.salesOrder.documentNo as salesorder, ol.salesOrder.businessPartner.name as bpartner, ol.product.name as productname, ol.attributeSetValue.description as attribute, ol.uOM.name as uom, ol.orderedQuantity as totalqty,     (select coalesce(sum(po.quantity),0)      from ProcurementPOInvoiceMatch po     where po.goodsShipmentLine is not null     and po.salesOrderLine = ol) as qtyReceived,     (select ol.orderedQuantity-coalesce(sum(po2.quantity),0) from ProcurementPOInvoiceMatch po2     where po2.goodsShipmentLine is not null     and po2.salesOrderLine = ol) as qtyPending from OrderLine as ol left join ol.attributeSetValue where ol.salesOrder.client.id =:client and ol.salesOrder.organization.id in (:organizationList) and ol.salesOrder.documentStatus='CO' and ol.salesOrder.salesTransaction=false and ol.orderedQuantity <> (select coalesce(sum(po3.quantity),0)                              from ProcurementPOInvoiceMatch po3                             where po3.goodsShipmentLine is not null                             and po3.salesOrderLine = ol) and ol.salesOrder.scheduledDeliveryDate<=now() and ol.product.name like :productname and ol.salesOrder.businessPartner.name like :suppliername and ol.salesOrder.documentNo like :documentno and ol.salesOrder.organization.name like :organizationName and @optional_filters@ order by ol.salesOrder.scheduledDeliveryDate, ol.salesOrder.documentNo]]></HQL>
+<!--F5DEE669DD8047FB831A12064BB277BE-->  <HQL><![CDATA[select ol.salesOrder.id as orderId, 
+       ol.salesOrder.organization.name as organizationName, 
+       ol.salesOrder.orderDate as dateordered,  
+       ol.salesOrder.scheduledDeliveryDate as plannedDeliveryDate, 
+       ol.salesOrder.documentNo as salesorder, 
+       ol.salesOrder.businessPartner.name as bpartner, 
+       ol.product.name as productname, 
+       attr.description as attribute, 
+       ol.uOM.name as uom, 
+       ol.orderedQuantity as totalqty,     
+       (select coalesce(sum(po.quantity),0)      
+          from ProcurementPOInvoiceMatch po     
+         where po.goodsShipmentLine is not null     
+           and po.salesOrderLine = ol) as qtyReceived,     
+       (select ol.orderedQuantity-coalesce(sum(po2.quantity),0) 
+          from ProcurementPOInvoiceMatch po2     
+         where po2.goodsShipmentLine is not null     
+           and po2.salesOrderLine = ol) as qtyPending 
+   from OrderLine as ol left join ol.attributeSetValue attr 
+  where ol.salesOrder.client.id =:client 
+    and ol.salesOrder.organization.id in (:organizationList) 
+    and ol.salesOrder.documentStatus='CO' 
+    and ol.salesOrder.salesTransaction=false 
+    and ol.orderedQuantity <> (select coalesce(sum(po3.quantity),0)                              
+                                 from ProcurementPOInvoiceMatch po3                             
+                                where po3.goodsShipmentLine is not null                             
+                                  and po3.salesOrderLine = ol) 
+    and ol.salesOrder.scheduledDeliveryDate<=now() 
+    and ol.product.name like :productname 
+    and ol.salesOrder.businessPartner.name like :suppliername 
+    and ol.salesOrder.documentNo like :documentno 
+    and ol.salesOrder.organization.name like :organizationName 
+    and @optional_filters@ 
+  order by ol.salesOrder.scheduledDeliveryDate, ol.salesOrder.documentNo]]></HQL>
 <!--F5DEE669DD8047FB831A12064BB277BE--></OBCQL_WIDGET_QUERY>
 
 <!--F94AEB4680AD4AD48255071903000A43--><OBCQL_WIDGET_QUERY>