Openbravo Issue Tracking System - Retail Modules
View Issue Details
0052701Retail ModulesWeb POSpublic2023-06-08 13:422023-06-22 09:25
ludmila_ursu 
sreehari 
highmajoralways
closedfixed 
5
 
RR23Q3 
approved
OBPS
65194
No
0052701: totalDeleteTickets incorrectly incremented on cash up.mp4
Hello team,
When we connect to a POS, do a cash up without creating any tickets, the variable totalDeleteTickets is incremented by 1.
In code:
newCashup.totalDeleteTickets += 1;

File:
web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/DeleteTicket.js


The code deletes the default (empty) ticket from the Web POS.
This variable (totalDeleteTickets) is used in reports that are printed for customers. The deletion of the default empty ticket in the begining will make report incorrect.
1. Connect to Web POS
2. Set a breakpoint on the line
newCashup.totalDeleteTickets += 1;
3. Do the cash up.
You will see that the execution stops at the line with the breakpoint.
Variable is icremented by 1, even if no ticket was deleted by the cashier.
No tags attached.
? Bug livebuilds - totalDeleteTickets incorrectly incremented on cash up.mp4 (4,509,009) 2023-06-08 13:42
https://issues.openbravo.com/file_download.php?file_id=18631&type=bug
Issue History
2023-06-08 13:42ludmila_ursuNew Issue
2023-06-08 13:42ludmila_ursuAssigned To => Retail
2023-06-08 13:42ludmila_ursuFile Added: Bug livebuilds - totalDeleteTickets incorrectly incremented on cash up.mp4
2023-06-08 13:42ludmila_ursuOBNetwork customer => No
2023-06-08 13:42ludmila_ursuSupport ticket => 65194
2023-06-08 13:42ludmila_ursuTriggers an Emergency Pack => No
2023-06-09 07:46sreehariAssigned ToRetail => sreehari
2023-06-12 08:02marvintmOBNetwork customerNo => OBPS
2023-06-15 14:44sreehariStatusnew => scheduled
2023-06-20 13:35hgbotMerge Request Status => open
2023-06-20 13:35hgbotNote Added: 0151371
2023-06-22 09:25hgbotMerge Request Statusopen => approved
2023-06-22 09:25hgbotResolutionopen => fixed
2023-06-22 09:25hgbotStatusscheduled => closed
2023-06-22 09:25hgbotFixed in Version => RR23Q3
2023-06-22 09:25hgbotNote Added: 0151475
2023-06-22 09:25hgbotNote Added: 0151476

Notes
(0151371)
hgbot   
2023-06-20 13:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1251 [^]
(0151475)
hgbot   
2023-06-22 09:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 787da3077e0cb6d9edafec688d4a9a7baeea0b03
Author: Sreehari Venkataraman <sreehari@qualiantech.com>
Date: 22-06-2023 06:31:43
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/787da3077e0cb6d9edafec688d4a9a7baeea0b03 [^]

Fixes ISSUE-52701: Added additional checks before incrementing totalDeleteTickets
*When deleting ticket if ticket has no lines or payments, then totalDeleteTickets should not be incremented

---
M web-test/model/business-object/ticket/actions/CloseTicket.test.js
M web-test/model/business-object/ticket/actions/DeleteTicket.test.js
M web/org.openbravo.retail.posterminal/app/model/business-object/ticket/actions/DeleteTicket.js
---
(0151476)
hgbot   
2023-06-22 09:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1251 [^]