Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0056718 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [POS2] POS | major | always | 2024-10-09 20:09 | 2024-12-19 05:25 | |||||||
Reporter | axelmercado | View Status | public | |||||||||
Assigned To | prakashmurugesan88 | |||||||||||
Priority | high | Resolution | open | Fixed in Version | 25Q1 | |||||||
Status | scheduled | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0056718: Problem with “Maximum discount per role” functionality, does not work correctly. | |||||||||||
Description | When we configure a role to be able to apply a certain maximum discount with the new functionality, it does not work if the action “Apply Higher Discount Than Allowed for Role” is not defined for that role, which is not correct. | |||||||||||
Steps To Reproduce | In Livebuilds: https://livebuilds.openbravo.com/context/retail_pos2_modules_pgsql [^] 1-Configure a new user and assign him the role of “Cashier Central Mountail”. 2-Navigate to the assigned role and configure the detailed actions and the maximum discount as shown in the userActionsRole.png, also in the “Organizations” tab add the Vall Blanca Store organization. This is so that the user can log in https://livebuilds.openbravo.com/context/retail_pos2_modules_pgsql/web/pos/?terminal=VBS-2 [^] and use it correctly. 3-In the terminal, add a product and to the line, add a manual discount of variable percentage with a value of 55% (we configured before that the maximum is 50%). 4-Apply the discount and verify that it is applied correctly, then delete the order. 5-Back to the backoffice and in the role, add the user action called “Apply Higher Discount Than Allowed for Role” with “Can Use”. 6-Back in the terminal, ctrl+shift+f5 and perform again step 3. Now we can notice that an error message has been displayed correctly. | |||||||||||
Proposed Solution | The error should be displayed without having defined the action “Apply Higher Discount Than Allowed for Role” since, as its name indicates, it should allow the opposite, it should allow exceeding the amount configured in the role header. This is also mentioned in the updated POS2 guide, where it is also mentioned that this action can be configured with “Approval required” for a supervisor to enable the excess discount. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0170850) hgbot (developer) 2024-10-23 22:34 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1621 [^] |
(0170851) hgbot (developer) 2024-10-23 22:35 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3022 [^] |
(0171983) hgbot (developer) 2024-11-14 15:07 |
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1621 [^] |
(0171984) hgbot (developer) 2024-11-14 15:07 |
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3022 [^] |
(0172061) hgbot (developer) 2024-11-15 21:13 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3101 [^] |
(0172305) hgbot (developer) 2024-11-20 10:03 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/3101 [^] |
(0172306) hgbot (developer) 2024-11-20 10:03 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^] Changeset: 65de65ca8986e3342929ef839a2ff72b7cc96798 Author: Francisco Javier Deler O'Farril <francisco.ofarril@doceleguas.com> Date: 20-11-2024 09:03:06 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/65de65ca8986e3342929ef839a2ff72b7cc96798 [^] Fixes ISSUE-56718: Problem with “Maximum discount per role” functionality, does not work correctly. --- M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/discounts/ApplyHigherDiscountThanAllowedForRole.js M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/discounts/CheckRoleMaximumDiscountHook.js --- |
(0172566) ivazquez (developer) 2024-11-26 00:15 |
Dear Team, We apply the changes but there is an error in the way decimals and rounding are handled, resulting in inconsistencies when validating the maximum discounts allowed. This allows the system to accept final prices that are below the calculated limits for both the Unit Price and the List Price: Initial Context: Product with List Price: 5.90€. Product with Unit Price (price already reduced): 4.90€. Observed Behavior: The system warns that the maximum discount allowed is 16%, based on the Unit Price. Calculated discount: 4.90€ × 0.16 = 0.784€ ≈ 0.78€ (rounding). Expected minimum allowed price: €4.90 - €0.78 = €4.12. However, the POS allows to apply a price of €4.11, which is below the expected limit of €4.12. Extended Case: If the original List Price of €5.90 is considered, a maximum discount of 30% would imply: Minimum price allowed: €5.90 × 0.70 = €4.13. But the system allows applying a discount that results in a final price of 4.11€, equivalent to a discount of 30.33%, exceeding the established limit. |
Issue History | |||
Date Modified | Username | Field | Change |
2024-10-09 20:09 | axelmercado | New Issue | |
2024-10-09 20:09 | axelmercado | Assigned To | => Retail |
2024-10-09 20:09 | axelmercado | Triggers an Emergency Pack | => No |
2024-10-09 20:10 | axelmercado | Relationship added | related to 0055990 |
2024-10-14 13:57 | jorgewederago | Assigned To | Retail => fofarril |
2024-10-14 15:19 | ivazquez | Issue Monitored: ivazquez | |
2024-10-15 18:48 | fofarril | Status | new => scheduled |
2024-10-23 22:34 | hgbot | Note Added: 0170850 | |
2024-10-23 22:35 | hgbot | Note Added: 0170851 | |
2024-10-23 22:47 | ivazquez | Issue End Monitor: ivazquez | |
2024-11-14 15:07 | hgbot | Note Added: 0171983 | |
2024-11-14 15:07 | hgbot | Note Added: 0171984 | |
2024-11-15 21:13 | hgbot | Note Added: 0172061 | |
2024-11-20 10:03 | hgbot | Resolution | open => fixed |
2024-11-20 10:03 | hgbot | Status | scheduled => closed |
2024-11-20 10:03 | hgbot | Note Added: 0172305 | |
2024-11-20 10:03 | hgbot | Fixed in Version | => 25Q1 |
2024-11-20 10:03 | hgbot | Note Added: 0172306 | |
2024-11-26 00:15 | ivazquez | Note Added: 0172566 | |
2024-11-26 00:15 | ivazquez | Status | closed => new |
2024-11-26 00:15 | ivazquez | Resolution | fixed => open |
2024-11-26 00:15 | ivazquez | Description Updated | View Revisions |
2024-11-26 00:15 | ivazquez | Issue Monitored: ivazquez | |
2024-11-26 10:17 | guilleaer | Status | new => scheduled |
2024-12-19 05:25 | jorgewederago | Assigned To | fofarril => prakashmurugesan88 |
Copyright © 2000 - 2009 MantisBT Group |