details: /erp/devel/pi/rev/fab5abc10d9c
changeset: 10359:fab5abc10d9c
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Thu Feb 03 16:13:02 2011 +0100
summary: Fixes issue 0015801: the system is blocked when run Create AP
Expense Invoices
It has been rewritten the SQL sentence that gets the sequence values to not to
lock the C_DOCTYPE table because it is not necessary and is the cause of the
issue
diffstat:
src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (19 lines):
diff -r f1baba469270 -r fab5abc10d9c
src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml
--- a/src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml Thu Feb 03
13:35:55 2011 +0100
+++ b/src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml Thu Feb 03
16:13:02 2011 +0100
@@ -65,11 +65,10 @@
RETURN;
END IF;
-- Get the numbers
-SELECT s.AD_Sequence_ID, s.CurrentNext, s.Prefix, s.Suffix
-INTO v_Sequence_ID, v_NextNo, v_Prefix, v_Suffix
-FROM C_DocType d, AD_Sequence s
-WHERE d.C_DocType_ID=p_DocType_ID -- parameter
- AND d.DocNoSequence_ID=s.AD_Sequence_ID AND s.IsActive='Y' AND
s.IsTableID='N' AND s.IsAutoSequence='Y' FOR UPDATE OF CurrentNext;
+SELECT s.CurrentNext, s.Prefix, s.Suffix
+INTO v_NextNo, v_Prefix, v_Suffix
+FROM AD_Sequence s
+WHERE s.AD_Sequence_ID = v_Sequence_ID AND s.IsActive='Y' AND
s.IsTableID='N' AND s.IsAutoSequence='Y' FOR UPDATE OF CurrentNext;
IF p_Update_Next='Y' THEN
UPDATE AD_Sequence
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits