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: option to disable Item Tax Template and Tax Category #29349

Merged
merged 3 commits into from
Feb 7, 2022

Conversation

barredterra
Copy link
Collaborator

@barredterra barredterra commented Jan 18, 2022

When Item Tax Template or Tax Category become obsolete we need some option to get rid of them. They might have been used in thousand of items and transactions, so deleting them is not possible.

This PR adds the "Disabled" checkbox to Item Tax Template and Tax Category, similar to Sales/Purchase Taxes and Charges Template.

Effect

  • When disabled, they can no longer be selected in Item master or transaction
  • Exception: If Item Tax Template is configured in Item master, it can still be selected in a transaction, even if the Item Tax Template is disabled.
Item Tax Template
Tax Category
Item
Transaction

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Jan 18, 2022
@barredterra barredterra added needs-docs and removed needs-tests This PR needs automated unit-tests. labels Jan 18, 2022
@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #29349 (663c594) into develop (79ab8e6) will decrease coverage by 0.99%.
The diff coverage is 0.00%.

❗ Current head 663c594 differs from pull request most recent head b5242df. Consider uploading reports for the commit b5242df to get more accurate results

@@             Coverage Diff             @@
##           develop   #29349      +/-   ##
===========================================
- Coverage    58.96%   57.96%   -1.00%     
===========================================
  Files         1108     1110       +2     
  Lines        69292    68066    -1226     
===========================================
- Hits         40856    39454    -1402     
- Misses       28436    28612     +176     
Impacted Files Coverage Δ
erpnext/controllers/queries.py 62.50% <0.00%> (-0.51%) ⬇️
...saction/incorrect_balance_qty_after_transaction.py 0.00% <0.00%> (-100.00%) ⬇️
...rial_no_valuation/incorrect_serial_no_valuation.py 0.00% <0.00%> (-96.50%) ⬇️
.../report/delayed_item_report/delayed_item_report.py 0.00% <0.00%> (-96.08%) ⬇️
erpnext/stock/report/item_prices/item_prices.py 0.00% <0.00%> (-95.00%) ⬇️
...e_sales_analytics/supplier_wise_sales_analytics.py 0.00% <0.00%> (-88.53%) ⬇️
...stock_value_report/incorrect_stock_value_report.py 0.00% <0.00%> (-55.56%) ⬇️
...rpnext/selling/page/point_of_sale/point_of_sale.py 0.00% <0.00%> (-54.68%) ⬇️
erpnext/utilities/product.py 50.00% <0.00%> (-22.84%) ⬇️
erpnext/setup/doctype/item_group/item_group.py 48.40% <0.00%> (-16.81%) ⬇️
... and 163 more

@ankush
Copy link
Member

ankush commented Jan 19, 2022

LGTM. Docs for enable/disable seems kinda too much. Isn't it self-explanatory? :P

@barredterra
Copy link
Collaborator Author

@ankush maybe the special case would be interesting to know. Otherwise (or anyways) we'll get complaints that disabled item tax templates can be selected in a transaction.

@stale
Copy link

stale bot commented Feb 4, 2022

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Feb 4, 2022
@deepeshgarg007
Copy link
Member

Merging this PR. Failing unit tests are unrelated to this PR and failing on other PRs as well

@deepeshgarg007 deepeshgarg007 merged commit cec971b into frappe:develop Feb 7, 2022
@barredterra barredterra deleted the disable-item-tax-category branch February 7, 2022 12:09
@barredterra
Copy link
Collaborator Author

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Feb 7, 2022

backport version-13-hotfix

✅ Backports have been created

deepeshgarg007 added a commit that referenced this pull request Feb 7, 2022
…-29349

feat: option to disable Item Tax Template and Tax Category (backport #29349)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants