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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034225
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorrandom2016-10-17 18:362016-10-17 21:16
ReporterguilleaerView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionopenFixed in Version
StatusnewFix 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

0034225: Corrupted Orders - Sum of lines is not the total gross of the order

DescriptionSometimes (not frequently) one customer who works with price including taxes but use a 0% percentage get corrupted orders where the amount of the sum of the lines is not equal to the total gross of the order.

Payments always match with the total amount of the order.

Apparently, the correct amount is given by the lines, but we are not sure of that.

After a deep research we know that this happens when a order is created, then more orders are created and paid and finally the previous order is paid.

To get more information in the customer environment we added a log which is shown when this issue happens. (you can find it in dataordersave.js file)

        _.each(this.get('lines').models, function (line) {
          var fieldValue = line.get('discountedNet');
          if (!fieldValue) {
            isFieldUndefined = true;
            return;
          }
          accum = OB.DEC.add(accum, fieldValue);
        });
        var difference = OB.DEC.sub(gross, accum);

        if (!isFieldUndefined && difference !== 0) {
          OB.error(enyo.format("%s: The sum of the net of each line plus taxes does not equal the gross: '%s', gross: %s, difference: %s", errorHeader, eventParams, gross, difference));
        }

currently we don't know why this happens but I think that it could be realated to the calculation of the receipt (calculateReceipt)

It is happening in a customer environment who run s 15Q4.2


Steps To ReproduceWe know that the problem happens when a order is created, then more orders are created and paid and finally the previous order is paid, but we haven't been able to reproduce that...

Maybe an automated test will help us to reproduce the problem.
Proposed Solution- create test to reproduce the problem
- Find a relevant place in the code to add log in the customer environment to get more info about the error
TagsNo tags attached.
Attached Filesjpg file icon GAL_screenshoot_Selection_511.jpg [^] (101,859 bytes) 2016-10-17 18:36

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2016-10-17 18:36 guilleaer New Issue
2016-10-17 18:36 guilleaer Assigned To => Retail
2016-10-17 18:36 guilleaer File Added: GAL_screenshoot_Selection_511.jpg
2016-10-17 18:36 guilleaer Triggers an Emergency Pack => No
2016-10-17 21:16 heccam Issue Monitored: heccam


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker