Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034517Retail ModulesWeb POSpublic2016-11-15 10:162017-03-22 18:26
jorge-garcia 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
RR17Q1 
marvintm
Production - Confirmed Stable
2015-09-12
RR15Q4
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ba7e9aa75f69ac696431167c9fbb26cb0e55dbf [^]
No
0034517: [Performance] Discounts calculation is slower when the user increase the number of lines of the receipt
Discounts calculation is more slower when the user increase the number of lines of the receipt
1) Login in the WebPOS
2) Start adding products in the ticket
3) Check the calculation of the receipt became more slower
4) Notice, after the tenth line in the receipt, the calculation takes several seconds.
5) From the twentieth line, the calculation could take twenty or thirty seconds.
Performance
depends on backport 0034520RR16Q4 closed jorge-garcia [Performance] Discounts calculation is slower when the user increase the number of lines of the receipt 
depends on backport 0034521RR16Q3.4 closed marvintm [Performance] Discounts calculation is slower when the user increase the number of lines of the receipt 
caused by defect 0030730 closed mario_castello The current date to check if a discount should be applied or not is taken using GMT timezone 
related to defect 0035604 closed migueldejuana Total (0.00) using a big number of lines in a POS terminal with not including taxes. 
Issue History
2016-11-15 10:16jorge-garciaNew Issue
2016-11-15 10:16jorge-garciaAssigned To => jorge-garcia
2016-11-15 10:16jorge-garciaRegression level => Production - Confirmed Stable
2016-11-15 10:16jorge-garciaRegression date => 2015-09-12
2016-11-15 10:16jorge-garciaRegression introduced in release => RR15Q4
2016-11-15 10:16jorge-garciaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1ba7e9aa75f69ac696431167c9fbb26cb0e55dbf [^]
2016-11-15 10:16jorge-garciaTriggers an Emergency Pack => No
2016-11-15 10:23jorge-garciaResolution time => 1479769200
2016-11-15 10:26jorge-garciaStatusnew => scheduled
2016-11-15 10:32lorenzofidalgoTag Attached: Performance
2016-11-15 17:16jorge-garciaRelationship addedcaused by 0030730
2016-11-28 10:26hgbotCheckin
2016-11-28 10:26hgbotNote Added: 0091879
2016-11-28 10:26hgbotCheckin
2016-11-28 10:26hgbotNote Added: 0091880
2016-11-28 10:26hgbotStatusscheduled => resolved
2016-11-28 10:26hgbotResolutionopen => fixed
2016-11-28 10:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a065f589a6c1d0bc2064c94a8db8c4c70ace2d8b [^]
2016-11-28 10:26hgbotCheckin
2016-11-28 10:26hgbotNote Added: 0091881
2016-11-28 10:26hgbotCheckin
2016-11-28 10:26hgbotNote Added: 0091882
2016-11-28 12:37marvintmReview Assigned To => marvintm
2016-11-28 12:37marvintmStatusresolved => closed
2016-11-28 12:37marvintmFixed in Version => RR17Q1
2016-12-01 10:53hgbotCheckin
2016-12-01 10:53hgbotNote Added: 0091955
2016-12-07 13:07hgbotCheckin
2016-12-07 13:07hgbotNote Added: 0092182
2017-03-22 18:00nataliagRelationship addedrelated to 0035604
2017-03-22 18:26jfrancesIssue Monitored: jfrances

Notes
(0091879)
hgbot   
2016-11-28 10:26   
Repository: tools/automation/pi-mobile
Changeset: 556e3ead498f081c26471951d018988062025a66
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Nov 25 12:22:29 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/556e3ead498f081c26471951d018988062025a66 [^]

Related to issue 34517: [Performance] Discounts calculation is slower when the
user increase the number of lines of the receipt

Delete test I32585_ReturnLineAndApplyDiscretionaryPromo.java because is
testing something that it’s not ok.

---
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I32585_ReturnLineAndApplyDiscretionaryPromo.java
---
(0091880)
hgbot   
2016-11-28 10:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a065f589a6c1d0bc2064c94a8db8c4c70ace2d8b
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Nov 18 13:50:51 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a065f589a6c1d0bc2064c94a8db8c4c70ace2d8b [^]

Fixed issue 34517: [Performance] Discounts calculation is slower when the
user increase the number of lines of the receipt

The problem with this issue is that the functionality of findUsingCache was
never use, because the parameter to stablish the initial date to take a
promotion was always changing with the value of the actual date witch was
a datetime value.

In the backend, it’s not possible to define a promotion neither the starting
date nor ending date fields with a date including hours, minutes and seconds.

The solution is to parse the date to sue only dates without time for the query
criteria.

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0091881)
hgbot   
2016-11-28 10:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5f071a4d8d3e6d9de76702a4bb3f1850279b48e4
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Nov 21 10:59:48 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5f071a4d8d3e6d9de76702a4bb3f1850279b48e4 [^]

Related to issue 34517: [Performance] Discounts calculation is slower when the
user increase the number of lines of the receipt

Only launch the calculation of the receipt when the last line to delete is
changed.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0091882)
hgbot   
2016-11-28 10:26   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 919dbb7fc4911e4f7d71c2d3925f49ee2367c560
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Nov 21 16:54:33 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/919dbb7fc4911e4f7d71c2d3925f49ee2367c560 [^]

Related to issue 34517: [Performance] Discounts calculation is slower when the
user increase the number of lines of the receipt

Fix the actual problem if we add several lines at once, like in the case of
RFID.

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
---
(0091955)
hgbot   
2016-12-01 10:53   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5754a065bc58f4bb58f524b64ec53d53c76d395d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Sun Jan 01 10:52:20 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5754a065bc58f4bb58f524b64ec53d53c76d395d [^]

Related to issue 34517: [Performance] Discounts calculation is slower when the
user increase the number of lines of the receipt

Problem with the date format of the discounts query.

Now it's fixed.

---
M web/org.openbravo.retail.posterminal/js/model/executor.js
---
(0092182)
hgbot   
2016-12-07 13:07   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: e55f6790372b849ed6eef58e360851636c371bff
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Dec 07 13:07:05 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e55f6790372b849ed6eef58e360851636c371bff [^]

Related to issue 34517. Date will always be correct, before it would sometimes return a wrong date due to the toISOString call returning the date in UTC timezone.

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