Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Discounts by Totalmajoralways2021-11-16 12:002021-11-30 08:26
ReporterTheo_DelobelView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionRR20Q3SCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0048069: Discount/promotion type Free Product per Total

DescriptionIn the WebPos, when we try to use promotion type : Free Products per Total Amount
the amount of the free product is add to the total receipt
Steps To Reproducein the window : discount and promotion

set up a promotion as following :
discount/promotion type : Free Products per Total Amount
Included BP Categories: Only those defined
Included BP Set :All excluding defined
Included Business Partners :All excluding defined
Included Product Categories :All excluding defined
Included Products :Only those defined
Include Price Lists :All excluding defined
Included Organizations :All excluding defined
Included Characteristics :All excluding defined

Total receipt :12,000.00

In the tab : Business partner category : Reseller
in the tab product : one productA
In the tab free product : another productB

If you made a sales with productA for 13,000
the free productB is proposed but if you selected it, the amount of the productB is add to the total amount of the receipt.
Proposed Solutionit seems the issue come from getApplicableLines method.

It takes only the lines with the products found in the 'Only one defined' configuration.
TagsNo tags attached.
Attached Files? file icon Discount issue Free Product per Totla Amount-2021-11-15_18.07.15.mkv [^] (2,833,745 bytes) 2021-11-16 12:00

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
Theo_Delobel (developer)
2021-11-17 15:18

I found that will i made some research :
it goes through the discount engine
which calls the method getApplicableLines
This method returns the lines on which you can apply a promotion,

Except that it returns the ticket without the line with the free object
Then it applies a filter on these lines to remove the price of the free item
Theo_Delobel (developer)
2021-11-23 08:55


The customer ask me for the delay of resolution for this issue
Can you tell me when it can be solve ?
hgbot (developer)
2021-11-26 06:32

Merge Request created: [^]
hgbot (developer)
2021-11-30 08:26

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 1b2a12ddf97ee87db292b2a7709cfc75f478f28e
Author: Ranjith S R <>
Date: 2021-11-30T07:26:27+00:00
URL: [^]

Fixed ISSUE-48069: FreeProducts should be applied even if discount product is not configured

M src-test/org/openbravo/discounts/bytotal/test/unittests/
M web/org.openbravo.retail.discounts.bytotal/app/model/business-logic/discounts-engine/engine/rules/by-total-free-item-discount.js
hgbot (developer)
2021-11-30 08:26

Merge request merged: [^]

- Issue History
Date Modified Username Field Change
2021-11-16 12:00 Theo_Delobel New Issue
2021-11-16 12:00 Theo_Delobel Assigned To => Retail
2021-11-16 12:00 Theo_Delobel File Added: Discount issue Free Product per Totla Amount-2021-11-15_18.07.15.mkv
2021-11-16 12:00 Theo_Delobel Triggers an Emergency Pack => No
2021-11-17 15:18 Theo_Delobel Note Added: 0133156
2021-11-23 08:55 Theo_Delobel Note Added: 0133268
2021-11-24 07:26 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2021-11-24 07:43 marvintm Status new => scheduled
2021-11-26 06:32 hgbot Note Added: 0133383
2021-11-30 08:26 hgbot Resolution open => fixed
2021-11-30 08:26 hgbot Status scheduled => closed
2021-11-30 08:26 hgbot Note Added: 0133408
2021-11-30 08:26 hgbot Note Added: 0133409

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker