fix: validation of job card in stock entry

(cherry picked from commit df8c3f0888)
(cherry picked from commit ce2bf5fb1c)
This commit is contained in:
Rohit Waghchaure
2023-06-17 12:14:32 +05:30
committed by Mergify
parent 7ffa6b4fbd
commit e7abdc34d0

View File

@@ -268,10 +268,10 @@ class StockEntry(StockController):
return return
for row in self.items: for row in self.items:
if row.job_card_item: if row.job_card_item or not row.s_warehouse:
continue 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 is missing. Kindly create the stock entry
from the job card. If you have added the row manually from the job card. If you have added the row manually
then you won't be able to add job card item reference.""" then you won't be able to add job card item reference."""