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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030542
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2015-08-11 09:442015-09-07 12:02
ReporteryogaskarnikView Statuspublic 
Assigned Tojorge-garcia 
PriorityhighResolutionfixedFixed in VersionRR15Q4
StatusclosedFix in branchFixed in SCM revisionaf93adc5dc20
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionRR15Q2.2SCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030542: Problem for discount calculation : buy x and pay Y differents products

DescriptionFor the discount "buy x and pay y of different products and If "apply to lowest price" is active, the lowest price is multiplied by the quantity of "gift"
products without checking the quantity selling for the the product.

If i have sell 10 and pay 8, apply to the lowest price :

i sell :
- 3 products at 50 €
- 6 procucts at 40 €
- 1 product at 30 €

The system do discount 2*30 € or i need 1*30 € and 1*40€ because i have only 1 product at 30 and the second "lowest price" is 40 €

See the screen in attachment

In this use case i need to have 1*4,80 and 1*7,20 and not 2*4,80
Steps To Reproduceconfigure the promotion "Buy X and pay Y" as X=10 , Y=8.

In the web pos add 3 proucts to the order, (note following is just an example)
p1 - 6 qty - price for each qty is 25,
p2 - 3 qty - price for each qty is 15,
p3 - 1 qty - price for each qty is 5

the promotion is calculated as 2*5 = 10 ie., promotion is calculated only based on the product with the lowest price (2* price of p3).
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0030446 closedjorge-garcia Discount : Buy X pay Y of different product don't apply to lowest price 

-  Notes
(0080113)
hgbot (developer)
2015-09-04 13:28

Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: af93adc5dc20b0d7a71879615dbc09ec39d06fe5
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Aug 27 08:46:36 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/af93adc5dc20b0d7a71879615dbc09ec39d06fe5 [^]

Fixed issue 30542: Problem for discounts: buy x and pay Y differents products

The problem is that the logic for apply discounts for differents products was
not working well. The logic implemented only applied discounts to the highest
price.

The solution is to changed the logic for apply this kind of discount. Now, the
logic applies to the lowest price only if it's defined in the backend. If
subtype field is set to null, the promotion is applied to the product with the
highest price.

The functionality of distributed between lines and apply average price doesn't
change.

---
M web/org.openbravo.retail.discounts/js/promotion-XYdifferentProduts.js
---
(0080114)
hgbot (developer)
2015-09-04 13:28

Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 899e85a58877b66e2ce0d97dc402f33f9aebfc0c
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Sep 03 09:18:55 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/899e85a58877b66e2ce0d97dc402f33f9aebfc0c [^]

Related to issue 30542: Problem for discounts: buy x and pay Y different product

In some cases, an error occurs when the logic of the discounts tries to applied
the distribution of the total amount to gift.

---
M web/org.openbravo.retail.discounts/js/promotion-XYdifferentProduts.js
---
(0080122)
hgbot (developer)
2015-09-04 13:30

Repository: tools/automation/pi-mobile
Changeset: 20ecd2dc860319ec94083b8ef0738ecb7d3f14bd
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Sep 04 12:53:58 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/20ecd2dc860319ec94083b8ef0738ecb7d3f14bd [^]

Verifies issue 30542: Added new tests for the Discount Logic

Four new test had been added, all related to BuyXPayY from different products
* Test for Lowest Price
* Test for Lowest Price and Distributed between lines checked
* Test for Average Price
* Test for Most Expensive Price (subtype=null)

---
M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30542_BuyXPayYDiffProd_Average.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30542_BuyXPayYDiffProd_Lowest.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30542_BuyXPayYDiffProd_LowestDistrib.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I30542_BuyXPayYDiffProd_MostExpensive.java
---

- Issue History
Date Modified Username Field Change
2015-08-11 09:44 yogaskarnik New Issue
2015-08-11 09:44 yogaskarnik Assigned To => Retail
2015-08-11 09:44 yogaskarnik Resolution time => 1442613600
2015-08-11 09:44 yogaskarnik Triggers an Emergency Pack => No
2015-08-13 18:04 ddeyris Issue Monitored: ddeyris
2015-08-21 14:08 egoitz Issue Monitored: egoitz
2015-08-26 10:13 jorge-garcia Assigned To Retail => jorge-garcia
2015-09-01 15:23 jorge-garcia Status new => scheduled
2015-09-04 13:28 hgbot Checkin
2015-09-04 13:28 hgbot Note Added: 0080113
2015-09-04 13:28 hgbot Status scheduled => resolved
2015-09-04 13:28 hgbot Resolution open => fixed
2015-09-04 13:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/af93adc5dc20b0d7a71879615dbc09ec39d06fe5 [^]
2015-09-04 13:28 hgbot Checkin
2015-09-04 13:28 hgbot Note Added: 0080114
2015-09-04 13:30 hgbot Checkin
2015-09-04 13:30 hgbot Note Added: 0080122
2015-09-07 10:49 jorge-garcia Relationship added related to 0030446
2015-09-07 12:02 marvintm Review Assigned To => marvintm
2015-09-07 12:02 marvintm Status resolved => closed
2015-09-07 12:02 marvintm Fixed in Version => RR15Q4


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker