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: PCV validation for previous fiscal year #40572

Merged

Conversation

GursheenK
Copy link
Member

Steps to replicate bug

  • Create a document for the previous fiscal year.
  • Create a transaction in the previous fiscal year and cancel it.
  • Create transactions in current fiscal year.
  • Try to submit Period Closing Voucher for current fiscal year.
  • The validation for PCV fails saying that the Previous Fiscal Year is not closed.

The validation checks if the previous fiscal year exists, if yes check for any GL entries created for the fiscal year, if no GL entries are created, allow submitting the PCV. If it does find GL entries it checks for a PCV for that year and considers it unclosed if no such voucher exists. However, if a cancelled GL entry exists in any of the past years then the validation still fails.

Fix
Do not consider cancelled GL entries for the validation.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Mar 20, 2024
@deepeshgarg007 deepeshgarg007 marked this pull request as ready for review March 20, 2024 14:51
@deepeshgarg007 deepeshgarg007 merged commit 1714ac6 into frappe:develop Mar 20, 2024
14 checks passed
GursheenK added a commit that referenced this pull request Mar 21, 2024
…-40572

fix: PCV validation for previous fiscal year (backport #40572)
@GursheenK GursheenK added the backport version-14-hotfix backport to version 14 label Mar 21, 2024
GursheenK added a commit that referenced this pull request Mar 21, 2024
…-40572

fix: PCV validation for previous fiscal year (backport #40572)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants