Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041398Retail ModulesDiscounts and Promotionspublic2019-07-17 16:412019-07-18 17:23
inaki_garcia 
guilleaer 
immediatemajoralways
closedfixed 
5
main 
RR19Q3RR19Q3 
jorge-garcia
No
0041398: [19Q3] [D&P per hour] Discount or promotion can no longer be correctly created and used
Due to the newly introduced "Discounts and Promotions per Hour" module extension, creating a discount or promotion in the usual workflow will lead to it not working. This is due to the newly added "Availability" section when creating a new discount or promotion, which has made it mandatory to have some of the the checkboxes checked in order to make the discount or promotion available for use when adding products to a ticket.

This issue is considered a regression, not because an error introduced in an existing project, but due to the disruption of the standard flow as a result of the introduction of this new functionality.
PRECONDITION: the "Discounts and Promotions per Hour" module must be installed alongside the standard "Discounts and Promotions" module

** Behaviour prior to the introduction of the module (19Q2 and earlier) **
-- Backend
0. Log in the ERP
1. Create a discount which isn't discretionary (p.e. "Price Adjustment" type) in the "Discounts and Promotions" window.
Fill all mandatory fields (highlighted in yellow), and add a Product by setting the "Included Products *" to "Only those defined"
and by creating a new record in the "Products" subtab

-- Frontend
0. Log in the Web POS as "vallblanca"
1. Add the product the discount has been created for
2. The discount is correctly added to the list item of the product



** Current behaviour **
- Execute steps 0 and 1 of Backend and Frontend
NOTICE that in step 2. of Frontend, the discount hasn't been correctly applied

-- Backend
2. Check the "All Week" checkbox in the availability section of the Discount, or check the current weekday and leave the Start/Ending Times blank

-- Frontend
- Execute steps 0 to 2 of Frontend
NOTICE that the discount is now correctly added

No tags attached.
blocks defect 0041383 closed guilleaer [19Q3] [D&P per hour] Discount or promotion can no longer be correctly created and used 
Issue History
2019-07-18 16:41guilleaerTypedefect => backport
2019-07-18 16:41guilleaerTarget Version => RR19Q3
2019-07-18 16:41guilleaerAssigned ToRetail => guilleaer
2019-07-18 17:03hgbotCheckin
2019-07-18 17:03hgbotNote Added: 0113530
2019-07-18 17:03hgbotStatusscheduled => resolved
2019-07-18 17:03hgbotResolutionopen => fixed
2019-07-18 17:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q3/rev/fd3fa1ac8753081b66039b225f1237c71492cad4 [^]
2019-07-18 17:23jorge-garciaReview Assigned To => jorge-garcia
2019-07-18 17:23jorge-garciaNote Added: 0113536
2019-07-18 17:23jorge-garciaStatusresolved => closed
2019-07-18 17:23jorge-garciaFixed in Version => RR19Q3

Notes
(0113530)
hgbot   
2019-07-18 17:03   
Repository: erp/backports/3.0PR19Q3
Changeset: fd3fa1ac8753081b66039b225f1237c71492cad4
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Thu Jul 18 17:00:35 2019 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR19Q3/rev/fd3fa1ac8753081b66039b225f1237c71492cad4 [^]

Fixed issue 41398: Discounts should be available all week by default

After add new feature to define discounts per hours, previous discounts present in the database must be marked as -allweek-. When the development was done developer tried to do it but forgot to define default in AD. Also is needed to set the column as required to update previous registers with Y

---
M src-db/database/model/tables/M_OFFER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0113536)
jorge-garcia   
2019-07-18 17:23   
Code reviewed and tested