Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045545Retail ModulesWeb POSpublic2020-12-09 12:062020-12-16 07:35
aaroncalero 
markmm82 
highmajoralways
closedfixed 
5
 
RR21Q1 
No
0045545: Cancel and Replace process fails when the new ticket has a total amount of zero
When executing the cancel and replace process, if the final ticket has a total gross amount of zero, the process fails and a record is generated in the Errors While Importing POS Data window.
First, log in backend and configure the following:
* Go to the Preference Window and make sure that the preference 'Web POS Enable Delivery Modes' is defined with value Y.
* Go to the Channel - Touchpoint window, find the VBS-1 record and navigate to its Touchpoint Type. Enable the 'Allow prepayments and partialpayments' check, and save the record.

Log in WebPOS terminal VBS-1
Create a new ticket
Add a product (i.e. Avalanche Transceiver)
Click on the Total Amount button and click on Done to complete the ticket. Approve the action if required.
Open the created ticket.
Click on the Menu, then on Cancel and Replace.
Change the price of the Avalanche Transceiver to 0.
Click on the Total Amount button and click on Done to complete the ticket again.

Verify in backend that a new record appears in the Errors While Importing POS Data window with the following error:
org.openbravo.base.exception.OBException: CancelAndReplaceUtils.cancelAndReplaceOrder:
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:545)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:201)
[...]
Caused by: org.openbravo.base.exception.OBException: org.openbravo.base.exception.OBException: java.lang.NullPointerException
    at org.openbravo.erpCommon.businessUtility.ReplaceOrderExecutor.cancelAndReplaceOrder(ReplaceOrderExecutor.java:167)
    at org.openbravo.erpCommon.businessUtility.ReplaceOrderExecutor.run(ReplaceOrderExecutor.java:107)
It seems that the problem happens when the final ticket doesn't have a Payment Schedule (since its total amount is 0 there is nothing to be paid)
No tags attached.
has duplicate defect 0048650 closed Retail EWI using a cancel in replace with a Layaway 
Issue History
2020-12-09 12:06aaroncaleroNew Issue
2020-12-09 12:06aaroncaleroAssigned To => Retail
2020-12-09 12:06aaroncaleroResolution time => 1609282800
2020-12-09 12:06aaroncaleroTriggers an Emergency Pack => No
2020-12-09 13:25marvintmAssigned ToRetail => markmm82
2020-12-09 13:25marvintmStatusnew => scheduled
2020-12-11 13:17hgbotResolutionopen => fixed
2020-12-11 13:17hgbotStatusscheduled => resolved
2020-12-11 13:17hgbotFixed in Version => RR21Q1
2020-12-11 13:17hgbotNote Added: 0124796
2020-12-11 13:37hgbotNote Added: 0124797
2020-12-14 06:30marvintmStatusresolved => new
2020-12-14 06:30marvintmResolutionfixed => open
2020-12-14 06:30marvintmFixed in VersionRR21Q1 =>
2020-12-14 06:30marvintmStatusnew => scheduled
2020-12-14 13:35hgbotNote Added: 0124806
2020-12-15 13:03hgbotNote Added: 0124829
2020-12-15 15:07hgbotNote Added: 0124831
2020-12-16 07:35hgbotResolutionopen => fixed
2020-12-16 07:35hgbotStatusscheduled => closed
2020-12-16 07:35hgbotFixed in Version => RR21Q1
2020-12-16 07:35hgbotNote Added: 0124859
2020-12-16 07:35hgbotNote Added: 0124860
2022-02-22 11:53marvintmRelationship addedhas duplicate 0048650

Notes
(0124796)
hgbot   
2020-12-11 13:17   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 297bce04c1d6219f5dfb2b4ca05cb013817abb89
Author: Mark <markmm82@gmail.com>
Date: 2020-12-11T09:17:41-03:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/297bce04c1d6219f5dfb2b4ca05cb013817abb89 [^]

Fixed BUG-45545: Cancel and Replace process fails when the new ticket has a total amount of zero

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0124797)
hgbot   
2020-12-11 13:37   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 82575b564b48503ae27fd4c6adc025671fd48452
Author: Mark Orlando Molina <markmm82@gmail.com>
Date: 2020-12-11T12:35:44+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/82575b564b48503ae27fd4c6adc025671fd48452 [^]

Revert "Fixed BUG-45545: Cancel and Replace process fails when the new ticket has a total amount of zero"

This reverts commit 297bce04c1d6219f5dfb2b4ca05cb013817abb89
---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0124806)
hgbot   
2020-12-14 13:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/208 [^]
(0124829)
hgbot   
2020-12-15 13:03   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/208 [^]
(0124831)
hgbot   
2020-12-15 15:07   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/214 [^]
(0124859)
hgbot   
2020-12-16 07:35   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: fd2905d4eca8fe4215b6afa1ed7c30f9584da811
Author: Mark <markmm82@gmail.com>
Date: 2020-12-16T06:35:43+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/fd2905d4eca8fe4215b6afa1ed7c30f9584da811 [^]

Fixed BUG-45545: Cancel and Replace process fails when the new ticket has a total amount of zero

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0124860)
hgbot   
2020-12-16 07:35   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/214 [^]