Openbravo Issue Tracking System - POS2
View Issue Details
0057260POS2POSpublic2024-11-22 13:292024-12-12 06:59
javietxe 
radhakrishnan 
normalmajorhave not tried
closedfixed 
5
 
 
No
0057260: Contribution Module - cancel and replace
When performing the cancel and replace, the contribution line is replaced by a new line (a copy of the original), BUT the related line field (line.relatedLines.orderLineId) continues pointing to the product line of the original ticket. This happens because the cancel and replace action (OBPOS2_CreateReplaceTicket) checks, before re-linking the services, whether the ticket has a check called "hasServices." With this check, several things happen (and the implemented solutions are in parentheses):

    -It is not set in the original ticket (we add it as a hook when adding a line with contributions).
    -It is not saved in the back office (nothing).
   - It is not retrieved when loading the remote ticket (we validate that there is a contribution line, and if there is, we load the check. This happens in a posthook of the load remote ticket action, OBPOS2_LoadRemoteTicket).

The validation is: !ticket.hasServices || !line.relatedLines. If that || were a &&, it would work perfectly, but I don't know if the intention of the || is actually something else, for purposes other than contributions.

It is also possible that it is simply a configuration error and can be marked so that when a contribution is added, the check is marked.

This causes issues when editing the product line with the contribution, as it is incorrectly linked and cannot be found, leading to the creation of a new contribution line.
- Enter to the POS
- Create an order with a line with a contribution.
- Pay it
- Do a cancel and replace
No tags attached.
Issue History
2024-11-22 13:29javietxeNew Issue
2024-11-22 13:29javietxeAssigned To => Retail
2024-11-22 13:29javietxeTriggers an Emergency Pack => No
2024-11-22 13:30javietxeIssue Monitored: javietxe
2024-11-22 13:30javietxeAssigned ToRetail => Triage Omni OMS
2024-11-28 06:35jonaeNote Added: 0172657
2024-11-28 06:35jonaeAssigned ToTriage Omni OMS => radhakrishnan
2024-12-04 07:45hgbotNote Added: 0172936
2024-12-12 06:59hgbotResolutionopen => fixed
2024-12-12 06:59hgbotStatusnew => closed
2024-12-12 06:59hgbotNote Added: 0173203
2024-12-12 06:59hgbotFixed in Version => RR25Q1
2024-12-12 06:59hgbotNote Added: 0173204

Notes
(0172657)
jonae   
2024-11-28 06:35   
Jira - https://openbravo.atlassian.net/browse/RM-19480 [^]
(0172936)
hgbot   
2024-12-04 07:45   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1827 [^]
(0173203)
hgbot   
2024-12-12 06:59   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1827 [^]
(0173204)
hgbot   
2024-12-12 06:59   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 845f3cd93b53801bd02a8b54d9e7506d47d59c14
Author: Radhakrishnan Seeman <r.seeman@external.orisha.com>
Date: 12-12-2024 05:59:53
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/845f3cd93b53801bd02a8b54d9e7506d47d59c14 [^]

Fixed ISSUE-57260: Removed service filter to update relatedLines

---
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/CreateReplaceTicket.js
---