Browse Source

fix: Collapse Scrap Items in Job Card (#28362)

develop
Sagar Sharma 3 years ago
committed by GitHub
parent
commit
a424310581
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      erpnext/manufacturing/doctype/job_card/job_card.js
  2. 3
      erpnext/manufacturing/doctype/job_card/job_card.json

6
erpnext/manufacturing/doctype/job_card/job_card.js

@ -23,6 +23,12 @@ frappe.ui.form.on('Job Card', {
);
},
onload: function(frm) {
if (frm.doc.scrap_items.length == 0) {
frm.fields_dict['scrap_items_section'].collapse();
}
},
refresh: function(frm) {
frappe.flags.pause_job = 0;
frappe.flags.resume_job = 0;

3
erpnext/manufacturing/doctype/job_card/job_card.json

@ -396,6 +396,7 @@
"options": "Batch"
},
{
"collapsible": 1,
"fieldname": "scrap_items_section",
"fieldtype": "Section Break",
"label": "Scrap Items"
@ -411,7 +412,7 @@
],
"is_submittable": 1,
"links": [],
"modified": "2021-09-14 00:38:46.873105",
"modified": "2021-11-12 10:15:03.572401",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Job Card",

Loading…
Cancel
Save