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

feat: added ability to use custom html format for process statement of accounts #45746

Open
wants to merge 2 commits into
base: version-14-hotfix
Choose a base branch
from

Conversation

stevewilson9009
Copy link

Added code to process_statement_of_accounts.py.
The added code accepts the path to a custom html format of General Ledger and Accounts Receivable through a hook.
This path to custom html format is then used to build pdf to either download or send email.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Feb 5, 2025
@stevewilson9009 stevewilson9009 changed the title feat: added ability to use custom print format for process statement feat: added ability to use custom print format for process statement of accounts Feb 5, 2025
@stevewilson9009 stevewilson9009 changed the title feat: added ability to use custom print format for process statement of accounts feat: added ability to use custom html format for process statement of accounts Feb 5, 2025
@Vishnu7025
Copy link
Contributor

@ruthra-kumar ruthra-kumar self-assigned this Feb 10, 2025
@ruthra-kumar ruthra-kumar removed the request for review from deepeshgarg007 February 10, 2025 04:30

process_soa_html = frappe.get_hooks("process_soa_html")
# fetching custom print format of Process Statement of Accounts
if process_soa_html.get(doc.report):
Copy link
Member

@ruthra-kumar ruthra-kumar Feb 10, 2025

Choose a reason for hiding this comment

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

when not set, frappe.get_hooks returns an empty list. Using get on list will throw error. You'll have to handle non-existing hook case as well.

Copy link
Author

@stevewilson9009 stevewilson9009 Feb 11, 2025

Choose a reason for hiding this comment

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

@ruthra-kumar
Thankyou for pointing that out.
I have updated the code to check for non-existing hook as well.

Copy link
Author

Choose a reason for hiding this comment

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

@stevewilson9009
Copy link
Author

Could you please review my code?
@deepeshgarg007 @ruthra-kumar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants