details: /erp/devel/main/rev/4ed5b7e9b0df
changeset: 8369:4ed5b7e9b0df
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Thu Sep 09 19:18:58 2010 +0200
summary: Fixes issue 0014352: It is not possible to create a Good Receipt
with more quantity than Purchase Order
It has been added a check that verifies shipment quantities against ordered
quantities only in sales orders.
details: /erp/devel/main/rev/f12e04486b2c
changeset: 8370:f12e04486b2c
user: RM packaging bot <staff.rm <at> openbravo.com>
date: Fri Sep 10 10:19:24 2010 +0000
summary: CI: promote changesets from pi to main
diffstat:
src-db/database/model/triggers/M_INOUTLINE_TRG.xml | 15 ++++++++++-----
src-db/database/sourcedata/AD_MODULE.xml | 2 +-
2 files changed, 11 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r acf15c4cab5c -r f12e04486b2c
src-db/database/model/triggers/M_INOUTLINE_TRG.xml
--- a/src-db/database/model/triggers/M_INOUTLINE_TRG.xml Thu Sep 09
13:40:34 2010 +0200
+++ b/src-db/database/model/triggers/M_INOUTLINE_TRG.xml Fri Sep 10
10:19:24 2010 +0000
@@ -18,6 +18,7 @@
v_UOM_ID varchar2(32);
v_AttrSetValueType M_Product.AttrSetValueType%TYPE;
V_COUNT NUMBER;
+ v_ISSOTRX CHAR(1);
/******************************************************************************
* 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
@@ -52,8 +53,9 @@
RAISE_APPLICATION_ERROR(-20111, 'Unit of Measure mismatch
(product/transaction)');
END IF;
END IF;
+ END IF;
END IF;
-
+
IF (UPDATING OR INSERTING) THEN
v_ID := :new.M_InOut_ID;
@@ -67,9 +69,12 @@
v_qty := :NEW.MOVEMENTQTY;
v_qtyorder := :NEW.QUANTITYORDER;
END IF;
- END IF;
- IF (:NEW.C_ORDERLINE_ID IS NOT NULL) THEN
+ SELECT ISSOTRX INTO v_ISSOTRX
+ FROM M_INOUT
+ WHERE M_INOUT_ID = :NEW.M_INOUT_ID;
+
+ IF (v_ISSOTRX = 'Y' AND :NEW.C_ORDERLINE_ID IS NOT NULL) THEN
SELECT COUNT(*) INTO V_COUNT FROM C_ORDERLINE ol
WHERE ol.C_ORDERLINE_ID = :NEW.C_ORDERLINE_ID
AND :NEW.MOVEMENTQTY > ol.QTYORDERED;
@@ -77,8 +82,8 @@
RAISE_APPLICATION_ERROR(-20000, '@MovementQtyCheck@');
END IF;
END IF;
- END IF;
-
+ END IF;
+
IF (UPDATING) THEN
IF (COALESCE(:OLD.C_UOM_ID, '0') <> COALESCE(:NEW.C_UOM_ID, '0')) THEN
IF (:NEW.M_PRODUCT_ID IS NOT NULL) THEN
diff -r acf15c4cab5c -r f12e04486b2c src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml Thu Sep 09 13:40:34 2010 +0200
+++ b/src-db/database/sourcedata/AD_MODULE.xml Fri Sep 10 10:19:24 2010 +0000
@@ -6,7 +6,7 @@
<!--0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
<!--0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
<!--0--> <NAME><![CDATA[core]]></NAME>
-<!--0--> <VERSION><![CDATA[2.50.18350]]></VERSION>
+<!--0--> <VERSION><![CDATA[2.50.18369]]></VERSION>
<!--0--> <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
<!--0--> <HELP><![CDATA[Core module is the base one, all developments in core
are included as part of the standard Openbravo ERP.]]></HELP>
<!--0--> <URL><![CDATA[www.openbravo.com]]></URL>
------------------------------------------------------------------------------
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful,
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance.
http://p.sf.net/sfu/dell-sfdev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits