mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-22 18:59:58 +00:00
fix: don't demand raw material transfer for semi FG job cards on submit
validate_transfer_qty uses an empty finished_good to detect legacy job cards, and unlike validate_semi_finished_goods it ignores skip_material_transfer. A job card tracking semi finished goods whose operation had no finished_good fell into the legacy branch and could not be submitted even with 'Skip Material Transfer' checked on the work order. Return early for semi FG job cards; validate_semi_finished_goods already enforces the transfer requirement for them and honours skip_material_transfer.
This commit is contained in:
@@ -891,6 +891,9 @@ class JobCard(Document):
|
||||
frappe.msgprint(message, alert=True, indicator="orange")
|
||||
|
||||
def validate_transfer_qty(self):
|
||||
if self.track_semi_finished_goods:
|
||||
return
|
||||
|
||||
if (
|
||||
not self.finished_good
|
||||
and not self.is_corrective_job_card
|
||||
|
||||
Reference in New Issue
Block a user