details: https://code.openbravo.com/erp/devel/pi/rev/2fa2537a618f
changeset: 17789:2fa2537a618f
user: Naiara Martinez <naiara.martinez <at> openbravo.com>
date: Thu Aug 23 15:11:53 2012 +0200
summary: fixed bug 21390 Impossible to reactivate an sales order
diffstat:
src-db/database/model/triggers/M_INOUTLINE_TRG.xml | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 51381abfd319 -r 2fa2537a618f
src-db/database/model/triggers/M_INOUTLINE_TRG.xml
--- a/src-db/database/model/triggers/M_INOUTLINE_TRG.xml Wed Aug 22
08:59:32 2012 +0200
+++ b/src-db/database/model/triggers/M_INOUTLINE_TRG.xml Thu Aug 23
15:11:53 2012 +0200
@@ -21,6 +21,7 @@
v_ISSOTRX CHAR(1);
v_QTYVARIABLE CHAR(1);
v_OrderProduct VARCHAR2(32);
+ v_IsUpdateAndNewIsDifferentProduct BOOLEAN;
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
@@ -165,9 +166,12 @@
END IF;
END IF;
+ IF (UPDATING) THEN
+ v_IsUpdateAndNewIsDifferentProduct = COALESCE(:OLD.m_product_id, '0') <>
COALESCE(:NEW.m_product_id, '0');
+ END IF;
-- Do not allow different product than the one in the related orderline.
- IF ((UPDATING OR INSERTING)) THEN
+ IF (INSERTING OR v_IsUpdateAndNewIsDifferentProduct) THEN
IF (:new.C_OrderLine_ID is not null) THEN
SELECT m_product_id INTO v_OrderProduct FROM C_OrderLine WHERE
C_OrderLine_ID = :new.C_OrderLine_ID;
IF (v_OrderProduct <> :new.M_Product_ID) THEN
@@ -175,7 +179,6 @@
END IF;
END IF;
END IF;
-
-- UPDATING inventory
IF (UPDATING OR DELETING) THEN
------------------------------------------------------------------------------
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