Openbravo Issue Tracking System - POS2 | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0049875 | POS2 | POS | public | 2022-07-24 20:59 | 2024-01-15 15:54 |
Reporter | cberner | ||||
Assigned To | Triage Platform Base | ||||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | unable to reproduce | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0049875: Setting distinct price and then completing a product configuration step, will reset the value after finishing it | ||||
Description | This is a bug with product configuration, it seems is using old state and returning it, changing the previously modified price if done so. Gif is provided to illustrate the issue. After further investigation, we saw that the problem comes from the updateProductModifiersExtraPrice function, which on addProductConfiguration action will recalculate the product modifiers extra prices and change the line price. It does it by taking the base product amount/price, which is incorrect, it should take into account line price. We propose another solution on the Proposed Solution part of this issue. | ||||
Steps To Reproduce | 1. Login WebPOS 2. Add a GPS Mini product to the ticket 3. Click on the line and Price Modification, change the value to something else 4. Finish the service configuration process, the price is reset This can also be reproduced out of the configuration step: 1. Add a GPS Handheld 2. Modify its price 3. Click on Edit Services and finish the step Price is wrongly reset to the original value, instead of the modified one. | ||||
Proposed Solution | We propose recalculating the price of product modifier just in two cases, when the action to add a product modifier or remove one is done, we recalculate the price, but only if there are new or less product modifiers(right now is executed each time any product configuration is done, and doesn't matter if it is a product modifier or another type of product configuration, like beeper). This should be done by running it inside the addProductConfiguration action, and taking into account the previous state, which we preserve and can check. If in the previous state we had more or less product modifiers, we recalculate it using the ticketline amount/price by adding or subtracting the proper amount corresponding to the added/removed product modifiers with extra price. We propose also recalculating the price on SetPrice action as a posthook, by first setting the new price, and then adding all the modifers with extra price to the final price, and setting the final amount of the ticketline to that(price user set + extra modifiers prices). | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | price modification changes original value.gif (680,336) 2022-07-24 20:59 https://issues.openbravo.com/file_download.php?file_id=17336&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2022-07-24 20:59 | cberner | New Issue | |||
2022-07-24 20:59 | cberner | Assigned To | => Retail | ||
2022-07-24 20:59 | cberner | File Added: price modification changes original value.gif | |||
2022-07-24 20:59 | cberner | Triggers an Emergency Pack | => No | ||
2022-07-24 20:59 | cberner | Assigned To | Retail => cberner | ||
2022-07-24 20:59 | cberner | Status | new => acknowledged | ||
2022-08-05 11:40 | cberner | Description Updated | bug_revision_view_page.php?rev_id=24592#r24592 | ||
2022-08-05 11:40 | cberner | Proposed Solution updated | |||
2022-08-11 13:48 | cberner | Assigned To | cberner => Triage Platform Base | ||
2024-01-15 15:54 | cberner | Status | acknowledged => scheduled | ||
2024-01-15 15:54 | asier_perez | Note Added: 0159317 | |||
2024-01-15 15:54 | asier_perez | Status | scheduled => closed | ||
2024-01-15 15:54 | asier_perez | Resolution | open => unable to reproduce |
Notes | |||||
|
|||||
|
|