Openbravo Issue Tracking System - POS2
View Issue Details
0055680POS2POSpublic2024-06-04 17:282024-09-24 08:26
charlotte_vasseur 
Rajesh_18 
normalmajorunable to reproduce
closedfixed 
5
 
24Q4 
approved
OBPS
No
0055680: [24Q2] Size Exchange after promotion: price modification is applied on only 1 quantity
When doing an exchange on a product in multiple quantities with a promotion applied during the sale, and deactivated before the return, the price modification coming with the exchange is made on only 1 quantity
Enable product exchange for the same price in the required touchpoint type

Login in POS with a correct user on the channel touchpoint
Finalize a sale of a product A with a promotion applied in quantity N > 1
In the backoffice, deactive the promotion and in POS, go to menu 'Orders'
Create a complete verified return on the previous sale
Add the same product A in quantity N
(See POS Product returned with promotion.png)

Click on the product line of the product added
Click on 'Exchange' and confirm the exchange
=> The price of the product in positive should be the same as the product in negative
(See POS Product exchange with promotion KO.png)

The promotion is applied only in quantity 1 (69€), the promotion for remaining quantities is not applied (69*2 = 138€)

(Cannot show a screenshot from Livebuilds because product exchange is actually KO - see POS Exchange product KO.png)
No tags attached.
png POS Product returned with promotion.png (179,420) 2024-06-04 17:28
https://issues.openbravo.com/file_download.php?file_id=19871&type=bug
png

png POS Product exchange with promotion KO.png (199,041) 2024-06-04 17:29
https://issues.openbravo.com/file_download.php?file_id=19872&type=bug
png

png POS Exchange product KO.png (159,353) 2024-06-04 17:29
https://issues.openbravo.com/file_download.php?file_id=19873&type=bug
png

png POS Product exchange with promotion 1 KO.png (221,532) 2024-06-04 18:47
https://issues.openbravo.com/file_download.php?file_id=19874&type=bug
png
Issue History
2024-06-04 17:28charlotte_vasseurNew Issue
2024-06-04 17:28charlotte_vasseurAssigned To => Retail
2024-06-04 17:28charlotte_vasseurFile Added: POS Product returned with promotion.png
2024-06-04 17:28charlotte_vasseurTriggers an Emergency Pack => No
2024-06-04 17:29charlotte_vasseurFile Added: POS Product exchange with promotion KO.png
2024-06-04 17:29charlotte_vasseurFile Added: POS Exchange product KO.png
2024-06-04 18:47charlotte_vasseurNote Added: 0165573
2024-06-04 18:47charlotte_vasseurFile Added: POS Product exchange with promotion 1 KO.png
2024-06-07 08:50guillermogilOBNetwork customer => OBPS
2024-06-07 08:50guillermogilSeveritycritical => major
2024-06-12 07:41guillermogilStatusnew => acknowledged
2024-06-12 08:58Rajesh_18Assigned ToRetail => Rajesh_18
2024-06-12 08:58Rajesh_18Statusacknowledged => scheduled
2024-06-14 09:09hgbotMerge Request Status => open
2024-06-14 09:09hgbotNote Added: 0165947
2024-09-23 09:23hgbotMerge Request Statusopen => approved
2024-09-23 09:23hgbotResolutionopen => fixed
2024-09-23 09:23hgbotStatusscheduled => closed
2024-09-23 09:23hgbotFixed in Version => 24Q4
2024-09-23 09:23hgbotNote Added: 0169470
2024-09-23 09:23hgbotNote Added: 0169471
2024-09-23 09:24marvintmNote Added: 0169472
2024-09-24 08:23hgbotNote Added: 0169502
2024-09-24 08:26hgbotNote Added: 0169503
2024-09-24 08:26hgbotNote Added: 0169504

Notes
(0165573)
charlotte_vasseur   
2024-06-04 18:47   
Actually, same issue happens in quantity 1
The problem seems linked to the promotion
(See POS Product exchange with promotion 1 KO.png)
(0165947)
hgbot   
2024-06-14 09:09   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2723 [^]
(0169470)
hgbot   
2024-09-23 09:23   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 21effb56cf8bc38f567810499917789aeb03cae7
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 23-09-2024 07:07:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/21effb56cf8bc38f567810499917789aeb03cae7 [^]

Fixed ISSUE-55680: Handled ExchangeProduct with promotion

---
M web-jspack/org.openbravo.pos2/src/components/Exchange/ExchangeProductSelector/ExchangeOrderLineWrapper/__test__/ExchangeOrderLineWrapper.test.jsx
M web-jspack/org.openbravo.pos2/src/components/Exchange/ExchangeProductSelector/__test__/ExchangeProductSelector.test.jsx
M web-jspack/org.openbravo.pos2/src/components/SelectLines/SelectedLinesGrid/__test__/SelectLines.test.jsx
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLineDiscount/TicketLineDiscount.jsx
M web-jspack/org.openbravo.pos2/src/components/TicketLineRenderCell/TicketLineRenderCell.jsx
M web-jspack/org.openbravo.pos2/src/components/TicketLineRenderCell/__test__/TicketLineRenderCell.test.jsx
M web-jspack/org.openbravo.pos2/src/components/VerifiedReturns/VerifiedReturnsGrid/TicketLineRenderCellWrapper/__test__/TicketLineRenderCellWrapper.test.jsx
M web-jspack/org.openbravo.pos2/src/components/VerifiedReturns/VerifiedReturnsGrid/__test__/VerifiedReturnsGrid.test.jsx
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/ExchangeProduct.js
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/__test__/ExchangeProduct.test.js
---
(0169471)
hgbot   
2024-09-23 09:23   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2723 [^]
(0169472)
marvintm   
2024-09-23 09:24   
Verified that after creating the initial return, and adding the positive line, the total amount of the order is positive (because discount is not applied to the positive line, as it was disabled).
Then, verified that afterwards when the Exchange flow is used, the positive line receives the discount, and the total amount of the order is 0, as expected.
Verified that when the order is completed, the created sales order in the backoffice is ok.
(0169502)
hgbot   
2024-09-24 08:23   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2940 [^]
(0169503)
hgbot   
2024-09-24 08:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2940 [^]
(0169504)
hgbot   
2024-09-24 08:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 76ac955757720caf1d098bdf465be228241d6106
Author: Rajesh Senthilkumar <r.senthilkumar@external.orisha.com>
Date: 24-09-2024 06:26:37
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/76ac955757720caf1d098bdf465be228241d6106 [^]

Related to ISSUE-55680: Added missing promotions in test

---
M web-jspack/org.openbravo.pos2/src/model/ticket/actions/__test__/ExchangeProduct.test.js
---