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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047398
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorrandom2021-07-15 11:122021-07-19 22:53
Reportersebastien_lironView Statuspublic 
Assigned Torqueralta 
PriorityurgentResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR20Q3.4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionRR20Q3.4SCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047398: Error while importing : taxes field is wrong

DescriptionAfter some investigation the problem is that the code in Web POS is failing and not calculating the taxes when the ticket is DELETED and synchronized to the backend (it happens randomly and we don’t know exactly why)

Due to this problem, the taxes property in the order are arriving as an array instead of JSON:
Taxes: [] <— wrong
Taxes: {} <— right
Steps To ReproduceAs it is random we cannot ensure the steps
It just happens on standard ticket deletion
Proposed SolutionWE made this as a quick patch, but this is not the source issue fix :

OB.UTIL.HookManager.registerHook(
    'OBPOS_PreSyncReceipt',
    (args, callbacks) => {
      const order = args.receipt;
      if (
        (order.get('obposIsDeleted') &&
          OB.UTIL.isNullOrUndefined(order.get('taxes'))) ||
        order.get('taxes') instanceof Array
      ) {
        order.set('taxes', {});
        order.get('lines').models.forEach(line => {
          if (OB.UTIL.isNullOrUndefined(order.get('net'))) {
            line.set('net', 0);
          }
        });
      }

      OB.UTIL.HookManager.callbackExecutor(args, callbacks);
    }
  );
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0130502)
egoitz (manager)
2021-07-15 11:38

Together with that problem, there are cases in which the net is set to null instead of 0. Both problems happen together.

- Issue History
Date Modified Username Field Change
2021-07-15 11:12 sebastien_liron New Issue
2021-07-15 11:12 sebastien_liron Assigned To => Retail
2021-07-15 11:12 sebastien_liron Triggers an Emergency Pack => No
2021-07-15 11:38 egoitz Note Added: 0130502
2021-07-15 11:38 egoitz Issue Monitored: egoitz
2021-07-19 22:53 rqueralta Assigned To Retail => rqueralta
2021-07-19 22:53 rqueralta Status new => scheduled


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker