[hqlpickandexecute] rtv shipment lines should not shown
authorSandra Huguet <sandra.huguet@openbravo.com>
Wed, 19 Nov 2014 18:22:03 +0100
changeset 25450 f91f0ee5ce06
parent 25449 8972b879f0cf
child 25451 cbb5cef5278f
[hqlpickandexecute] rtv shipment lines should not shown
src-db/database/sourcedata/AD_TABLE.xml
--- a/src-db/database/sourcedata/AD_TABLE.xml	Wed Nov 19 18:21:20 2014 +0100
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Wed Nov 19 18:22:03 2014 +0100
@@ -11815,6 +11815,12 @@
 where io.businessPartner.id = :businessPartnerId 
 and io.processed = true and io.documentStatus <> 'VO' 
 and io.salesTransaction = @isSalesTransaction@ 
+and iol.movementQuantity > coalesce((select sum(ol.orderedQuantity)
+from OrderLine as ol
+left join ol.salesOrder as o
+where ol.goodsShipmentLine = iol
+and o.processed = true
+and o.documentStatus <> 'VO'), 0)
 and @insertion_point_0@
 and @additional_filters@]]></HQLQUERY>
 <!--CDB9DC9655F24DF8AB41AA0ADBD04390-->  <ENTITY_ALIAS><![CDATA[iol]]></ENTITY_ALIAS>