Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043089Retail ModulesGift cards and gift voucherspublic2020-02-03 08:422021-03-08 09:13
ranjith_qualiantech_com 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR20Q2 
guilleaer
Packaging and release
2019-11-28
main
https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/39afb8125b3911e1258cc4096c4fd6af63bc19ce [^]
No
0043089: Giftcard Initial Balance is not created with the price sold when initial amount is empty
Giftcard Initial Balance is not created with the price sold when gift card pridct initial amount is empty
1) Create Gift Product in backoffice with Empty Initial Amount
2) Add Price in Price List of 100
POS
1) Add Giftcard
2) Change the price
3) Complete it
Giftcard Initial balance should be created with the price sold instead of priceList price
We are thinking on a new way to fix that issue
1. Revert original one
2. Create a new field with the desired balance in the popup where giftcard instance is configured
-> This field will store/show the inital balance of the giftcard
-> If giftcard has defined an initial balance in the backend, it will be read only an will show this value
-> if giftcard does not have initial balance defined, by default, it will be read only but will have the list price of the giftcard
-> A preference [WebPOS Allow to Edit GiftCard Initial Balance] will be created to allow to change the balance of the giftcard. If this preference is enabled, field will be editable

With that fix, does not matter the mofications done in the line price through discounts or changing the price, we always will know the desired initial balance
No tags attached.
caused by defect 0042391 closed ranjith_qualiantech_com Automatic discount selling gift cards 
related to defect 0045948 closed ranjith_qualiantech_com Gift cards in back office displays wrong ammount 
diff 43089_20Q1_BUT_giftcards.diff (18,894) 2021-03-08 09:13
https://issues.openbravo.com/file_download.php?file_id=15371&type=bug
Issue History
2020-02-03 08:42ranjith_qualiantech_comNew Issue
2020-02-03 08:42ranjith_qualiantech_comAssigned To => Retail
2020-02-03 08:42ranjith_qualiantech_comRegression level => Packaging and release
2020-02-03 08:42ranjith_qualiantech_comRegression date => 2019-11-28
2020-02-03 08:42ranjith_qualiantech_comRegression introduced in release => main
2020-02-03 08:42ranjith_qualiantech_comRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/39afb8125b3911e1258cc4096c4fd6af63bc19ce [^]
2020-02-03 08:42ranjith_qualiantech_comTriggers an Emergency Pack => No
2020-02-03 08:42ranjith_qualiantech_comRelationship addedcaused by 0042391
2020-02-03 09:01ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-02-03 10:44ranjith_qualiantech_comStatusnew => scheduled
2020-02-03 12:12guilleaerProposed Solution updated
2020-02-03 12:22martinsdanIssue Monitored: martinsdan
2020-02-03 12:26guilleaerProposed Solution updated
2020-02-03 14:27ngarciaResolution time => 1550962800
2020-02-03 14:30ngarciaIssue Monitored: ngarcia
2020-02-04 08:52hgbotCheckin
2020-02-04 08:52hgbotNote Added: 0117442
2020-02-04 13:29hgbotCheckin
2020-02-04 13:29hgbotNote Added: 0117456
2020-02-04 13:30hgbotCheckin
2020-02-04 13:30hgbotNote Added: 0117457
2020-02-04 13:30ranjith_qualiantech_comStatusscheduled => resolved
2020-02-04 13:30ranjith_qualiantech_comResolutionopen => fixed
2020-02-04 17:40guilleaerReview Assigned To => guilleaer
2020-02-04 17:40guilleaerStatusresolved => closed
2020-02-04 17:40guilleaerFixed in Version => RR20Q2
2020-02-04 17:55guilleaerNote Added: 0117464
2020-02-20 13:22psarobeNote Added: 0117969
2020-02-20 14:11guilleaerNote Added: 0117970
2020-02-20 14:11guilleaerStatusclosed => new
2020-02-20 14:11guilleaerResolutionfixed => open
2020-02-20 14:11guilleaerFixed in VersionRR20Q2 =>
2020-02-20 14:11guilleaerStatusnew => scheduled
2020-02-20 14:28guilleaerResolution time1550962800 => 1582498800
2020-02-21 13:05hgbotCheckin
2020-02-21 13:05hgbotNote Added: 0118016
2020-02-21 13:05hgbotStatusscheduled => resolved
2020-02-21 13:05hgbotResolutionopen => fixed
2020-02-21 13:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/aa6e56fa1a439d57843e1a7f5637acbfba799d92 [^]
2020-02-21 13:06ranjith_qualiantech_comNote Added: 0118017
2020-02-21 14:28guilleaerStatusresolved => closed
2020-02-21 14:28guilleaerFixed in Version => RR20Q2
2020-04-03 09:47santi_lozanoNote Added: 0118930
2020-04-03 10:10santi_lozanoNote Added: 0118932
2021-03-07 13:32ranjith_qualiantech_comFile Added: 43089_20Q1.diff
2021-03-08 08:55ranjith_qualiantech_comFile Deleted: 43089_20Q1.diff
2021-03-08 09:10ranjith_qualiantech_comRelationship addedrelated to 0045948
2021-03-08 09:13ranjith_qualiantech_comFile Added: 43089_20Q1_BUT_giftcards.diff

