Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030788Openbravo ERP09. Financial managementpublic2015-09-08 09:472015-11-23 21:17
vmromanos 
aferraz 
normalminorN/A
closedfixed 
5
 
3.0PR16Q1 
vmromanos
Core
No
0030788: Add filter by document no. in Journal Entries Report
This feature request is about adding a new textbox to the Journal Entries Report where the user can filter by the document number.

This new filter will be only displayed when the user selects a document type which has document numbers.

If the users enters a document type and a document number, the system will return all the accounting entries linked to this document number. Please note that the document number is not unique per document, so the query may find several records.
NA
Implement an optional where clause that links the FACT_ACCT to the document type's table and searches for the document number in an exists clause. This where clause should be dynamic in the sense that both the table and the document no. column names may change.

Note also that the system should avoid SQL injection in this new field.
No tags attached.
duplicate of feature request 0030757 closed aferraz It would be nice to be able to filter by Document No field in Journal Entries Report in order to print specific accounting entry 
diff 30788.diff (36,944) 2015-09-15 14:06
https://issues.openbravo.com/file_download.php?file_id=8448&type=bug
Issue History
2015-09-08 09:47vmromanosNew Issue
2015-09-08 09:47vmromanosAssigned To => Triage Finance
2015-09-08 09:47vmromanosModules => Core
2015-09-08 09:47vmromanosTriggers an Emergency Pack => No
2015-09-08 11:55VictorVillarRelationship addedduplicate of 0030757
2015-09-08 11:58VictorVillarResolution time => 1442527200
2015-09-10 17:25aferrazAssigned ToTriage Finance => aferraz
2015-09-10 17:25aferrazStatusnew => scheduled
2015-09-14 11:12aferrazNote Added: 0080366
2015-09-15 13:01vmromanosFile Added: 30788.diff
2015-09-15 13:03vmromanosNote Added: 0080403
2015-09-15 13:36vmromanosFile Deleted: 30788.diff
2015-09-15 14:06vmromanosFile Added: 30788.diff
2015-11-10 13:24hgbotCheckin
2015-11-10 13:24hgbotNote Added: 0081647
2015-11-10 13:24hgbotStatusscheduled => resolved
2015-11-10 13:24hgbotResolutionopen => fixed
2015-11-10 13:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1f83e987ac4933aaa61e72cedb03707c37e770af [^]
2015-11-10 13:24hgbotCheckin
2015-11-10 13:24hgbotNote Added: 0081648
2015-11-10 13:25vmromanosReview Assigned To => vmromanos
2015-11-10 13:25vmromanosStatusresolved => closed
2015-11-10 13:58psanjuanNote Added: 0081650
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082192
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082193

Notes
(0080366)
aferraz   
2015-09-14 11:12   
Test plan:

As F&B Admin:

- Go to Journal Entries Report window.
- Realize filters in Advanced Filter section are not shown.
- Click on Advanced Filters
- Realize filters in Advanced Filter section (but Document No. filter) are shown
- Select AP Invoice (document type with document number property) in Document filter
- Realize Document No. filter is shown
- Select Amortization (document type without document number property) in Document filter
- Realize Document No. filter is not shown

- Select again AP Invoice in Document filter and click on Search
- Realize all Purchase Invoice are shown in View Results section

- Write a valid Purchase Invoice documentno in Document No. filter and click on Search
- Realize only Purchase Invoice with this documentno are shown in View Results section
- Check filter also works when exporting to PDF and Excel
(0080403)
vmromanos   
2015-09-15 13:03   
Attached the export.

Code review + testing OK.

Pending to be pushed to PI until is open for 16Q1
(0081647)
hgbot   
2015-11-10 13:24   
Repository: erp/devel/pi
Changeset: 1f83e987ac4933aaa61e72cedb03707c37e770af
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 14 13:53:36 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1f83e987ac4933aaa61e72cedb03707c37e770af [^]

Fixes issue 30788: Add filter by document no. in Journal Entries Report

Document No. field has been added to Journal Entries Report.
It will be shown only in case of Document selected has a document number property. Otherwise, it will be hidden and its value will be empty.
If it is filled with any value, report query will retrieve only records of this document with selected document number.
Query to filter by documentno will be dynamically generated from ReportGeneralLedgerJournal.java and insterted into ReportGeneralLedgerJournalData.java query.

---
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.html
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal_data.xsql
---
(0081648)
hgbot   
2015-11-10 13:24   
Repository: erp/devel/pi
Changeset: 488b5488e994579ce98b430ad31b6db1a1ea100d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Sep 15 14:02:13 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/488b5488e994579ce98b430ad31b6db1a1ea100d [^]

Related to issue 30788: code review improvements

Minor modifications:
+ Run query in admin mode
+ Usage of StringUtils.isBlank to control whitespace
+ Usage of StringBuffer to avoid String concatenation
+ Control any possible exception and return null to avoid breaking the report
+ Avoid unnecessary indentation (removed else)
+ Avoid the need of getting the Client object and using directly the id instead
+ Exists clause removed from subquery related to accounts from/to filter because it's useless and affects performance
+ Set the right param to djConfig.searchIds.push

---
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.html
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal_data.xsql
---
(0081650)
psanjuan   
2015-11-10 13:58   
Documented: http://wiki.openbravo.com/wiki/General_Ledger_Journal [^]
(0082192)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test
(0082193)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test