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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045525
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminoralways2020-11-27 13:422020-12-15 08:17
Reporternicola_uvaView Statuspublic 
Assigned Torqueralta 
PrioritynormalResolutionfixedFixed in VersionRR21Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Versionpi
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in releasepi
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045525: [SafeBox - Cashup] During processing the cashup an error happen on ProcessCashClose

DescriptionDuring the execution of ProcessCashClose.java a hibernate error happen. Below the piece of code failing

    if (jsonCashup.has("currentSafeBox")) {
        String safeBoxSK = jsonCashup.getString("currentSafeBox");
        OBCriteria<OBPOSSafeBox> safeBoxCriteria = OBDal.getInstance()
            .createCriteria(OBPOSSafeBox.class);
        safeBoxCriteria.add(Restrictions.eq(OBPOSSafeBox.PROPERTY_SEARCHKEY, safeBoxSK));

        safeBox = (OBPOSSafeBox) safeBoxCriteria.uniqueResult();
      }
Steps To ReproduceCreate a safebox with search key = 1 for organization A with cash payment method
Create a safebox with search key = 1 for organization B with cash payment method
Connect to POS on organization A
Link the safebox 1 and do a ticket in cash
Remove the safebox from the menu and process

The cashup go in error while importing POS data with the following error:
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
Proposed SolutionPut the unicity on (Organization, searchkey) level
We also need to ensure that safe boxes are created at store level, otherwise more than one safe box may be visible if we only do the constraint change
TagsNo tags attached.
Attached Filestxt file icon errorlog.txt [^] (1,674 bytes) 2020-11-27 13:42 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0045157 closedjorge-garcia [SafeBox] Same search key can't be used on different Organization 

-  Notes
(0124812)
hgbot (developer)
2020-12-14 20:59

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/211 [^]
(0124818)
hgbot (developer)
2020-12-15 08:17

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 1a790b02ddf6c29d1ed7d6638f4b7b54969bf9b7
Author: Rafael Queralta <rafaelcuba81@gmail.com>
Date: 2020-12-15T07:17:12+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/1a790b02ddf6c29d1ed7d6638f4b7b54969bf9b7 [^]

Fixed BUG-45525: Added filter by organization to retrieve an unique safe box

---
M src/org/openbravo/retail/posterminal/ProcessCashClose.java
---
(0124819)
hgbot (developer)
2020-12-15 08:17

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

- Issue History
Date Modified Username Field Change
2020-11-27 13:42 nicola_uva New Issue
2020-11-27 13:42 nicola_uva Assigned To => Retail
2020-11-27 13:42 nicola_uva File Added: errorlog.txt
2020-11-27 13:42 nicola_uva Resolution time => 1606863600
2020-11-27 13:42 nicola_uva Triggers an Emergency Pack => No
2020-11-27 13:54 javietxe Issue Monitored: javietxe
2020-11-27 13:55 javietxe Resolution time 1606863600 => 1608246000
2020-11-27 13:56 javietxe Regression introduced in release => pi
2020-11-27 13:57 javietxe Relationship added caused by 0045157
2020-12-09 17:02 rqueralta Assigned To Retail => rqueralta
2020-12-14 20:59 hgbot Note Added: 0124812
2020-12-15 08:17 hgbot Resolution open => fixed
2020-12-15 08:17 hgbot Status new => closed
2020-12-15 08:17 hgbot Fixed in Version => RR21Q1
2020-12-15 08:17 hgbot Note Added: 0124818
2020-12-15 08:17 hgbot Note Added: 0124819


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker