Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035006 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2017-01-19 09:34 | 2017-01-30 09:46 | |||
Reporter | marvintm | View Status | public | |||||
Assigned To | ranjith_qualiantech_com | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | RR17Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | c22376541cdc | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | No | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035006: Discounts priority is not properly taken into account if incremental refresh updates the discount information | |||||||
Description | Discounts 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 Solution | In 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. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|||||||||||||||
|
![]() |
|
(0093782) hgbot (developer) 2017-01-23 14:29 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: c22376541cdcaed876f82bac2cb2faa2a87a08da Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Mon Jan 23 18:58:39 2017 +0530 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c22376541cdcaed876f82bac2cb2faa2a87a08da [^] Fixes issue 35006 : 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 --- |
(0093904) hgbot (developer) 2017-01-28 19:08 |
Repository: tools/automation/pi-mobile Changeset: 1c995b9f90f38d4f28b64b15d807bbb52f023040 Author: Ranjith S R <ranjith <at> qualiantech.com> Date: Sat Jan 28 23:38:14 2017 +0530 URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/1c995b9f90f38d4f28b64b15d807bbb52f023040 [^] Verifies issue 35006 : Added automated test 'I35006_VerifyDiscountPriorityOnUpdate' --- A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I35006_VerifyDiscountPriorityOnUpdate.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2017-01-19 09:34 | marvintm | New Issue | |
2017-01-19 09:34 | marvintm | Assigned To | => Retail |
2017-01-19 09:34 | marvintm | OBNetwork customer | => No |
2017-01-19 09:34 | marvintm | Triggers an Emergency Pack | => No |
2017-01-20 09:51 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2017-01-20 09:51 | ranjith_qualiantech_com | Status | new => scheduled |
2017-01-23 14:29 | hgbot | Checkin | |
2017-01-23 14:29 | hgbot | Note Added: 0093782 | |
2017-01-23 14:29 | hgbot | Status | scheduled => resolved |
2017-01-23 14:29 | hgbot | Resolution | open => fixed |
2017-01-23 14:29 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c22376541cdcaed876f82bac2cb2faa2a87a08da [^] |
2017-01-28 19:08 | hgbot | Checkin | |
2017-01-28 19:08 | hgbot | Note Added: 0093904 | |
2017-01-30 09:45 | marvintm | Status | resolved => new |
2017-01-30 09:45 | marvintm | Resolution | fixed => open |
2017-01-30 09:46 | marvintm | Status | new => scheduled |
2017-01-30 09:46 | marvintm | Status | scheduled => resolved |
2017-01-30 09:46 | marvintm | Fixed in Version | => RR17Q2 |
2017-01-30 09:46 | marvintm | Resolution | open => fixed |
2017-01-30 09:46 | marvintm | Review Assigned To | => marvintm |
2017-01-30 09:46 | marvintm | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |