Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044506Retail ModulesGift cards and gift voucherspublic2020-06-29 17:002021-06-11 08:09
kchoperena 
ranjith_qualiantech_com 
highmajorsometimes
closedfixed 
5
 
RR20Q4 
marvintm
No
0044506: The preOrderSave hook of giftcards module fails when the netting payment of a C&R is using the credit note payment method
The setDefaultPaymentType function of POSUtils.java searches a payment method to use in a C&R for the netting payment. If the selected payment method is 'Credit Note' the preOrderSave of giftcards module raises an error because the p.get('paymentData') is undefined.
PRECONDITION: "Web POS Forbid Anonymous Customer use a Credit Note" preference enabled

1.- Log in to the WebPOS
2.- Create a Layaway, pay it and synchronize it.
3.- Open the created Layaway and do a C&R (check that the netting payment is created as a 'Credit Note' payment)
4.- Try to synchronize the C&R

Expected result:

The preOrderSave hook of giftcards module fails with the next error:

ee2bc9b50b784fb0eefd8efa05412c36.js:formatted:105359 Uncaught TypeError: Cannot read property 'creditNote' of undefined
    at ee2bc9b50b784fb0eefd8efa05412c36.js:formatted:105359
    at Array.forEach (<anonymous>)
    at Function.b.each.b.forEach (underscore-1.3.3.min.js:11)
Check if p.get('paymentData') exists in the preOrderSave hook
No tags attached.
Issue History
2020-06-29 17:00kchoperenaNew Issue
2020-06-29 17:00kchoperenaAssigned To => Retail
2020-06-29 17:00kchoperenaResolution time => 1594591200
2020-06-29 17:00kchoperenaTriggers an Emergency Pack => No
2020-07-05 18:02ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-07-08 09:22kchoperenaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21295#r21295
2020-07-08 11:39ranjith_qualiantech_comStatusnew => scheduled
2020-07-09 09:54hgbotCheckin
2020-07-09 09:54hgbotNote Added: 0121348
2020-07-09 09:54hgbotStatusscheduled => resolved
2020-07-09 09:54hgbotResolutionopen => fixed
2020-07-09 09:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/abe4329035b5925f9c97e1e65ae671e4265ebf90 [^]
2020-07-09 10:57marvintmReview Assigned To => marvintm
2020-07-09 10:57marvintmStatusresolved => closed
2020-07-09 10:57marvintmFixed in Version => RR20Q4
2021-06-11 08:09hgbotNote Added: 0129381

Notes
(0121348)
hgbot   
2020-07-09 09:54   
Repository: erp/pmods/org.openbravo.retail.giftcards
Changeset: abe4329035b5925f9c97e1e65ae671e4265ebf90
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jul 09 13:24:14 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.giftcards/rev/abe4329035b5925f9c97e1e65ae671e4265ebf90 [^]

Fixed issue-44506: PaidReceipt Prepayment should be validated in PreOrderSave hook

* For Paid Receipt, CreditNote prepayment should not be validated in
  PreOrderSave hook when processing again

---
M web/org.openbravo.retail.giftcards/js/hooks/preOrderSaveHook.js
---
(0129381)
hgbot   
2021-06-11 08:09   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/9 [^]