Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030764Openbravo ERP07. Sales managementpublic2015-09-04 12:482016-02-22 17:13
maite 
nonofrancisco 
highminoralways
scheduledopen 
5
 
 
Core
No
0030764: Entry number incorrectly calculated in Journal Entries Report under some circumstances
Query to calculate first Entry Number is considering a random value (fact_acct_group_id) so it is not correct in some specific cases. Problem is reproducible when fact_acct_group_id corresponding to a "normal" entry (factaccttype=N) is lower than fact_acct_group_id corresponding to a "normal" entry (factaccttype=O) and accounting date is the same
1. Register Sales Invoice for España organization and Accounting date=01-01-2014. Add any line, process and POST invoice
2. In F&B sample data, fact_acct_group_id value corresponding with 2014 opening entry is '0330181B76254F5CBB167FEC50397403', so you need to update fact_acct_group_id of your inoice's entry to be smaller than this:

update fact_acct set fact_acct_group_id='0330181B76254F5CBB167FEC50397401' where record_id='YOUR_INVOICE_ID'
3. Run Journal Entries Report in HTML format and realize that first entry number is 2 instead of 1, which is not correct
No tags attached.
Issue History
2015-09-04 12:48maiteNew Issue
2015-09-04 12:48maiteAssigned To => Triage Finance
2015-09-04 12:48maiteModules => Core
2015-09-04 12:48maiteTriggers an Emergency Pack => No
2015-09-04 12:49maiteIssue Monitored: networkb
2016-02-17 18:05markmm82Statusnew => scheduled
2016-02-17 18:05markmm82Assigned ToTriage Finance => nonofrancisco
2016-02-22 17:13nonofranciscoNote Added: 0084409

Notes
(0084409)
nonofrancisco   
2016-02-22 17:13   
Test plan:

As Openbravo / F&B International Group Admin

Register Sales Invoice for España organization and Accounting date=01-01-2014. Add any line, process and POST invoice
In the database, find the c_invoice_id or the last created invoice
Run the following sentence:
update fact_acct set fact_acct_group_id='0330181B76254F5CBB167FEC50397401' where record_id='YOUR_INVOICE_ID'

Run the Journal Entries Report in HTML format with starting date '01-01-2014', use different combinations of parameters and realize the entries number always start with 1