Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043445Retail ModulesGift cards and gift voucherspublic2020-03-06 12:262020-04-23 17:11
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR20Q3 
marvintm
No
0043445: Gift Card is cancelled when it is returned although it is not included in the ticket because negative lines are not allowed
Gift Card is cancelled when it is returned although it is not included in the ticket because negative lines are not allowed
In the backoffice:
   Set the Do not allow Sales with return preference to Y

In the POS:
   Add a Gift Card Infinite to the receipt
   Pay it

In the backoffice:
   Check a new Gift Card Instance has been created in New status

In the POS:
   Add a product to the receipt
   Select Gift / Credit Notes
   Select previously created Gift Card
   Return it
   Check the following error is shown and the gift card is not included
      You cannot add a negative line in a sales order
   Complete the ticket

In the backoffice:
   Check the Gift Card Instance is Closed and it is set as Cancelled
No tags attached.
related to defect 0042880 closed ranjith_qualiantech_com When the user do a return of a Gift Card based on product the negative line should be in a sales ticket 
related to defect 0042899 closed ranjith_qualiantech_com [20Q1] Returning a non returnable Gift Card does not work as expected in some circumstances 
causes defect 0046981 closed ranjith_qualiantech_com It is not possible to return a product/voucher gift card 
png Screenshot from 2020-03-23 13-48-57.png (584,847) 2020-03-23 14:58
https://issues.openbravo.com/file_download.php?file_id=14193&type=bug
Issue History
2020-03-06 12:26ngarciaNew Issue
2020-03-06 12:26ngarciaAssigned To => Retail
2020-03-06 12:26ngarciaResolution time => 1585263600
2020-03-06 12:26ngarciaTriggers an Emergency Pack => No
2020-03-06 12:27ngarciaIssue Monitored: networkb
2020-03-18 00:08rqueraltaAssigned ToRetail => rqueralta
2020-03-18 00:09rqueraltaStatusnew => scheduled
2020-03-18 21:49hgbotCheckin
2020-03-18 21:49hgbotNote Added: 0118684
2020-03-18 21:49hgbotStatusscheduled => resolved
2020-03-18 21:49hgbotResolutionopen => fixed
2020-03-18 21:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/b603dd4c4554796d19440fdf93efbf9a4bb02cc9 [^]
2020-03-23 14:57adrianromeroNote Added: 0118761
2020-03-23 14:57adrianromeroStatusresolved => new
2020-03-23 14:57adrianromeroResolutionfixed => open
2020-03-23 14:58adrianromeroFile Added: Screenshot from 2020-03-23 13-48-57.png
2020-03-23 17:13adrianromeroRelationship addedrelated to 0042880
2020-03-23 17:14adrianromeroRelationship addedrelated to 0042899
2020-03-23 17:18adrianromeroNote Added: 0118771
2020-03-27 03:29hgbotCheckin
2020-03-27 03:29hgbotNote Added: 0118850
2020-03-27 03:29hgbotStatusnew => resolved
2020-03-27 03:29hgbotResolutionopen => fixed
2020-03-27 03:29hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/b603dd4c4554796d19440fdf93efbf9a4bb02cc9 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/adc149f09c2a8c5935d431b8d650143fe266024e [^]
2020-03-27 08:19marvintmStatusresolved => new
2020-03-27 08:19marvintmResolutionfixed => open
2020-03-27 09:58guilleaerStatusnew => scheduled
2020-04-01 13:18ranjith_qualiantech_comAssigned Torqueralta => ranjith_qualiantech_com
2020-04-13 13:47hgbotCheckin
2020-04-13 13:47hgbotNote Added: 0119138
2020-04-14 02:44hgbotCheckin
2020-04-14 02:44hgbotNote Added: 0119141
2020-04-15 08:25ranjith_qualiantech_comStatusscheduled => resolved
2020-04-15 08:25ranjith_qualiantech_comResolutionopen => fixed
2020-04-23 17:11marvintmReview Assigned To => marvintm
2020-04-23 17:11marvintmStatusresolved => closed
2020-04-23 17:11marvintmFixed in Version => RR20Q3
2021-06-07 01:46ranjith_qualiantech_comRelationship addedcauses 0046981

Notes
(0118684)
hgbot   
2020-03-18 21:49   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: b603dd4c4554796d19440fdf93efbf9a4bb02cc9
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Mar 18 14:58:14 2020 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/b603dd4c4554796d19440fdf93efbf9a4bb02cc9 [^]

Fixed BUG-43445: Gift Card is cancelled when it is returned although it is not
included in the ticket because negative lines are not allowed

- If OBPOS_NotAllowSalesWithReturn preference is true, call to CancelGiftCard
service was avoided.

---
M web/org.openbravo.retail.giftcards/js/model/GiftCardUtils.js
---
(0118761)
adrianromero   
2020-03-23 14:57   
The are several issues related to this fix:

* The callback "fail()" of the function "cancelGiftCard" is not invoked, so the dialog stays in an inconsistent status.
* It should be allowed to add the returned giftcard to the receipt if there is no other line in the receipt. The preference "Do not allow Sales with return" does not allow to mix positive and negative lines. But it allows only negative lines. Otherwise it will not be possible to return a giftcard with this preference activated.
* To be consistent with other error messages displayed when trying to return or apply a giftcard, a dialog must be displayed instead of a "showerror" message. See for example screenshot attached.
(0118771)
adrianromero   
2020-03-23 17:18   
Important: Note this issue is closely related to issues 42899 and 42880 and probably all theses issues should be fixed as a whole allowing the functional flow of returning a gift card is consistent in all preferences combination related to returns and giftcards: "Do not allow Sales with return", "Web POS action Return receipt", ...
(0118850)
hgbot   
2020-03-27 03:29   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: adc149f09c2a8c5935d431b8d650143fe266024e
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Mar 26 22:25:23 2020 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/adc149f09c2a8c5935d431b8d650143fe266024e [^]

Fixed BUG-43445: Gift Card is cancelled when it is returned although it is not
included in the ticket because negative lines are not allowed

- Backed out changeset: b603dd4c4554

---
M web/org.openbravo.retail.giftcards/js/model/GiftCardUtils.js
---
(0119138)
hgbot   
2020-04-13 13:47   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: 4ae14c816476826e373a41181ce9748862ba7f24
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Apr 13 17:17:17 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/4ae14c816476826e373a41181ce9748862ba7f24 [^]

Related to issue-43445 : Refactored Return Giftcard process

* When returning giftcard, if any error while adding the return line to receipt,
  then return transaction should be reverted

---
M web/org.openbravo.retail.giftcards/js/components/GiftCardDetails.js
M web/org.openbravo.retail.giftcards/js/model/GiftCardUtils.js
---
(0119141)
hgbot   
2020-04-14 02:44   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3814ba2c2623251e32c0bdf788e7c769241ada9c
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Apr 14 06:14:04 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3814ba2c2623251e32c0bdf788e7c769241ada9c [^]

Related to issue-43445 : Refactored addProductToOrder by adding callback when adding line

* Return line is not allowed in sales receipt when Pref. "Do not not allow sales with Return" is enabled
  callback should be called when line creation fails

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---