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: add parenttype condition to payment schedule query in accounts receivable report #46370

Conversation

Shanuka-98
Copy link
Contributor

This fix ensures that the get_payment_terms function correctly filters records by adding the missing condition:

si.name = ps.parent and ps.parenttype = '{row.voucher_type}'

By including ps.parenttype = '{row.voucher_type}', the function properly associates payment terms with the correct document type, preventing incorrect outstanding amount calculations.

Impact of the Fix

  • Ensures that the Accounts Receivable Report - Outstanding Amount is accurately computed when the Based On Payment Terms filter is applied.
  • Prevents incorrect doubling of outstanding amounts, improving financial accuracy in reporting.

closes #46367

backport version-14
backport version-15

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Mar 6, 2025
@nabinhait nabinhait merged commit f311a0f into frappe:version-14-hotfix Mar 12, 2025
11 checks passed
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.83.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@ruthra-kumar ruthra-kumar added backport develop instructs mergify to frontport PR to develop branch backport version-15-hotfix labels Mar 13, 2025
mergify bot pushed a commit that referenced this pull request Mar 13, 2025
…eceivable report (#46370)

fix: add parenttype condition to payment schedule query in accounts receivable report
(cherry picked from commit f311a0f)
mergify bot pushed a commit that referenced this pull request Mar 13, 2025
…eceivable report (#46370)

fix: add parenttype condition to payment schedule query in accounts receivable report
(cherry picked from commit f311a0f)
ruthra-kumar pushed a commit that referenced this pull request Mar 13, 2025
ruthra-kumar pushed a commit that referenced this pull request Mar 13, 2025
…eceivable report (backport #46370) (#46499)

Fix: add parenttype condition to payment schedule query in accounts receivable report (#46370)

fix: add parenttype condition to payment schedule query in accounts receivable report
(cherry picked from commit f311a0f)

Co-authored-by: Shanuka Hewage <89955436+Shanuka-98@users.noreply.github.com>
diptanilsaha pushed a commit to diptanilsaha/erpnext that referenced this pull request Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport develop instructs mergify to frontport PR to develop branch backport version-15-hotfix needs-tests This PR needs automated unit-tests. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants