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(minor): discount accounting patch #30854

Merged

Conversation

rmehta
Copy link
Member

@rmehta rmehta commented May 1, 2022

Please provide enough information so that others can review your pull request:

Explain the details for making this change. What existing problem does the pull request solve?

Screenshots/GIFs

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label May 1, 2022
@deepeshgarg007 deepeshgarg007 merged commit 15237fd into frappe:develop May 1, 2022
data = frappe.db.sql(
'select value from tabSingles where doctype="Accounts Settings" and field="enable_discount_accounting"'
)
discount_account = data and data[0][0] or 0
if discount_account:
Copy link
Member

Choose a reason for hiding this comment

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

This should be casted to integer, else it's always true. @deepeshgarg007 @rahib-hassan

@rmehta
Copy link
Member Author

rmehta commented May 2, 2022 via email

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.

3 participants