details:   /erp/devel/pi/rev/3bd074923746
changeset: 8748:3bd074923746
user:      Adrián Romero <adrianromero <at> openbravo.com>
date:      Tue Oct 26 16:08:08 2010 +0200
summary:   Fixes issue 0015035: Not able to create Goods receipt, for a order 
which is created with -ve quantity using create line from button in Good receipt
It has been removed the check of delivered items for negative quantities for 
the query that selects candidate lines for shipment

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql |  4 
++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r f293da03873a -r 3bd074923746 
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql 
Tue Oct 26 13:09:37 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql 
Tue Oct 26 16:08:08 2010 +0200
@@ -104,7 +104,7 @@
         AND l.C_UOM_ID = uom.C_UOM_ID
         AND l.M_Product_ID=p.M_Product_ID 
         AND ic.C_Order_ID = ?
-        AND l.QtyOrdered > COALESCE(l.qtydelivered,0)
+        AND (l.QtyOrdered < 0 OR l.QtyOrdered > COALESCE(l.qtydelivered,0))
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, 
l.QtyOrdered,l.qtydelivered, 
         
l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, 
l.ad_org_id, l.DESCRIPTION
         ORDER BY NAME, l.Line
@@ -193,7 +193,7 @@
         AND l.C_UOM_ID = uom.C_UOM_ID 
         AND l.M_Product_ID=p.M_Product_ID 
         AND ic.C_Order_ID = ?
-        AND l.QtyOrdered > COALESCE(l.qtydelivered,0)
+        AND (l.QtyOrdered < 0 OR l.QtyOrdered > COALESCE(l.qtydelivered,0))
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, 
l.QtyOrdered,l.qtydelivered, 
         
l.C_UOM_ID,uom.UOMSymbol,uomt.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID,
 l.DESCRIPTION
         ORDER BY NAME, l.Line

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to