fix: validation for corrective job card (backport #43555) (backport #43558) (#43628)

fix: validation for corrective job card (backport #43555) (#43558)

* fix: validation for corrective job card (#43555)

(cherry picked from commit 7a0a893d08)

# Conflicts:
#	erpnext/manufacturing/doctype/job_card/job_card.py

* chore: fix conflicts

* chore: fix linters issue

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit cf0fa0db7b)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 1f099752d2)
This commit is contained in:
mergify[bot]
2024-10-12 18:32:30 +05:30
committed by Mergify
parent e9dbbbe324
commit ea0f044c48

View File

@@ -521,7 +521,7 @@ class JobCard(Document):
self.set_transferred_qty()
def validate_transfer_qty(self):
if self.items and self.transferred_qty < self.for_quantity:
if not self.is_corrective_job_card and self.items and self.transferred_qty < self.for_quantity:
frappe.throw(
_(
"Materials needs to be transferred to the work in progress warehouse for the job card {0}"