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: Added validation for single_threshold in Tax With Holding Category #30382

Merged
merged 8 commits into from
Apr 4, 2022
Merged

fix: Added validation for single_threshold in Tax With Holding Category #30382

merged 8 commits into from
Apr 4, 2022

Conversation

SherinKR
Copy link
Contributor

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

@deepeshgarg007
Copy link
Member

@Mergifyio backport develop

@mergify
Copy link
Contributor

mergify bot commented Apr 4, 2022

backport develop

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

@deepeshgarg007 deepeshgarg007 merged commit 0a2c72c into frappe:version-13-hotfix Apr 4, 2022
mergify bot pushed a commit that referenced this pull request Apr 4, 2022
@mergify
Copy link
Contributor

mergify bot commented Apr 4, 2022

backport develop

✅ 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)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants