-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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: Added validation for single_threshold in Tax With Holding Category #30382
Merged
deepeshgarg007
merged 8 commits into
frappe:version-13-hotfix
from
SherinKR:version-13-hotfix
Apr 4, 2022
Merged
fix: Added validation for single_threshold in Tax With Holding Category #30382
deepeshgarg007
merged 8 commits into
frappe:version-13-hotfix
from
SherinKR:version-13-hotfix
Apr 4, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Mergifyio backport develop |
🟠 Waiting for conditions to match
|
✅ Backports have been created
|
nextchamp-saqib
added a commit
that referenced
this pull request
Apr 5, 2022
fix: Added validation for single_threshold in Tax With Holding Category (backport #30382)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Getting type error while creating new Tax Withholding Category.
TypeError: '<' not supported between instances of 'int' and 'NoneType'
Frappe version - v13.23.0 (version-13)
ERPNext version - v13.23.0 [(version-13)
Module
accounts
Version
Frappe version - v13.23.0 (version-13)
ERPNext version - v13.23.0 (version-13)
Installation method
FrappeCloud
Relevant log output / Stack trace / Full Error Message.
Traceback (most recent call last):
File "apps/frappe/frappe/desk/form/save.py", line 21, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 287, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 309, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 240, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 971, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 869, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1161, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1144, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 863, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "apps/erpnext/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py", line 14, in validate
self.validate_thresholds()
File "apps/erpnext/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py", line 28, in validate_thresholds
if d.cumulative_threshold and d.cumulative_threshold < d.single_threshold:
TypeError: '<' not supported between instances of 'int' and 'NoneType'
#30379