Merged heads
authorMartin Taal <martin.taal@openbravo.com>
Fri, 24 Feb 2012 09:26:54 +0100
changeset 15612 b3241413daf1
parent 15611 a06fc0bfe385 (current diff)
parent 15609 745a14a7766c (diff)
child 15613 650146191c5f
Merged heads
--- a/src-db/database/sourcedata/AD_TREENODE.xml	Fri Feb 24 09:26:20 2012 +0100
+++ b/src-db/database/sourcedata/AD_TREENODE.xml	Fri Feb 24 09:26:54 2012 +0100
@@ -2405,7 +2405,7 @@
 <!--52118BF1A30A4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A30A4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A30A4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A30A4D84E040007F01005FEC-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--52118BF1A30A4D84E040007F01005FEC-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--52118BF1A30A4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A30B4D84E040007F01005FEC--><AD_TREENODE>
@@ -2416,7 +2416,7 @@
 <!--52118BF1A30B4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A30B4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A30B4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A30B4D84E040007F01005FEC-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--52118BF1A30B4D84E040007F01005FEC-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--52118BF1A30B4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A30C4D84E040007F01005FEC--><AD_TREENODE>
@@ -2438,7 +2438,7 @@
 <!--52118BF1A30D4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A30D4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A30D4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A30D4D84E040007F01005FEC-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--52118BF1A30D4D84E040007F01005FEC-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--52118BF1A30D4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A30E4D84E040007F01005FEC--><AD_TREENODE>
@@ -2449,7 +2449,7 @@
 <!--52118BF1A30E4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A30E4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A30E4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A30E4D84E040007F01005FEC-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--52118BF1A30E4D84E040007F01005FEC-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--52118BF1A30E4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A30F4D84E040007F01005FEC--><AD_TREENODE>
@@ -2459,8 +2459,8 @@
 <!--52118BF1A30F4D84E040007F01005FEC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--52118BF1A30F4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A30F4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--52118BF1A30F4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800245]]></PARENT_ID>
-<!--52118BF1A30F4D84E040007F01005FEC-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--52118BF1A30F4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
+<!--52118BF1A30F4D84E040007F01005FEC-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--52118BF1A30F4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3104D84E040007F01005FEC--><AD_TREENODE>
@@ -2504,7 +2504,7 @@
 <!--52118BF1A3134D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3134D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3134D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A3134D84E040007F01005FEC-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--52118BF1A3134D84E040007F01005FEC-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--52118BF1A3134D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3144D84E040007F01005FEC--><AD_TREENODE>
@@ -2526,7 +2526,7 @@
 <!--52118BF1A3164D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3164D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3164D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A3164D84E040007F01005FEC-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--52118BF1A3164D84E040007F01005FEC-->  <SEQNO><![CDATA[100]]></SEQNO>
 <!--52118BF1A3164D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3174D84E040007F01005FEC--><AD_TREENODE>
@@ -2548,7 +2548,7 @@
 <!--52118BF1A3184D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3184D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3184D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A3184D84E040007F01005FEC-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--52118BF1A3184D84E040007F01005FEC-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--52118BF1A3184D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3194D84E040007F01005FEC--><AD_TREENODE>
@@ -2625,7 +2625,7 @@
 <!--52118BF1A3204D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3204D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3204D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A3204D84E040007F01005FEC-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--52118BF1A3204D84E040007F01005FEC-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--52118BF1A3204D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3214D84E040007F01005FEC--><AD_TREENODE>
@@ -2636,7 +2636,7 @@
 <!--52118BF1A3214D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3214D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3214D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A3214D84E040007F01005FEC-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--52118BF1A3214D84E040007F01005FEC-->  <SEQNO><![CDATA[120]]></SEQNO>
 <!--52118BF1A3214D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3224D84E040007F01005FEC--><AD_TREENODE>
@@ -2834,7 +2834,7 @@
 <!--52118BF1A3354D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3354D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3354D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800189]]></PARENT_ID>
-<!--52118BF1A3354D84E040007F01005FEC-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--52118BF1A3354D84E040007F01005FEC-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--52118BF1A3354D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3364D84E040007F01005FEC--><AD_TREENODE>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql	Fri Feb 24 09:26:20 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql	Fri Feb 24 09:26:54 2012 +0100
@@ -395,12 +395,12 @@
         WHERE o.C_ORDER_ID = s.C_ORDER_ID
         AND o.C_ORDER_ID = ic.C_ORDER_ID
         AND ic.term = 'N')
-        AND EXISTS (SELECT 1
+        AND NOT EXISTS (SELECT 1
         FROM C_ORDER o , C_ORDERLINE ol
         WHERE o.C_ORDER_ID = s.C_ORDER_ID
         AND o.C_ORDER_ID = ol.C_ORDER_ID
         GROUP BY o.INVOICERULE
-        HAVING o.INVOICERULE <> 'O' OR (SUM(ol.qtyordered) = SUM(ol.qtydelivered)))
+        HAVING (o.INVOICERULE = 'O' AND SUM(ol.qtyordered) <> SUM(ol.qtydelivered)))
         ORDER BY NAME
       ]]>
     </Sql>