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: payments irrespective of party types (backport #37828) #43040

Open
wants to merge 13 commits into
base: version-14-hotfix
Choose a base branch
from

Conversation

dj12djdjs
Copy link
Collaborator

I didn't want to overwrite the changes in #38630 in case I've made an error during rebase.

continuation of: #38630
backport of: #37828

@barredterra
Copy link
Collaborator

barredterra commented Sep 17, 2024

@dj12djdjs did you also consider this follow-up to the original PR? #38071

Also, these validations we're removing in the backend still exist in the frontend, even on the develop branch:

if (paid_amount > total_negative_outstanding) {
if (total_negative_outstanding == 0) {
frappe.msgprint(
__("Cannot {0} {1} {2} without any negative outstanding invoice", [
frm.doc.payment_type,
frm.doc.party_type == "Customer" ? "to" : "from",
frm.doc.party_type,
])
);
return false;
} else {
frappe.msgprint(
__("Paid Amount cannot be greater than total negative outstanding amount {0}", [
total_negative_outstanding,
])
);
return false;
}
} else {

Is this on purpose?

@dj12djdjs
Copy link
Collaborator Author

@barredterra I noticed that, my customer wasn't to picky about it and just ignored the popup.

It should be removed from the frontend. Will rebase and remove that logic.

@dj12djdjs dj12djdjs force-pushed the backport/version-14-hotfix/37828-1 branch from 2f2afca to 1c3ea83 Compare October 4, 2024 19:48
return false;
}
} else {
if(paid_amount < total_negative_outstanding) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barredterra I think it makes sense to reverse the original if condition since we're removing the path that triggered the validation. I haven't spent much time reading this section of PE logic. Do you have any initial doubts about this?

@dj12djdjs dj12djdjs assigned barredterra and unassigned dj12djdjs Oct 4, 2024

This comment has been minimized.

@stale stale bot added the inactive label Nov 5, 2024

This comment was marked as outdated.

@stale stale bot added the inactive label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants