details: https://code.openbravo.com/erp/devel/pi/rev/3020127b4f3a
changeset: 17850:3020127b4f3a
user: Javier Etxarri <javier.echarri <at> openbravo.com>
date: Mon Sep 03 17:46:56 2012 +0200
summary: Fixes issue 21540 , issue 21225:
Problems to close and order with different qty than the shipment
Not update in Order qty (secondary uom qty) of an order document when you close
it
diffstat:
src-db/database/model/functions/C_ORDER_POST1.xml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r bb5ec0f1781c -r 3020127b4f3a
src-db/database/model/functions/C_ORDER_POST1.xml
--- a/src-db/database/model/functions/C_ORDER_POST1.xml Mon Sep 03 13:12:56
2012 +0200
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml Mon Sep 03 17:46:56
2012 +0200
@@ -434,7 +434,7 @@
QuantityOrder= CASE WHEN M_PRODUCT_UOM_ID IS NULL THEN
QuantityOrder
ELSE (c_uom_convert((CASE WHEN (qtyinvoiced = 0)
THEN QtyDelivered ELSE
(CASE WHEN (QtyDelivered = 0) THEN qtyinvoiced
ELSE
- (CASE WHEN (QtyDelivered < 0 AND
qtyinvoiced < 0) THEN LEAST(QtyDelivered, qtyinvoiced) ELSE
GREATEST(QtyDelivered, qtyinvoiced) END) END) END), C_UOM_ID, (SELECT
UOM.C_UOM_ID FROM M_PRODUCT_UOM UOM WHERE
UOM.M_PRODUCT_UOM_ID=M_PRODUCT_UOM_ID),'Y')) END,
+ (CASE WHEN (QtyDelivered < 0 AND
qtyinvoiced < 0) THEN LEAST(QtyDelivered, qtyinvoiced) ELSE
GREATEST(QtyDelivered, qtyinvoiced) END) END) END), C_UOM_ID, (SELECT
UOM.C_UOM_ID FROM M_PRODUCT_UOM UOM WHERE
UOM.M_PRODUCT_UOM_ID=C_ORDERLINE.M_PRODUCT_UOM_ID),'Y')) END,
Updated=now()
WHERE C_Order_ID=v_Record_ID
AND QtyOrdered <> (SELECT (CASE WHEN (qtyinvoiced = 0) THEN
QtyDelivered ELSE
@@ -471,7 +471,7 @@
END)
FROM M_MATCHPO
WHERE M_MATCHPO.C_ORDERLINE_ID=C_ORDERLINE.C_ORDERLINE_ID
- ), 0),C_UOM_ID,(SELECT UOM.C_UOM_ID FROM M_PRODUCT_UOM UOM
WHERE UOM.M_PRODUCT_UOM_ID=M_PRODUCT_UOM_ID),'Y') END,
+ ), 0),C_UOM_ID,(SELECT UOM.C_UOM_ID FROM M_PRODUCT_UOM UOM
WHERE UOM.M_PRODUCT_UOM_ID=C_ORDERLINE.M_PRODUCT_UOM_ID),'Y') END,
Updated=now(),
linenetamt=COALESCE((
SELECT (CASE WHEN (SUM(CASE WHEN M_MATCHPO.M_INOUTLINE_ID IS
NULL THEN M_MATCHPO.QTY ELSE 0 END) = 0)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits