fix: added validation for insufficient stock during stock transfer
This commit is contained in:
@@ -68,6 +68,26 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
|
||||
}
|
||||
});
|
||||
|
||||
if (this.frm.doc.doctype === 'Stock Entry'
|
||||
&& this.frm.doc.purpose === 'Manufacture') {
|
||||
fields.push({
|
||||
fieldtype: 'Column Break',
|
||||
});
|
||||
|
||||
fields.push({
|
||||
fieldtype: 'Link',
|
||||
fieldname: 'work_order',
|
||||
label: __('For Work Order'),
|
||||
options: 'Work Order',
|
||||
read_only: 1,
|
||||
default: this.frm.doc.work_order,
|
||||
});
|
||||
|
||||
fields.push({
|
||||
fieldtype: 'Section Break',
|
||||
});
|
||||
}
|
||||
|
||||
fields.push({
|
||||
fieldtype: 'Column Break',
|
||||
});
|
||||
@@ -101,22 +121,6 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.frm.doc.doctype === 'Stock Entry'
|
||||
&& this.frm.doc.purpose === 'Manufacture') {
|
||||
fields.push({
|
||||
fieldtype: 'Column Break',
|
||||
});
|
||||
|
||||
fields.push({
|
||||
fieldtype: 'Link',
|
||||
fieldname: 'work_order',
|
||||
label: __('For Work Order'),
|
||||
options: 'Work Order',
|
||||
read_only: 1,
|
||||
default: this.frm.doc.work_order,
|
||||
});
|
||||
}
|
||||
|
||||
if (this.item?.outward) {
|
||||
fields = [...this.get_filter_fields(), ...fields];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user