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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042649
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts and Promotionsmajoralways2019-12-26 05:082020-01-03 10:11
ReporterjorgewederagoView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR20Q2
StatusclosedFix in branchFixed in SCM revision1b526cc30575
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042649: User defined amount discounts may not work properly under certain circumstances

DescriptionWhen a user defined amount discount was configured initially as user defined % and had a default value on it. If used on ticket that requires to reload the information from the discount the values are wrongly calculated.
Steps To ReproduceBackend:
-Create a new discount as User Defined % and set 10 as default value
-Change the type of the discount to User Defined Amount


There are two ways to reproduce the issue:

Original issue:
-Add a product to the ticket and apply the discount with value 10
-Close the transaction as layaway
-Load the receipt and execute in the console OB.MobileApp.model.receipt.turnEditable()
-Add a new discount
-The previous discount value will be recalculated wrongly

How to reproduce it in PI:
-Add a product to the ticket and apply the discount with value 10
-Close the transaction as layaway
-Load the receipt
-Execute cancel and replace
-Add an extra unit of the product
-The discount will be recalculated wrongly
Proposed SolutionThe issue is related to the following line in order.js

if (discount.get('obdiscPercentage')) {

Even if the discount type is one which does not need the value of obdiscPercentage since it is present in the discount saved in the local database it is used and thus the discount is wrongly set.

The proposed solution would be to add an extra check based on the discount type to avoid this behavior.
TagsNo tags attached.
Attached Filespatch file icon issue 42649 source discounts.patch [^] (3,465 bytes) 2019-12-27 13:18 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0042630 closedrqueralta Variable Percentage Discount per Total Amount uses hidden percentage discount as default percentage 

-  Notes
(0116613)
hgbot (developer)
2020-01-03 07:19

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 4d4c1b6672615aed5bf69cb5d18edd32526f8269
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jan 03 11:48:46 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4d4c1b6672615aed5bf69cb5d18edd32526f8269 [^]

Related to issue 42649 : Added DiscountType Validation when loading receipt

* When loading the receipt/layaway, promotion should be updated
  when DiscountType is related to percentage

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0116614)
hgbot (developer)
2020-01-03 07:19

Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 1b526cc30575c0011c3f81ef5665f9e985b60c65
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jan 03 11:49:07 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/1b526cc30575c0011c3f81ef5665f9e985b60c65 [^]

Fixed issue 42649 : Updated MOffer EventHandler for Discount Amount and Percentage

---
M src/org/openbravo/retail/discounts/event/MOfferEventHandler.java
---

- Issue History
Date Modified Username Field Change
2019-12-26 05:08 jorgewederago New Issue
2019-12-26 05:08 jorgewederago Assigned To => Retail
2019-12-26 05:08 jorgewederago Resolution time => 1579129200
2019-12-26 05:08 jorgewederago Triggers an Emergency Pack => No
2019-12-26 05:09 jorgewederago Relationship added related to 0042630
2019-12-26 11:10 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2019-12-26 11:10 ranjith_qualiantech_com Status new => scheduled
2019-12-27 13:18 ranjith_qualiantech_com File Added: issue 42649 source discounts.patch
2020-01-03 07:19 hgbot Checkin
2020-01-03 07:19 hgbot Note Added: 0116613
2020-01-03 07:19 hgbot Checkin
2020-01-03 07:19 hgbot Note Added: 0116614
2020-01-03 07:19 hgbot Status scheduled => resolved
2020-01-03 07:19 hgbot Resolution open => fixed
2020-01-03 07:19 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/1b526cc30575c0011c3f81ef5665f9e985b60c65 [^]
2020-01-03 10:11 marvintm Review Assigned To => marvintm
2020-01-03 10:11 marvintm Status resolved => closed
2020-01-03 10:11 marvintm Fixed in Version => RR20Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker