details:   https://code.openbravo.com/erp/devel/pi/rev/7b3a543035a2
changeset: 22638:7b3a543035a2
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Thu Mar 06 13:22:06 2014 +0530
summary:   Fixes Issue 0025899: In Utility.getDocumentNo the client is not 
obtained in some cases

When invoking the method Utility.getDocumentNo from a DalBaseProcess the client 
is not obtained.
In case client is not present in context, it is fetched from vars.

diffstat:

 src/org/openbravo/erpCommon/utility/Utility.java |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 9484419af022 -r 7b3a543035a2 
src/org/openbravo/erpCommon/utility/Utility.java
--- a/src/org/openbravo/erpCommon/utility/Utility.java  Thu Mar 06 10:35:05 
2014 +0100
+++ b/src/org/openbravo/erpCommon/utility/Utility.java  Thu Mar 06 13:22:06 
2014 +0530
@@ -845,7 +845,10 @@
       String C_DocType_ID, boolean onlyDocType, boolean updateNext) {
     if (TableName == null || TableName.length() == 0)
       throw new IllegalArgumentException("Utility.getDocumentNo - required 
parameter missing");
-    final String AD_Client_ID = getContext(con, vars, "AD_Client_ID", 
WindowNo);
+    String AD_Client_ID = getContext(con, vars, "AD_Client_ID", WindowNo);
+    if ("".equals(AD_Client_ID)) {
+      AD_Client_ID = vars.getClient();
+    }
 
     final String cDocTypeID = (C_DocTypeTarget_ID.equals("") ? C_DocType_ID : 
C_DocTypeTarget_ID);
     if (cDocTypeID.equals(""))

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to