details:   https://code.openbravo.com/erp/devel/pi/rev/65dffb0597a8
changeset: 15163:65dffb0597a8
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Tue Jan 17 13:30:39 2012 +0100
summary:   Fixes issue 19278: Error with parcial "Goods Shipments" and Invoices.
Now the shipments don't appear until the order has been delivered completely

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql |  7 
++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 774fb449cb26 -r 65dffb0597a8 
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql  
Tue Jan 17 12:11:21 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql  
Tue Jan 17 13:30:39 2012 +0100
@@ -362,7 +362,12 @@
         AND NOT EXISTS (SELECT 1 FROM C_INVOICE_CANDIDATE_V ic, C_ORDER o 
         WHERE o.C_ORDER_ID = s.C_ORDER_ID
         AND o.C_ORDER_ID = ic.C_ORDER_ID
-        AND ic.term = 'N') 
+        AND ic.term = 'N')
+        AND (SELECT CASE o.INVOICERULE WHEN 'O' THEN SUM(ol.qtyordered) = 
SUM(ol.qtydelivered) ELSE true END
+        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)
         ORDER BY NAME
       ]]>
     </Sql>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to