Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040252Retail ModulesGift cards and gift voucherspublic2019-02-21 11:012019-03-01 11:37
ngarcia 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q2 
marvintm
No
0040252: Cannot cancel a gift card instance if it does not include a payment
Cannot cancel a gift card instance if it does not include a payment
In the POS:
   Create a new receipt
   Set a business partner to it
   Add the following two products:
      Gift Card Infinite
      Gift Voucher
   Pay it

In the backoffice:
   Check two records have been created in Gift Card Instance window:
      one with Based on Product Gift Card type and one with Based on Voucher type
   Check both of them have the Payment field empty

   Try to launch the Cancel Gift Card process for them and check the following error message is shown:
      Close Card Exception closing card: <>

   The log shows:
      
ERROR org.openbravo.retail.giftcards.process.CancelGiftCardProcessHandler - Exception closing card: %0
org.openbravo.base.exception.OBException: Exception closing gift card : <>
    at org.openbravo.retail.giftcards.process.GiftCardGLItemUtils.close(GiftCardGLItemUtils.java:92) ~[GiftCardGLItemUtils.class:?]
    at org.openbravo.retail.giftcards.process.GiftCardGLItemUtils.close(GiftCardGLItemUtils.java:68) ~[GiftCardGLItemUtils.class:?]
    at org.openbravo.retail.giftcards.process.GiftCardGLItemUtils.close(GiftCardGLItemUtils.java:63) ~[GiftCardGLItemUtils.class:?]
    at org.openbravo.retail.giftcards.process.CancelGiftCardProcessHandler.doExecute(CancelGiftCardProcessHandler.java:44) [CancelGiftCardProcessHandler.class:?]
    ...
Caused by: java.lang.NullPointerException
    at org.openbravo.retail.giftcards.process.GiftCardGLItemUtils.makeGiftCardTrans(GiftCardGLItemUtils.java:104) ~[GiftCardGLItemUtils.class:?]
    at org.openbravo.retail.giftcards.process.GiftCardGLItemUtils.close(GiftCardGLItemUtils.java:85) ~[GiftCardGLItemUtils.class:?]
    ... 54 more
No tags attached.
related to defect 0040251 closed ranjith_qualiantech_com Cancelled field is not set to Y when launching the Cancel Gift Card process in Gift Card Instance window 
Issue History
2019-02-21 11:01ngarciaNew Issue
2019-02-21 11:01ngarciaAssigned To => Retail
2019-02-21 11:01ngarciaTriggers an Emergency Pack => No
2019-02-21 11:02ngarciaIssue Monitored: networkb
2019-02-21 12:37rafarodaRelationship addedrelated to 0040251
2019-02-21 13:42marvintmResolution time => 1552172400
2019-02-21 14:33ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2019-02-22 06:17ranjith_qualiantech_comStatusnew => scheduled
2019-02-22 12:37hgbotCheckin
2019-02-22 12:37hgbotNote Added: 0110030
2019-02-22 12:37hgbotStatusscheduled => resolved
2019-02-22 12:37hgbotResolutionopen => fixed
2019-02-22 12:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/e5569d9ba275f5cd6c14a4d0326356d011622730 [^]
2019-03-01 11:37marvintmReview Assigned To => marvintm
2019-03-01 11:37marvintmStatusresolved => closed
2019-03-01 11:37marvintmFixed in Version => RR19Q2

Notes
(0110030)
hgbot   
2019-02-22 12:37   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: e5569d9ba275f5cd6c14a4d0326356d011622730
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Feb 22 17:06:52 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/e5569d9ba275f5cd6c14a4d0326356d011622730 [^]

Fixed issue 40252 : Validate GiftCard Instance with Payment when cancelleing it

* When cancelling the gift card, Reverse payment when GiftCard Instance payment is presents

---
M src/org/openbravo/retail/giftcards/process/GiftCardGLItemUtils.java
---