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 #37828

Merged

Conversation

GursheenK
Copy link
Member

@GursheenK GursheenK commented Nov 1, 2023

Problem
Currently, when a Payment Entry is created, the ledger entries that get generated are configured in a way that does not allow the following scenarios -

  • Receive from a Payable Party Type like Supplier / Shareholder / Employee.
  • Pay to a Receivable Party Type like Customer.

Solution

  • Remove the validation for checking negative outstanding amounts.
  • Use the Payment Type instead of Party Type field for determining how GL entries are created for a payment.

Resolves #37124

no-docs

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Nov 1, 2023
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #37828 (2984a86) into develop (7a3e4a8) will increase coverage by 0.08%.
Report is 102 commits behind head on develop.
The diff coverage is 82.97%.

@@             Coverage Diff             @@
##           develop   #37828      +/-   ##
===========================================
+ Coverage    67.33%   67.41%   +0.08%     
===========================================
  Files          757      757              
  Lines        60147    60326     +179     
===========================================
+ Hits         40497    40666     +169     
- Misses       19650    19660      +10     
Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 83.56% <100.00%> (-0.21%) ⬇️
.../report/accounts_receivable/accounts_receivable.py 89.96% <100.00%> (-0.64%) ⬇️
..._receivable_summary/accounts_receivable_summary.py 92.15% <100.00%> (+0.07%) ⬆️
erpnext/accounts/utils.py 73.22% <100.00%> (+0.09%) ⬆️
erpnext/controllers/status_updater.py 88.42% <ø> (ø)
erpnext/selling/doctype/sales_order/sales_order.py 79.12% <ø> (ø)
...doctype/landed_cost_voucher/landed_cost_voucher.py 87.59% <ø> (ø)
...tax_withholding_details/tax_withholding_details.py 79.87% <71.42%> (+0.42%) ⬆️

... and 33 files with indirect coverage changes

@GursheenK GursheenK marked this pull request as ready for review November 6, 2023 05:28


def get_party_types_from_account_type(account_type):
return frappe.db.get_list("Party Type", {"account_type": account_type}, pluck="name")
Copy link
Member

Choose a reason for hiding this comment

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

Use get_all instead of get_list, get_list might cause unwanted permission issues

@deepeshgarg007 deepeshgarg007 merged commit 860b67e into frappe:develop Nov 9, 2023
13 checks passed
deepeshgarg007 added a commit that referenced this pull request Nov 9, 2023
…-37828

fix: payments irrespective of party types (backport #37828)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Payment Receive from Shareholder
2 participants