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(capitalization): debit cwip account instead of fixed asset account #42857

Merged
merged 10 commits into from
Aug 29, 2024

Conversation

khushi8112
Copy link
Member

Problem:
The current asset capitalization process is incorrectly booking amounts directly into the Asset Account instead of the Capital Work in Progress (CWIP) account when a WIP composite asset is selected. Despite enable_cwip_accounting=1 being set and the CWIP account configured for the asset category, the system bypasses the CWIP account.

  • When an asset is created and capitalized, the expected behavior is that the amount should first be booked into the CWIP account if the asset is designated as a WIP composite asset.
  • Once the asset is fully completed and ready to be used, the amount should then be transferred from the CWIP account to the Fixed Asset Account.

gl_entries_test = get_gl_entries("Asset Capitalization", asset_capitalization)

# Return if GL entry's account matches the target fixed asset account
if gl_entries_test and gl_entries_test[0].account == target_fixed_asset_account:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are chances of debiting multiple accounts from asset capitalization. Hence, don't compare zero-th element to target_fixed_asset_account. Instead, get_gl_entries should return gle for only target_fixed_asset_account.

@nabinhait nabinhait merged commit 5d99f17 into frappe:develop Aug 29, 2024
13 checks passed
mergify bot pushed a commit that referenced this pull request Aug 29, 2024
#42857)

* fix(capitalization): debit cwip account instead of fixed asset account

* fix: post entries for capitalized asset through background jobs

* chore: run pre-commit

* fix: correct GL entries posting for composite assets

* fix(minor): resolve failing check

* chore: update gl entry check logic

* chore: handle none values

(cherry picked from commit 5d99f17)
khushi8112 added a commit that referenced this pull request Aug 29, 2024
…-42857

fix(capitalization): debit cwip account instead of fixed asset account (backport #42857)
frappe-pr-bot pushed a commit that referenced this pull request Sep 5, 2024
## [15.34.1](v15.34.0...v15.34.1) (2024-09-05)

### Bug Fixes

* add the company in payment request bcz delete company transactions (backport [#42664](#42664)) ([#42982](#42982)) ([42e7725](42e7725))
* added app permission check for apps page ([a35ce12](a35ce12))
* adjust price insertion logic for internal suppliers/customers ([#42988](#42988)) ([daa75ee](daa75ee))
* auto reorder material request mail issue (backport [#43066](#43066)) ([#43068](#43068)) ([d2b2002](d2b2002))
* **capitalization:** debit cwip account instead of fixed asset account ([#42857](#42857)) ([f3c60ea](f3c60ea))
* company accounts setup_queries ([b99cdb5](b99cdb5))
* disabled batches showing in the list (backport [#43024](#43024)) ([#43069](#43069)) ([56dad7d](56dad7d))
* don't allow capitalizing only service item for new composite asset ([a833010](a833010))
* improve asset item matching logic ([3bb1867](3bb1867))
* indentation ([4d7c0c0](4d7c0c0))
* link Purchase Invoice and Receipt Items to Asset ([1121c66](1121c66))
* retain date filter when redirecting in Profit and Loss report ([f0e3fb4](f0e3fb4))
* typeerror on Payment Entry ([6d51d14](6d51d14))
* typerror on default_currency ([7d6984c](7d6984c))
* update develop_version in hooks ([6c8e0fd](6c8e0fd))
* validate component quantity according to BOM (backport [#43011](#43011)) ([#43014](#43014)) ([fee2255](fee2255))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants