Openbravo Issue Tracking System - Modules
View Issue Details
0032651ModulesWarehouse Pickingpublic2016-04-11 19:072016-05-12 14:08
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
 
aferraz
0032651: Stock Reservations are not deleted when cancelling a picking list if the reserved quantity has decimals
Stock Reservations are not deleted when cancelling a picking list if the reserved quantity has decimals
As group admin role:
   Set the Enable Stock Reservations to Y
   Log out and log in
   Create a sales order with a product with stock. Set a quantity with decimals such as 4.5
   Book it
   Generate Picking List from it
   Go to Warehouse Picking List window and cancel it
   Go to Stock Reservation window and check the reservation is not deleted although the reserved quantity is not 0
   Repeat the process with a non decimal value and check the Stock Reservation is deleted
Change the

<variable>.equals(BigDecimal.ZERO)

with

BigDecimal.ZERO.compareTo(<variable>) == 0

in

EditActionHandler.java: if (resStock.getQuantity().equals(BigDecimal.ZERO)) {
DeletePickingLineHandler.java: if (reservation.getReservedQty().equals(BigDecimal.ZERO)
Utilities.java: if (resStock.getQuantity().equals(BigDecimal.ZERO) && !resStock.isAllocated()) {
PickingListActionHandler.java: if (resStock.getQuantity().equals(BigDecimal.ZERO)) {
PickingListActionHandler.java: if (res.getReservedQty().equals(BigDecimal.ZERO)
No tags attached.
related to defect 0035542 closed aferraz Wrong stock reservation when deleting lines or canceling partially shipped orders' picking lists 
related to defect 0035600 new Triage Omni WMS An exception is thrown in Eclipse and the popup to Delete line in the PL is not opened 
Issue History
2016-04-11 19:07ngarciaNew Issue
2016-04-11 19:07ngarciaAssigned To => Triage Finance
2016-04-11 19:07ngarciaResolution time => 1464127200
2016-04-11 19:07ngarciaIssue Monitored: networkb
2016-04-12 09:29ngarciaProposed Solution updated
2016-04-12 19:23aferrazAssigned ToTriage Finance => Sanjota
2016-04-19 17:09aferrazAssigned ToSanjota => markmm82
2016-04-19 17:15markmm82Statusnew => scheduled
2016-05-11 21:44markmm82Note Added: 0086387
2016-05-12 14:06hgbotCheckin
2016-05-12 14:06hgbotNote Added: 0086401
2016-05-12 14:06hgbotStatusscheduled => resolved
2016-05-12 14:06hgbotResolutionopen => fixed
2016-05-12 14:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/f3ba7528afec8ad5ec35b3be15237edd2d512db4 [^]
2016-05-12 14:07hgbotCheckin
2016-05-12 14:07hgbotNote Added: 0086402
2016-05-12 14:08aferrazReview Assigned To => aferraz
2016-05-12 14:08aferrazNote Added: 0086403
2016-05-12 14:08aferrazStatusresolved => closed
2017-03-17 14:36aferrazRelationship addedrelated to 0035542
2017-03-22 16:43markmm82Relationship addedrelated to 0035600

Notes
(0086387)
markmm82   
2016-05-11 21:44   
Test plan:
As group admin role:
   Set the Enable Stock Reservations to Y
   Log out and log in
   Create a sales order with a product with stock. Set a quantity with decimals such as 4.5
   Book it
   Generate Picking List from it
   Go to Warehouse Picking List window and cancel it
   Go to Stock Reservation window and check the reservation has been deleted.
(0086401)
hgbot   
2016-05-12 14:06   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: f3ba7528afec8ad5ec35b3be15237edd2d512db4
Author: Mark <markmm82 <at> gmail.com>
Date: Wed May 11 13:46:49 2016 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/f3ba7528afec8ad5ec35b3be15237edd2d512db4 [^]

Fixes issue 32651: Deleted reservation cancelling a picking if qty has decimals

Stock Reservations are deleted when cancelling a picking list if the reserved quantity has decimals. Fixed using the proposed solution:
Change the
<variable>.equals(BigDecimal.ZERO)
with
BigDecimal.ZERO.compareTo(<variable>) == 0
in
EditActionHandler.java: if (resStock.getQuantity().equals(BigDecimal.ZERO)) {
DeletePickingLineHandler.java: if (reservation.getReservedQty().equals(BigDecimal.ZERO)
Utilities.java: if (resStock.getQuantity().equals(BigDecimal.ZERO) && !resStock.isAllocated()) {
PickingListActionHandler.java: if (resStock.getQuantity().equals(BigDecimal.ZERO)) {
PickingListActionHandler.java: if (res.getReservedQty().equals(BigDecimal.ZERO)

---
M src/org/openbravo/warehouse/pickinglist/PickingListActionHandler.java
M src/org/openbravo/warehouse/pickinglist/Utilities.java
M src/org/openbravo/warehouse/pickinglist/actionhandler/DeletePickingLineHandler.java
M src/org/openbravo/warehouse/pickinglist/actionhandler/EditActionHandler.java
---
(0086402)
hgbot   
2016-05-12 14:07   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: e60871964dc53fc15b33a5e12d8fa356617c3ce8
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu May 12 14:04:46 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/e60871964dc53fc15b33a5e12d8fa356617c3ce8 [^]

Related to issue 32651: Update module version

---
M src-db/database/model/modifiedTables/C_DOCTYPE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MODULE.xml
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
---
(0086403)
aferraz   
2016-05-12 14:08   
Code review + Testing OK