Skip to content

fix: post restructure charges capitalization (backport #1239)#1245

Merged
Nihantra-Patel merged 8 commits into
version-2-betafrom
mergify/bp/version-2-beta/pr-1239
May 28, 2026
Merged

fix: post restructure charges capitalization (backport #1239)#1245
Nihantra-Patel merged 8 commits into
version-2-betafrom
mergify/bp/version-2-beta/pr-1239

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented May 28, 2026

Summary by CodeRabbit

  • New Features

    • Mark charges as post-restructure on sales invoices.
    • Auto-create principal-capitalization repayments when post-restructure charges are invoiced.
  • Improvements

    • Allow payable charges for principal capitalization during restructures; refine repayment allocation, GL entry flow, and payment account resolution.
  • Tests

    • Expect an additional repayment record and verify post-restructure invoice creation and paid status.
  • Chores

    • Add migration patch to add the new invoice field.

Review Change Stack


This is an automatic backport of pull request #1239 done by [Mergify](https://mergify.com).

(cherry picked from commit d005f2b)

# Conflicts:
#	lending/loan_management/doctype/loan_repayment/loan_repayment.py
#	lending/loan_management/doctype/loan_restructure/loan_restructure.py
(cherry picked from commit 5d74936)

# Conflicts:
#	lending/loan_management/doctype/loan_restructure/loan_restructure.py
(cherry picked from commit 02cace5)

# Conflicts:
#	lending/loan_management/doctype/loan_repayment/loan_repayment.py
#	lending/loan_management/doctype/loan_restructure/test_loan_restructure.py
(cherry picked from commit 6713d25)

# Conflicts:
#	lending/loan_management/doctype/loan_repayment/loan_repayment.py
(cherry picked from commit 53baa99)

# Conflicts:
#	lending/loan_management/doctype/loan_repayment/loan_repayment.py
(cherry picked from commit cd58469)

# Conflicts:
#	lending/patches.txt
(cherry picked from commit a33f16c)
@mergify mergify Bot requested a review from deepeshgarg007 as a code owner May 28, 2026 08:23
@mergify mergify Bot added the conflicts label May 28, 2026
@mergify
Copy link
Copy Markdown
Author

mergify Bot commented May 28, 2026

Cherry-pick of d005f2b has failed:

On branch mergify/bp/version-2-beta/pr-1239
Your branch is up to date with 'origin/version-2-beta'.

You are currently cherry-picking commit d005f2b3.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   lending/install.py
	modified:   lending/loan_management/doctype/loan_disbursement/loan_disbursement.py
	modified:   lending/loan_management/doctype/loan_restructure/test_loan_restructure.py
	modified:   lending/patches.txt
	new file:   lending/patches/v16_0/add_is_post_restructure_charge_field.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   lending/loan_management/doctype/loan_repayment/loan_repayment.py
	both modified:   lending/loan_management/doctype/loan_restructure/loan_restructure.py

Cherry-pick of 5d74936 has failed:

On branch mergify/bp/version-2-beta/pr-1239
Your branch is ahead of 'origin/version-2-beta' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 5d749367.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   lending/loan_management/doctype/loan_restructure/loan_restructure.py

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of 02cace5 has failed:

On branch mergify/bp/version-2-beta/pr-1239
Your branch is ahead of 'origin/version-2-beta' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 02cace56.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   lending/patches/v16_0/add_is_post_restructure_charge_field.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   lending/loan_management/doctype/loan_repayment/loan_repayment.py
	both modified:   lending/loan_management/doctype/loan_restructure/test_loan_restructure.py

Cherry-pick of 6713d25 has failed:

On branch mergify/bp/version-2-beta/pr-1239
Your branch is ahead of 'origin/version-2-beta' by 3 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 6713d25c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   lending/loan_management/doctype/loan_repayment/loan_repayment.py

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of 53baa99 has failed:

On branch mergify/bp/version-2-beta/pr-1239
Your branch is ahead of 'origin/version-2-beta' by 4 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 53baa994.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   lending/loan_management/doctype/loan_repayment/loan_repayment.py

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of cd58469 has failed:

On branch mergify/bp/version-2-beta/pr-1239
Your branch is ahead of 'origin/version-2-beta' by 5 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit cd584693.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   lending/install.py
	modified:   lending/loan_management/doctype/loan_disbursement/loan_disbursement.py
	modified:   lending/loan_management/doctype/loan_restructure/loan_restructure.py
	modified:   lending/loan_management/doctype/loan_restructure/test_loan_restructure.py
	modified:   lending/overrides/sales_invoice.py
	deleted:    lending/patches/v16_0/add_is_post_restructure_charge_field.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   lending/patches.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@Nihantra-Patel Nihantra-Patel merged commit 45bfa60 into version-2-beta May 28, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant