Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028120Retail ModulesDiscounts and Promotionspublic2014-11-07 12:202014-11-27 20:03
gorkaion 
malsasua 
normalmajoralways
closedfixed 
20Gentoo
RR14Q3.1 
RR14Q3.1RR15Q1 
migueldejuana
Production - QA Approved
2014-06-10
RR14Q3
https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/ff64aefab4b0 [^]
No
0028120: Discounts related to packs are not properly related to order lines when sharing products
When a sales order includes different packs that share some products the line grouping is not correctly done and the order line offers are not properly related to the corresponding order lines.

As the lines and offer lines are not properly set there can be lines with more discounted quantity than ordered quantity.
Using White Valley.
Create a new Pack "My Pack" with price 500 and currency EUR.
Products:
* "Camel bak 3 L" qty: 2
* "Down sleeping bag 500" qty: 2
* "Expedition tent 4 season2 person" qty: 1

In the POS:
* Create a new ticket add:
** 2 unit of Camping Pack
** 1 unit of My Pack

Check that the "Expedition tent 4 season 2 person" product lines are not grouped.
Pay and synchronize the ticket.

In the Backend go to the Sales Order:
check that for "Expedition tent 4 season 2 person" product there are 2 lines.
1st line with quantity 2 has the discounts of both tickets with quantities 1 and 2.
2nd line with quantity 1 has not any discount.

The discount of "My Pack" of quantity 1 should have been related to the line that does not have any discount.

Note that the amounts and quantities of the lines and the header are correct.
No tags attached.
related to defect 0028100 closed Orekaria [RR14Q4] Discretionary discounts not applied in Return receipts 
blocks defect 0028164 closed migueldejuana discount is removed when exists other line negative 
Issue History
2014-11-07 12:20gorkaionNew Issue
2014-11-07 12:20gorkaionAssigned To => marvintm
2014-11-07 12:20gorkaionTriggers an Emergency Pack => No
2014-11-11 13:29hgbotCheckin
2014-11-11 13:29hgbotNote Added: 0071554
2014-11-11 13:29hgbotStatusnew => resolved
2014-11-11 13:29hgbotResolutionopen => fixed
2014-11-11 13:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a2bf2cc6f31ee40d593dd24c05bb341c7fdef927 [^]
2014-11-11 15:23malsasuaAssigned Tomarvintm => malsasua
2014-11-11 15:23malsasuaNote Added: 0071556
2014-11-11 15:23malsasuaStatusresolved => new
2014-11-11 15:23malsasuaResolutionfixed => open
2014-11-11 15:31malsasuaRegression level => Production - QA Approved
2014-11-11 15:31malsasuaRegression date => 2014-06-10
2014-11-11 15:31malsasuaRegression introduced in release => RR14Q3
2014-11-11 15:31malsasuaRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/ff64aefab4b0 [^]
2014-11-11 15:31malsasuaStatusnew => scheduled
2014-11-11 15:31malsasuafix_in_branch => pi
2014-11-11 15:31malsasuaStatusscheduled => resolved
2014-11-11 15:31malsasuaFixed in Version => RR15Q1
2014-11-11 15:31malsasuaResolutionopen => fixed
2014-11-11 18:28hgbotCheckin
2014-11-11 18:28hgbotNote Added: 0071567
2014-11-11 18:28hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a2bf2cc6f31ee40d593dd24c05bb341c7fdef927 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/721f502cb284785802fb72c0178755a6c10bca39 [^]
2014-11-12 21:12migueldejuanaReview Assigned To => migueldejuana
2014-11-12 21:12migueldejuanaNote Added: 0071615
2014-11-12 21:12migueldejuanaStatusresolved => closed
2014-11-14 08:59OrekariaRelationship addedblocks 0028164
2014-11-14 09:10OrekariaRelationship addedrelated to 0028100
2014-11-27 19:14hgbotCheckin
2014-11-27 19:14hgbotNote Added: 0072086
2014-11-27 19:52hgbotCheckin
2014-11-27 19:52hgbotNote Added: 0072087
2014-11-27 20:03hgbotCheckin
2014-11-27 20:03hgbotNote Added: 0072088

Notes
(0071554)
hgbot   
2014-11-11 13:29   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a2bf2cc6f31ee40d593dd24c05bb341c7fdef927
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Nov 11 13:27:28 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a2bf2cc6f31ee40d593dd24c05bb341c7fdef927 [^]

fixed issue 28120:added sortby to the lines to apply the discount in the fillpromotionswith function

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0071556)
malsasua   
2014-11-11 15:23   
update regression info
(0071567)
hgbot   
2014-11-11 18:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 721f502cb284785802fb72c0178755a6c10bca39
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Tue Nov 11 18:28:23 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/721f502cb284785802fb72c0178755a6c10bca39 [^]

fixed issue 28120:jslint

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0071615)
migueldejuana   
2014-11-12 21:12   
Tested and reviewed in e1f64251bb0e
(0072086)
hgbot   
2014-11-27 19:14   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 74609f55cf7c539814f35e5ccc1d754c115b92bd
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Nov 27 19:13:33 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/74609f55cf7c539814f35e5ccc1d754c115b92bd [^]

Related to issue 28120: added new pack to do the automatic test

---
M referencedata/sampledata/The_White_Valley_Group/M_OFFER.xml
M referencedata/sampledata/The_White_Valley_Group/M_OFFER_PRODUCT.xml
---
(0072087)
hgbot   
2014-11-27 19:52   
Repository: tools/automation/pi-mobile
Changeset: f7717dc43b8bd946640d7a5c411053e456191021
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Nov 27 19:51:53 2014 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/f7717dc43b8bd946640d7a5c411053e456191021 [^]

test for issue 28120: Discounts related to packs are not properly related to order lines when sharing products

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28120_SameProductInTwoPacks.java
---
(0072088)
hgbot   
2014-11-27 20:03   
Repository: tools/automation/pi-mobile
Changeset: cbe7c51d2f8485f32046e23679e8d1db53be2cf9
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Thu Nov 27 20:03:27 2014 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cbe7c51d2f8485f32046e23679e8d1db53be2cf9 [^]

changed test for issue 28120: replaced TerminalNonSecureHelper by WebPOSTerminalHelper

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I28120_SameProductInTwoPacks.java
---