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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035078
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSmajoralways2017-01-19 09:342017-03-03 14:31
ReportermarvintmView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityurgentResolutionfixedFixed in VersionRR16Q4.2
StatusclosedFix in branchFixed in SCM revision733e52f859de
ProjectionnoneETAnoneTarget VersionRR16Q4.2
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

0035078: Discounts priority is not properly taken into account if incremental refresh updates the discount information

DescriptionDiscounts defined in the system should be applied following order of priority. When the Web POS is initially loaded, this works correctly. However, if incremental refresh later on updates some discounts, this may stop working properly.

The reason for this is that the query executed in the client-side doesn't contain an explicit order, which means that it implicitly uses the "_idx" property, automatically generated when records are loaded from the backend. The query in the backed does have proper order, so it works correctly on the first load.

However, if incremental refresh is triggered and it either adds new discounts, or updates previously existing discounts, their corresponding value for the idx column will reset to 0, and in this case, their effective priority will no longer be valid.
Steps To Reproduce- Define two discounts over the same product, disc1 and disc2 (disc1 priority=20, disc2 priority=40). They should not have the "apply next discount" checked.
- Log in the Web POS. Add the product to the ticket. Notice that the disc1 is applied. Delete the ticket.
- Go to the backend. Change the disc2 name and save.
- Go back to the web pos, and refresh the page (F5).
- Add the same product again. Notice that now the disc2 is applied instead. This is wrong.
Proposed SolutionIn the executor.js file, in the query executed for the Discounts, an orderby of priority and id should be added. Once this is done, the problem will no longer happen.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0035006 closedranjith_qualiantech_com Discounts priority is not properly taken into account if incremental refresh updates the discount information 

-  Notes
(0093933)
hgbot (developer)
2017-01-30 13:32

Repository: retail/backports/3.0RR16Q4.2/org.openbravo.retail.posterminal
Changeset: 733e52f859deb95d899d05221af7bdbd4eed5df1
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jan 30 18:00:07 2017 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4.2/org.openbravo.retail.posterminal/rev/733e52f859deb95d899d05221af7bdbd4eed5df1 [^]

Fixes issue 35078 : Adding orderClause for Discount

* default orderClause "_idx" is not stable when incremental refresh happens.
So for discount calcualtion, discount should be ordered by priority and idx

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0093934)
hgbot (developer)
2017-01-30 13:33

Repository: retail/backports/3.0RR16Q4.2/pi-mobile
Changeset: 2ea555835cac3bbd4436537cbbec2d7f45ad6368
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jan 30 18:00:10 2017 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4.2/pi-mobile/rev/2ea555835cac3bbd4436537cbbec2d7f45ad6368 [^]

Verifies issue 35078 : Added automated test 'I35078_VerifyDiscountPriorityOnUpdate'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I35078_VerifyDiscountPriorityOnUpdate.java
---

- Issue History
Date Modified Username Field Change
2017-01-30 09:46 marvintm Type defect => backport
2017-01-30 09:46 marvintm Target Version => RR16Q4.2
2017-01-30 13:32 hgbot Checkin
2017-01-30 13:32 hgbot Note Added: 0093933
2017-01-30 13:32 hgbot Status scheduled => resolved
2017-01-30 13:32 hgbot Resolution open => fixed
2017-01-30 13:32 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c22376541cdcaed876f82bac2cb2faa2a87a08da [^] => http://code.openbravo.com/retail/backports/3.0RR16Q4.2/org.openbravo.retail.posterminal/rev/733e52f859deb95d899d05221af7bdbd4eed5df1 [^]
2017-01-30 13:33 hgbot Checkin
2017-01-30 13:33 hgbot Note Added: 0093934
2017-03-03 14:31 marvintm Review Assigned To => marvintm
2017-03-03 14:31 marvintm Status resolved => closed
2017-03-03 14:31 marvintm Fixed in Version => RR16Q4.2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker