Openbravo Issue Tracking System - POS2
View Issue Details
0056736POS2POSpublic2024-10-10 16:032024-10-21 16:54
andre_montenegro 
guilleaer 
normalmajoralways
scheduledopen 
5
pi 
 
No
0056736: Incorrect Approval Dialog Display for Coupons with Extra Validity Days if triggered though Coupons options
In a scenario where extra validity days are configured for a coupon, and the manager role is granted the 'Allow Extra Validity Days for Coupons' action for the cashier role, an issue arises.

When a cashier attempts to apply a coupon that has expired but is within the extra validity days, the system correctly prompts for approval. However, the approval dialog that appears does not display fields for the approver's username and password. Instead, it displays a field to re-enter the coupon.

Upon clicking the 'Redeem' button in this state, an error pop-up is triggered, displaying 'this.stateDispatcher is not a function'.

This issue prevents the correct application of coupons within their extra validity days, disrupting the checkout process.

But if the coupon code is introduced using the scan code field, the dialog displayed is the expected one.

This behavior has been observed in 24Q3 too.
Configure manager and cashier roles access in the 'Role' window of Backoffice
Cashier Role:
1. Open 'VallBlancaUser' role
2. Go to 'User Action Access' tab
3. Add 'Allow Extra Validity Days for Coupons' user action with 'Approval = Approval Required' and 'Confirmation Required' and 'Active' flags selected
Manager Role:
1. Open 'The White Valley Group Admin' role
2. Go to 'User Action Access' tab
3. Add 'Allow Extra Validity Days for Coupons' user action with 'Approval = Can Use and Approve' and 'Confirmation Required' and 'Active' flags selected

Configure Coupon to have extra validity period in 'Discounts and Promotions' window of Backoffice
1. Open 'price_adjust_chrampons_30_eur' discount →'Definition' section
2. Tick 'Uses coupon codes' checkbox
3. Go to 'Coupons' tab
4. Add new record with the following values:
 - Coupon Code = 1234
 - Number of Uses = Infinite
 - Valid From = 8 days before today
 - Valid To = 4 days before today
 - Coupon Extra Validity Days = 6


Steps to reproduce issue
    
1. Log in to POS as a cashier (VallBlancaUser)
2. Add 3 units of 'Crampons 10 point' product to the Order
3. Push 3 dots above 'Pay' button
4. Select 'Coupons' option
5. Push 'Redeem Coupon' button at the top right
6. Introduce an expired Coupon code with extra validity date:: 1234
7. Click 'Redeem' button

Actual result: Observe that the approval dialog appears does not display fields for the approver's username and password. Instead, it displays a field to re-enter the coupon.
Expected result: Approval dialog must display fields for the approver's username and password.
No tags attached.
depends on defect 0056852 new Triage Platform Base Request approval dialog does not show username + password 
Not all the children of this issue are yet resolved or closed.
png ExtraValidityDateApprovalDialog.png (104,110) 2024-10-10 16:05
https://issues.openbravo.com/file_download.php?file_id=20272&type=bug
png
Issue History
2024-10-10 16:03andre_montenegroNew Issue
2024-10-10 16:03andre_montenegroAssigned To => Retail
2024-10-10 16:03andre_montenegroRegression introduced by commit => "Extra Validity Date Approval' dialog content does not allow to introduce user and password
2024-10-10 16:03andre_montenegroTriggers an Emergency Pack => No
2024-10-10 16:05andre_montenegroFile Added: ExtraValidityDateApprovalDialog.png
2024-10-10 16:06andre_montenegroversion => pi
2024-10-10 16:06andre_montenegroDescription Updatedbug_revision_view_page.php?rev_id=28575#r28575
2024-10-10 16:07andre_montenegroRegression introduced by commit"Extra Validity Date Approval' dialog content does not allow to introduce user and password =>
2024-10-11 11:58guilleaerStatusnew => acknowledged
2024-10-14 15:02Bimla_vmAssigned ToRetail => Bimla_vm
2024-10-14 15:02Bimla_vmStatusacknowledged => scheduled
2024-10-21 16:40guilleaerRelationship addeddepends on 0056852
2024-10-21 16:41guilleaerAssigned ToBimla_vm => guilleaer
2024-10-21 16:42guilleaerNote Added: 0170720

Notes
(0170720)
guilleaer   
2024-10-21 16:42   
A bug was created for platform team which seems to be the real cause of this issue.
Once it is fixed we will recheck the issue to confirm that it will fix both problems