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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042237
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2019-11-08 13:292019-11-28 19:00
ReporterngarciaView Statuspublic 
Assigned Torqueralta 
PriorityurgentResolutionfixedFixed in VersionRR20Q1
StatusclosedFix in branchFixed in SCM revision109ef7129404
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

0042237: Discount value is not recalculated when opening a layaway with a price modification and editing it (not standard)

DescriptionDiscount value is not recalculated when opening a layaway with a price modification and editing it (not standard).

The discountPercentage is recalculated in adjustPrices function if the following condition is fulfilled:

          (line.get('product').get('standardPrice') &&
            line.get('product').get('standardPrice') !== price) ||
          (_.isNumber(line.get('discountedLinePrice')) &&
            line.get('discountedLinePrice') !==
              line.get('product').get('standardPrice'))
        )

When loading an editable layaway (customization), the standardPrice and the price are equals and discountLinePrice is undefined, so discountPercentage is not recalculated.

discountLinePrice is not calculated when loading an editable layaway
Steps To ReproduceIn the POS:
   Create a receipt
   Layaway this receipt
   Add a Adhesive body warmers product
   Reduce its price to 2
   Layaway

In the backoffice:
   Check the Gross Unit Price and Gross List price are different and the Discount is different from 0 (44.44%). This is correct

   Open Receipt
   Select previously created layaway
 
Note: layaways cannot be edited so we should force it to be editable. Moreover, the discountLinePrice is calculated only for not editable receipts when they are loaded, so we should force it was editable before loading

Open Developers' tools and do the following instruction

OB.MobileApp.model.receipt.turnEditable()
OB.MobileApp.model.receipt.attributes.lines.models[0].attributes.discountedLinePrice = undefined

In the POS:
   Change the price of the line to the original one (3.60)
   Pay it

In the backoffice:
   Check the Gross Unit Price and Gross List are equal and the Discount didn't change. It should have been recalculated
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0041582 closedrqueralta Wrong discount information in JSON if a layaway includes a discount and the price in the backoffice is changed before paying it 

-  Notes
(0115781)
hgbot (developer)
2019-11-23 14:35

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 109ef7129404f8b17104c2b65b9b473ea0cd4ca7
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Nov 21 10:26:53 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/109ef7129404f8b17104c2b65b9b473ea0cd4ca7 [^]

Fixed issue 42237: Discount value is not recalculated when opening a layaway
with a price modification and editing it (not standard)

- If dicountedLinePrice is undefined and grossListPrice is different to
grossUnitPrice of the line recalculate the discount is requiered

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---

- Issue History
Date Modified Username Field Change
2019-11-08 13:29 ngarcia New Issue
2019-11-08 13:29 ngarcia Assigned To => Retail
2019-11-08 13:29 ngarcia Resolution time => 1574982000
2019-11-08 13:29 ngarcia Triggers an Emergency Pack => No
2019-11-08 13:29 ngarcia Issue Monitored: networkb
2019-11-08 13:37 ngarcia Relationship added related to 0041582
2019-11-13 22:08 rqueralta Assigned To Retail => rqueralta
2019-11-13 22:08 rqueralta Status new => scheduled
2019-11-21 09:56 ngarcia Steps to Reproduce Updated View Revisions
2019-11-23 14:35 hgbot Checkin
2019-11-23 14:35 hgbot Note Added: 0115781
2019-11-23 14:35 hgbot Status scheduled => resolved
2019-11-23 14:35 hgbot Resolution open => fixed
2019-11-23 14:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/109ef7129404f8b17104c2b65b9b473ea0cd4ca7 [^]
2019-11-28 19:00 marvintm Review Assigned To => marvintm
2019-11-28 19:00 marvintm Status resolved => closed
2019-11-28 19:00 marvintm Fixed in Version => RR20Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker