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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033841
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2016-08-29 13:532017-08-09 10:47
ReporteraaroncaleroView Statuspublic 
Assigned Torqueralta 
PriorityhighResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision26b89dcf502a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tojorge-garcia
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033841: Free Products per Total Amount discount removes other discounts

DescriptionWhen several discounts* are applied on the ticket, applying a 'Free Products per Total Amount' discount removes other discounts from the ticket.

* This issue has been reproduced with a combo and a two families combo, but it might be reproducible with other types of discounts.
Steps To ReproduceUsing modules sampledata, define the following discounts:
1. Type: Combo
Name: Ski combo
Valid start/end dates
Family 1: Name: Electronics, Qty: 1, Discount type: percentage, 20%
*Product(s): Digital Altimeter
Family 2: Name: Ski, Qty: 1, Discount type: percentage, 10%
*Product(s): Alpine ski boot

2. Type: Two Families Discount
Name: Camping Combo
Valid start/end dates
Priority: 10
Family 1, Qty: 1, Discount type: Fixed discount, amt: 0
*Product(s):Down sleeping bag 500; Down sleeping bag 700
Family 2, Qty: 1, Discount type: Fixed discount, amt: 50
*Product(s): Compression sacks cordura; Down sleeping bag 500

3. Type: Free Products per Total Amount
Name: Gift over 500 €
Valid start/end dates
Priority: 100
Total receipt: 500
Free Products subtab: Adhesive body warmers; Camera bag.
------------------------------------------------------------

Steps to reproduce:
login in web pos and create a new ticket
Add the following products:
3 Avalanche transceivers (total: 451.5€)
3 Digital altimeter blue
2 Alpine Ski boot
>> (2x) Ski combo applied to lines 2 & 3
1 Down sleeping bag 700
1 Compression sacks cordura
>> Camping combo applied to lines 4 & 5
1 Adhesive body warmer
>> 'Gift over 500€' applied to line 6 (-3.60€)

Add another Adhesive body warmer.
The 'Gift over 500€' discount will update to -7.20€
>> Error: The Camping combo is removed from lines 4 & 5
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0097560)
hgbot (developer)
2017-06-21 17:22

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 9dfc6be7748bec06136ed19e3c04b9cd23d02e5d
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Wed May 10 13:34:11 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/9dfc6be7748bec06136ed19e3c04b9cd23d02e5d [^]

Fixed issue 33841: Free Products per Total Amount discount removes other
discounts

Removed the addition of a promotion with amt 0

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-freeitemstotal.js
---
(0097590)
gorka_gil (administrator)
2017-06-22 16:29

Reopening because it is breaking these tests:
- SplitLineWithAutomaticPromoFreeProdScaledPriceAndManualPromo
- SplitLineWithPromoComboFamilyComboFreeProd

Not seen in try-retail because have a wait for this issue to be resolved:
@TestAnnotations(waitFixOf = 33841)
(0097591)
gorka_gil (administrator)
2017-06-22 16:43

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 47dd5621d628
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: Thu Jun 22 16:37:34 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/47dd5621d628 [^]

Backed out changeset 9dfc6be7748b . Because break test: SplitLineWithAutomaticPromoFreeProdPerTotalAmt

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-freeitemstotal.js
---
(0097811)
hgbot (developer)
2017-07-03 21:22

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 8acd99aa5aadb65397bb525b79988bd6cbb29b99
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Wed May 10 13:34:11 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8acd99aa5aadb65397bb525b79988bd6cbb29b99 [^]

Fixed issue 33841: Free Products per Total Amount discount removes other
discounts

Removed the addition of a promotion with amt 0 and verify if discount was aplied
before

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-freeitemstotal.js
---
(0097918)
hgbot (developer)
2017-07-06 15:49

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 715caf71759c37a5e5726e784c536d424a1488f2
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Thu Jul 06 09:19:56 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/715caf71759c37a5e5726e784c536d424a1488f2 [^]

