Skip to content
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

fix: Don't allow negative amount on Payment Request #41905 #41959

Conversation

hiteshprajapati
Copy link
Contributor

image

Copy link

stale bot commented Jul 6, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Jul 6, 2024
@hiteshprajapati
Copy link
Contributor Author

@deepeshgarg007 @ruthra-kumar : is anything missing in this change?

@stale stale bot removed the inactive label Jul 9, 2024
@ruthra-kumar
Copy link
Member

@hiteshprajapati
The Payment Request with a -ve amount in the screenshot, could you describe how that value came to be? Can you provide a simple replicable scenario?

@hiteshprajapati
Copy link
Contributor Author

hiteshprajapati commented Jul 9, 2024

@hiteshprajapati The Payment Request with a -ve amount in the screenshot, could you describe how that value came to be? Can you provide a simple replicable scenario?

@ruthra-kumar : I am not sure whether I understand your question correctly.
About the screenshot, it is taken while creating payment request with -ve amount after making the code changes locally. Its new Payment Request and not the existing one and when I hit the save button, non-negative validation error returned by framework due to my changes

@hiteshprajapati
Copy link
Contributor Author

@hiteshprajapati The Payment Request with a -ve amount in the screenshot, could you describe how that value came to be? Can you provide a simple replicable scenario?

@ruthra-kumar : I am not sure whether I understand your question correctly. About the screenshot, it is taken while creating payment request with -ve amount after making the code changes locally. Its new Payment Request and not the existing one and when I hit the save button, non-negative validation error returned by framework due to my changes

@ruthra-kumar : could you please provide your thoughts ? Its been here for a while

@ruthra-kumar
Copy link
Member

@hiteshprajapati

From the screenshot, it looks like payment request is made against purchase order. But -ve purchase orders are not possible. So, how was the PO made?

@hiteshprajapati
Copy link
Contributor Author

@hiteshprajapati

From the screenshot, it looks like payment request is made against purchase order. But -ve purchase orders are not possible. So, how was the PO made?

@ruthra-kumar : Yes, the payment request is made against the purchase order. But you can edit the amount while creating payment request from PO. Please refer this screenshot

paymentrequest_negative.mp4

@ruthra-kumar ruthra-kumar merged commit 930ecb3 into frappe:develop Jul 19, 2024
14 checks passed
ruthra-kumar added a commit that referenced this pull request Jul 19, 2024
…-41959

fix: Don't allow negative amount on Payment Request #41905 (backport #41959)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants