Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051659
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2023-02-21 15:002023-03-17 07:55
ReportergorkaionView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR23Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051659: Wrong discounts in deleted Lines

DescriptionWhen the removed tickets are set to be stored the discount information on deleted lines is not correct. Currently there are 3 different scenarios depending on how the line is deleted and its source:

Case 1 OK. Create a ticket with a line that has discounts applied. Click on delete ticket. On backend the Discounts and Promotions tab has the discount with the correct information.

Case 2 KO. Create a ticket with 2 lines with discounts applied. Click on Delete Line on one of them and complete the ticket. On backend the deleted line does not have the Discounts and Promotions.

Case 3 KO. Create a Verified return of a ticket with 2 lines that have Discounts applied. Delete one of the lines and complete the ticket. On backend the deleted line has the Discounts and Promotion but the Base Gross Unit Price is ZERO instead of the original price when the discount was applied.
Steps To ReproducePrerequisite: Web POS Save Removed Ticket preference must be enabled.

Case 1.
- In POS:
1. Add a line and apply any discount
2. Click on delete ticket
- In Backend
1. Find the removed ticket and check the Discounts and Promotion tab has the discount with expected Base Gross Unit Price and discount amounts.

Case 2.
In POS:
1. Add 3 lines and apply any discount in both of them.
2. Delete one of the lines.
3. Complete the ticket.
In Backend:
1. Find the paid ticket
2. Check that deleted line has the Discount and Promotion tab empty

Case 3a:
In POS:
1. Open verified return and find ticket from case 2.
2. Return all lines
3. Delete one of the lines.
4. Click on Delete ticket
In Backend:
1. Find the deleted return ticket.
2. Check Discounts and Promotinos of line that WAS NOT deleted. Base Gross Unit Price and discount amounts are correct.
3. Check Discoutns and Promotions of line that WAS deleted. Base Gross Unit Price is ZERO which is wrong.

Case 3b (same as before but completing the return after deleting 1 line):
In POS:
1. Open verified return and find ticket from case 2.
2. Return all lines
3. Delete one of the lines.
4. Complete the ticket
In Backend:
1. Find the return ticket.
2. Check Discounts and Promotions of line that WAS NOT deleted. Base Gross Unit Price and discount amounts are correct.
3. Check Discoutns and Promotions of line that WAS deleted. Base Gross Unit Price is ZERO which is wrong.
Proposed SolutionAny form of deleting a ticket and/or any line must preserve the Discounts and Promotions tab information as it was in the moment of the deletion. As it is done when the ticket is deleted.

Base Gross Unit Price has to be the price in that moment. Including any manual price change.

Verified return line promotions are not removed per below ticket. But even if the promotion is not reset the original price is lost:
https://issues.openbravo.com/view.php?id=30755 [^]

calculate receipt reapplies the promotions when a line is deleted. but it is not considering 0 qty lines (deleted ones) because of below changesets:
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/ab2ece3b1073ddc3e436b2dab10bc05733105520 [^]
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/6cc38ae18ad8a1b7d4497a97aed2b96a0e730158 [^]

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0030755 closedfmolina using verified return, discount is removed 
related to defect 0035974 closedjorge-garcia It's possible to apply a manual promotion to a negative or a return line 
depends on defect 0039495 closedjorge-garcia It is not possible to apply a manual promotion/discount to a negative line 

-  Notes
(0147018)
hgbot (developer)
2023-02-27 10:35

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1080 [^]
(0147436)
hgbot (developer)
2023-03-10 09:31

Merge Request created: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/276 [^]
(0147632)
hgbot (developer)
2023-03-17 07:55

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 7e34c40139d1a4a879bfa4fc85e83eebe18f4862
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 17-03-2023 06:54:45
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/7e34c40139d1a4a879bfa4fc85e83eebe18f4862 [^]

Fixed ISSUE-51659: Discounts should not be removed when deleting lines
* With Pref. "Web POS Save Removed Tickets" is enabled,
  when deleting ticket (or) lines
  1) Discounts should not be removed
  2) Gross unit price & Net unit price should be set as Zero

---
M web-test/model/business-object/ticket/actions/DeleteLine.test.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/DeleteLine.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/DeleteTicket.js
---
(0147633)
hgbot (developer)
2023-03-17 07:55

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1080 [^]
(0147634)
hgbot (developer)
2023-03-17 07:55

Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: b526bb18218470cb222774ccc02fe54d0b8dc414
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 17-03-2023 06:54:54
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/b526bb18218470cb222774ccc02fe54d0b8dc414 [^]

Verifies ISSUE-51659: Updated Delete Receipt automated tests

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I35797_VerifyRemoveOrderWithServices.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I33759_DeleteReceiptLinesToZero.java
---
(0147635)
hgbot (developer)
2023-03-17 07:55

Merge request merged: https://gitlab.com/openbravo/ci/mobile-test/-/merge_requests/276 [^]

- Issue History
Date Modified Username Field Change
2023-02-21 15:00 gorkaion New Issue
2023-02-21 15:00 gorkaion Assigned To => Retail
2023-02-21 15:00 gorkaion Triggers an Emergency Pack => No
2023-02-21 15:00 gorkaion Relationship added related to 0030755
2023-02-21 15:01 gorkaion Relationship added related to 0035974
2023-02-21 15:01 gorkaion Relationship added depends on 0039495
2023-02-24 13:44 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2023-02-24 13:44 ranjith_qualiantech_com Status new => scheduled
2023-02-27 10:35 hgbot Note Added: 0147018
2023-02-27 10:35 hgbot Note Added: 0147019
2023-03-08 01:07 hgbot Note Added: 0147347
2023-03-10 04:51 ranjith_qualiantech_com Note Deleted: 0147347
2023-03-10 04:52 ranjith_qualiantech_com Note Deleted: 0147019
2023-03-10 09:31 hgbot Note Added: 0147436
2023-03-17 07:55 hgbot Resolution open => fixed
2023-03-17 07:55 hgbot Status scheduled => closed
2023-03-17 07:55 hgbot Fixed in Version => RR23Q2
2023-03-17 07:55 hgbot Note Added: 0147632
2023-03-17 07:55 hgbot Note Added: 0147633
2023-03-17 07:55 hgbot Note Added: 0147634
2023-03-17 07:55 hgbot Note Added: 0147635


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker