details:   /erp/stable/2.50/rev/cb44b14e43ea
changeset: 9187:cb44b14e43ea
user:      Adrián Romero <adrianromero <at> openbravo.com>
date:      Thu Feb 03 14:56:03 2011 +0100
summary:   Fixes issue 0015788: 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 8ea431427f33 -r cb44b14e43ea 
src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml
--- a/src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml   Thu Feb 03 
12:28:54 2011 +0100
+++ b/src-db/database/model/functions/AD_SEQUENCE_DOCTYPE.xml   Thu Feb 03 
14:56:03 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

Reply via email to