Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008348Openbravo ERP07. Sales managementpublic2009-03-30 14:002009-05-11 11:03
networkb 
areefbasha 
immediatemajoralways
closedfixed 
20rPath Linux
2.40MP3 
2.40MP4 
Core
No
0008348: Report dimensional invoice shows invoices of all organizations
In sales invoice dimensional report, if you don't select any organization, all invoices are showns, independently of organizations that user conected has access
user1 only has access to org1
user2 only has access to org2

create invoice in org1
access to OpenbravoERP with user2 and execute sales invoice dimensional report with combo "Organization" void.

The problem is that, if filter is left blank, organization 0 (and all its sub-organizations tree) is taken by default and causes this wrong filtering.

The proposed solution is the following: if a user leaves the Organization combo-box blank, the report will be filtered by the organization (and sub-organizations tree) the user is logged with.

Technical solution:
1.Inside if (vars.commandIn("DEFAULT", "DEFAULT_COMPARATIVE")), replace value set in String strOrg = vars.getGlobalVariable("inpOrg", "ReportInvoiceCustomerDimensionalAnalysesJR|org", "0"); by String strOrg = vars.getGlobalVariable("inpOrg", "ReportInvoiceCustomerDimensionalAnalysesJR|org", "");

2. Inside if (vars.commandIn("EDIT_HTML", "EDIT_HTML_COMPARATIVE")) and if (vars.commandIn("EDIT_PDF", "EDIT_PDF_COMPARATIVE")), replace String strOrg = vars.getGlobalVariable("inpOrg", "ReportInvoiceCustomerDimensionalAnalysesJR|org", "0"); by String strOrg = vars.getRequestGlobalVariable("inpOrg", "ReportInvoiceCustomerDimensionalAnalysesJR|org");

3. Inside printPageHtml, just before the selects (if (strComparative.equals("Y"))), add: if (strOrg.equals("")) strOrg = vars.getOrg();
No tags attached.
related to backport 0008394 closed areefbasha Reports shows data of all organizations 
blocks defect 0008343 closed areefbasha Report dimensional invoice shows invoices of all organizations 
Issue History
2009-03-30 18:20rafarodaTypedefect => backport
2009-03-30 18:20rafarodafix_in_branch => 2.40
2009-03-31 06:58areefbashaAssigned Tosathiyan => areefbasha
2009-03-31 17:22hgbotCheckin
2009-03-31 17:22hgbotNote Added: 0015090
2009-03-31 17:22hgbotStatusscheduled => resolved
2009-03-31 17:22hgbotResolutionopen => fixed
2009-03-31 17:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/6ff611975f13ada629b69d52b538474899fc8b73 [^]
2009-04-02 09:36rafarodaRelationship addedrelated to 0008394
2009-05-10 19:37psarobeFixed in Version => 2.40MP4
2009-05-11 11:03sureshbabuStatusresolved => closed
2009-05-11 11:03sureshbabuNote Added: 0016241

Notes
(0015090)
hgbot   
2009-03-31 17:22   
Repository: erp/stable/2.40
Changeset: 6ff611975f13ada629b69d52b538474899fc8b73
Author: areefbasha <areef.basha <at> openbravo.com>
Date: Tue Mar 31 20:50:39 2009 -0400
URL: http://code.openbravo.com/erp/stable/2.40/rev/6ff611975f13ada629b69d52b538474899fc8b73 [^]

Fixed 8348: Report dimensional invoice shows invoices of all organizations.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
---
(0016241)
sureshbabu   
2009-05-11 11:03   
Tested working fine