Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011384Openbravo ERP07. Sales managementpublic2009-11-17 10:322009-11-20 00:00
arunkumar 
rafaroda 
immediatemajorhave not tried
closedfixed 
5
main 
2.50MP92.50MP9 
Core
No
0011384: Unable to complete the sales invoice document
While trying to complete a sales invoice document the error message is displayed as "Rrror:Two invoices can not have the same document number in the same organization tree within the same fiscal year."
Login as userA
Go to Sales management->Transactions->Sales invoice
Click New select Transaction Document: AR Invoice
Select the business partner.
Click on button 'Create lines from' and
Select the sales order and click OK
Go back to Header and click Complete

We are unable to complete the sales invoice.(Please refer the screenshot)
No tags attached.
related to defect 00108072.50MP8 closed rafaroda The documentno on invoices is not unique 
png com.openbravo.test.integration.smoke.sales.E_03_CreateSalesInvoice.png (137,757) 2009-11-17 10:32
https://issues.openbravo.com/file_download.php?file_id=1952&type=bug
png
Issue History
2009-11-17 10:32arunkumarNew Issue
2009-11-17 10:32arunkumarAssigned To => rafaroda
2009-11-17 10:32arunkumarFile Added: com.openbravo.test.integration.smoke.sales.E_03_CreateSalesInvoice.png
2009-11-17 10:33arunkumarNote Added: 0021906
2009-11-17 10:52plujanPrioritynormal => urgent
2009-11-17 14:19psarobePriorityurgent => immediate
2009-11-17 14:19psarobeStatusnew => scheduled
2009-11-17 14:19psarobeTarget Version => 2.50MP9
2009-11-17 15:02rafarodaRelationship addedrelated to 0010807
2009-11-18 18:31rafarodaNote Added: 0021984
2009-11-18 19:17hgbotCheckin
2009-11-18 19:17hgbotNote Added: 0021988
2009-11-18 19:17hgbotStatusscheduled => resolved
2009-11-18 19:17hgbotResolutionopen => fixed
2009-11-18 19:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9ad3ddb414cd2351a1eb44faf899882b96d2f183 [^]
2009-11-19 06:23sureshbabuNote Added: 0022001
2009-11-19 06:23sureshbabuStatusresolved => closed
2009-11-19 06:23sureshbabuFixed in Version => 2.50MP9
2009-11-20 00:00anonymoussf_bug_id0 => 2900820

Notes
(0021906)
arunkumar   
2009-11-17 10:33   
This issue happens in our daily build run in main postgres context
(0021984)
rafaroda   
2009-11-18 18:31   
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.
(0021988)
hgbot   
2009-11-18 19:17   
Repository: erp/devel/pi
Changeset: 9ad3ddb414cd2351a1eb44faf899882b96d2f183
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Fri Nov 13 04:26:44 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9ad3ddb414cd2351a1eb44faf899882b96d2f183 [^]

Fixes issue 11384 fixes issue 10807 DocumentNo check is now filtering by client.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0022001)
sureshbabu   
2009-11-19 06:23   
tested right now i am not getting the error mentioned by the user.