Notes
(0117442)
hgbot   
2020-02-04 08:52   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: f571efa0a95b7e0ea5764129103f5220efebad64
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 04 10:15:30 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/f571efa0a95b7e0ea5764129103f5220efebad64 [^]

Related to issue 43089 : Added Giftcard Initial Balance to Line Properties

* Added Pref "WebPOS Allow to Edit GiftCard Initial Balance" to edit the
  initial balance in giftcard properties popup
* Added Pref "WebPOS Use List Price as Initial Balance For GiftCard" to set the
  product listPrice as initial balance in giftcard properties popup
  when Initial amount is not defined for the product

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src/org/openbravo/retail/giftcards/GiftCardModel.java
M src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
M src/org/openbravo/retail/giftcards/master/GiftCardProductProperties.java
M web/org.openbravo.retail.giftcards/js/components/lineproperties.js
M web/org.openbravo.retail.giftcards/js/model/giftcardproductproperty.js
---
(0117456)
hgbot   
2020-02-04 13:29   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: e93456add7eeb1801cc7477255ee412dcec7e11e
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 04 17:59:44 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/e93456add7eeb1801cc7477255ee412dcec7e11e [^]

Related to issue 43089 : Initial Balance Field should be shown only for Product GiftCard type

---
M web/org.openbravo.retail.giftcards/js/components/lineproperties.js
---
(0117457)
hgbot   
2020-02-04 13:30   
Repository: tools/automation/pi-mobile
Changeset: be1959bfc5e1334e297e995c802658968608f176
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Feb 04 18:00:05 2020 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/be1959bfc5e1334e297e995c802658968608f176 [^]

Verifies issue 43089 : Added Automated Test I43089_VerifyGiftCardInitialBalance

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/TestIdExtModules.java
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/giftcards/I43089_VerifyGiftCardInitialBalance.java
---
(0117464)
guilleaer   
2020-02-04 17:55   
Added documentation

http://wiki.openbravo.com/wiki/Retail:Gift_Cards/Product_Gift_Cards_and_Gift_Vouchers#Gift_cards [^]
(0117969)
psarobe   
2020-02-20 13:22   
The solution of the issue is not completed. The scenario when the "Gift card initial amount" is null in the backoffice is not complete.
In that scenario the value of the gift card is changing all the time. So:
1. The initial amount of the gift card is defined by the user in the popup. Fine
2. The user enters for example 100. Clicks OK. Fine

Expected result: The price of the gift card should be 100

Current result: The price is not the initial balance defined in the popup. It is getting the price defined in the backoffice.

Remember, this is only when the Gift Card initial amount is empty
(0117970)
guilleaer   
2020-02-20 14:11   
Reopened to include the improvement suggested in note
https://issues.openbravo.com/view.php?id=43089#c117969 [^]
(0118016)
hgbot   
2020-02-21 13:05   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: aa6e56fa1a439d57843e1a7f5637acbfba799d92
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Feb 21 17:35:30 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/aa6e56fa1a439d57843e1a7f5637acbfba799d92 [^]

Fixed issue 43089 : Line Price should be updated with Giftcard Initial Balance

* If Giftcard Initial amount is not defined in the backoffice, then
  line price should be updated with giftcard Initial Balance

---
M web/org.openbravo.retail.giftcards/js/components/lineproperties.js
---
(0118017)
ranjith_qualiantech_com   
2020-02-21 13:06   
Repository: tools/automation/pi-mobile
Changeset: b41f5bc5fddf43f169fd2496fb874fca4ab4c5c8
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Feb 21 17:35:21 2020 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/b41f5bc5fddf43f169fd2496fb874fca4ab4c5c8 [^] [^]

Verifies issue 43089 : Modified Automated Test I43089_VerifyGiftCardInitialBalance

---
M src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/giftcards/I43089_VerifyGiftCardInitialBalance.java
(0118930)
santi_lozano   
2020-04-03 09:47   
The problem is also reproduced on 20Q1 (as it has part of backport it should also be included on 20Q1)

Reproduced a similar case reported by customer (zendesk 15393) related to the same cause, which gets solved by that patches

1) Download locally 20Q1 with retail, retail sampledata, gift cards and vouchers.
2) For White Valley Group create a new product assigning: Organization = White Valley Group, add a name, add id, Tax Category = Exento, Stocked = unchecked, Grouped Product = unchecked, Gift Card Type = Gift Card, Editable Price = checked. Create a price on Price tab for it on all White Valley Group Price lists, with price quantity 0.0 (don't put initial balance)
3) Add the product to the Assortment (there is a window for it), The White Valley Group Product List
4) On Web POS search for that Product, add it to the ticket, but pay for it 50 (Edit its price), complete the order
5) Try to apply it for a ticket with products on Web POS (see that clicking on Gift card on menu shows the created one with price 0.0 which is wrong, also shown like this on backoffice on Gift Card Instance), then when you click on Apply an error is raised

I have also reported the missing translation for this current issue
https://issues.openbravo.com/view.php?id=43644 [^]
(0118932)
santi_lozano   
2020-04-03 10:10   
Additional: on 19Q4.3 it works well (previous problem is not reproduced)