Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0010807 | Openbravo ERP | 09. Financial management | public | 2009-09-29 10:42 | 2010-02-18 00:31 |
|
Reporter | networkb | |
Assigned To | rafaroda | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 2.50MP5 | |
Target Version | 2.50MP8 | Fixed in Version | 2.50MP9 | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0010807: The documentno on invoices is not unique |
Description | The documentno on invoices is not unique. You can use the same documentno
in the same organization.
|
Steps To Reproduce | -Create a new invoice on organization A and save it
-Create another new invoice on organization A and put in the documentno the documentno of the invoice created previously |
Proposed Solution | Logic will be added into the invoice completion function (C_Invoice_Post) in order that these documents can not be completed if the document number is repeated in the organization tree of the document sequence within the same fiscal year.
Can not be done via a trigger since it will lead to mutating table issues. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0011384 | 2.50MP9 | closed | rafaroda | Unable to complete the sales invoice document | related to | defect | 0012230 | pi | closed | rafaroda | not able to void invoices |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2009-09-29 10:42 | networkb | New Issue | |
2009-09-29 10:42 | networkb | Assigned To | => rafaroda |
2009-09-29 22:32 | psarobe | Status | new => scheduled |
2009-09-29 22:32 | psarobe | fix_in_branch | => pi |
2009-09-30 06:46 | rafaroda | Note Added: 0020572 | |
2009-09-30 06:46 | rafaroda | Priority | normal => urgent |
2009-09-30 06:46 | rafaroda | fix_in_branch | pi => |
2009-10-13 12:12 | psarobe | Assigned To | rafaroda => gorkaion |
2009-10-14 12:11 | shuehner | Note Added: 0021000 | |
2009-10-15 13:01 | gorkaion | Note Added: 0021049 | |
2009-10-19 11:39 | rafaroda | Assigned To | gorkaion => rafaroda |
2009-10-20 15:01 | rafaroda | Steps to Reproduce Updated | |
2009-10-22 10:03 | networkb | Target Version | 2.50MP7 => 2.50MP8 |
2009-10-26 12:49 | dmitry_mezentsev | Note Added: 0021369 | |
2009-11-02 13:46 | rafaroda | Steps to Reproduce Updated | |
2009-11-02 13:51 | hgbot | Checkin | |
2009-11-02 13:51 | hgbot | Note Added: 0021504 | |
2009-11-02 13:51 | hgbot | Status | scheduled => resolved |
2009-11-02 13:51 | hgbot | Resolution | open => fixed |
2009-11-02 13:51 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/005a6d8a4029174ac9c2bf5e1bd9066660c1018a [^] |
2009-11-02 13:53 | rafaroda | Note Added: 0021505 | |
2009-11-02 13:57 | rafaroda | Note Added: 0021506 | |
2009-11-09 07:51 | arunkumar | Status | resolved => closed |
2009-11-09 07:51 | arunkumar | Note Added: 0021629 | |
2009-11-09 07:51 | arunkumar | Fixed in Version | => 2.50MP9 |
2009-11-10 00:00 | anonymous | sf_bug_id | 0 => 2894887 |
2009-11-17 15:02 | rafaroda | Relationship added | related to 0011384 |
2009-11-18 18:30 | rafaroda | Note Edited: 0021505 | |
2009-11-18 19:17 | hgbot | Checkin | |
2009-11-18 19:17 | hgbot | Note Added: 0021989 | |
2009-11-18 19:17 | hgbot | Status | closed => resolved |
2009-11-18 19:17 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/005a6d8a4029174ac9c2bf5e1bd9066660c1018a [^] => http://code.openbravo.com/erp/devel/pi/rev/9ad3ddb414cd2351a1eb44faf899882b96d2f183 [^] |
2009-11-19 05:34 | sureshbabu | Note Added: 0021997 | |
2009-11-19 05:34 | sureshbabu | Status | resolved => closed |
2010-02-16 12:55 | rafaroda | Relationship added | related to 0012230 |
2010-02-16 15:15 | hgbot | Checkin | |
2010-02-16 15:15 | hgbot | Note Added: 0024414 | |
2010-02-16 15:15 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/9ad3ddb414cd2351a1eb44faf899882b96d2f183 [^] => http://code.openbravo.com/erp/devel/pi/rev/7de7c4a6be7eb6b511d2156f5c75b9953af86bf9 [^] |
2010-02-18 00:31 | hudsonbot | Checkin | |
2010-02-18 00:31 | hudsonbot | Note Added: 0024541 | |
Notes |
|
|
|
|
|
Note: this will be an API change and require extra effort on upgrades (for installations where the new unique constraint is not satisfied)) |
|
|
|
In some countries it is possible to have the same Document Number in an organization for different fiscal years. So creating an index is not an option. |
|
|
|
Gorka,
There was a discussion about the best way to fix this issue. Could you please share it with Rafa if his team is going to resolve it (just as a reminder if it is not yet done cause the issue is moving to its deadline)? |
|
|
(0021504)
|
hgbot
|
2009-11-02 13:51
|
|
Repository: erp/devel/pi
Changeset: 005a6d8a4029174ac9c2bf5e1bd9066660c1018a
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Thu Oct 29 04:39:58 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/005a6d8a4029174ac9c2bf5e1bd9066660c1018a [^]
Fixes issue 10807 Now document numbers can not be repeated.
Logic has been added into the invoice completion function (C_Invoice_Post) in order that these documents can not be completed if the document number is repeated in the organization tree of the document sequence within the same fiscal year.
---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
|
|
|
(0021505)
|
rafaroda
|
2009-11-02 13:53
(edited on: 2009-11-18 18:30) |
|
Steps to test the fix.
With the following organization tree:
_ *
__ Main
___ A
____ A1
____ A2
___ B
1) Create a AR sales invoice in organization A with document number 200200 and invoice date 22-10-2009 and complete it.
2) Create a AR Credit Memo sales invoice in organization A with document number 200200 and invoice date 22-12-2009 and complete it.
3) Re-activate it and change its transaction document to AR Invoice and complete it. You will not be allowed since you are in the same organization and fiscal year (and same transaction document -document type-).
4) Change is organization to A1 and complete it. You will not be allowed since the document type is defined at * level and both A and A1 are children of it.
5) Change its invoice date to 22-10-2008 and complete it.
6) Create a AR sales invoice in organization A2 with document number 200200 and invoice date 22-10-2009 and complete it. You will not be allowed since the document type is defined at * level and both A and A2 are children of it.
7) Change its document number to 200201 and complete it.
8) Create a AR sales invoice in organization Main with document number 200200 and invoice date 22-10-2009 and complete it. You will not be allowed since the document type is defined at * level and both Main and A are children of it.
9) Change its document number to 200201 and complete it. You will not be allowed since the document type is defined at * level and both Main and A2 are children of it.
10) Change its invoice date to 22-10-2007 and complete it.
11) Create a AR sales invoice in organization B with document number 200201 and invoice date 22-12-2007 and complete it. You will not be allowed since the document type is defined at * level and both Main and B are children of it.
12) Change its document number to 200200 and complete it.
13) Re-activate it, change its invoice date to 22-10-2009 and complete it. You will not be allowed since the document type is defined at * level and both A and B are children of it.
|
|
|
|
Why using date invoiced for looking for invoices in the same fiscal year?
After completing the invoice, accounting date can be changed (until the invoice is posted) but not the invoiced date. If one forgets to include the invoice in the accounting of one year he can always change its accounting date for including it in the following year. But the document sequence number has to follow the invoiced date year. |
|
|
|
I have tested the steps given by Rafa to test the fix.They are working fine. |
|
|
(0021989)
|
hgbot
|
2009-11-18 19:17
|
|
|
|
|
|
|
(0024414)
|
hgbot
|
2010-02-16 15:15
|
|
Repository: erp/devel/pi
Changeset: 7de7c4a6be7eb6b511d2156f5c75b9953af86bf9
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Tue Feb 16 15:08:01 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7de7c4a6be7eb6b511d2156f5c75b9953af86bf9 [^]
Fixes issue 12230 Check for repeated invoice document nos works also now for non existing periods. Related to issue 10807
---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
|
|
|
|
|