Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043464Retail ModulesDiscounts and Promotionspublic2020-03-10 11:332020-04-15 14:33
Leyre 
prakashmurugesan88 
highmajoralways
closedfixed 
5
 
 
migueldejuana
No
0043464: "Line Total" is not calculated correctly when the discounts are added to a product with quantity with decimals.
"Line Total" is not calculated correctly when the discounts are added to a product with quantity with decimals.
Backend:

1. Set the Preference "Web POS Use advanced discounts engine" = N

2. "Product" window -> for example "Alpine Poles" -> is Scale = true

3. In the "Channel Touchpoint" window:
   3.1 Scale url = http://localhost:8090/scale [^] [^]
   3.2 Hardware url = http://localhost:8090/printer [^] [^]

4. As system administrator, define the Unit of Measure of a product Standard Precision = 3, for example = EA (Unit of measure of "Alpine Poles" => Standard Precision = 3)

5. Define two discounts:
   Discount 1: Fixed Percentage Discount, discount % = 30, priority = 1
   Discount 2: Fixed Percentage Discount, discount % = 100, priority = 10

Scale in POS Hardware Manager:

1. Current weight = for example 0.234

Web POS:

1. Add the product Alpine Poles (quantity 0.432 in the HWM - Scale)

Verify this three errors:
1. The web pos shows two lines.
2. The quantity is 0.23 instead of 0.234.
3. The total receipt (even discount 2 is 100%) is 0.01.
No tags attached.
related to defect 0043374 closed rqueralta It is not possible to apply a discount, using the scale of POS Hardware Manager 
png Screenshot from 2020-03-23 16-04-38.png (253,320) 2020-03-23 16:09
https://issues.openbravo.com/file_download.php?file_id=14194&type=bug
png

patch I43464_DiscountsOnProductQtyInDecimals.patch (1,037) 2020-04-04 10:47
https://issues.openbravo.com/file_download.php?file_id=14270&type=bug
Issue History
2020-03-10 11:33LeyreNew Issue
2020-03-10 11:33LeyreAssigned To => Retail
2020-03-10 11:33LeyreFile Added: bug_scale.png
2020-03-10 11:33LeyreResolution time => 1585605600
2020-03-10 11:33LeyreTriggers an Emergency Pack => No
2020-03-10 11:33LeyreRelationship addedrelated to 0043374
2020-03-18 13:52rqueraltaAssigned ToRetail => rqueralta
2020-03-18 13:52rqueraltaStatusnew => scheduled
2020-03-20 16:18guilleaerAssigned Torqueralta => Leyre
2020-03-20 16:18guilleaerStatusscheduled => feedback
2020-03-23 16:09LeyreSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20587#r20587
2020-03-23 16:09LeyreFile Deleted: bug_scale.png
2020-03-23 16:09LeyreFile Added: Screenshot from 2020-03-23 16-04-38.png
2020-03-23 16:10LeyreResolution time1585605600 => 1586124000
2020-03-23 16:10LeyreAssigned ToLeyre => Retail
2020-03-23 16:10LeyreStatusfeedback => new
2020-03-23 17:12LeyreSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20588#r20588
2020-03-27 03:39rqueraltaAssigned ToRetail => rqueralta
2020-03-31 18:08rqueraltaFile Added: 43464.diff
2020-04-02 10:11guilleaerAssigned Torqueralta => Retail
2020-04-02 10:11guilleaerStatusnew => scheduled
2020-04-02 10:23prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-04-02 13:05prakashmurugesan88Note Added: 0118920
2020-04-04 10:47prakashmurugesan88File Added: I43464_DiscountsOnProductQtyInDecimals.patch
2020-04-06 08:57guilleaerFile Deleted: 43464.diff
2020-04-08 07:28hgbotCheckin
2020-04-08 07:28hgbotNote Added: 0119078
2020-04-08 07:28hgbotStatusscheduled => resolved
2020-04-08 07:28hgbotResolutionopen => fixed
2020-04-08 07:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0c2e71fbb016d7695f29948f35c4011b8895c447 [^]
2020-04-15 14:33migueldejuanaReview Assigned To => migueldejuana
2020-04-15 14:33migueldejuanaNote Added: 0119186
2020-04-15 14:33migueldejuanaStatusresolved => closed

Notes
(0118920)
prakashmurugesan88   
2020-04-02 13:05   
Similar issue when the discount is applied manually.
https://drive.google.com/file/d/1H_o-WB-j7NTKC9ztJ_CbpZ-tojXLndzm/view?usp=sharing [^]
(0119078)
hgbot   
2020-04-08 07:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 0c2e71fbb016d7695f29948f35c4011b8895c447
Author: Prakash M <prakash <at> qualiantech.com>
Date: Wed Apr 08 10:57:04 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0c2e71fbb016d7695f29948f35c4011b8895c447 [^]

Fixed BUG 43464: Fixed duplicate line generation on applying discount
to a line with quantity in decimals(3 Precision)

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0119186)
migueldejuana   
2020-04-15 14:33   
Tested and reviewed