Openbravo Issue Tracking System - Retail Modules
View Issue Details
0052225Retail ModulesGift cards and gift voucherspublic2023-04-25 12:002023-04-26 06:47
guilleaer 
hcurbelo 
normalcriticalhave not tried
closedfixed 
5
 
RR23Q2RR23Q2 
marvintm
No
Production - QA Approved
2023-01-27
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/f7860454aa84bf073f34ebd22e5b8d151b732e95 [^]
No
0052225: Issue prepaid order from POS2 generates and EWI if gift card module is installed
Issue prepaid order from POS2 generates and EWI if gift card module is installed
Configure POS2 to use prepayments
Create an order to pickup in store
Select a customer
complete the order with a prepayment
Open the order and pay it completely
Open de order and issue the order

EWI is generated (null pointer exception)(Created does not exist)

diff --git a/src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java b/src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
index 018021e..1edc565 100644
--- a/src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
+++ b/src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
@@ -42,7 +42,7 @@ public class OrderLoaderHookGiftCard extends OrderLoaderPaymentHook {
   public void exec(JSONObject jsonorder, Order order, ShipmentInOut shipment, Invoice invoice)
       throws Exception {
     // Date Time Long Value from Order Creation
- Long localCreationDate = jsonorder.getLong("created");
+ Long localCreationDate = jsonorder.optLong("created", new Date().getTime());
No tags attached.
blocks defect 0052224 closed hcurbelo Issue prepaid order from POS2 generates and EWI if gift card module is installed 
Issue History
2023-04-25 12:13guilleaerTypedefect => backport
2023-04-25 12:13guilleaerTarget Version => RR23Q2
2023-04-26 06:47hgbotResolutionopen => fixed
2023-04-26 06:47hgbotStatusscheduled => resolved
2023-04-26 06:47hgbotNote Added: 0148878
2023-04-26 06:47marvintmReview Assigned To => marvintm
2023-04-26 06:47marvintmStatusresolved => closed
2023-04-26 06:47marvintmFixed in Version => RR23Q2

Notes
(0148878)
hgbot   
2023-04-26 06:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: b3d375d38b46c6762b2ff79492d93772af7b8087
Author: HECTOR CURBELO BARRIOS <HECTOR.CURBELO@SMFCONSULTING.ES>
Date: 25-04-2023 17:24:28
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/b3d375d38b46c6762b2ff79492d93772af7b8087 [^]

Fixed ISSUE-52225: Open order and issue the order when order is to pickup in store

---
M src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
---