From 7a0a893d08217b3131f2a1d38db7c0be51aed82b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 8 Oct 2024 13:48:36 +0530 Subject: [PATCH] fix: validation for corrective job card (#43555) --- erpnext/manufacturing/doctype/job_card/job_card.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 100ca45a9f0..3fcabc47853 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -689,7 +689,12 @@ class JobCard(Document): self.set_transferred_qty() def validate_transfer_qty(self): - if not self.finished_good and self.items and self.transferred_qty < self.for_quantity: + if ( + not self.finished_good + and 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}"