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: exclude already consumed purchase receipt items from asset capitalization (backport #46329) #46336

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 5, 2025

Previously, when selecting "Choose a WIP Composite Asset", the system was including assets/stock items that had already been capitalized. This fix ensures that only eligible assets/stock items are fetched, preventing duplicate capitalization.

Before:

REC-20250305160303.mp4

After:

REC-20250305160635.mp4

This is an automatic backport of pull request #46329 done by [Mergify](https://mergify.com).

…alization (#46329)

* feat: link purchase receipt row item to capitalization

* fix: avoid fetching already consumed stock and asset items during capitalization

* fix(patch): added patch to link purchase receipt item to stock item child table

* fix: added nosemgrep

* refactor: rename  to

(cherry picked from commit f50d479)

# Conflicts:
#	erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json
#	erpnext/patches.txt
Copy link
Contributor Author

mergify bot commented Mar 5, 2025

Cherry-pick of f50d479 has failed:

On branch mergify/bp/version-15-hotfix/pr-46329
Your branch is up to date with 'origin/version-15-hotfix'.

You are currently cherry-picking commit f50d479bfd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   erpnext/assets/doctype/asset_capitalization/asset_capitalization.js
	modified:   erpnext/assets/doctype/asset_capitalization/asset_capitalization.py
	modified:   erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.py
	new file:   erpnext/patches/v15_0/set_purchase_receipt_row_item_to_capitalization_stock_item.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/assets/doctype/asset_capitalization_stock_item/asset_capitalization_stock_item.json
	both modified:   erpnext/patches.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Mar 5, 2025
@khushi8112 khushi8112 merged commit 6c1ceff into version-15-hotfix Mar 5, 2025
11 checks passed
@khushi8112 khushi8112 deleted the mergify/bp/version-15-hotfix/pr-46329 branch March 5, 2025 12:37
frappe-pr-bot pushed a commit that referenced this pull request Mar 5, 2025
# [15.54.0](v15.53.4...v15.54.0) (2025-03-05)

### Bug Fixes

* Accounting Period validation throwing for different companies ([6df9cf3](6df9cf3))
* Add company filter at get_invoice method (backport [#46238](#46238)) ([#46299](#46299)) ([4f80ddd](4f80ddd))
* Add permission check in POS's `Toggle Recent Orders` (backport [#46010](#46010)) ([#46274](#46274)) ([7759775](7759775))
* adding cost center on pos invoice items while applying product discount (backport [#46082](#46082)) ([#46322](#46322)) ([9a433a6](9a433a6))
* **asset depreciation schedules:** enable auto commit ([899e468](899e468))
* auto allocation for negative amount outstanding for Customers in Payment Entry ([78a329e](78a329e))
* Batch Price gets updated only if it is a billed item ([dbd47df](dbd47df))
* Batch Price gets updated only if it is a billed item ([8ed512f](8ed512f))
* change voucher_type and voucher_no field type to data ([3a03865](3a03865))
* Close and Reopen buttons dissapear after saving changes ([#46048](#46048)) ([506dd3c](506dd3c))
* consider journal entry and return invoice in paid_amount calculation (backport [#46129](#46129)) ([#46319](#46319)) ([836fd8f](836fd8f))
* consolidate gl entries by project in General Ledger Report (backport [#46314](#46314)) ([#46321](#46321)) ([6aa8803](6aa8803))
* Convert tuple of tuples to list of dicts for dot notation access ([#46062](#46062)) ([ef19551](ef19551))
* delivery note from sales order uom conversion mistake ([d10add4](d10add4))
* depreciation and balances report correction (backport [#46259](#46259)) ([#46305](#46305)) ([087dde5](087dde5))
* discount accounting for v15 ([f609012](f609012))
* do not include opening invoices in billed items to be received report ([eee500f](eee500f))
* don't allow renaming account while system is actively in use (backport [#46176](#46176)) ([#46210](#46210)) ([faee8d6](faee8d6))
* dont update rate of free item when batch is updated ([9e649d8](9e649d8))
* error ([61d5680](61d5680))
* exclude already consumed purchase receipt items from asset capitalization (backport [#46329](#46329)) ([#46336](#46336)) ([6c1ceff](6c1ceff))
* exclude cancelled gl entries ([5e08386](5e08386))
* fiscal year error ([7b13d8c](7b13d8c))
* fixing test case ([9f4311e](9f4311e))
* if invoice is return then add amount in proper column ([0a65217](0a65217))
* Include additional account types for Expense Account in LCV (backport [#46206](#46206)) ([#46296](#46296)) ([88234bb](88234bb))
* incorrect batch picked ([e94f0b1](e94f0b1))
* incorrect batch picked in the pick list (backport [#45761](#45761)) ([#46315](#46315)) ([5a3073c](5a3073c))
* incorrectly billed amount in the purchase receipt ([c247cf8](c247cf8))
* Naming of Purchase Amount (backport [#46051](#46051)) ([#46324](#46324)) ([aaf35c5](aaf35c5))
* only include submitted docs for internal received quantity validation (backport [#46262](#46262)) ([#46304](#46304)) ([5ae9faa](5ae9faa))
* patch ([5e06e4a](5e06e4a))
* patch ([8f2fdca](8f2fdca))
* patch path ([af49f5a](af49f5a))
* **patch:** Ensure SLE indexes (backport [#46131](#46131)) ([#46135](#46135)) ([f3cafef](f3cafef))
* payment entry exchange gain loss issue ([3fb9033](3fb9033))
* pos item detail serial no field (backport [#46211](#46211)) ([#46212](#46212)) ([de0dfbc](de0dfbc))
* pos item selection using serial no (backport [#46200](#46200)) ([#46203](#46203)) ([0f263bc](0f263bc))
* **pos:** get parent item group without user permission ([#46020](#46020)) ([29f3aac](29f3aac))
* production analytics report ([5668795](5668795))
* rate changing on the deliver note ([75bc68b](75bc68b))
* rearrange stock settings fields ([87703c6](87703c6))
* removed mandatory property for the cost center field ([a94292a](a94292a))
* rename some sla fields ([c5717b9](c5717b9))
* replacing serial and batch bundle on pos with auto fetch serial nos (backport [#46236](#46236)) ([#46337](#46337)) ([1e85f69](1e85f69))
* **report:** allow `Closed` purchase orders to be visible ([20c4487](20c4487))
* **report:** allow `Closed` sales orders to be visible ([8799af9](8799af9))
* **report:** filter sales / purchase orders based on date filters ([2221bf1](2221bf1))
* revamp logic (split parent and child) ([7437cea](7437cea))
* revert last commit ([a09c57f](a09c57f))
* set landed cost based on purchase invoice rate ([fdaf5fa](fdaf5fa))
* set taxes before calculating taxes and totals ([90dea42](90dea42))
* source warehouse not fetched in bom creator ([6157fed](6157fed))
* stock qty not recalculate on changing of the qty ([331798b](331798b))
* stock reservation issue while making Purchase Invoice ([8bd7195](8bd7195))
* syntax error ([1790bcc](1790bcc))
* syntax error ([bd48d39](bd48d39))
* syntax error ([cc535b7](cc535b7))
* test case for debit note ([a8b31df](a8b31df))
* tests ([46b0734](46b0734))
* tests ([d413039](d413039))
* translation DE ([ddcf79d](ddcf79d))
* use else instead of unnecessary elif ([6f760d1](6f760d1))
* use valuation method from settings in stock ageing report (backport [#46068](#46068)) ([#46297](#46297)) ([d02d005](d02d005))
* use value from currency exchange when exchange api is disabled (backport [#46137](#46137)) ([#46309](#46309)) ([ccc0358](ccc0358))
* **workspace:** enable is_query_report on purchase reports (backport [#46249](#46249)) ([#46306](#46306)) ([363129b](363129b))
* Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (backport [#46146](#46146)) ([#46310](#46310)) ([1ff0858](1ff0858))

### Features

* add new Closed and Stopped rows ([7749814](7749814))
* add total weight in shipment ([#46049](#46049)) ([171df3a](171df3a))
* create sales invoice print format ([#45403](#45403)) ([1a382eb](1a382eb))
* **received items to be billed:** add company and date filters (backport [#46271](#46271)) ([#46302](#46302)) ([400f4f3](400f4f3))
* **Sales Invoice:** add items row via "Fetch Timesheet" (backport [#46071](#46071)) ([#46311](#46311)) ([1c6e464](1c6e464))

### Performance Improvements

* don't track seen for POS Invoice (backport [#46187](#46187)) ([#46189](#46189)) ([41ab7f3](41ab7f3))
* patch ([ee41e55](ee41e55))
* replace if function in query ([d0b8e0d](d0b8e0d))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant