From 0aa769e4f8348e4876834e09e406a5a4f96fb726 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Fri, 7 Sep 2007 18:12:07 +0000 Subject: [PATCH] BF [ 1775358 ] GL Journal DateAcct/C_Period_ID issue http://sourceforge.net/tracker/index.php?func=detail&aid=1775358&group_id=176962&atid=879332 --- base/src/org/compiere/model/MJournal.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/base/src/org/compiere/model/MJournal.java b/base/src/org/compiere/model/MJournal.java index fb42ad21bb..5615cf71e8 100644 --- a/base/src/org/compiere/model/MJournal.java +++ b/base/src/org/compiere/model/MJournal.java @@ -26,13 +26,13 @@ import org.compiere.util.*; /** * GL Journal Model - *

Change log: - *

* * @author Jorg Janke * @version $Id: MJournal.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1619150 ] Usability/Consistency: reversed gl journal description + *
  • BF [ 1775358 ] GL Journal DateAcct/C_Period_ID issue */ public class MJournal extends X_GL_Journal implements DocAction { @@ -307,6 +307,15 @@ public class MJournal extends X_GL_Journal implements DocAction } if (getDateAcct() == null) setDateAcct(getDateDoc()); + + // Update DateAcct on lines - teo_sarca BF [ 1775358 ] + if (is_ValueChanged(COLUMNNAME_DateAcct)) { + int no = DB.executeUpdate( + "UPDATE GL_JournalLine SET "+MJournalLine.COLUMNNAME_DateAcct+"=? WHERE GL_Journal_ID=?", + new Object[]{getDateAcct(), getGL_Journal_ID()}, + false, get_TrxName()); + log.finest("Updated GL_JournalLine.DateAcct #" + no); + } return true; } // beforeSave