Skip to content

Commit

Permalink
Merge pull request #35756 from rohitwaghchaure/fixed-stock-entry-not-…
Browse files Browse the repository at this point in the history
…able-to-save

fix: validation of job card in stock entry
  • Loading branch information
rohitwaghchaure authored Jun 17, 2023
2 parents 9fb6fc5 + df8c3f0 commit c51e6db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/stock/doctype/stock_entry/stock_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ def validate_job_card_item(self):
return

for row in self.items:
if row.job_card_item:
if row.job_card_item or not row.s_warehouse:
continue

msg = f"""Row #{0}: The job card item reference
msg = f"""Row #{row.idx}: The job card item reference
is missing. Kindly create the stock entry
from the job card. If you have added the row manually
then you won't be able to add job card item reference."""
Expand Down

0 comments on commit c51e6db

Please sign in to comment.