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: asset depreciation ledger #37991

Merged
merged 5 commits into from
Nov 8, 2023
Merged

fix: asset depreciation ledger #37991

merged 5 commits into from
Nov 8, 2023

Conversation

anandbaburajan
Copy link
Contributor

  • accumulated_depreciation_amount was not including opening_accumulated_depreciation of assets, so fixed that
  • renamed amount_after_depreciation to value_after_depreciation because that's what it actually represents
  • added cost_center filter and column, similar to how it's there in the Fixed Asset Register report
  • values of assets with multiple finance books were wrong since finance books weren't handled properly, so fixed that
  • unrelated: renamed 'include default book entries' to 'include default FB entries`, which is more clear

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Nov 8, 2023
Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #37991 (eba31ef) into develop (8fbd4ce) will increase coverage by 0.02%.
Report is 55 commits behind head on develop.
The diff coverage is 62.22%.

@@             Coverage Diff             @@
##           develop   #37991      +/-   ##
===========================================
+ Coverage    67.37%   67.39%   +0.02%     
===========================================
  Files          755      757       +2     
  Lines        60202    60336     +134     
===========================================
+ Hits         40562    40666     +104     
- Misses       19640    19670      +30     
Files Coverage Δ
erpnext/assets/doctype/asset/asset.py 80.37% <ø> (ø)
...preciation_schedule/asset_depreciation_schedule.py 89.42% <100.00%> (ø)
erpnext/stock/doctype/bin/bin.py 96.20% <ø> (-0.68%) ⬇️
...pnext/stock/doctype/delivery_note/delivery_note.py 81.22% <100.00%> (+0.07%) ⬆️
...stock_reservation_entry/stock_reservation_entry.py 83.01% <100.00%> (+0.92%) ⬆️
erpnext/accounts/report/financial_statements.py 80.42% <0.00%> (ø)
...t/accounts/report/general_ledger/general_ledger.py 70.45% <0.00%> (ø)
...ext/accounts/report/trial_balance/trial_balance.py 75.14% <0.00%> (ø)
...eport/fixed_asset_register/fixed_asset_register.py 0.00% <0.00%> (ø)
...t_depreciation_ledger/asset_depreciation_ledger.py 0.00% <0.00%> (ø)
... and 1 more

... and 19 files with indirect coverage changes

@anandbaburajan anandbaburajan merged commit 9a171db into frappe:develop Nov 8, 2023
13 checks passed
mergify bot pushed a commit that referenced this pull request Nov 8, 2023
* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)

# Conflicts:
#	erpnext/accounts/report/balance_sheet/balance_sheet.js
#	erpnext/accounts/report/cash_flow/cash_flow.js
#	erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
#	erpnext/accounts/report/trial_balance/trial_balance.js
#	erpnext/translations/pl.csv
#	erpnext/translations/tr.csv
mergify bot pushed a commit that referenced this pull request Nov 8, 2023
* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)
anandbaburajan added a commit that referenced this pull request Nov 8, 2023
fix: asset depreciation ledger (#37991)

* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)

Co-authored-by: Anand Baburajan <[email protected]>
@anandbaburajan
Copy link
Contributor Author

@mergify copy version-13-hotfix

Copy link
Contributor

mergify bot commented Nov 8, 2023

copy version-13-hotfix

✅ Pull request copies have been created

mergify bot pushed a commit that referenced this pull request Nov 8, 2023
* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)

# Conflicts:
#	erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.json
#	erpnext/accounts/report/balance_sheet/balance_sheet.js
#	erpnext/accounts/report/cash_flow/cash_flow.js
#	erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
#	erpnext/accounts/report/financial_statements.py
#	erpnext/accounts/report/trial_balance/trial_balance.js
#	erpnext/accounts/report/trial_balance/trial_balance.py
#	erpnext/translations/pl.csv
#	erpnext/translations/tr.csv
anandbaburajan added a commit that referenced this pull request Nov 8, 2023
* fix: asset depreciation ledger (#37991)

* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)

# Conflicts:
#	erpnext/accounts/report/balance_sheet/balance_sheet.js
#	erpnext/accounts/report/cash_flow/cash_flow.js
#	erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
#	erpnext/accounts/report/trial_balance/trial_balance.js
#	erpnext/translations/pl.csv
#	erpnext/translations/tr.csv

* chore: fix conflict in balance_sheet.js

* chore: fix conflict in cash_flow.js

* chore: fix conflict in consolidated_financial_statement.js

* chore: fix conflict in trial_balance.js

* chore: fix conflict in tr.csv

* chore: fix conflict in pl.csv

---------

Co-authored-by: Anand Baburajan <[email protected]>
mergify bot added a commit that referenced this pull request Nov 8, 2023
* fix: asset depreciation ledger (#37991)

* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)

# Conflicts:
#	erpnext/accounts/report/balance_sheet/balance_sheet.js
#	erpnext/accounts/report/cash_flow/cash_flow.js
#	erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
#	erpnext/accounts/report/trial_balance/trial_balance.js
#	erpnext/translations/pl.csv
#	erpnext/translations/tr.csv

* chore: fix conflict in balance_sheet.js

* chore: fix conflict in cash_flow.js

* chore: fix conflict in consolidated_financial_statement.js

* chore: fix conflict in trial_balance.js

* chore: fix conflict in tr.csv

* chore: fix conflict in pl.csv

---------

Co-authored-by: Anand Baburajan <[email protected]>
(cherry picked from commit 043dc1b)
mergify bot added a commit that referenced this pull request Nov 8, 2023
* fix: asset depreciation ledger (#37991)

* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'

(cherry picked from commit 9a171db)

# Conflicts:
#	erpnext/accounts/report/balance_sheet/balance_sheet.js
#	erpnext/accounts/report/cash_flow/cash_flow.js
#	erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js
#	erpnext/accounts/report/trial_balance/trial_balance.js
#	erpnext/translations/pl.csv
#	erpnext/translations/tr.csv

* chore: fix conflict in balance_sheet.js

* chore: fix conflict in cash_flow.js

* chore: fix conflict in consolidated_financial_statement.js

* chore: fix conflict in trial_balance.js

* chore: fix conflict in tr.csv

* chore: fix conflict in pl.csv

---------

Co-authored-by: Anand Baburajan <[email protected]>
(cherry picked from commit 043dc1b)

# Conflicts:
#	erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.json
#	erpnext/accounts/report/financial_statements.py
#	erpnext/accounts/report/trial_balance/trial_balance.py
anandbaburajan added a commit that referenced this pull request Nov 8, 2023
fix: asset depreciation ledger (backport #37991) (backport #37992)
frappe-pr-bot pushed a commit that referenced this pull request Nov 8, 2023
## [14.47.1](v14.47.0...v14.47.1) (2023-11-08)

### Bug Fixes

* asset depreciation ledger (backport [#37991](#37991)) ([#37992](#37992)) ([0ac78a9](0ac78a9))
frappe-pr-bot pushed a commit that referenced this pull request Nov 14, 2023
# [14.48.0](v14.47.4...v14.48.0) (2023-11-14)

### Bug Fixes

* asset depreciation ledger (backport [#37991](#37991)) ([#37992](#37992)) ([043dc1b](043dc1b))
* close `Credit Limit Crossed` dialog (backport [#38052](#38052)) ([#38058](#38058)) ([6979c3e](6979c3e))
* COA Importer app related issues ([#37238](#37238)) ([57ce73d](57ce73d))
* german translations of Accounts Settings ([b75aae9](b75aae9))
* indentation issue in the Production Plan Summary report (backport [#38019](#38019)) ([#38068](#38068)) ([c552884](c552884))
* make adjustment entry using stock reconciliation (backport [#37995](#37995)) ([#38008](#38008)) ([984703c](984703c))
* make item field read-only in batch (backport [#38010](#38010)) ([#38033](#38033)) ([424ebd1](424ebd1))
* minor change added to test_case ([6b34568](6b34568))
* minor issue ([0eab723](0eab723))
* new logic for handling revaluation journals ([9c0d80c](9c0d80c))
* pick serial nos from selected batch only ([#37988](#37988)) ([db29180](db29180))
* sales order not assigned to territory orders ([#37905](#37905)) ([#38024](#38024)) ([620f4f2](620f4f2))
* Set right party name in bank transaction ([21b430a](21b430a))
* **translations:** suggestions from review ([4d2169e](4d2169e))
* Use `process.extract` to get the corresponding party doc name of the result ([b0a184e](b0a184e))

### Features

* **accounts_receivable:** test_case added for multi-select customer group ([cf0d936](cf0d936))
* multi-select customer group in AR Report ([935286f](935286f))
frappe-pr-bot pushed a commit that referenced this pull request Nov 16, 2023
# [15.1.0](v15.0.0...v15.1.0) (2023-11-16)

### Bug Fixes

* `PermissionError` while creating DN from SO (backport [#37758](#37758)) ([#37768](#37768)) ([e742310](e742310))
* `TypeError` in PR for non-stock item (backport [#37819](#37819)) ([#37842](#37842)) ([847dd9e](847dd9e))
* add translation wrapper (backport [#37911](#37911)) ([#37947](#37947)) ([915ca47](915ca47))
* asset depreciation ledger (backport [#37991](#37991)) ([#37993](#37993)) ([b3562bd](b3562bd))
* avoid name clash in delivery stop (backport [#37306](#37306)) ([#37702](#37702)) ([bfd240a](bfd240a))
* close `Credit Limit Crossed` dialog (backport [#38052](#38052)) ([#38059](#38059)) ([cff56d4](cff56d4))
* COA Importer app related issues ([#37238](#37238)) ([d5bf7a0](d5bf7a0))
* consider reserved stock while cancelling a stock transaction (backport [#37754](#37754)) ([#37906](#37906)) ([e0b0b6b](e0b0b6b))
* credit note receive payment entry ([9781f9b](9781f9b))
* **customer:** contact creation for companies ([#38055](#38055)) ([fc09d75](fc09d75))
* **customer:** quick form and integration fixes ([#37386](#37386)) ([02e2258](02e2258))
* **defaults:** apply discount and provisonal defaults from item group and brand if available (backport [#37466](#37466)) ([#37704](#37704)) ([f382b1c](f382b1c))
* deprecate unused create_contact ([6f2b34e](6f2b34e))
* don't reset rate if greater than zero in standalone debit note (backport [#37935](#37935)) ([#37941](#37941)) ([e156564](e156564))
* force delete removed report (backport [#37668](#37668)) ([#37670](#37670)) ([a871d95](a871d95))
* handle gle for standalone credit and debit notes ([6e463b1](6e463b1))
* Identical items are added line by line instead of grouped together in POS ([#37986](#37986)) ([011cf3d](011cf3d))
* ignore Stock Reservation for future dated PR (backport [#37979](#37979)) ([#37990](#37990)) ([d74f0ef](d74f0ef))
* In-Transit Warehouse company filter (backport [#37796](#37796)) ([#37798](#37798)) ([254ec2c](254ec2c))
* incorrect material request quantity in production plan (backport [#37785](#37785)) ([#37790](#37790)) ([8b3c4a9](8b3c4a9))
* indentation issue in the Production Plan Summary report (backport [#38019](#38019)) ([#38069](#38069)) ([6d325a4](6d325a4))
* indexing on Delivery Note Item (backport [#37766](#37766)) ([#37778](#37778)) ([98a7c17](98a7c17))
* link between parent and child procedure (backport [#37903](#37903)) ([#37944](#37944)) ([a065f22](a065f22))
* list index out of range (backport [#37890](#37890)) ([#37920](#37920)) ([e71ef10](e71ef10))
* make `Material Request Item` required if `Material Request` is set in PO (backport [#37928](#37928)) ([#37937](#37937)) ([7ad0817](7ad0817))
* make adjustment entry using stock reconciliation (backport [#37995](#37995)) ([#38009](#38009)) ([b23fa1f](b23fa1f))
* make changes that enable gantt view for job cards (backport [#37661](#37661)) ([#37757](#37757)) ([f132552](f132552))
* make item field read-only in batch (backport [#38010](#38010)) ([#38034](#38034)) ([99b7cdb](99b7cdb))
* make project page translatable (backport [#37743](#37743)) ([#37801](#37801)) ([59e67cd](59e67cd))
* Mark Status field in Payment Entry 'no_copy'. ([#38000](#38000)) ([3c0f8b1](3c0f8b1))
* minor change added to test_case ([b1714ec](b1714ec))
* minor issue ([24be044](24be044))
* **minor:** set tax values for item variants (backport [#37674](#37674)) ([#37739](#37739)) ([5c46d74](5c46d74))
* new logic for handling revaluation journals ([fb71a6e](fb71a6e))
* Not able to save subcontracting receipt ([#38085](#38085)) ([a874997](a874997))
* **packed_item:** ensure proper names for ref integrity (backport [#37597](#37597)) ([#37794](#37794)) ([9aa29f5](9aa29f5))
* permission error while creating Supplier Quotation from Portal (backport [#37864](#37864)) ([#37871](#37871)) ([be8399f](be8399f))
* **plaid:** Do not sync pending transactions ([2149de4](2149de4))
* POS change amount gl entry with no amount ([#37799](#37799)) ([fd7a768](fd7a768))
* Quality Inspection Parameter migration - DuplicateEntryError due to case sensitivity (backport [#37499](#37499)) ([#37917](#37917)) ([7d0f1f4](7d0f1f4))
* remove from or target warehouse for non internal transfer entries (backport [#37612](#37612)) ([#37627](#37627)) ([3155790](3155790))
* remove validation for negative outstanding invoices ([8602a3e](8602a3e))
* remove voucher type and no for Item and Warehouse based reposting ([b96be67](b96be67))
* sales order not assigned to territory orders (backport [#37905](#37905)) ([#38025](#38025)) ([40cc3a7](40cc3a7))
* skip check for removed validation ([22e58e0](22e58e0))
* sort by section code ([06bb1a3](06bb1a3))
* standard submit perm in repost ledger for editable invoices (backport [#37826](#37826)) ([#37855](#37855)) ([71361f7](71361f7))
* status for over delivery or billing ([95d6742](95d6742))
* test for invoice returns ([a89af58](a89af58))
* type error on new payment entry ([5937135](5937135))
* typo in AR report ([fc3d303](fc3d303))
* typo in function name and msg (backport [#37722](#37722)) ([#37741](#37741)) ([4819fde](4819fde))
* unsupported operand type(s) for serial and batch bundle in POS Invoice (backport [#37721](#37721)) ([#37731](#37731)) ([b03c65f](b03c65f))
* use get_all instead of get_list ([2a5b3bd](2a5b3bd))
* validate so item with qtn ([71538cf](71538cf))
* valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (backport [#38094](#38094)) (backport [#38097](#38097)) ([#38101](#38101)) ([880cea5](880cea5))

### Features

* **accounts_receivable:** test_case added for multi-select customer group ([848efe8](848efe8))
* add cols for supplier inv details ([e51e5b3](e51e5b3))
* allow return of components for SCO that don't have SCR created (backport [#37686](#37686)) ([#37693](#37693)) ([4044325](4044325))
* auto reserve stock for Sales Order on purchase (backport [#37603](#37603)) ([#37648](#37648)) ([da5bf50](da5bf50))
* **delivery:** link to delivery notes list view from delivery trip (backport [#37604](#37604)) ([#37696](#37696)) ([08ea62f](08ea62f))
* multi-select customer group in AR Report ([fff294f](fff294f))
* proprietorship & partnership options in entity type ([6df125a](6df125a))
* reserved production plan sub assembly items (backport [#37884](#37884)) ([#37927](#37927)) ([df90fd7](df90fd7))
* settings page for repost ([c047fd7](c047fd7))
* **Stock Balance:** add filters from route (backport [#37836](#37836)) ([#37840](#37840)) ([fad8228](fad8228))

### Performance Improvements

* Add index to supplier invoice field (backport [#37861](#37861)) ([#37863](#37863)) ([b1982a6](b1982a6))
* index return against for purchase invoice (backport [#37881](#37881)) ([#37883](#37883)) ([febd20a](febd20a))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant