details: /erp/devel/pi/rev/7bdfb9074ae5
changeset: 7017:7bdfb9074ae5
user: Mikel Irurita <mikel.irurita <at> openbravo.com>
date: Tue Apr 13 13:50:24 2010 +0200
summary: Fixes issue 0012951: Make consistent not data found messages in
General Ledger and Trial Balance reports
details: /erp/devel/pi/rev/4ae39f38c46b
changeset: 7018:4ae39f38c46b
user: Mikel Irurita <mikel.irurita <at> openbravo.com>
date: Tue Apr 13 13:52:37 2010 +0200
summary: merge
diffstat:
src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java | 4
+-
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java | 27
+++++++--
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java | 16
++--
src/org/openbravo/erpCommon/utility/PrintJR_data.xsql | 10
+-
4 files changed, 35 insertions(+), 22 deletions(-)
diffs (139 lines):
diff -r 386a43438f36 -r 4ae39f38c46b
src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java
Tue Apr 13 16:19:56 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_RequisitionLine_Product.java
Tue Apr 13 13:52:37 2010 +0200
@@ -190,7 +190,9 @@
resultado.append("null");
resultado.append("),\n");
// To set the cursor focus in the amount field
- resultado.append("new Array(\"CURSOR_FIELD\", \"inpqty\"),\n");
+ if (!strMProductID.equals("")) {
+ resultado.append("new Array(\"CURSOR_FIELD\", \"inpqty\"),\n");
+ }
}
if (!strMessage.equals(""))
diff -r 386a43438f36 -r 4ae39f38c46b
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java Tue Apr
13 16:19:56 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java Tue Apr
13 13:52:37 2010 +0200
@@ -453,10 +453,21 @@
if (log4j.isDebugEnabled())
log4j.debug("data.length: " + data.length);
- if (strGroupBy.equals(""))
- xmlDocument.setData("structure1", data);
- else
- xmlDocument.setData("structure2", data);
+ if (data != null && data.length > 0) {
+ if (strGroupBy.equals(""))
+ xmlDocument.setData("structure1", data);
+ else
+ xmlDocument.setData("structure2", data);
+ } else {
+ if (vars.commandIn("FIND")) {
+ // No data has been found. Show warning message.
+ xmlDocument.setParameter("messageType", "WARNING");
+ xmlDocument.setParameter("messageTitle", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()));
+ xmlDocument.setParameter("messageMessage", Utility.messageBD(this,
"NoDataFound", vars
+ .getLanguage()));
+ }
+ }
/*
* if (strcBpartnerId.equals("") && strAll.equals(""))
xmlDocument.setDataArray("reportTotals",
@@ -514,8 +525,8 @@
null, null, null, null, null);
}
if (data == null || data.length == 0) {
- advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"NoDataFound", vars
- .getLanguage()));
+ advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()), Utility.messageBD(this, "NoDataFound",
vars.getLanguage()));
} else {
String strOld = "";
BigDecimal totalDebit = BigDecimal.ZERO;
@@ -609,8 +620,8 @@
strmProductId, strcProjectId, strAmtFrom, strAmtTo);
}
if (data == null || data.length == 0) {
- advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"NoDataFound", vars
- .getLanguage()));
+ advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()), Utility.messageBD(this, "NoDataFound",
vars.getLanguage()));
} else {
String strReportName =
"@basedesign@/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerExcel.jrxml";
diff -r 386a43438f36 -r 4ae39f38c46b
src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java Tue Apr
13 16:19:56 2010 +0530
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java Tue Apr
13 13:52:37 2010 +0200
@@ -471,8 +471,8 @@
}
if (data == null || data.length == 0) {
- advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"NoDataFound", vars
- .getLanguage()));
+ advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()), Utility.messageBD(this, "NoDataFound",
vars.getLanguage()));
} else {
String strReportName =
"@basedesign@/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceExcel.jrxml";
@@ -494,8 +494,8 @@
renderJR(vars, response, strReportName, "xls", parameters, data, null);
}
} else {
- advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"NoDataFound", vars
- .getLanguage()));
+ advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()), Utility.messageBD(this, "NoDataFound",
vars.getLanguage()));
}
}
@@ -543,8 +543,8 @@
}
if (data == null || data.length == 0) {
- advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"NoDataFound", vars
- .getLanguage()));
+ advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()), Utility.messageBD(this, "NoDataFound",
vars.getLanguage()));
} else {
String strLanguage = vars.getLanguage();
@@ -568,8 +568,8 @@
}
} else {
- advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"NoDataFound", vars
- .getLanguage()));
+ advisePopUp(request, response, "WARNING", Utility.messageBD(this,
"ProcessStatus-W", vars
+ .getLanguage()), Utility.messageBD(this, "NoDataFound",
vars.getLanguage()));
}
}
diff -r 386a43438f36 -r 4ae39f38c46b
src/org/openbravo/erpCommon/utility/PrintJR_data.xsql
--- a/src/org/openbravo/erpCommon/utility/PrintJR_data.xsql Tue Apr 13
16:19:56 2010 +0530
+++ b/src/org/openbravo/erpCommon/utility/PrintJR_data.xsql Tue Apr 13
13:52:37 2010 +0200
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2006 Openbravo SLU
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -46,10 +46,10 @@
<SqlMethod name="getReportTitle" type="preparedStatement" return="String">
<SqlMethodComment></SqlMethodComment>
<Sql>
- select COALESCE(t.name, m.name) AS paramname
- FROM AD_Menu M LEFT JOIN AD_Menu_Trl t ON m.AD_Menu_ID = t.AD_Menu_ID
- AND t.AD_Language = ?
- WHERE M.AD_Process_ID = ?
+ select COALESCE(pt.name, p.name) AS paramname
+ FROM ad_process p LEFT JOIN AD_process_Trl pt ON
p.AD_process_ID = pt.AD_process_ID
+ AND pt.AD_Language = ?
+ where p.ad_process_id = ?
</Sql>
<Parameter name="adLanguage"/>
<Parameter name="adProcessId"/>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits