Ankush Menat
3 years ago
committed by
Ankush Menat
2 changed files with 19 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||
# Copyright (c) 2021, Frappe and Contributors |
|||
# License: GNU General Public License v3. See license.txt |
|||
|
|||
import frappe |
|||
|
|||
|
|||
def execute(): |
|||
|
|||
job_card = frappe.qb.DocType("Job Card") |
|||
(frappe.qb |
|||
.update(job_card) |
|||
.set(job_card.status, "Completed") |
|||
.where( |
|||
(job_card.docstatus == 1) |
|||
& (job_card.for_quantity <= job_card.total_completed_qty) |
|||
& (job_card.status.isin(["Work In Progress", "Material Transferred"])) |
|||
) |
|||
).run() |
Loading…
Reference in new issue