|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[POS2] POS||major||have not tried||2022-07-24 20:59||2022-08-11 13:48|
|Assigned To||Triage Platform Base|
|Priority||normal||Resolution||open||Fixed in Version|
|Status||acknowledged||Fix in branch||Fixed in SCM revision|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
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).
|Tags||No tags attached.|
|Attached Files||price modification changes original value.gif [^] (680,336 bytes) 2022-07-24 20:59|
|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||View Revisions|
|2022-08-05 11:40||cberner||Proposed Solution updated|
|2022-08-11 13:48||cberner||Assigned To||cberner => Triage Platform Base|
|Copyright © 2000 - 2009 MantisBT Group|