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

refactor: GL entries build logic for Advance in Separate Party Account option. #38393

Merged

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented Nov 28, 2023

continues: #35609
Refactor on how Ledger entries are built for Advance that are booked in separate party account.

Fixes partial payment ledger entries upon unreconciling the invoice from advance payment.

ToDo:

  • Handle Forex Payments
  • Test cases for the new GL build logic

with `Advance as Liability`, partial reconciliation should not post
duplicate ledger entries for same reference
make_advance_gl_entries -> add_advance_gl_entries -> add_advance_gl_for_reference

'make_advance_gl_entries' - main method thats builds and post GL
entries for all or one specific reference based on parameters

'add_advance_gl_entries' - build GL map for all or one specific
reference. Return an array of dict.

'add_advance_gl_for_reference' - utility function to build gl
entries. returns dict.
@ruthra-kumar ruthra-kumar marked this pull request as draft November 29, 2023 03:51
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #38393 (961bdf0) into develop (8c3713b) will decrease coverage by 7.08%.
Report is 71 commits behind head on develop.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #38393      +/-   ##
===========================================
- Coverage    67.23%   60.15%   -7.08%     
===========================================
  Files          758      760       +2     
  Lines        60619    69470    +8851     
===========================================
+ Hits         40756    41791    +1035     
- Misses       19863    27679    +7816     
Files Coverage Δ
...xt/accounts/doctype/payment_entry/payment_entry.py 84.20% <100.00%> (+0.53%) ⬆️
erpnext/accounts/general_ledger.py 90.67% <100.00%> (+0.12%) ⬆️
erpnext/accounts/utils.py 73.79% <100.00%> (+0.52%) ⬆️

... and 494 files with indirect coverage changes

@ruthra-kumar ruthra-kumar marked this pull request as ready for review December 1, 2023 07:06
@ruthra-kumar ruthra-kumar merged commit 6128011 into frappe:develop Dec 1, 2023
12 of 13 checks passed
ruthra-kumar added a commit that referenced this pull request Dec 1, 2023
…-38393

refactor: GL entries build logic for `Advance in Separate Party Account` option. (backport #38393)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 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.

1 participant