Openbravo Issue Tracking System - POS2
View Issue Details
0048273POS2Restaurantspublic2021-12-17 12:232022-01-17 09:10
mmohammad 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
 
No
0048273: Jira 2579 [TAP] The rounding calculation is not always correct in verified return with discount
In the test environment, there are an issue on the verified return with discount. The rounding calculation is not correct where there are more than one quantity for a same product. There are a lot of product with a price finished by 0.95.

I can reproduce it on livebuilds
1. In the back office, go to Price list and find the list "The White Valley Group Sale Price List Version". Use the role White Valley Group Admin
2. In the tab Product price , find Adhesive body warmers : change the price to 3.95 (unit price and list price)
3. Create a promotion (Fixed Percentage per Total Amount) with fixed percentage of 10%
4. Go to WEBPOS and log in, Update datas on WEBPOS, log out and log in.
5. Choose the product Adhesive body warmers and select it 2 times
6. Apply a disount of 10% Fixed Percentage per Total Amount (previously created)
7. Pay for the receipt.
8. Now make a verified return on the whole receipt => the price of return is not the same as the initial receipt
No tags attached.
related to defect 0048248 closed ranjith_qualiantech_com Retail Modules Wrong ticket amount when doing a Verified Return of a ticket with discount 
depends on backport 0048371TAP closed ranjith_qualiantech_com POS2 Jira 2579 [TAP] The rounding calculation is not always correct in verified return with discount 
blocks defect 0048148 acknowledged Retail POS2 Verified returns and discounts are not having a correct behavior (Umbrella issue) 
pdf jira 2579- Verified Returns with discount.pdf (712,685) 2022-01-11 17:54
https://issues.openbravo.com/file_download.php?file_id=16503&type=bug
Issue History
2021-12-17 12:23mmohammadNew Issue
2021-12-17 12:23mmohammadAssigned To => Retail
2021-12-17 12:23mmohammadTriggers an Emergency Pack => No
2022-01-11 08:47guilleaerRelationship addedblocks 0048148
2022-01-11 08:47guilleaerStatusnew => scheduled
2022-01-11 08:47guilleaerAssigned ToRetail => ranjith_qualiantech_com
2022-01-11 17:48mmohammadFile Added: jira 2579- Verified Returns with discount.pdf
2022-01-11 17:51mmohammadSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23502#r23502
2022-01-11 17:54mmohammadFile Deleted: jira 2579- Verified Returns with discount.pdf
2022-01-11 17:54mmohammadFile Added: jira 2579- Verified Returns with discount.pdf
2022-01-12 08:42ranjith_qualiantech_comRelationship addedrelated to 0048248
2022-01-17 08:31hgbotNote Added: 0134310
2022-01-17 08:31hgbotNote Added: 0134311
2022-01-17 09:10hgbotNote Added: 0134313
2022-01-17 09:10hgbotNote Added: 0134314
2022-01-17 09:10hgbotResolutionopen => fixed
2022-01-17 09:10hgbotStatusscheduled => closed
2022-01-17 09:10hgbotNote Added: 0134315
2022-01-17 09:10hgbotFixed in Version => RR22Q2
2022-01-17 09:10hgbotNote Added: 0134316

Notes
(0134310)
hgbot   
2022-01-17 08:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/689 [^]
(0134311)
hgbot   
2022-01-17 08:31   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/779 [^]
(0134313)
hgbot   
2022-01-17 09:10   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 0a9697afabf8331d1f3ef0cce3b8a46abfd5116a
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 17-01-2022 12:53:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/0a9697afabf8331d1f3ef0cce3b8a46abfd5116a [^]

Related to ISSUE-48273: DiscountAmount should be used to calculate grossAmount
* In Verfied returns, when showing lines in the returns popup
  grossUnitAmount should be baseGrossUnitAmount subtracted with discountAmount

---
M web-jspack/org.openbravo.pos2/src/components/TicketLineRenderCell/TicketLineRenderCell.jsx
---
(0134314)
hgbot   
2022-01-17 09:10   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/779 [^]
(0134315)
hgbot   
2022-01-17 09:10   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/689 [^]
(0134316)
hgbot   
2022-01-17 09:10   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 3ea676dc5fa7fa6e8cc5377db478a2d8a8ea20ac
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 17-01-2022 12:54:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/3ea676dc5fa7fa6e8cc5377db478a2d8a8ea20ac [^]

Fixed ISSUE-48273: DiscountAmount should be used to calculate line grossAmount
* When calculating line grossAmount with skipPromotion enabled,
  grossUnitAmount should be baseGrossUnitAmount subtracted with discountAmount

---
M web-test/model/business-object/ticket/CalculateTotalsModelHook.test.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/TicketUtils.js
---