Skip to content

Commit

Permalink
fix: ignore item-less maintenance visit for sr no (#30684)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush authored Apr 12, 2022
1 parent 7d263e9 commit 60fb71b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ frappe.ui.form.on('Maintenance Visit', {
// filters for serial no based on item code
if (frm.doc.maintenance_type === "Scheduled") {
let item_code = frm.doc.purposes[0].item_code;
if (!item_code) {
return;
}
frappe.call({
method: "erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule.get_serial_nos_from_schedule",
args: {
Expand Down

0 comments on commit 60fb71b

Please sign in to comment.