Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033738Retail ModulesWeb POSpublic2016-08-18 12:492016-08-31 11:27
aaroncalero 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
 
RR16Q4 
guilleaer
No
0033738: [SERQA 1604] Priorities are ignored when selecting a storage bin to deposit returned goods.
When a return is created in web pos, the returned goods are placed in the warehouse set on the returned line.
The storage bin in which these goods are placed is selected as follows:
If the warehouse has a Return Bin defined, the goods are placed on that bin.
If not, then a random bin is selected to place the goods.
Verify that the function in charge of selecting the bin for returns:
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/b160aade8e75/src/org/openbravo/retail/posterminal/POSUtils.java#l643 [^]
Gets the first bin it retrieves, without sorting:

[...]
       // We haven't found a warehouse with a return bin
       // We are going to select the bin with greater priority
       // of the warehouse of greater priority
 
       List<Locator> lstLocators = lstWarehouses.get(0).getLocatorList();
       if (lstLocators.size() > 0) {
         return lstLocators.get(0);
       } else {
         throw new OBException("Warehouse" + lstWarehouses.get(0) + " doesn't have bins");
       }
[...]
As the comment on the code states, it should be taking into account the bin priorities to select the fin for returns.
Instead of listing and retrieving the first bin directly, an OBCriteria should be done to sort the bins.
SER-QA
related to defect 0033755 closed ranjith_qualiantech_com Sometimes, Returned goods are shipped to an inactive locator 
Issue History
2016-08-18 12:49aaroncaleroNew Issue
2016-08-18 12:49aaroncaleroAssigned To => Retail
2016-08-18 12:49aaroncaleroResolution time => 1472680800
2016-08-18 12:49aaroncaleroTriggers an Emergency Pack => No
2016-08-18 12:49aaroncaleroTag Attached: SER-QA
2016-08-22 10:39ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-08-22 10:39ranjith_qualiantech_comStatusnew => scheduled
2016-08-23 07:29hgbotCheckin
2016-08-23 07:29hgbotNote Added: 0089291
2016-08-23 07:29hgbotStatusscheduled => resolved
2016-08-23 07:29hgbotResolutionopen => fixed
2016-08-23 07:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/51660f59cd892e33e55fa2eb5b631d0f4d0c6694 [^]
2016-08-23 13:48ranjith_qualiantech_comRelationship addedrelated to 0033755
2016-08-31 11:27guilleaerReview Assigned To => guilleaer
2016-08-31 11:27guilleaerStatusresolved => closed
2016-08-31 11:27guilleaerFixed in Version => RR16Q4

Notes
(0089291)
hgbot   
2016-08-23 07:29   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 51660f59cd892e33e55fa2eb5b631d0f4d0c6694
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Aug 23 10:59:19 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/51660f59cd892e33e55fa2eb5b631d0f4d0c6694 [^]

Fixes issue 33738 : Adding Criteria for return bin selection based on priority

---
M src/org/openbravo/retail/posterminal/POSUtils.java
---