Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012363
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2010-02-19 16:302010-05-18 12:12
ReporternetworkbView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revisiond301591fbf60
ProjectionnoneETAnoneTarget Version2.50MP17
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP11SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012363: An error on Report Remittance

DescriptionNULL appears on the Report Remittance (when you click on Print Record).
Steps To Reproduce-As Openbravo Admin go to Financial Management || Receivables & Payables || Transactions || Remittance
-Click Print Record (In a Remittance with complete lines)
-Realize that NULL appears. (File attached)
TagsNo tags attached.
Attached Filespng file icon RptC_Remittance.png [^] (39,889 bytes) 2010-02-19 16:30


diff file icon Issue_12363_pi.diff [^] (1,975 bytes) 2010-04-09 12:40 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0026024)
sathiyan (reporter)
2010-04-09 12:38

We have to fix it in core class for this issue. Because We will get REPORT_TITLE from generic method in renderJR at HttpSecureAppServlet class like below.

     designParameters.put("REPORT_TITLE", PrintJRData.getReportTitle(this, variables.getLanguage(), classInfo.id);
  
Query For Report Title:

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 = 'en_US' WHERE M.AD_Process_ID = '800146'

<<no records selected for reports/process which is not configured through Menu>>

The above report will work while click on print icon in the transaction window (Remittance).

Remittance Print Report/Process query to get process id:

select * from ad_process where ad_process_id='800146'

"800146";"0";"0";"Y";"2010-03-24 18:17:53.635099";"0";"2010-03-24 18:17:53.635099";"0";"RptC_Remittance";"Remittance printed";"Remittance printed";"Remittance printed";"3";"N";"";"Y";"N";"";"N";"N";"";"";"";"";"0";"M"

How to fix it:

If any Report/Process is not configured through menu, We have to get REPORT_TITLE from process name(from ad_process table), since that is null in menu(given process id won't be there in menu table). Since this is common across all Report/process which is not mapped/configured with menu. So We have to fix it in renderJR method level(available in HttpSecureAppServlet class).

I have attached diff for your review, since it is in HttpSecureAppServlet class. David advise me to assign this issue to platform team to push.

diff -r 610225e88ac0 src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java Wed Mar 17 20:29:41 2010 +0100
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java Thu Apr 08 20:44:18 2010 +0530
@@ -1083,8 +1083,12 @@
       designParameters.put("USER_ORG", Utility.getContext(this, variables, "#User_Org", ""));
       designParameters.put("LANGUAGE", strLanguage);
       designParameters.put("LOCALE", locLocale);
- designParameters.put("REPORT_TITLE", PrintJRData.getReportTitle(this,
- variables.getLanguage(), classInfo.id));
+ String reportTitle = PrintJRData.getReportTitle(this, variables.getLanguage(), classInfo.id);
+ if (reportTitle == null) {
+ reportTitle = PrintJRData.getReportTitleFromProcess(this, variables.getLanguage(),
+ classInfo.id);
+ }
+ designParameters.put("REPORT_TITLE", reportTitle);
 
       final DecimalFormatSymbols dfs = new DecimalFormatSymbols();
       dfs.setDecimalSeparator(variables.getSessionValue("#AD_ReportDecimalSeparator").charAt(0));
diff -r 610225e88ac0 src/org/openbravo/erpCommon/utility/PrintJR_data.xsql
--- a/src/org/openbravo/erpCommon/utility/PrintJR_data.xsql Wed Mar 17 20:29:41 2010 +0100
+++ b/src/org/openbravo/erpCommon/utility/PrintJR_data.xsql Thu Apr 08 20:44:18 2010 +0530
@@ -54,5 +54,16 @@
       <Parameter name="adLanguage"/>
       <Parameter name="adProcessId"/>
     </SqlMethod>
+ <SqlMethod name="getReportTitleFromProcess" type="preparedStatement" return="String">
+ <SqlMethodComment></SqlMethodComment>
+ <Sql>
+ select COALESCE(t.name, m.name) AS paramname
+ FROM AD_PROCESS m LEFT JOIN ad_process_trl t ON m.AD_Process_ID = t.AD_Process_ID
+ AND t.AD_Language = ?
+ WHERE m.AD_Process_ID = ?
+ </Sql>
+ <Parameter name="adLanguage"/>
+ <Parameter name="adProcessId"/>
+ </SqlMethod>
     
 </SqlClass>
(0026134)
hgbot (developer)
2010-04-13 12:50

Repository: erp/devel/pi
Changeset: d301591fbf605d4a994b39488c137809e038ad7d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 13 13:03:01 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d301591fbf605d4a994b39488c137809e038ad7d [^]

fixed bug 12363: An error on Report Remittance

---
M src/org/openbravo/erpCommon/utility/PrintJR_data.xsql
---
(0026255)
iperdomo (reporter)
2010-04-15 13:22

Tested on PI @ rev 90e107951e84
(0026462)
hudsonbot (developer)
2010-04-19 21:13

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/d301591fbf60 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]

- Issue History
Date Modified Username Field Change
2010-02-19 16:30 networkb New Issue
2010-02-19 16:30 networkb Assigned To => dalsasua
2010-02-19 16:30 networkb File Added: RptC_Remittance.png
2010-02-19 16:36 networkb Steps to Reproduce Updated View Revisions
2010-03-08 16:05 jpabloae Target Version 2.50MP14 => 2.50MP15
2010-04-08 08:41 sathiyan Assigned To dalsasua => sathiyan
2010-04-08 08:41 sathiyan Status new => scheduled
2010-04-08 08:41 sathiyan fix_in_branch => pi
2010-04-09 12:38 sathiyan Note Added: 0026024
2010-04-09 12:38 sathiyan Assigned To sathiyan => iciordia
2010-04-09 12:40 sathiyan File Added: Issue_12363_pi.diff
2010-04-13 12:42 iciordia Assigned To iciordia => alostale
2010-04-13 12:50 hgbot Checkin
2010-04-13 12:50 hgbot Note Added: 0026134
2010-04-13 12:50 hgbot Status scheduled => resolved
2010-04-13 12:50 hgbot Resolution open => fixed
2010-04-13 12:50 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d301591fbf605d4a994b39488c137809e038ad7d [^]
2010-04-15 13:22 iperdomo Note Added: 0026255
2010-04-15 13:22 iperdomo Status resolved => closed
2010-04-16 00:00 anonymous sf_bug_id 0 => 2987952
2010-04-19 21:13 hudsonbot Checkin
2010-04-19 21:13 hudsonbot Note Added: 0026462
2010-05-18 12:12 gorka_gil Target Version 2.50MP15 => 2.50MP17


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker