Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011149Openbravo ERP09. Financial managementpublic2009-10-27 15:432009-11-17 00:00
networkb 
vmromanos 
immediatemajoralways
closedfixed 
5
2.50MP5 
2.50MP92.50MP9 
Core
No
0011149: Incorrect documentno is set in GL Journal when a document type is set as "Default" and has a sequence
In GL Journal window, is possible to copy, from a GL Journal template, GL Journal (AppsOpenbravo/src/org/openbravo/erpCommon/ad_process/CopyFromJournal.java). This proccess set an incorrect documentno because it takes a documentno from other document type. This happens if:
*It exists a document type as Default, and a sequence is used.

The problem is that CopyFromJornal.java, gets the documentno using Utility.getContext function.

After debugging this process, LoginUtils.java sets values for session variables, like C_DOCTYPE_ID. This ID, is taken executing this query:
SELECT C_DOCTYPE_ID FROM C_DOCTYPE
WHERE ISACTIVE='Y'
AND ISDEFAULT='Y'.

If this documenttype has a sequence, will be used to do the insert.
Go to Financial Management > Accounting > Setup > Document Type.
Select one document type and set it as "Default".
Also, check "Sequenced Document" option and select a Document sequence.

Go to Financial Management > Accounting > Transaction > GL Journal.
If exists one, check as "Template". If not, create a new record and also its header, and lines.
Complete it.
Create a new GL Journal.
Press "Copy lines".
Select the previous one and OK.
Go to Header and see documentno field.
No tags attached.
Issue History
2009-10-27 15:43networkbNew Issue
2009-10-27 15:43networkbAssigned To => rafaroda
2009-10-27 16:34networkbTarget Version => 2.50MP9
2009-10-28 06:19rafarodaAssigned Torafaroda => dalsasua
2009-10-28 06:19rafarodaPriorityimmediate => urgent
2009-10-28 06:19rafarodaStatusnew => scheduled
2009-11-09 13:58pnudingPriorityurgent => immediate
2009-11-09 13:58pnudingAssigned Todalsasua => vmromanos
2009-11-10 17:56hgbotCheckin
2009-11-10 17:56hgbotNote Added: 0021698
2009-11-10 17:56hgbotStatusscheduled => resolved
2009-11-10 17:56hgbotResolutionopen => fixed
2009-11-10 17:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a23ec93d6ee2be113276705fba69c0c174678481 [^]
2009-11-16 08:58sureshbabuNote Added: 0021832
2009-11-16 08:58sureshbabuStatusresolved => closed
2009-11-16 08:58sureshbabuFixed in Version => 2.50MP9
2009-11-17 00:00anonymoussf_bug_id0 => 2898753

Notes
(0021698)
hgbot   
2009-11-10 17:56   
Repository: erp/devel/pi
Changeset: a23ec93d6ee2be113276705fba69c0c174678481
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Nov 10 17:57:58 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a23ec93d6ee2be113276705fba69c0c174678481 [^]

Fixed bug 11149: Incorrect documentno in GL Journal
when a document type is set as "Default" and has a sequence

---
M src/org/openbravo/erpCommon/ad_process/CopyFromGLJournal.java
---
(0021832)
sureshbabu   
2009-11-16 08:58   
Tested, Document number rightly set in G/L journal.