fixes issue 23517: No error message shown when trying to import a file
authorCarlos Aristu <carlos.aristu@openbravo.com>
Tue, 04 Jun 2013 16:10:08 +0200
changeset 20513 9f59aacfd71a
parent 20512 e9c65e2e6ae9
child 20514 ed7a3d054f89
fixes issue 23517: No error message shown when trying to import a file
with a line without date or amount defined
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Jun 04 12:33:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Jun 04 16:10:08 2013 +0200
@@ -1165,6 +1165,18 @@
 <!--F579E42461DC472AA4F21B14DD3D680B-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--F579E42461DC472AA4F21B14DD3D680B--></AD_MESSAGE>
 
+<!--FC953B2C0069441DB85EB9BECDF9B7A8--><AD_MESSAGE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_MESSAGE_ID><![CDATA[FC953B2C0069441DB85EB9BECDF9B7A8]]></AD_MESSAGE_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <VALUE><![CDATA[APRM_InvalidOrMissingValues]]></VALUE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <MSGTEXT><![CDATA[Could not load the statement. Please check the file because it could contain invalid values or there are missing values.]]></MSGTEXT>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--FC953B2C0069441DB85EB9BECDF9B7A8--></AD_MESSAGE>
+
 <!--FCDC2F10EAAD46A5A24BCEC2BF017A05--><AD_MESSAGE>
 <!--FCDC2F10EAAD46A5A24BCEC2BF017A05-->  <AD_MESSAGE_ID><![CDATA[FCDC2F10EAAD46A5A24BCEC2BF017A05]]></AD_MESSAGE_ID>
 <!--FCDC2F10EAAD46A5A24BCEC2BF017A05-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Tue Jun 04 12:33:00 2013 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Tue Jun 04 16:10:08 2013 +0200
@@ -156,7 +156,7 @@
       bankStatementLines = loadFile(file, bankStatement);
     } catch (Exception e) {
       OBDal.getInstance().rollbackAndClose();
-      return getMyError();
+      return getOBError(conn, vars, "@APRM_InvalidOrMissingValues@", "Error", "Error");
     }
     if (bankStatementLines == null || bankStatementLines.size() == 0) {
       OBDal.getInstance().rollbackAndClose();