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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055331
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POSmajorhave not tried2024-04-26 08:082024-05-06 13:02
ReportermarvintmView Statuspublic 
Assigned ToRajesh_18 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix 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

0055331: Error while importing generated when doing the cashup, if the connection is lost at a certain point in the process

DescriptionIt is possible for an Error While importing to happen in certain conditions when doing the cashup, if the connection is lost in some specific moment in time.

When this happens, the terminal will go offline, and once it is online again, the user can trigger the cashup completion again, causing an EWI due to a wrong cashup that is containing the same ids that the previously completed cashup also had.
Steps To Reproduce- Login in the POS and do some sales.
- Go to the Cashup window, and count the payment methods (leaving no difference).
- When you reach the last step, add a breakpoint in this function, inside the FinishCashup.js file, in dev tools:
function addCashupId(payload) {
  return { ...payload, cashupId: OB.App.State.getState().Cashup.id };
}
- Then execute the cashup. The process will stop in the breakpoint you just added
- Go to dev tools/Network panel, and set the connectivity to "Without connection"
- Continue the process. The user action will fail as there is some post hook that requires connection
- Enable connectivity again.
- In the POS, change the terminal to online (it will work now because you just enabled connectivity).
- Now, realize you can complete the cashup again. Click on the "Finish" button again.
- Go to the back office. Verify that you now have an Error While Importing with the following message:

org.openbravo.base.exception.OBException: Cashup cannot be processed since error occurred in CashClose: A different object with the same identifier value was already associated with the session : [FIN_Reconciliation#590A06CCA2E08FD9EE354472E0ED81F1]
    at org.openbravo.retail.posterminal.ProcessCashClose.doReconciliationAndInvoices(ProcessCashClose.java:525)
    at org.openbravo.retail.posterminal.ProcessCashClose.saveRecord(ProcessCashClose.java:222)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:214)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:165)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:97)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:55)
    at
Proposed SolutionMost probably the easiest solution is to review all postHooks of the action, and make sure we have proper fallbacks for all the cases where a remote request is triggered, so that the user action itself cannot fail if connection is lost at that moment.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2024-04-26 08:08 marvintm New Issue
2024-04-26 08:08 marvintm Assigned To => Retail
2024-04-26 08:08 marvintm Triggers an Emergency Pack => No
2024-04-26 09:05 ngarcia Issue Monitored: ngarcia
2024-05-06 09:24 guilleaer Status new => acknowledged
2024-05-06 13:01 Rajesh_18 Assigned To Retail => Rajesh_18
2024-05-06 13:02 Rajesh_18 Status acknowledged => scheduled


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker