details:   https://code.openbravo.com/erp/devel/pi/rev/0e2211ada03d
changeset: 16683:0e2211ada03d
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Tue May 29 09:26:41 2012 +0200
summary:   fixes issue 20620: ProcessRunError closing a year

diffstat:

 src-db/database/sourcedata/AD_MESSAGE.xml                          |  11 
++++++++++
 src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java |   7 ++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 155508a56bac -r 0e2211ada03d src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Tue May 29 09:00:49 2012 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Tue May 29 09:26:41 2012 +0200
@@ -18650,6 +18650,17 @@
 <!--A96A9CE562E94DBC8D59C2F0208028B0-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--A96A9CE562E94DBC8D59C2F0208028B0--></AD_MESSAGE>
 
+<!--A9F691D8BBE1457CACD78884CE9A8B07--><AD_MESSAGE>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  
<AD_MESSAGE_ID><![CDATA[A9F691D8BBE1457CACD78884CE9A8B07]]></AD_MESSAGE_ID>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  
<VALUE><![CDATA[AllPeriodsPermanentClosed]]></VALUE>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  <MSGTEXT><![CDATA[The year can not be 
closed because all its periods are in closed permanently state]]></MSGTEXT>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--A9F691D8BBE1457CACD78884CE9A8B07-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A9F691D8BBE1457CACD78884CE9A8B07--></AD_MESSAGE>
+
 <!--AA196DCD58DA494FA1ADCF695FFAA80C--><AD_MESSAGE>
 <!--AA196DCD58DA494FA1ADCF695FFAA80C-->  
<AD_MESSAGE_ID><![CDATA[AA196DCD58DA494FA1ADCF695FFAA80C]]></AD_MESSAGE_ID>
 <!--AA196DCD58DA494FA1ADCF695FFAA80C-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 155508a56bac -r 0e2211ada03d 
src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java        
Tue May 29 09:00:49 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateRegFactAcct.java        
Tue May 29 09:26:41 2012 +0200
@@ -172,8 +172,11 @@
               return Utility.translateError(this, vars, vars.getLanguage(), 
"ProcessRunError");
           }
         }
-        if (CreateRegFactAcctData.updateClose(conn, this, vars.getUser(), 
strKey, strOrgId) == 0)
-          return Utility.translateError(this, vars, vars.getLanguage(), 
"ProcessRunError");
+        if (CreateRegFactAcctData.updateClose(conn, this, vars.getUser(), 
strKey, strOrgId) == 0) {
+          String strAllPeriodsErr = Utility.messageBD(this, 
"AllPeriodsPermanentClosed",
+              vars.getLanguage());
+          return Utility.translateError(this, vars, vars.getLanguage(), 
strAllPeriodsErr);
+        }
       }
 
       releaseCommitConnection(conn);

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to