Openbravo Issue Tracking System - POS2
View Issue Details
0047507POS2POSpublic2021-08-05 12:292021-11-20 07:17
salvador_mira 
hernan-dp 
highmajoralways
closedfixed 
5
 
 
approved
No
Automated tests
https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/124316882c062fd20a12bb4bb63b45b48c1da3c9 [^]
No
0047507: Can't add an already added product to ticket if ticket is Return Order
When a ticket is set as a Return Order, a NEW product can be added, but if you try to add a product that already is in the ticket using the keymap (product buttons) a popup message gets shown saying that a positive line can't be added to a return order.
1. Login in the POS2.
2. Create an empty ticket.
3. Add a poduct.
4. Convert the ticket to a Return Order.
5. Try to add the same product, and the error shows up.

Alternate flow:

1. Login in the POS2.
2. Create an empty ticket.
3. Convert the ticket to a Return Order.
4. Add a poduct.
5. Try to add the same product, and the error shows up.
No tags attached.
related to backport 0048057TAP closed prakashmurugesan88 JIRA 2492 - Particular issue when returning products with amount = -1 
png Screenshot from 2021-08-05 12-28-56.png (156,342) 2021-08-05 12:29
https://issues.openbravo.com/file_download.php?file_id=16073&type=bug
png
Issue History
2021-08-05 12:29salvador_miraNew Issue
2021-08-05 12:29salvador_miraAssigned To => Retail
2021-08-05 12:29salvador_miraFile Added: Screenshot from 2021-08-05 12-28-56.png
2021-08-05 12:29salvador_miraRegression level => Automated tests
2021-08-05 12:29salvador_miraTriggers an Emergency Pack => No
2021-08-05 13:11dmiguelezOBNetwork customer => No
2021-08-05 13:11dmiguelezResolution time => 1629324000
2021-08-05 13:11dmiguelezAssigned ToRetail => platform
2021-08-05 13:11dmiguelezStatusnew => acknowledged
2021-08-05 13:26dmiguelezRegression introduced by commit => https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/124316882c062fd20a12bb4bb63b45b48c1da3c9 [^]
2021-08-05 13:27dmiguelezAssigned Toplatform => hernan-dp
2021-08-05 14:08dmiguelezNote Added: 0130985
2021-08-10 17:41hgbotMerge Request Status => open
2021-08-10 17:41hgbotNote Added: 0131057
2021-08-11 12:14guilleaerStatusacknowledged => scheduled
2021-08-11 12:23hgbotMerge Request Statusopen => approved
2021-08-11 12:26hgbotResolutionopen => fixed
2021-08-11 12:26hgbotStatusscheduled => closed
2021-08-11 12:26hgbotNote Added: 0131067
2021-08-11 12:26hgbotNote Added: 0131068
2021-11-20 07:15prakashmurugesan88Relationship addedrelated to 0048057
2021-11-20 07:17prakashmurugesan88Note Added: 0133231

Notes
(0130985)
dmiguelez   
2021-08-05 14:08   
Note, feedback from the developer:

It seems the problem is quantity is inverted in an AddProduct user action prehook (https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/124316882c062fd20a12bb4bb63b45b48c1da3c9#a6d59a34aa4e4dafda67bcb5a5d8ae9d1ff40b1a_91_106 [^]), which is also inverted in a state action preparation (https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/AddProduct.js#L25 [^]), resulting in it being positive when it reaches this check (https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/master/web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/AddProduct.js#L114 [^]).
I would also like to raise that id in here is always undefined, at least on the 3-4 flows I tested (https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/124316882c062fd20a12bb4bb63b45b48c1da3c9#a6d59a34aa4e4dafda67bcb5a5d8ae9d1ff40b1a_93_114 [^]).
(0131057)
hgbot   
2021-08-10 17:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/654 [^]
(0131067)
hgbot   
2021-08-11 12:26   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 565c39d19ff85f10801334d6a9cb4f41fddfbc11
Author: hernan-dp <hernan.de.prada@smfconsulting.es>
Date: 2021-08-10T12:36:52-03:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/565c39d19ff85f10801334d6a9cb4f41fddfbc11 [^]

fixes ISSUE-47507: Added condition if quantity come from Quantitys button on popover make the quantity change.

---
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLinePopover/TicketLinePopover.config.json
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/AddProduct.js
---
(0131068)
hgbot   
2021-08-11 12:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/654 [^]
(0133231)
prakashmurugesan88   
2021-11-20 07:17   
Backported to tap as part of the fix of 48057