Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008343Openbravo ERP07. Sales managementpublic2009-03-30 14:002009-04-25 00:00
networkb 
areefbasha 
immediatemajoralways
closedfixed 
20rPath Linux
2.40MP3 
2.50MP1 
Core
No
0008343: 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();
main
depends on backport 0008348 closed areefbasha Report dimensional invoice shows invoices of all organizations 
has duplicate defect 0008682 closed AinhoaPagola The filter on the dimensional reports maintains the values after remove a previous selection 
has duplicate backport 00086602.40 closed AinhoaPagola Dimensional Reports don't clean every filter 
related to defect 0008372 closed areefbasha Reports shows data of all organizations 
Issue History
2009-03-30 14:00networkbNew Issue
2009-03-30 14:00networkbAssigned To => rafaroda
2009-03-30 14:00networkbRegression testing => No
2009-03-30 18:20rafarodaAssigned Torafaroda => sathiyan
2009-03-30 18:20rafarodaProposed Solution updated
2009-03-30 18:20rafarodaSteps to Reproduce Updated
2009-03-30 18:20rafarodaStatusnew => scheduled
2009-03-30 18:20rafarodafix_in_branch => pi
2009-03-31 06:58areefbashaAssigned Tosathiyan => areefbasha
2009-03-31 18:22hgbotCheckin
2009-03-31 18:22hgbotNote Added: 0015091
2009-03-31 18:22hgbotStatusscheduled => resolved
2009-03-31 18:22hgbotResolutionopen => fixed
2009-03-31 18:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bcd9ef5fe9b90d715870196f3460a79c8352cd6a [^]
2009-04-02 09:35rafarodaRelationship addedrelated to 0008372
2009-04-21 18:10AinhoaPagolaRelationship addedhas duplicate 0008682
2009-04-22 11:24psarobeTag Attached: main
2009-04-24 09:55sureshbabuStatusresolved => closed
2009-04-24 09:55sureshbabuNote Added: 0015667
2009-04-24 09:55sureshbabuFixed in Version => main
2009-04-25 00:00anonymoussf_bug_id0 => 2780812
2009-10-29 12:56rafarodaRelationship addedhas duplicate 0008660

Notes
(0015091)
hgbot   
2009-03-31 18:22   
Repository: erp/devel/pi
Changeset: bcd9ef5fe9b90d715870196f3460a79c8352cd6a
Author: areefbasha <areef.basha <at> openbravo.com>
Date: Tue Mar 31 21:50:21 2009 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/bcd9ef5fe9b90d715870196f3460a79c8352cd6a [^]

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

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
---
(0015667)
sureshbabu   
2009-04-24 09:55   
Tested working fine