Describe the bug
In the BO => Orders => new migrated Order details page or legacy page when we add a new discount with an invalid amount for example -10 => an exception is displayed
To Reproduce
Steps to reproduce the behavior:
admin-dev/index.php/sell/orders/orders/5/view or the legacy page

Additional information
PrestaShop version: 1.7.7.x, 1.7.6.3, 1.7.5.2
PHP version: 7.1
Ping @colinegin new issue in the Order page
Hi,
Same issue with an invalid percent value
An exception detected when we add a new discount = -10%


Reproduced with 177x branch, PS1.7.6.3 and PS1.7.5.2
Thanks!
Isn't this the same as this? https://github.com/PrestaShop/PrestaShop/issues/13809
Hi @Hlavtox,
We have different exceptions:
They are not similar but they are just related.
Thanks!
The behaviour should be the same as in the cart rule page. When adding a discount value (in %) containing a "-", this error message is displayed :

And when adding a discount value (in amount) containing a "-", this error message is displayed :

So IMO we should be consistent and do the same in the order page.
After discussing with @TristanLDD and @LouiseBonnard the wording for error messages should be the same as in the cart rule page and the error message should be located on top of the order page. When a error occurs, the pop-up is closed and the user has to re-open it to add a cart rule.
@colinegin, as long as we stay consistent and display the same error message when the same mistake is done, it suits me fine! :-)
@atomiix, as @colinegin said, and especially if the error notification is displayed on the top of the page and not in the modal, I prefer to keep the wording consistent and use the same error notifications as in the cart rule page.
@LouiseBonnard @colinegin
Wouldn't it be better to go upfront the employee and just remove the minus from the input, so he can enter the discount with minus or not? Maybe it would be even easier to do and more comfortable for employees.
Because, when you look on it from the other side, the discount is really -15%, why should he be forced to enter positive value?
Fixed by #17852