Openbravo Issue Tracking System - POS2
View Issue Details
0056587POS2POSpublic2024-09-30 15:392024-10-14 11:49
jayala 
Rajesh_18 
normalminorhave not tried
closedfixed 
5
 
 
No
0056587: [DraftOrders] Manual discounts are lost
When a draft order which contain a manual discount is loaded, the manual discount is lost when the discount engine is executed.
Discounts engine is executeb doing several actions:
- Add new items to the ticket
- Press pay button
1. Add a product to a ticket.
2. Add a manual discount to the line.
3. Save the ticket as Draft Order.
4. Load the saved Draft Order (the discount is keeped).
5a. Click pay button.
5b. Modify the ticket.
6. The discount is lost.
When a draft order is loaded the information abot discounts is retrieved but not the information about manual discounts.
We need to re-generate manual discounts info.
To do that we can use this code [
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/blob/59b2f8c0168a9e3aa794b4610cce853fd16f8801/web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js#L341 [^]]

This information must be generated here [https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/blob/8a8a0429859bac4c63459f5fbf418cebd7b00ea2/web/org.openbravo.retail.posterminal/app/model/business-object/ticket/LoadTicketUtils.js#L108 [^]]

No tags attached.
Issue History
2024-09-30 15:39jayalaNew Issue
2024-09-30 15:39jayalaAssigned To => Retail
2024-09-30 15:39jayalaTriggers an Emergency Pack => No
2024-09-30 15:39jayalaAssigned ToRetail => jayala
2024-10-08 08:34guilleaerTypedesign defect => defect
2024-10-08 08:34guilleaerDescription Updatedbug_revision_view_page.php?rev_id=28547#r28547
2024-10-08 08:34guilleaerProposed Solution updated
2024-10-08 08:35guilleaerStatusnew => acknowledged
2024-10-08 09:07guilleaerAssigned Tojayala => Retail
2024-10-08 09:22Rajesh_18Assigned ToRetail => Rajesh_18
2024-10-08 09:22Rajesh_18Statusacknowledged => scheduled
2024-10-09 13:23hgbotNote Added: 0170188
2024-10-14 11:49hgbotResolutionopen => fixed
2024-10-14 11:49hgbotStatusscheduled => closed
2024-10-14 11:49hgbotFixed in Version => RR25Q1
2024-10-14 11:49hgbotNote Added: 0170345
2024-10-14 11:49hgbotNote Added: 0170346

Notes
(0170188)
hgbot   
2024-10-09 13:23   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/155 [^]
(0170345)
hgbot   
2024-10-14 11:49   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 634bfb6f49b59debb5c8b573536a99de8166c915
Author: Rajesh Senthilkumar <r.senthilkumar@external.orisha.com>
Date: 14-10-2024 09:49:35
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/634bfb6f49b59debb5c8b573536a99de8166c915 [^]

Fixed ISSUE-56587: [DraftOrders] Manual discounts are added to draft ticket

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/interface/discount-posinterface.js
---
(0170346)
hgbot   
2024-10-14 11:49   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/155 [^]