details:   https://code.openbravo.com/erp/devel/pi/rev/7507a81f4e63
changeset: 24154:7507a81f4e63
user:      Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
date:      Mon Aug 04 09:51:01 2014 +0200
summary:   Issue 27140: Backout previous fix to study its consequences

diffstat:

 src-db/database/model/functions/C_ORDER_POST1.xml |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (25 lines):

diff -r 9ca3a8d726f5 -r 7507a81f4e63 
src-db/database/model/functions/C_ORDER_POST1.xml
--- a/src-db/database/model/functions/C_ORDER_POST1.xml Mon Aug 04 12:16:50 
2014 +0530
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml Mon Aug 04 09:51:01 
2014 +0200
@@ -1358,8 +1358,8 @@
      */
       BEGIN
         v_ResultStr:='OrderCompleteCheck';
-        SELECT SUM(QtyOrdered) -SUM(QtyDelivered),
-            SUM(QtyOrdered) -SUM(QtyInvoiced)
+        SELECT SUM(QtyOrdered*hex_to_int(C_OrderLine_ID)) 
-SUM(QtyDelivered*hex_to_int(C_OrderLine_ID)),
+            SUM(QtyOrdered*hex_to_int(C_OrderLine_ID)) 
-SUM(QtyInvoiced*hex_to_int(C_OrderLine_ID))
           INTO ToDeliver,
             ToInvoice
         FROM C_ORDERLINE
@@ -1508,8 +1508,8 @@
      /**
       * Final Completeness check
       */
-      SELECT SUM(QtyOrdered) -SUM(QtyDelivered),
-          SUM(QtyOrdered) -SUM(QtyInvoiced)
+      SELECT SUM(QtyOrdered*hex_to_int(C_OrderLine_ID)) 
-SUM(QtyDelivered*hex_to_int(C_OrderLine_ID)),
+          SUM(QtyOrdered*hex_to_int(C_OrderLine_ID)) 
-SUM(QtyInvoiced*hex_to_int(C_OrderLine_ID))
         INTO ToDeliver,
           ToInvoice
       FROM C_ORDERLINE

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to