Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035801Retail ModulesWeb POSpublic2017-04-19 18:072017-05-03 12:21
malsasua 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
 
migueldejuana
No
0035801: error printing when special chars (for example, '&') are used in the discount name
if there is one discount name with the char "&", and receipt is created in POS, with a product using this discount, error is returned when the receipt is printed
in backoffice:
. in discount and promotions window:
  update the discount "3 x 2 Bottles"
    name= "3 x 2 & Bottles"

open hw manager

in POS:
. new receipt:
 add new line: Bottle 1 L -> qty= 3
pay it

Error: Printer and display are not available.
in hw manager, error is returned:
om.openbravo.pos.printer.TicketPrinterException: The entity name must immediately follow the '&' in the entity reference.
    at com.openbravo.pos.printer.TicketParser.printTicket(TicketParser.java:97)
    at com.openbravo.poshw.TicketServlet.doProcess(TicketServlet.java:53)
...
No tags attached.
related to defect 0035907 closed Triage Platform Conn error printing when special chars (for example, '<') are used in the discount name 
causes defect 0037737 closed jorge-garcia Special characters like ' in product names is printed in the receipt as & 
Issue History
2017-04-19 18:07malsasuaNew Issue
2017-04-19 18:07malsasuaAssigned To => Retail
2017-04-19 18:07malsasuaResolution time => 1494367200
2017-04-19 18:07malsasuaTriggers an Emergency Pack => No
2017-04-24 17:22jorge-garciaStatusnew => scheduled
2017-04-24 17:22jorge-garciaAssigned ToRetail => jorge-garcia
2017-04-26 09:29hgbotCheckin
2017-04-26 09:29hgbotNote Added: 0096185
2017-04-26 09:29hgbotCheckin
2017-04-26 09:29hgbotNote Added: 0096186
2017-04-26 09:29hgbotStatusscheduled => resolved
2017-04-26 09:29hgbotResolutionopen => fixed
2017-04-26 09:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.poshwmanager.sources/rev/d4f8ae4bb164cc750ecfe2a6bcceaab321e1ee14 [^]
2017-05-03 12:21migueldejuanaReview Assigned To => migueldejuana
2017-05-03 12:21migueldejuanaNote Added: 0096342
2017-05-03 12:21migueldejuanaStatusresolved => closed
2017-05-03 12:25migueldejuanaRelationship addedrelated to 0035907
2018-01-26 12:17adrianromeroRelationship addedcauses 0037737

Notes
(0096185)
hgbot   
2017-04-26 09:29   
Repository: erp/pmods/org.openbravo.retail.poshwmanager
Changeset: d0a053a86a9904c0002c86c787316717765f7924
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Apr 26 09:28:27 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.poshwmanager/rev/d0a053a86a9904c0002c86c787316717765f7924 [^]

Related to issue 35801: error printing when special chars (for example, '&') are
used in the discount name

Compile hardware manager with the new changes.

---
M bin/poshw.jar
M bin/rev.id
---
(0096186)
hgbot   
2017-04-26 09:29   
Repository: erp/pmods/org.openbravo.retail.poshwmanager.sources
Changeset: d4f8ae4bb164cc750ecfe2a6bcceaab321e1ee14
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 25 13:55:16 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.poshwmanager.sources/rev/d4f8ae4bb164cc750ecfe2a6bcceaab321e1ee14 [^]

Fixed issue 35801: error printing when special chars (for example, '&') are
used in the discount name

The solution is to replace all characaters & for & string
in POSHWManager.

For that, it is necessary to create a regular expresion to match those cases.

---
M project/src/com/openbravo/pos/printer/TicketParser.java
---
(0096342)
migueldejuana   
2017-05-03 12:21   
Tested and reviewed