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: consolidate GL entries based on voucher #38337

Closed
wants to merge 2 commits into from

Conversation

rtdany10
Copy link
Contributor

Create a payment entry without any references. Reconcile the same against multiple invoices using payment reconciliation tool.
Screenshot 2023-11-25 at 14-46-46 Dany - ACC-PAY-2023-00004-1

Create another payment entry, this time allocate the amounts in the payment entry itself.
Screenshot 2023-11-25 at 14-47-27 Dany - ACC-PAY-2023-00005

Look at the General Ledger:
Screenshot 2023-11-25 at 14-47-44 General Ledger

Even though both payment entry records look the same, they differ in the General Ledger, while the first one has only 2 entries, the second one has n-number of entries(n being the number of unique references).

This PR consolidates it based on voucher and account, if the group_by is Group by Voucher (Consolidated)

General Ledger after this PR:
image

Also removes debit and credit being on the same line.

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

codecov bot commented Nov 25, 2023

Codecov Report

Merging #38337 (b73b7c6) into develop (f258ab5) will decrease coverage by 0.03%.
Report is 28 commits behind head on develop.
The diff coverage is 70.83%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #38337      +/-   ##
===========================================
- Coverage    67.27%   67.24%   -0.03%     
===========================================
  Files          757      758       +1     
  Lines        60540    60623      +83     
===========================================
+ Hits         40727    40767      +40     
- Misses       19813    19856      +43     
Files Coverage Δ
erpnext/buying/doctype/supplier/supplier.py 68.57% <0.00%> (-1.34%) ⬇️
...t/accounts/report/general_ledger/general_ledger.py 70.60% <80.95%> (+0.60%) ⬆️

... and 13 files with indirect coverage changes

@rtdany10
Copy link
Contributor Author

@ruthra-kumar ruthra-kumar self-assigned this Nov 28, 2023
@ruthra-kumar
Copy link
Member

@rtdany10

This happens when Book Advance Payments in Separate Party Account is enabled. GL entries are valid, but there is too much splitting on reconciliation that it becomes hard to reason the GL entries.

Rather than fixing it at the report level, I've already made a PR to tidy up the build logic for GL entries.

There are some test cases, that needs to be addressed. Post which I'll merge it. You can test it out let me know if you find anything breaking.

@ruthra-kumar
Copy link
Member

closing the pr.

@ruthra-kumar
Copy link
Member

Latest PR: #38393

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants