Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030471Openbravo ERP04. Warehouse managementpublic2015-07-31 12:272015-08-20 23:16
umartirena 
AtulOpenbravo 
normalmajoralways
closedfixed 
5
 
 
vmromanos
Core
Production - Confirmed Stable
2014-06-16
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/05f152469a6a [^]
No
0030471: Return from Customer Pick&Edit Lines allows to enter more quantity to return than the pending to be returned
Return from Customer Pick&Edit Lines allows to enter more quantity to return than the pending to be returned. This happens because the "Returned Quantity other RM" field is showing negative values instead of positive, so this makes the validation on Returned field to perform wrongly.

There is another issue in the pick&edit probably related to the same problem. It shows shipment lines fully returned, when they should not appear.
As F&B Group Admin:
 * Go to Sales Order window and create a Sales Order with a product with stock for quantity 5.
 * Go to Create Shipments from Orders and create the shipment from the previous Sales Order.
 * Go to Return from Customer Window and create a header for the same Business Partner as previous Order/Shipment.
 * Click on Pick&Edit Lines and select the previous shipment line. Set Returned 3. CLick Done.
 * Book the document.
 * Create a new header of Return from Customer.
 * Click again on Pick&Edit Lines. Realize that the previous shipment line appears with -3 on Returned Quantity other RM field, what is wrong because it should be 3.
 * Check also that it allows to enter a value on Returned field between 0 and 8. when it should be between 0 and 2.
 * At least, if you put a value greater than 3 it will not allow to book the document, it will throw an error.
No tags attached.
depends on backport 00304903.0PR15Q3 closed AtulOpenbravo Return from Customer Pick&Edit Lines allows to enter more quantity to return than the pending to be returned 
depends on backport 00304913.0PR15Q2.4 closed AtulOpenbravo Return from Customer Pick&Edit Lines allows to enter more quantity to return than the pending to be returned 
Issue History
2015-07-31 12:27umartirenaNew Issue
2015-07-31 12:27umartirenaAssigned To => Triage Finance
2015-07-31 12:27umartirenaModules => Core
2015-07-31 12:27umartirenaTriggers an Emergency Pack => No
2015-08-03 12:36AtulOpenbravoAssigned ToTriage Finance => AtulOpenbravo
2015-08-03 12:37AtulOpenbravoStatusnew => scheduled
2015-08-04 06:01AtulOpenbravoNote Added: 0079167
2015-08-04 06:04AtulOpenbravoNote Edited: 0079167bug_revision_view_page.php?bugnote_id=0079167#r9140
2015-08-04 09:43AtulOpenbravoRegression date => 2014-06-16
2015-08-04 09:43AtulOpenbravoRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/05f152469a6a [^]
2015-08-04 10:21AtulOpenbravoStatusscheduled => acknowledged
2015-08-04 10:25AtulOpenbravoStatusacknowledged => scheduled
2015-08-04 10:29AtulOpenbravoRegression level => Production - Confirmed Stable
2015-08-04 10:29AtulOpenbravoRegression introduced in release => 3.0PR15Q1
2015-08-04 12:02hgbotCheckin
2015-08-04 12:02hgbotNote Added: 0079174
2015-08-04 12:02hgbotStatusscheduled => resolved
2015-08-04 12:02hgbotResolutionopen => fixed
2015-08-04 12:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/603caa01cb426466778e8c9048cf4b33cf206de1 [^]
2015-08-04 12:02vmromanosReview Assigned To => vmromanos
2015-08-04 12:02vmromanosNote Added: 0079175
2015-08-04 12:02vmromanosStatusresolved => closed
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079519

Notes
(0079167)
AtulOpenbravo   
2015-08-04 06:01   
(edited on: 2015-08-04 06:04)
Test Plan
- Login as F&B Group International Admin.
- Go to Sales Order window and create a Sales Order with a product with stock for quantity 5.
- Go to Create Shipments from Orders and create the shipment from the previous Sales Order.
- Go to Return from Customer Window and create a header for the same Business Partner as previous Order/Shipment.
- Click on Pick & Edit Lines and select the previous shipment line. Set Returned as 3 and click Done. Book the document.
- Create a new header of Return from Customer.
     Click again on Pick&Edit Lines. Realize that the previous shipment line appears with 3 on Returned Quantity other RM field.
     Check that it allows to enter a value on Returned field between 0 and 2. Put a value greater than 2 it will not allow to book the document, it will throw an error.

Alternative Test Plan
- Go to Purchase Order window and create a Purchase Order with a product with Qty 5.
- Go to Pending Goods Receipt and create the it for previous Purchase Order.
- Go to Return To Vendor Window and create a header for the same Business Partner as previous Order/Receipt.
- Click on Pick & Edit Lines and select the previous Receipt line. Set Returned as 3 and click Done. Book the document.
- Create a new header of Return To Vendor.
     Click again on Pick&Edit Lines. Realize that the previous receipt line appears with 3 on Returned Quantity other RM field.
     Check that it allows to enter a value on Returned field between 0 and 2. Put a value greater than 2 it will not allow to book the document, it will throw an error.

(0079174)
hgbot   
2015-08-04 12:02   
Repository: erp/devel/pi
Changeset: 603caa01cb426466778e8c9048cf4b33cf206de1
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Aug 03 23:08:59 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/603caa01cb426466778e8c9048cf4b33cf206de1 [^]

Fixes Issue 30471: Return from Customer Pick&Edit Lines allows to enter more
quantity to return than the pending to be returned

Return document has negative movementqty so ReturnQtyOtherRM was negative.
It should be postive so unlike ReturnQty it is multiplied with -1 as in prev
Datasource prior to transforming it to HQL PE. Where clause which checks
MovementQty of shipment line with the ReturnQtyOtherRM was missing. Sum of
Shipmentline MovementQty and ReturnQtyOtherRM should not be zero. It is added
to fix the problem.

---
M src-db/database/sourcedata/AD_TABLE.xml
---
(0079175)
vmromanos   
2015-08-04 12:02   
Code review + testing OK

Tested in both Oracle and PostgreSQL
(0079519)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test