Related to issue 33841: Free Products per Total Amount discount removes other
discounts

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-freeitemstotal.js
---
(0097980)
hgbot (developer)
2017-07-10 15:39

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 26b89dcf502a32e389862264d038960c668bb149
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Tue Jun 27 14:25:25 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/26b89dcf502a32e389862264d038960c668bb149 [^]

Fixed issue 33841: Free Products per Total Amount discount removes other
discounts

- Not apply discount again if the order lines have changed
- Clear discountedUnits array after apply promotions finished

---
M web/org.openbravo.retail.posterminal/js/model/discounts.js
---
(0098027)
hgbot (developer)
2017-07-11 20:01

Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 4f3a4d425ed45de89f959b8c388abfe34ef72322
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Tue Jul 11 13:11:25 2017 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/4f3a4d425ed45de89f959b8c388abfe34ef72322 [^]

Related to issue 33841: Free Products per Total Amount discount removes other
discounts

---
M web/org.openbravo.retail.discounts.bytotal/js/promotion-by-total-utils.js
---
(0098446)
jorge-garcia (reporter)
2017-08-09 10:47
edited on: 2017-08-09 10:48

The patch is not correct for two reasons:

* It's not a good practice to add in posterminal a reference to a discount rule not included in the pack
  + OB.Model.Discounts.discountRules['4755A35B4DA34F6CB08F15462BA123CF'].discountedUnits = {};
    
* The hidden promotions are necessary to "reserve" the untis from other lines in promotions that could affect to more than one line (such as combos, twofamilies combo, by total, etc.)
http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8acd99aa5aadb65397bb525b79988bd6cbb29b99 [^]


- Issue History
Date Modified Username Field Change
2016-08-29 13:53 aaroncalero New Issue
2016-08-29 13:53 aaroncalero Assigned To => Retail
2016-08-29 13:53 aaroncalero Triggers an Emergency Pack => No
2017-05-03 15:02 rqueralta Assigned To Retail => rqueralta
2017-05-03 15:02 rqueralta Status new => scheduled
2017-06-21 17:22 hgbot Checkin
2017-06-21 17:22 hgbot Note Added: 0097560
2017-06-21 17:22 hgbot Status scheduled => resolved
2017-06-21 17:22 hgbot Resolution open => fixed
2017-06-21 17:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/9dfc6be7748bec06136ed19e3c04b9cd23d02e5d [^]
2017-06-22 12:32 Sandrahuguet Review Assigned To => Sandrahuguet
2017-06-22 16:29 gorka_gil Note Added: 0097590
2017-06-22 16:29 gorka_gil Status resolved => new
2017-06-22 16:29 gorka_gil Resolution fixed => open
2017-06-22 16:43 gorka_gil Note Added: 0097591
2017-06-28 10:42 Sandrahuguet Review Assigned To Sandrahuguet =>
2017-07-03 21:22 hgbot Checkin
2017-07-03 21:22 hgbot Note Added: 0097811
2017-07-03 21:22 hgbot Status new => resolved
2017-07-03 21:22 hgbot Resolution open => fixed
2017-07-03 21:22 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/9dfc6be7748bec06136ed19e3c04b9cd23d02e5d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8acd99aa5aadb65397bb525b79988bd6cbb29b99 [^]
2017-07-06 15:49 hgbot Checkin
2017-07-06 15:49 hgbot Note Added: 0097918
2017-07-10 15:39 hgbot Checkin
2017-07-10 15:39 hgbot Note Added: 0097980
2017-07-10 15:39 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/8acd99aa5aadb65397bb525b79988bd6cbb29b99 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/26b89dcf502a32e389862264d038960c668bb149 [^]
2017-07-11 20:01 hgbot Checkin
2017-07-11 20:01 hgbot Note Added: 0098027
2017-08-08 11:59 jorge-garcia Review Assigned To => jorge-garcia
2017-08-09 10:47 jorge-garcia Note Added: 0098446
2017-08-09 10:47 jorge-garcia Status resolved => new
2017-08-09 10:47 jorge-garcia Resolution fixed => open
2017-08-09 10:47 jorge-garcia Note Edited: 0098446 View Revisions
2017-08-09 10:48 jorge-garcia Note Edited: 0098446 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker