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: Make Depreciation Entry posting more flexible #28421

Merged
merged 11 commits into from
Dec 6, 2021

Conversation

GangaManoj
Copy link
Contributor

@GangaManoj GangaManoj commented Nov 16, 2021

Problem

In order to post Depreciation Entries, you need to set 2 accounts:

  1. Accumulated Depreciation Account
  2. Depreciation Expense Account

However, this poses a problem for some customers in the European region. They prefer to use the same root node for both Income and Expense Accounts, which means that they're unable to set Depreciation Expense Accounts(which need to have Root Type = Expense). Consequently, they're unable to post Depreciation Entries(manually or otherwise).

Fix

  • Change the filter for Depreciation Expense Account to allow the selection of Income accounts as well
  • Post Depreciation Entries according to the root type of the Depreciation Expense Account

To Do:

  • Rename Depreciation Expense Account
Testing Info

Case 1:

  1. Create a new Asset Category

  2. Set an Expense Account as the Depreciation Expense Account

  3. Create a depreciable Asset belonging to that Asset Category, with Depreciation Starting Date set as a past date

  4. After submission of the Asset doc, expand the Depreciation Schedule row whose Schedule Date has already passed and click on the Make Depreciation Entry button

    Screenshot 2021-11-17 at 5 32 42 AM

  5. Check the Journal Entry thus created and confirm that the Depreciation Expense Account was debited

Case 2:

  1. Create a new Asset Category
  2. Set an Income Account as the Depreciation Expense Account
  3. Create a depreciable Asset belonging to that Asset Category, with Depreciation Starting Date set as a past date
  4. After submission of the Asset doc, expand the Depreciation Schedule row whose Schedule Date has already passed and click on the Make Depreciation Entry button
  5. Check the Journal Entry thus created and confirm that the Depreciation Expense Account was credited

no-docs

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #28421 (56df646) into develop (87f2dcf) will decrease coverage by 0.14%.
The diff coverage is 92.30%.

@@             Coverage Diff             @@
##           develop   #28421      +/-   ##
===========================================
- Coverage    55.34%   55.19%   -0.15%     
===========================================
  Files         1119     1121       +2     
  Lines        66664    66760      +96     
===========================================
- Hits         36897    36851      -46     
- Misses       29767    29909     +142     
Impacted Files Coverage Δ
erpnext/assets/doctype/asset/depreciation.py 84.93% <90.90%> (-2.48%) ⬇️
...xt/assets/doctype/asset_category/asset_category.py 87.30% <100.00%> (ø)
erpnext/utilities/product.py 14.70% <0.00%> (-35.30%) ⬇️
...wise_balance_history/batch_wise_balance_history.py 68.96% <0.00%> (-24.14%) ⬇️
erpnext/shopping_cart/product_info.py 30.30% <0.00%> (-21.22%) ⬇️
erpnext/regional/saudi_arabia/utils.py 23.75% <0.00%> (-11.81%) ⬇️
erpnext/stock/doctype/warehouse/warehouse.py 43.22% <0.00%> (-11.09%) ⬇️
erpnext/stock/doctype/bin/bin.py 87.27% <0.00%> (-5.04%) ⬇️
...ctype/woocommerce_settings/woocommerce_settings.py 80.00% <0.00%> (-4.00%) ⬇️
...eport/item_variant_details/item_variant_details.py 84.33% <0.00%> (-3.62%) ⬇️
... and 61 more

@nextchamp-saqib nextchamp-saqib merged commit b1ba98c into frappe:develop Dec 6, 2021
@nextchamp-saqib
Copy link
Member

@Mergifyio backport version-13-hotfix

@mergify
Copy link
Contributor

mergify bot commented Dec 6, 2021

backport version-13-hotfix

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants