details:   https://code.openbravo.com/erp/devel/pi/rev/e99deb6bf819
changeset: 16711:e99deb6bf819
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Wed May 30 13:29:23 2012 +0200
summary:   Fixes issue 20638: Is imposible to delete lines in Good Receipts.

diffstat:

 src-db/database/model/triggers/M_INOUTLINE_TRG.xml |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (20 lines):

diff -r 9a62a0e2f041 -r e99deb6bf819 
src-db/database/model/triggers/M_INOUTLINE_TRG.xml
--- a/src-db/database/model/triggers/M_INOUTLINE_TRG.xml        Wed May 30 
16:22:49 2012 +0200
+++ b/src-db/database/model/triggers/M_INOUTLINE_TRG.xml        Wed May 30 
13:29:23 2012 +0200
@@ -167,10 +167,12 @@
 
 
  -- Do not allow different product than the one in the related orderline.
- IF ((UPDATING OR INSERTING) AND :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
-     RAISE_APPLICATION_ERROR(-20000, '@ProductDefinedByOrder@');
+ IF ((UPDATING OR INSERTING)) 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
+       RAISE_APPLICATION_ERROR(-20000, '@ProductDefinedByOrder@');
+     END IF;
    END IF;
  END IF;
 

------------------------------------------------------------------------------
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

Reply via email to