Openbravo Issue Tracking System - POS2
View Issue Details
0057568POS2Fashionpublic2025-01-06 11:332025-01-20 16:53
philippe_mui 
Bimla_vm 
highminoralways
scheduledopen 
5
 
 
No
0057568: RM-20135 [COUPONS] - Coupon imported by csv is not active on the WebPos
When using Business API data load to generate Coupon codes for a discount and promotion, the coupon is Active = Y but it is not usable on the POS.
However when we deactivate and save then activate and save again, the coupon is usable. It should be usable right after being generated.

See video : https://drive.google.com/file/d/17IXrP9NYiTMLTQJJIYWsVSFASeYcjJFe/view?usp=sharing [^]

https://openbravo.atlassian.net/browse/RM-20135 [^]

In attachment, the CSV file used.
- Create a promotion with uses coupon codes = Y
- Import a csv file of coupons in a promotion on the back office via Business API Data load
- Connect to the back office and verify the result of the import :
the coupon is present in the tab ‘Coupon’ of the promotion
the field ‘Active’ of the coupon is ticked => the coupon must be active on the webpos
- Connect to the web pos and do a ‘refresh masterdata’
- Add a produit on the webpos
- Apply the coupon on the webpos (3 dots/Coupons/Redeem coupon/Coupon code)
A popup displayed ‘Invalid coupon’ (see video joined) = KO

Go back to BO to edit the coupon
Untick the field ‘Active’ of the coupon and save the coupon
Tick the field ‘Active’ of the coupon and save the coupon
In POS, refresh masterdata and use the coupon = OK

=> The coupon should be activated and should be able to be used on the webpos directly after being generated.
FASH
csv Fichier_FR_Import_FURSAC_EUR_FR.csv (291) 2025-01-06 11:33
https://issues.openbravo.com/file_download.php?file_id=20702&type=bug
diff candidate57568.diff (1,221) 2025-01-08 07:55
https://issues.openbravo.com/file_download.php?file_id=20717&type=bug
Issue History
2025-01-06 11:33philippe_muiNew Issue
2025-01-06 11:33philippe_muiAssigned To => Retail
2025-01-06 11:33philippe_muiFile Added: Fichier_FR_Import_FURSAC_EUR_FR.csv
2025-01-06 11:33philippe_muiTriggers an Emergency Pack => No
2025-01-06 11:33philippe_muiTag Attached: FASH
2025-01-08 07:55jorgewederagoFile Added: candidate57568.diff
2025-01-08 07:57jorgewederagoAssigned ToRetail => guilleaer
2025-01-08 07:57jorgewederagoStatusnew => acknowledged
2025-01-08 08:02guillermogilNote Added: 0173888
2025-01-08 09:57guilleaerNote Added: 0173900
2025-01-08 10:10Bimla_vmAssigned Toguilleaer => Bimla_vm
2025-01-08 10:10Bimla_vmStatusacknowledged => scheduled
2025-01-08 12:03guillermogilSeveritymajor => minor
2025-01-20 09:30hgbotNote Added: 0174359
2025-01-20 11:17hgbotResolutionopen => fixed
2025-01-20 11:17hgbotStatusscheduled => closed
2025-01-20 11:17hgbotNote Added: 0174375
2025-01-20 11:17hgbotNote Added: 0174376
2025-01-20 16:52hgbotNote Added: 0174423
2025-01-20 16:53guilleaerStatusclosed => new
2025-01-20 16:53guilleaerResolutionfixed => open
2025-01-20 16:53guilleaerStatusnew => scheduled

Notes
(0173888)
guillermogil   
2025-01-08 08:02   
See candidate patch as a proposed solution
(0173900)
guilleaer   
2025-01-08 09:57   
The issue here is related to the fact of having the crmExternalReference with blank values. When they are created in this way at first they are saved as blank values when all the code expect a null. Activating and deactivating the values changes that empty into null and that’s why they start working.

A workaround for now is just removing that column from the CSV and it will work in the way it is supposed to.

The issue has been assigned to the proper team with a proposed solution.
(0174359)
hgbot   
2025-01-20 09:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/77 [^]
(0174376)
hgbot   
2025-01-20 11:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/merge_requests/77 [^]
(0174375)
hgbot   
2025-01-20 11:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons [^]
Changeset: ff8eebe1307086f3d480d19a986bed8b07fd189b
Author: Bimla Mayavan <b.mayavan@external.orisha.com>
Date: 20-01-2025 08:30:31
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/commit/ff8eebe1307086f3d480d19a986bed8b07fd189b [^]

Fixed ISSUE-57568: Modified criteria restriction for crmReference while coupon redeem

---
M src/org/openbravo/retail/discounts/coupons/DISCPUtils.java
---
(0174423)
hgbot   
2025-01-20 16:52   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons [^]
Changeset: 5fbadb45e05fac97fbf12c4efb08a3fecaf0f255
Author: Guillermo Alvarez de Eulate <g.alvarez@orisha.com>
Date: 20-01-2025 15:52:04
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons/-/commit/5fbadb45e05fac97fbf12c4efb08a3fecaf0f255 [^]

Revert "Fixed ISSUE-57568: Modified criteria restriction for crmReference while coupon redeem"

This reverts merge request !77
---
M src/org/openbravo/retail/discounts/coupons/DISCPUtils.java
---