details:   https://code.openbravo.com/erp/devel/pi/rev/a37b6649b7c7
changeset: 21212:a37b6649b7c7
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Fri Sep 27 14:18:34 2013 +0200
summary:   issue 23826: New payment should
be created when using GL Journal defined as Template

diffstat:

 src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r 34a6241c3e04 -r a37b6649b7c7 
src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java
--- a/src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java     Fri Sep 
27 13:51:22 2013 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java     Fri Sep 
27 14:18:34 2013 +0200
@@ -21,6 +21,8 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.sql.Connection;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -84,6 +86,9 @@
 
   private OBError processButton(VariablesSecureApp vars, String strKey, String 
strGLJournalBatch,
       String windowId) {
+    String strDateFormat = vars.getJavaDateFormat();
+    SimpleDateFormat dateFormat = new SimpleDateFormat(strDateFormat);
+
     if (log4j.isDebugEnabled())
       log4j.debug("Save: GLJournal");
     if (strGLJournalBatch.equals(""))
@@ -130,7 +135,7 @@
                 dataLines[j].cSalesregionId, dataLines[j].mProductId, 
dataLines[j].cBpartnerId,
                 dataLines[j].aAssetId, dataLines[j].cCostcenterId, 
dataLines[j].openItems,
                 dataLines[j].finFinancialAccountId, 
dataLines[j].finPaymentmethodId,
-                dataLines[j].cGlitemId, dataLines[j].paymentdate, null) == 0)
+                dataLines[j].cGlitemId, dateFormat.format(new Date()), null) 
== 0)
               log4j.warn("Save: GLJournalLine record " + j + " not inserted. 
Sequence = "
                   + strLineSequence);
           } catch (ServletException ex) {

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to