Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027485Openbravo ERP07. Sales managementpublic2014-08-27 13:362014-12-30 23:24
maite 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q1 
Sandrahuguet
Core
No
0027485: Should not be possible to invoice more quantity than delivered quantity, when Invoice Terms are "After delivery"
Should not be possible to invoice more quantity than delivered quantity, when Invoice Terms are "After delivery"
1. Register Sales Order with invoice terms= After delivery. Add line and set qty=10. Process
2. Register Goods Shipment related to that order but delivering qty=5. Process
3. Register new Sales Invoice header, run "Create Lines From" process and select previous Order. Realize that line qty showed is 10 but when adding order, invoice's line has qty 5 (which is qty delivered)
4. Edit invoice line to set qty 10 and verify that you are able to process invoice, having invoiced qty > delivered qty when Invoice Terms are "After delivery"
No tags attached.
causes defect 0028862 closed Sandrahuguet Error received when processing invoice including line referencing "discount product" line if it has not been delivered 
Issue History
2014-08-27 13:36maiteNew Issue
2014-08-27 13:36maiteAssigned To => dmiguelez
2014-08-27 13:36maiteModules => Core
2014-08-27 13:36maiteResolution time => 1412114400
2014-08-27 13:36maiteTriggers an Emergency Pack => No
2014-08-27 13:38maiteIssue Monitored: networkb
2014-08-27 16:52heccamIssue Monitored: heccam
2014-09-22 16:34jonalegriaesarteTarget Version3.0PR14Q4 => 3.0PR15Q1
2014-10-12 03:04reinaldoguerraNote Added: 0070889
2014-10-24 17:12reinaldoguerraAssigned Todmiguelez => reinaldoguerra
2014-10-24 17:12reinaldoguerraStatusnew => scheduled
2014-10-24 17:13reinaldoguerraNote Edited: 0070889bug_revision_view_page.php?bugnote_id=0070889#r6890
2014-11-04 17:05hgbotCheckin
2014-11-04 17:05hgbotNote Added: 0071405
2014-11-04 17:05hgbotStatusscheduled => resolved
2014-11-04 17:05hgbotResolutionopen => fixed
2014-11-04 17:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d45ee3d2e877ea751fbfbf1ea381ed4d670fa190 [^]
2014-11-04 17:05SandrahuguetReview Assigned To => Sandrahuguet
2014-11-04 17:05SandrahuguetNote Added: 0071406
2014-11-04 17:05SandrahuguetStatusresolved => closed
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073015
2015-02-06 16:37dmitry_mezentsevRelationship addedcauses 0028862

Notes
(0070889)
reinaldoguerra   
2014-10-12 03:04   
(edited on: 2014-10-24 17:13)
Test plan 1: Processing a single invoice's line

1- Login into Openbravo ERP
2- Go to Sales Order window an register a new one with invoice terms = After delivery.
3- Add line for available product, for example: Bebida Energética 0,5L, and set qty=10. Book it.
4- Go to Goods Shipment window and register a new one.
5- Select created order running "Create Lines From" process selecting created order and Rn-0-0-0 warehouse.
6- Modify line movement qty=5. Complete it.
7- Register new Sales Invoice header, run "Create Lines From" process and select previous Order. Realize that line qty showed is 10 but when adding order, invoice's line has qty 5 (which is qty delivered)
8- Edit invoice line to set qty 10 and verify that now you are not able to process invoice having invoiced qty > delivered qty, an error message is shown.

Test plan 2: Processing two invoice's line

1- Login into Openbravo ERP
2- Go to Sales Order window an register a new one with invoice terms = After delivery.
3- Add line for available product, for example: Bebida Energética 0,5L, and set qty=30. Book it.
4- Go to Goods Shipment window and register a new one.
5- Select created order running "Create Lines From" process selecting created order and Rn-0-0-0 warehouse.
6- Modify line movement qty=5. Complete it.
7- Register new Sales Invoice header, run "Create Lines From" process and select previous Order. Realize that line qty showed is 30 but when adding order, invoice's line has qty 5 (which is qty delivered)
8- Do not process invoice.
9- Go to Goods Shipment window and register a new one.
10- Select again created sales order running "Create Lines From" process selecting created order and Rn-0-0-0 warehouse.
11- Modify line movement qty=15. Complete it.
12- Go to previous registered Sales Invoice and run again "Create Lines From" process and select previous Order. Realize that line qty showed is 30 but when adding order, new invoice's line has qty 15 (which is new qty delivered)
13- Edit new invoice line added and set qty 16. Verify that now you are not able to process invoice having invoiced qty > accumulated delivered qty, an error message is shown.

(0071405)
hgbot   
2014-11-04 17:05   
Repository: erp/devel/pi
Changeset: d45ee3d2e877ea751fbfbf1ea381ed4d670fa190
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Thu Oct 23 19:44:10 2014 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/d45ee3d2e877ea751fbfbf1ea381ed4d670fa190 [^]

Fixed bug 27485: Should not be possible to invoice more quantity than delivered

c_invoice_post stored procedure was modified to throws an error when trying to invoice more quantity than delivered quantity, when Invoice Terms of the related order are: After Delivery. This validation takes into account the accumulated invoiced quantity for the invoice's lines.
This stored procedure is also called from Processing option on Sales Invoice window.

---
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0071406)
Sandrahuguet   
2014-11-04 17:05   
Code review + testing OK
(0073015)
hudsonbot   
2014-12-30 23:24   
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/6525fe229e06 [^]
Maturity status: Test