Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045340Retail ModulesWeb POSpublic2020-10-30 09:442020-11-30 08:44
Leyre 
prakashmurugesan88 
highmajoralways
closedfixed 
5
 
 
No
0045340: A Cross-Store sale can not be made if AWO Connector is defined
With the AWO Conector defined in the Touchpoint, only stock is selected from the same store (from the area that has been defined).

But if the Cross Store functionality is used, this is not correct.

StockChecker.java class only considers the store bin of the store and this is wrong if we use the cross store functionality:

if (useAWOConnector) {
hqlQuery += " and ms.storageBin.id in (";
hqlQuery += " select loc.id from Locator loc ";
hqlQuery += " where loc.oBAWOLocatorGroup <> null and loc.oBAWOLocatorGroup.active = true and loc.oBAWOLocatorGroup.internalRoutingArea.id = :iraid and loc.active = true and loc.oBAWOLocatorGroup.internalRoutingArea.active = true";
hqlQuery += ")";
}
Backend:
1. Touchpoint VBS-1: Define an "Internal Routing Area for sales", in AWO Connector section.
2. Touchpoint VB-1: Define an "Internal Routing Area for sales", in AWO Connector section.
3. Configure correctly both warehouses: warehouse definition. See attached document.

Web POS:
1. Open the VBS-1 terminal:
2. Select a product
3. Check the Stock, and select Vall Boi Store
4. Click "Add to the Receipt"
Result: Error: Not enough stock.
1. Easy but not 100% accurate solution:
Do not filter by Sales Area when the stock is selected from a Warehouse that belongs to a different Organization

2. 100% accurate solution:
When the stock belongs to a Warehouse of a different Organization:
  1. Check if there are terminals related to that Organization
  2. Check if those terminals have Sales Areas defined
  3. In that case, filter the stock by the Sales Areas defined for those terminals
  4. If not, do not filter and show all stock as available
No tags attached.
docx Ticket_19071_Live.docx (1,031,818) 2020-10-30 09:44
https://issues.openbravo.com/file_download.php?file_id=15063&type=bug
Issue History
2020-10-30 09:44LeyreNew Issue
2020-10-30 09:44LeyreAssigned To => Retail
2020-10-30 09:44LeyreResolution time => 1605826800
2020-10-30 09:44LeyreTriggers an Emergency Pack => No
2020-10-30 09:44LeyreFile Added: Ticket_19071_Live.docx
2020-10-30 09:44LeyreSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21840#r21840
2020-10-30 10:29dmiguelezProposed Solution updated
2020-11-23 11:14gorka_gilAssigned ToRetail => gorka_gil
2020-11-23 16:00prakashmurugesan88Assigned Togorka_gil => prakashmurugesan88
2020-11-24 07:57prakashmurugesan88Statusnew => scheduled
2020-11-27 05:19hgbotNote Added: 0124637
2020-11-30 08:44hgbotResolutionopen => fixed
2020-11-30 08:44hgbotStatusscheduled => closed
2020-11-30 08:44hgbotNote Added: 0124665
2020-11-30 08:44hgbotNote Added: 0124666

Notes
(0124637)
hgbot   
2020-11-27 05:19   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.stockvalidation/-/merge_requests/4 [^]
(0124665)
hgbot   
2020-11-30 08:44   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.stockvalidation [^]
Changeset: 6de6ffad0d16093e6c4fe4fc2a6ee08b53616b25
Author: Prakash M <prakash@qualiantech.com>
Date: 2020-11-27T16:52:04+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.stockvalidation/-/commit/6de6ffad0d16093e6c4fe4fc2a6ee08b53616b25 [^]

Fixed BUG-45340: Fixes Cross-Store sale cannot be made if AWO Connector is defined
* Validated with cross-store's sales area instead of terminal store

---
M src/org/openbravo/retail/stockvalidation/StockChecker.java
---
(0124666)
hgbot   
2020-11-30 08:44   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.stockvalidation/-/merge_requests/4 [^]