Pause button not working in Job Card

The pause button which appears once we start the Job Card, is not working and throwing “Error: Job Card Time Log Row #5: Value missing for: Completed Qty” error.

Possible source is erpnext/manufacturing/doctype/job_card/job_card.py, in line 491

		if last_row and args.get("complete_time"):
			for row in self.time_logs:
				if not row.to_time:
					row.update(
						{
							"to_time": get_datetime(args.get("complete_time")),
							"operation": args.get("sub_operation"),
							**"completed_qty": (args.get("completed_qty") if last_row.idx == row.idx else 0.0)**,
						}
					)

I think in the older version the same line was ‘completed_qty": args.get(“completed_qty”) or 0.0,’

ERPNext Version 16.0.0-dev

Hi @Krish_Vyas,

Can you explain the process flow? please explain it step by step, for a better understanding because we checked in dev branch but no issue found.

Hi @NCP, so the let us take an example to understand the process flow:
Consider there is a BOM created for any product, when we start the manufacturing process i.e., production plan → work order → job card, till job card everything goes smoothly, now when I start the job by clicking on ‘Start’ button the process is started and time is calculated, now take a scenario where the job is not yet completed but due to some reason I need to pause the time, so when I click the ‘Pause’ button the above mentioned error is seen.
I hope this explains the scenario to you, if not then let me know I will be explaining it in more detail.

Let me check, is it worked in v15?

Yes it was working finely!

Hi @NCP, any updates on this?

Will check when I’m free because that for i have to configure the flow.

Sure. No issues :slight_smile:

Hi @NCP, can you please look into the problem ASAP, because my things in my project depends on it

The issue is in both version 15 and dev.

Okay!! So has the code been updated now?

No, please raise the issue on GitHub.

1 Like