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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045445
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Discounts and Promotionsmajoralways2020-10-28 18:002020-11-16 07:37
ReporterngarciaView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityurgentResolutionfixedFixed in VersionRR20Q3.2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR20Q3.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionRR20Q3SCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045445: [Save Removed Tickets] Screen get frozen when trying to delete a line with a manual discount

Description[Save Removed Tickets] Screen get frozen when trying to delete a line with a manual discount

It is reproduced in 20Q3 but not in PI
Steps To ReproduceIn the backoffice:
   Set the Web POS Save Removed Tickets preference to Y
   Create a new record in Discounts And Promotions window:
      Organization: *
      Discount Promotion Type: User Defined Percentage
      Starting date: today
      Apply Next Discount/Promotion: Y
      Included...: All excluding defined
      Percentage: 20
      Allow to Apply in Negative Lines: Y
      Log out and log in

In the POS:
   Create a new ticket
   Add Adhesive body warmers product to it
   Add the previously created discount and Apply to all lines
   Try to delete the line and check the screen is locked (grey)

The log shows:

Uncaught dodivide(): Divide by 0
D @ BigDecimal-all-1.0.3.min.js:14
v @ BigDecimal-all-1.0.3.min.js:14
div @ 24ba54b2459bf10d1c792e3d526e56ca.js:1302
div @ 24ba54b2459bf10d1c792e3d526e56ca.js:1312
pushDiscountAndUpdate @ 24ba54b2459bf10d1c792e3d526e56ca.js:2407
addDiscount @ 24ba54b2459bf10d1c792e3d526e56ca.js:2406
(anonymous) @ 24ba54b2459bf10d1c792e3d526e56ca.js:2491
executeDiscountCalculation @ 24ba54b2459bf10d1c792e3d526e56ca.js:2491
calculateDiscounts @ 24ba54b2459bf10d1c792e3d526e56ca.js:2383
(anonymous) @ 24ba54b2459bf10d1c792e3d526e56ca.js:2363
OB.Discounts.applyDiscounts @ 24ba54b2459bf10d1c792e3d526e56ca.js:2363
calculateLocal @ 24ba54b2459bf10d1c792e3d526e56ca.js:5426
(anonymous) @ 24ba54b2459bf10d1c792e3d526e56ca.js:5434
callbackExecutor @ 24ba54b2459bf10d1c792e3d526e56ca.js:1320
executeHooks @ 24ba54b2459bf10d1c792e3d526e56ca.js:1320
OB.Discounts.Pos.calculateDiscounts @ 24ba54b2459bf10d1c792e3d526e56ca.js:5434
calculateReceipt @ 24ba54b2459bf10d1c792e3d526e56ca.js:2621
postDeleteLine @ 24ba54b2459bf10d1c792e3d526e56ca.js:2664
_deleteLines @ 24ba54b2459bf10d1c792e3d526e56ca.js:2682
(anonymous) @ 24ba54b2459bf10d1c792e3d526e56ca.js:2684
(anonymous) @ 24ba54b2459bf10d1c792e3d526e56ca.js:2709
callbackExecutor @ 24ba54b2459bf10d1c792e3d526e56ca.js:1320
executeHooks @ 24ba54b2459bf10d1c792e3d526e56ca.js:1320
deleteLineOnceChecked @ 24ba54b2459bf10d1c792e3d526e56ca.js:2694
_deleteLine @ 24ba54b2459bf10d1c792e3d526e56ca.js:2718
_deleteLines @ 24ba54b2459bf10d1c792e3d526e56ca.js:2684


   
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0045328 closedranjith_qualiantech_com [Save Removed Tickets] Screen get frozen when trying to delete a line with a manual discount 

-  Notes
(0124393)
hgbot (developer)
2020-11-16 07:03

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 752a742c98a426e48e9f6e40d9ce4c7f18aa595a
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-11-16T11:32:52+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/752a742c98a426e48e9f6e40d9ce4c7f18aa595a [^]

Fixed ISSUE-45445: Discounts should not be calculated if line qty is zero
* With Save Removed Ticket Pref. is enabled, discount should not be caluculated for the line since line qty will be zero when deleting it

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-engine.js
---

- Issue History
Date Modified Username Field Change
2020-11-16 06:44 marvintm Type defect => backport
2020-11-16 06:44 marvintm Target Version => RR20Q3.2
2020-11-16 06:46 ranjith_qualiantech_com Status scheduled => acknowledged
2020-11-16 06:47 ranjith_qualiantech_com Status acknowledged => scheduled
2020-11-16 07:03 hgbot Resolution open => fixed
2020-11-16 07:03 hgbot Status scheduled => resolved
2020-11-16 07:03 hgbot Fixed in Version => RR20Q3.2
2020-11-16 07:03 hgbot Note Added: 0124393
2020-11-16 07:37 marvintm Review Assigned To => marvintm
2020-11-16 07:37 marvintm Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker