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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042208
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Return Receiptmajoralways2019-11-06 15:002019-11-25 12:19
ReporteraaroncaleroView Statuspublic 
Assigned Torqueralta 
PriorityhighResolutionfixedFixed in VersionRR20Q1
StatusclosedFix in branchFixed in SCM revisioncf0948955b91
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toguilleaer
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042208: Error while importing generated after reprocessing a verified return under specific circumstances

DescriptionWhen a verified return is reprocessed (loaded in webpos and synchronized again, i.e. with a reverse payment), if any of the returned lines was originally delivered in several shipment lines, the processing goes to the Errors While importing POS Data window with the following error:
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
    at org.hibernate.query.internal.AbstractProducedQuery.uniqueElement(AbstractProducedQuery.java:1596)
    at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:392)
    at org.openbravo.dal.service.OBCriteria.uniqueResult(OBCriteria.java:172)
    at org.openbravo.retail.returns.ReturnsShipmentOrderLoaderHook.exec(ReturnsShipmentOrderLoaderHook.java:43)
    at org.openbravo.retail.returns.ReturnsShipmentOrderLoaderHook$Proxy$_$$_WeldClientProxy.exec(Unknown Source)
    at org.openbravo.retail.posterminal.OrderLoader.executeHooks(OrderLoader.java:634
Steps To Reproducea) Configuration
1. Log in Backend, go to the Product window, search for the Avalanche Transceiver and go to the Stock tab. Note the stock for the VBS/001 0-0-0 bin.
2. If there is stock also for the VBS/002 bin skip to step 3. If not, add stock for the Avalanche transceiver in that bin:
2.1. Go to the Physical Inventory window and create a new record.
2.2. Select the Vall Blanca Store organization and then the Vall Blanca Store Warehouse.
2.3. Create a new inventory line and select the Avalanche Transceiver product. Change the bin to VBS/002 and the Quantity count to 1. Save and click on the Process Inventory Count button on the top right.
3. Go to the Preference window and create the preference "Allow to select a warehouse for a specific line order" with value Y

b) Steps
1. Log in Web POS and create a new ticket
2. Add the product Avalanche Transceiver. Click on the line and, on the Edit tab, click on Show More > Check Stock
3. Click on Store Stock, and then select the Vall Blanca Store Warehouse
4. Change the quantity of the line to (qty in VBS/001 0-0-0 + qty in VBS/002). This will create 2 separate shipment lines for the same order line.
5. Pay and complete the ticket
6. Go to the menu > Verified Returns and select the newly created ticket. Select the ticket line and click on Apply
7. Two different lines will be added to the ticket (one for each shipment line)
8. Pay and complete the verified return
9. Load the Verified return again in webpos.
10. Click on the total amount button and finally click on Done.
11. Verify that a new Error While Importing has been generated with the error mentioned in the description.
Proposed SolutionOne possible solution is to make the ReturnsShipmentOrderLoaderHook ignore verified returns that have already been processed.
This can be done by checking the isPaid property in the order json, and ignoring receipts that have the isPaid property set to true (because it means this ticket was loaded in webpos and then reprocessed).
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0115779)
hgbot (developer)
2019-11-23 14:28

Repository: erp/pmods/org.openbravo.retail.returns
Changeset: cf0948955b919d9e47c1b0f0922ea40d2ce74bd0
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Nov 21 11:04:48 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.returns/rev/cf0948955b919d9e47c1b0f0922ea40d2ce74bd0 [^]

Fixed issue 42208: Error while importing generated after reprocessing a verified
return under specific circumstances

- Ignoring receipts that have the isPaid property set to true

---
M src/org/openbravo/retail/returns/ReturnsShipmentOrderLoaderHook.java
---

- Issue History
Date Modified Username Field Change
2019-11-06 15:00 aaroncalero New Issue
2019-11-06 15:00 aaroncalero Assigned To => Retail
2019-11-06 15:00 aaroncalero Resolution time => 1574204400
2019-11-06 15:00 aaroncalero Triggers an Emergency Pack => No
2019-11-07 15:23 rqueralta Assigned To Retail => rqueralta
2019-11-07 15:24 rqueralta Status new => scheduled
2019-11-23 14:28 hgbot Checkin
2019-11-23 14:28 hgbot Note Added: 0115779
2019-11-23 14:28 hgbot Status scheduled => resolved
2019-11-23 14:28 hgbot Resolution open => fixed
2019-11-23 14:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.returns/rev/cf0948955b919d9e47c1b0f0922ea40d2ce74bd0 [^]
2019-11-25 12:19 guilleaer Review Assigned To => guilleaer
2019-11-25 12:19 guilleaer Status resolved => closed
2019-11-25 12:19 guilleaer Fixed in Version => RR20Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker