New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is possible to add negative Amount for Order Payment from the Back Office #16582
Comments
Hi @tdavidsonas88, I manage to reproduce the issue with PS1.7.5.2 & PS1.7.6.1 & PS1.7.6.2build2 & the develop branch. |
@rokaszygmantas - would like some advice how we can contribute |
You can't add negative value to the payment method. To balance an overdue by the clients, it is recommended to make a credit slip. |
Fixed in #17241 |
A payment can be positive or negative. Another thing is that the Total cannot be negative, but partial refunds must be allowed and that these are recorded. |
You wish it to happen but it's PrestaShop @PrestaShop/product-team that decides what happens or not in the project. I understand you find it very useful to have positive or negative payments but there is more than "is it easy or not to use" when it comes to payments. AFAIK Product team is actually in the process of getting some law compliance people so that they can tell us what can be done or what cannot be done in order to comply with the law. |
I am getting issue related to it. PS 1.7.8.0 Error: How to reproduce it:
Looking for solution, if its already fixed please provide PR link for that fix. |
@VipinNethues please create a dedicated issue here |
Describe the bug
It is possible to add negative Amount for Order Payment from the Back Office. Then message is thrown: An unexpected error occurred. [PrestaShopException code 0]. The actual exception is: Property Order->total_paid_real is not valid.
According to as I understand negative payments should not be saved to the database or at least total sum of payments from the db should not be negative.
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots or screenrecords to help explain your problem.
Additional information
Have Behat integration 2 failing tests written in file /Order/add_payment.feature on the Github Pull request: #16525
The text was updated successfully, but these errors were encountered: