Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0049286 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] POS | critical | always | 2022-05-10 18:06 | 2022-05-20 08:56 | |||
Reporter | jmelin | View Status | public | |||||
Assigned To | Retail | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0049286: JIRA 2974 - Credit note - Can't import an order with credit note payment | |||||||
Description | When “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 Reproduce | This 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 Solution | The 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. | |||||||
Tags | No 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 |