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: validate negative stock for inventory dimension #37373

Conversation

rohitwaghchaure
Copy link
Collaborator

@rohitwaghchaure rohitwaghchaure commented Oct 5, 2023

In the inventory dimension added provision to enable / disable validate negative stock

Screenshot 2023-10-05 at 6 10 16 PM

If the stock not exists then system will throw below error

Screenshot 2023-10-05 at 6 01 24 PM

Added validation to restrict the use of stock reconciliation with inventory dimensions for modifying quantity or valuation. User can only use the stock reconciliation with inventory dimensions to enter opening values. Since we are not maintaining inventory dimensions wise valuation rate there is not sense to allow to modify valuation rate through stock reco.

image

docs https://docs.erpnext.com/docs/user/manual/en/inventory_dimension#validate-negative-stock
Fixed #34785

@github-actions github-actions bot added needs-tests This PR needs automated unit-tests. stock labels Oct 5, 2023
@rohitwaghchaure rohitwaghchaure force-pushed the fixed-valudate-negative-stock-for-inventory-dimension branch 2 times, most recently from 06fab5f to 66a726e Compare October 6, 2023 08:44
@rohitwaghchaure rohitwaghchaure force-pushed the fixed-valudate-negative-stock-for-inventory-dimension branch from 66a726e to bbd34ac Compare October 6, 2023 08:49
@rohitwaghchaure rohitwaghchaure merged commit 1480aca into frappe:version-14-hotfix Oct 6, 2023
@rohitwaghchaure rohitwaghchaure added backport develop instructs mergify to frontport PR to develop branch and removed needs-tests This PR needs automated unit-tests. labels Oct 6, 2023
mergify bot pushed a commit that referenced this pull request Oct 6, 2023
* feat: validate negative stock for inventory dimension

* test: test case for validate negative stock for inv dimension

(cherry picked from commit 1480aca)

# Conflicts:
#	erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
#	erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
#	erpnext/stock/stock_ledger.py
frappe-pr-bot pushed a commit that referenced this pull request Oct 12, 2023
# [14.44.0](v14.43.1...v14.44.0) (2023-10-12)

### Bug Fixes

* added validation for the batch on stock reco ([#37174](#37174)) ([4c337a6](4c337a6))
* ageing summary in AR ([15d2024](15d2024))
* allocate amt for payment term invoices ([b22ac13](b22ac13))
* call validate before setting repost flag ([bec3e8e](bec3e8e))
* do not run bg job for single doc ([4123e7b](4123e7b))
* **Employee:** enable `no_copy` for `relieving_date` (backport [#37344](#37344)) ([#37358](#37358)) ([2b38b78](2b38b78))
* exception on exporting errored rows ([e58b3b1](e58b3b1))
* fetch company details for Lead based quotation ([c1d40a6](c1d40a6))
* fetch dependent task subject and project (backport [#37401](#37401)) ([#37421](#37421)) ([0aad942](0aad942))
* ignore cancelled gle in voucher-wise balance report ([#36417](#36417)) ([ee1255a](ee1255a))
* incorrect status of the returned purchase receipt ([#37300](#37300)) ([63f4573](63f4573))
* linting issues ([6c8a65e](6c8a65e))
* negative valuation rate in PR return ([#37424](#37424)) ([26ad688](26ad688))
* payment request rounding in multi-currency and on status update ([eed5863](eed5863))
* production plan reserved qty incorrect calculation (backport [#37400](#37400)) ([#37458](#37458)) ([573b159](573b159))
* split inv allocated amt on server side ([06b0477](06b0477))
* typo in doctype name and qb ([606c99e](606c99e))
* **ux:** allow MR to Stop until fully received (backport [#37452](#37452)) ([#37456](#37456)) ([fb0b426](fb0b426))
* validation for si ([3dc68e3](3dc68e3))

### Features

* add repost btn in invoice ([cde848d](cde848d))
* allow on submit fields ([f5245f6](f5245f6))
* allow repost for pi ([2d13dda](2d13dda))
* composite WIP asset ([#37352](#37352)) ([0ecd7d2](0ecd7d2))
* disable currency exchange api. ([#33593](#33593)) ([1ca0516](1ca0516))
* filter on voucher no ([cb35218](cb35218))
* introduce unreconcile doctype ([ae8355c](ae8355c))
* UI for unreconcile ([9531a45](9531a45))
* unreconcile support for journal entry ([cd2d335](cd2d335))
* validate negative stock for inventory dimension ([#37373](#37373)) ([1480aca](1480aca))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.44.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

rohitwaghchaure added a commit that referenced this pull request Oct 16, 2023
… (#37383)

* feat: validate negative stock for inventory dimension (#37373)

* feat: validate negative stock for inventory dimension

* test: test case for validate negative stock for inv dimension

(cherry picked from commit 1480aca)

# Conflicts:
#	erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
#	erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
#	erpnext/stock/stock_ledger.py

* chore: fix conflicts

* chore: fix conflicts

* chore: fix conflicts

* chore: fix linter issue

* chore: fix linter issue

* chore: fix linter issue

* chore: fix linter issue

* chore: fix linter issue

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport develop instructs mergify to frontport PR to develop branch released stock
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants