Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039841Retail ModulesDiscounts and Promotionspublic2018-12-20 10:562019-01-18 12:17
anderaranguren 
rqueralta 
urgentmajoralways
closedfixed 
5
pi 
RR19Q2 
marvintm
No
0039841: Cannot pay the ticket if an approval is configured for a Discretionary Discount
If an approval has been configured for a Discretionary Discount and the approval has been configured for a parent organization and set visibility to a parent organization it is not possible to pay.
- Go to Discounts and Promotion window and add two records for North East Zone and Vall Blanca Store. Both Discretionary Fixed Percentage with Approval Required checked and included organization itself (As it is shown in the pic).
- Go to Preference window and add a record for Web POS Discretionary Discount Approval for North East Zone and visible at North East Zone value='Y' and visible at Openbravo user.
- Add another record for the same property set value to 'N' for Vall Blanca use.

- Go to Web POS and log in with vallblanca.
- Add a Product and add the created discount to the ticket.
- Click on the total amount and the approval popup will be shown.
- Login with openbravo (as it is shown as supervisor) and the payment window will not be shown
No tags attached.
png Discount.png (126,641) 2018-12-20 10:56
https://issues.openbravo.com/file_download.php?file_id=12447&type=bug
png

png preference.png (91,964) 2018-12-20 10:58
https://issues.openbravo.com/file_download.php?file_id=12448&type=bug
png
Issue History
2018-12-20 10:56anderarangurenNew Issue
2018-12-20 10:56anderarangurenAssigned To => Retail
2018-12-20 10:56anderarangurenFile Added: Discount.png
2018-12-20 10:56anderarangurenResolution time => 1547074800
2018-12-20 10:56anderarangurenTriggers an Emergency Pack => No
2018-12-20 10:58anderarangurenFile Added: preference.png
2018-12-20 15:03rqueraltaAssigned ToRetail => rqueralta
2018-12-24 18:36rqueraltaStatusnew => scheduled
2019-01-07 04:16hgbotCheckin
2019-01-07 04:16hgbotNote Added: 0108839
2019-01-07 04:16hgbotStatusscheduled => resolved
2019-01-07 04:16hgbotResolutionopen => fixed
2019-01-07 04:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/87c8706e97f3e73c7078285958104305dd9246e9 [^]
2019-01-11 08:40marvintmNote Added: 0108917
2019-01-11 08:40marvintmStatusresolved => new
2019-01-11 08:40marvintmResolutionfixed => open
2019-01-12 13:09hgbotCheckin
2019-01-12 13:09hgbotNote Added: 0108930
2019-01-12 13:09hgbotStatusnew => resolved
2019-01-12 13:09hgbotResolutionopen => fixed
2019-01-12 13:09hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/87c8706e97f3e73c7078285958104305dd9246e9 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f47d0a2de50484c6479747653c22a99f44bd9d4 [^]
2019-01-14 16:00hgbotCheckin
2019-01-14 16:00hgbotNote Added: 0108945
2019-01-14 16:01hgbotCheckin
2019-01-14 16:01hgbotNote Added: 0108950
2019-01-18 12:17marvintmReview Assigned To => marvintm
2019-01-18 12:17marvintmStatusresolved => closed
2019-01-18 12:17marvintmFixed in Version => RR19Q2

Notes
(0108839)
hgbot   
2019-01-07 04:16   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 87c8706e97f3e73c7078285958104305dd9246e9
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Dec 28 14:35:11 2018 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/87c8706e97f3e73c7078285958104305dd9246e9 [^]

Fixed issue 39841: Cannot pay the ticket if an approval is configured for a
Discretionary Discount

- Remove orgList parameter because the transformed sql is having problems with it

---
M src/org/openbravo/retail/posterminal/utility/CheckApproval.java
---
(0108917)
marvintm   
2019-01-11 08:40   
We should always use parameters, it's not correct to concatenate a string to the query.

Instead of the current fix, most likely the problem with the original fix was that a comma-separated string was passed as parameter instead of a set or list. The Utility.getInStrSet should be removed, and instead the set or list should be passed as parameter to the query.
(0108930)
hgbot   
2019-01-12 13:09   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 8f47d0a2de50484c6479747653c22a99f44bd9d4
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Jan 11 07:29:24 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/8f47d0a2de50484c6479747653c22a99f44bd9d4 [^]

Fixed issue 39841: Cannot pay the ticket if an approval is configured for a
Discretionary Discount

- Change orgList string parameter by list parameter

---
M src/org/openbravo/retail/posterminal/utility/CheckApproval.java
---
(0108945)
hgbot   
2019-01-14 16:00   
Repository: tools/automation/pi-mobile
Changeset: b8fa1964c3b4e270065220f6ef29328bf21bc96f
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Jan 10 13:00:34 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b8fa1964c3b4e270065220f6ef29328bf21bc96f [^]

Related to issue 39841: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I39841_VerifyTicketPaymentIfApprovalForDiscretionaryDiscount.java
---
(0108950)
hgbot   
2019-01-14 16:01   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 8fee007580bc16f10b173ebe2e53ed08c53583ef
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Jan 10 11:13:19 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/8fee007580bc16f10b173ebe2e53ed08c53583ef [^]

Related to issue 39841: added sampledata for testing purposes

---
M referencedata/sampledata/The_White_Valley_Group/M_OFFER.xml
A referencedata/sampledata/The_White_Valley_Group/M_OFFER_ORGANIZATION.xml
---