Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022333Openbravo ERP07. Sales managementpublic2012-11-16 14:192013-04-19 12:52
naiaramartinez 
pramakrishnan 
normalmajorhave not tried
closedfixed 
5
 
 
Core
No
0022333: Generate invoice throws an exception when it shouldn't
You have a sales order completely invoiced. Then, if you execute 'Generate invoices' process you get an error saying that invoiced quantity cannot be higher than Ordered Quantity.

Create a Sales order:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.
 
Create new line:
 Product: Cerveza Ale 0,5L
 Ordered quantity: 10

Create new line:
 Product: Cola 0,5L
 Ordered Quantity: 20

Delete the discount. Complete the order.

Go to Goods Shipment window and create new header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press 'Create lines from'. Select newly created order and select both lines. Select a warehouse and press OK.
Modify the quantities:
  For Cerveza Ale 0,5L set quantity 5
  For Cola 0,5L set quantity 10
Complete the goods shipment.

Go to sales invoice window and create new header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press create lines from and select newly created goods shipment. Select both lines and press OK.
Modify the quantities:
  For Cerveza Ale 0,5L set quantity 2.5
  For Cola 0,5L set quantity 5

Complete the sales invoice.

Create new sales invoice header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press 'Create lines from' and select previosuly created sales order. Select both lines and press OK.

Complete the invoice.

Go back to Goods shipment window and create new header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press 'Create lines from' window and select previously created sales order.
Complete the good shipment.

Now, go to the menu and execute 'Generate invoices' process. You will get an error.

I attach a screenshot with the error.
 
No tags attached.
png nairabug.PNG (14,405) 2012-11-16 14:19
https://issues.openbravo.com/file_download.php?file_id=5744&type=bug
png
Issue History
2012-11-16 14:19naiaramartinezNew Issue
2012-11-16 14:19naiaramartinezAssigned To => dmiguelez
2012-11-16 14:19naiaramartinezFile Added: nairabug.PNG
2012-11-16 14:19naiaramartinezModules => Core
2012-11-16 14:21naiaramartinezDescription Updatedbug_revision_view_page.php?rev_id=4079#r4079
2012-11-27 09:50pramakrishnanAssigned Todmiguelez => pramakrishnan
2012-11-27 09:50pramakrishnanStatusnew => scheduled
2012-11-27 09:50pramakrishnanfix_in_branch => pi
2012-12-24 08:39pramakrishnanNote Added: 0055164
2013-04-16 10:30hgbotCheckin
2013-04-16 10:30hgbotNote Added: 0057921
2013-04-16 10:30hgbotStatusscheduled => resolved
2013-04-16 10:30hgbotResolutionopen => fixed
2013-04-16 10:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d1449feb13c488769be689b41abfed09fdfd5445 [^]
2013-04-16 10:34dmiguelezNote Added: 0057922
2013-04-16 10:34dmiguelezStatusresolved => closed
2013-04-19 12:52hudsonbotCheckin
2013-04-19 12:52hudsonbotNote Added: 0058034

Notes
(0055164)
pramakrishnan   
2012-12-24 08:39   
Test Plan:
Create a Sales order:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.
 
Create new line:
 Product: Cerveza Ale 0,5L
 Ordered quantity: 10

Create new line:
 Product: Cola 0,5L
 Ordered Quantity: 20

Delete the discount. Complete the order.

Go to Goods Shipment window and create new header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press 'Create lines from'. Select newly created order and select both lines. Select a warehouse and press OK.
Modify the quantities:
  For Cerveza Ale 0,5L set quantity 5
  For Cola 0,5L set quantity 10
Complete the goods shipment.

Go to sales invoice window and create new header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press create lines from and select newly created goods shipment. Select both lines and press OK.
Modify the quantities:
  For Cerveza Ale 0,5L set quantity 2.5
  For Cola 0,5L set quantity 5

Complete the sales invoice.

Create new sales invoice header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press 'Create lines from' and select previosuly created sales order. Select both lines and press OK.

Complete the invoice.

Go back to Goods shipment window and create new header:
 Org: España -Region Norte
 BP: Restaurantes Luna Llena, S.A.

Press 'Create lines from' window and select previously created sales order.
Complete the good shipment.

Now, go to the menu and execute 'Generate invoices' process.
Notice that the process gets executed without any errors.
(0057921)
hgbot   
2013-04-16 10:30   
Repository: erp/devel/pi
Changeset: d1449feb13c488769be689b41abfed09fdfd5445
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Thu Apr 11 16:16:39 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d1449feb13c488769be689b41abfed09fdfd5445 [^]

Fixed bug 22333 Generate invoice throws an exception when it shouldn't

---
M src-db/database/model/functions/C_INVOICE_CREATE.xml
---
(0057922)
dmiguelez   
2013-04-16 10:34   
Code Review + Testing Ok
(0058034)
hudsonbot   
2013-04-19 12:52   
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/872081925d42 [^]

Maturity status: Test