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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047780
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 07. Sales managementmajoralways2021-09-29 19:572021-10-06 16:25
ReporterlbressanView Statuspublic 
Assigned Tovmromanos 
PriorityhighResolutioninvalidFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionPR20Q4.4SCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression level
Regression date2021-10-13
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047780: Application of discount in cascade

DescriptionApplication of discounts in cascade, for a sales order in ERP
Steps To Reproduce1) Add an order in the "Sales order" window

2) Add 3 discounts in the tab "Basic Discounts", the first two with the check deactivated "Cascade" and the other active, in the last discount with the active checks

3) Select "Book" to pay

4) Verify that there have been discounts but only two discounts apply
TagsNo tags attached.
Attached Files? file icon Openbravo - Sale.mp4 [^] (3,216,432 bytes) 2021-09-29 19:57

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0132211)
vmromanos (manager)
2021-10-06 16:25

This is working as expected.

Cascade means to apply this discount and any other previous discount in cascade.
http://wiki.openbravo.com/wiki/Discount [^]

Example: Let's imagine we have a line net amount of 100€.
In the first scenario we declare 3 discounts as:
* 10% Cascade=Yes
* 10% Cascade=Yes
* 10% Cascade=Yes

The calculated discounts are:
 100
- 10 [10% of 100]
- 9 [10% of 100 - 10]
- 8.10 [10% of 100 - 10 - 9]


Now let's define these 3 discounts (like in the bug description) as:
* 10% Cascade=No
* 10% Cascade=No
* 10% Cascade=Yes

The calculated discounts are:
 100
- 10 [10% of 100]
- 10 [10% of 100]
- 8.10 [10% of 100 - 10 - 9]

So the system is applying the Non-cascade discounts (first two discounts), and then it calculates the cascade discount considering the previous ones as if they were declared as cascade.

Implementation details can be found at: https://gitlab.com/openbravo/product/openbravo/-/blob/master/src-db/database/model/functions/C_ORDER_POST1.xml#L1025 [^]

- Issue History
Date Modified Username Field Change
2021-09-29 19:57 lbressan New Issue
2021-09-29 19:57 lbressan Assigned To => Triage Finance
2021-09-29 19:57 lbressan File Added: Openbravo - Sale.mp4
2021-09-29 19:57 lbressan Modules => Core
2021-09-29 19:57 lbressan Regression date => 2021-10-13
2021-09-29 19:57 lbressan Triggers an Emergency Pack => No
2021-10-01 11:01 Practics Issue Monitored: Practics
2021-10-06 15:56 vmromanos Status new => scheduled
2021-10-06 15:56 vmromanos Assigned To Triage Finance => vmromanos
2021-10-06 16:25 vmromanos Review Assigned To => vmromanos
2021-10-06 16:25 vmromanos Note Added: 0132211
2021-10-06 16:25 vmromanos Status scheduled => closed
2021-10-06 16:25 vmromanos Resolution open => invalid


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker