Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0049286
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POScriticalalways2022-05-10 18:062022-05-20 08:56
ReporterjmelinView Statuspublic 
Assigned ToRetail 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0049286: JIRA 2974 - Credit note - Can't import an order with credit note payment

DescriptionWhen “Use credit note once” is checked in BO then the following error when importing the order where the credit note is used:

java.lang.Exception: GCNV_ErrorGiftCardClosed:XXXD/XXXXX
org.openbravo.retail.giftcards.GiftCardModel.consumeAmountGiftCard(GiftCardModel.java:283)at org.openbravo.retail.giftcards.GiftCardModel.populateGiftCardTransaction(GiftCardModel.java:503)
Steps To ReproduceThis is not reproducible on build env only customer env

Create an order and do an overpayment using "Ticket CRT"
Note the credit note id
Create a new order and pay using the credit note (complete with other payment method if necessary)

=> KO, in BO, the order is not loaded because of the error
java.lang.Exception: GCNV_ErrorGiftCardClosed:XXXD/XXXXX


Note:
If you unchecked the filed "Use credit note once" for the org, then you can import the order
Proposed SolutionThe credit note closing logic was in a separate order loader hook (OrderLoaderHookCreditNote). There is another orderloader: OrderLoaderHookGiftcard, which consumes the giftcard. If this OrderLoaderHookGiftcard was executed after the OrderLoaderHookCreditNote then an error is thrown.

The solution is to move the code of the OrderLoaderHookCreditNote inside the OrderLoaderHookGiftcard to control the order of execution.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0137543)
hgbot (developer)
2022-05-19 16:06

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/119 [^]
(0137546)
mtaal (manager)
2022-05-19 17:01

For information on the test and setup see the MR
(0137547)
hgbot (developer)
2022-05-19 20:35

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: 1665d4ba5293491daa23accb9f4d74020037f11e
Author: Martin Taal <martin.taal@openbravo.com>
Date: 19-05-2022 16:03:44
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/1665d4ba5293491daa23accb9f4d74020037f11e [^]

Fixes ISSUE-49286: credit note should be closed after consuming the amount and not before

---
M src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookGiftCard.java
R src/org/openbravo/retail/giftcards/hooks/OrderLoaderHookCreditNote.java
---
(0137548)
hgbot (developer)
2022-05-19 20:35

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/119 [^]

- Issue History
Date Modified Username Field Change
2022-05-10 18:06 jmelin New Issue
2022-05-10 18:06 jmelin Assigned To => Retail
2022-05-10 18:06 jmelin Triggers an Emergency Pack => No
2022-05-19 16:06 hgbot Note Added: 0137543
2022-05-19 17:01 mtaal Note Added: 0137546
2022-05-19 17:01 mtaal Status new => scheduled
2022-05-19 17:01 mtaal Status scheduled => resolved
2022-05-19 17:01 mtaal Resolution open => fixed
2022-05-19 20:35 hgbot Status resolved => closed
2022-05-19 20:35 hgbot Note Added: 0137547
2022-05-19 20:35 hgbot Note Added: 0137548
2022-05-20 08:56 mtaal Proposed Solution updated


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker