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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042913
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2020-01-16 15:492020-01-24 15:00
ReportermalsasuaView Statuspublic 
Assigned Torqueralta 
PrioritynormalResolutionfixedFixed in VersionRR20Q2
StatusclosedFix in branchFixed in SCM revision3296a0251a2f
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042913: Performance problem with discounts

Descriptionin function removePromotion, a save action is done, but it is not required, and this save action is affecting to performance
Steps To Reproducecheck removePromotion code:
 removePromotion: function(line, rule) {
            var promotions = line.get('promotions'), ruleId = rule.id, discountinstance = rule.discountinstance, removed = false, res = [], i;
            if (!promotions) {
                return;
            }
            for (i = 0; i < promotions.length; i++) {
                if (promotions[i].ruleId === rule.id && promotions[i].discountinstance === discountinstance) {
                    removed = true;
                } else {
                    res.push(promotions[i]);
                }
            }
            if (removed) {
                line.set('promotions', res);
                this.calculateDiscountedLinePrice(line);
                line.trigger('change');
                this.save();
            }

the line this.save() is not required
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0117236)
hgbot (developer)
2020-01-24 13:35

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3296a0251a2fe820d4ff63c843f361f38e9ab611
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jan 22 06:54:24 2020 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3296a0251a2fe820d4ff63c843f361f38e9ab611 [^]

Fixed issue 42913: Performance problem with discounts

- Removed save action to improve the performance

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---

- Issue History
Date Modified Username Field Change
2020-01-16 15:49 malsasua New Issue
2020-01-16 15:49 malsasua Assigned To => Retail
2020-01-16 15:49 malsasua Resolution time => 1581030000
2020-01-16 15:49 malsasua Triggers an Emergency Pack => No
2020-01-22 02:45 rqueralta Assigned To Retail => rqueralta
2020-01-22 02:45 rqueralta Status new => scheduled
2020-01-24 13:35 hgbot Checkin
2020-01-24 13:35 hgbot Note Added: 0117236
2020-01-24 13:35 hgbot Status scheduled => resolved
2020-01-24 13:35 hgbot Resolution open => fixed
2020-01-24 13:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3296a0251a2fe820d4ff63c843f361f38e9ab611 [^]
2020-01-24 15:00 marvintm Review Assigned To => marvintm
2020-01-24 15:00 marvintm Status resolved => closed
2020-01-24 15:00 marvintm Fixed in Version => RR20Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker