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-08-24 11:40
Reportersebastien_lironView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR20Q3.4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionRR20Q3.4SCM revision 
Review Assigned Tomarvintm
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 Filesdiff file icon 20Q3_TaxArray_ForceCashup.diff [^] (1,306 bytes) 2021-08-24 11:40 [Show Content]

- 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.
(0131289)
marvintm (manager)
2021-08-24 11:40

This issue should be resolved by the patch attached.

- 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 Resolution time => 1630274400
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
2021-08-24 11:40 marvintm File Added: 20Q3_TaxArray_ForceCashup.diff
2021-08-24 11:40 marvintm Note Added: 0131289
2021-08-24 11:40 marvintm Status scheduled => resolved
2021-08-24 11:40 marvintm Resolution open => fixed
2021-08-24 11:40 marvintm Assigned To rqueralta => ranjith_qualiantech_com
2021-08-24 11:40 marvintm Review Assigned To => marvintm
2021-08-24 11:40 marvintm Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker