Checkbox has_expiry_date in Item to make suer Expiry Date is entered in Batch (#11413)
This commit is contained in:
parent
1077c782a3
commit
e59c9ce9f4
@ -24,6 +24,11 @@ frappe.ui.form.on('Batch', {
|
||||
frm.trigger('make_dashboard');
|
||||
}
|
||||
},
|
||||
item: (frm) => {
|
||||
frappe.db.get_value('Item', {name: frm.doc.item}, 'has_expiry_date', (r) => {
|
||||
frm.toggle_reqd('expiry_date', r.has_expiry_date);
|
||||
});
|
||||
},
|
||||
make_dashboard: (frm) => {
|
||||
if(!frm.is_new()) {
|
||||
frappe.call({
|
||||
|
@ -1183,6 +1183,37 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "has_batch_no",
|
||||
"fieldname": "has_expiry_date",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Has Expiry Date",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_on_submit": 0,
|
||||
@ -3329,7 +3360,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 1,
|
||||
"modified": "2017-10-25 14:08:02.948326",
|
||||
"modified": "2017-11-01 11:53:52.060505",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item",
|
||||
|
Loading…
Reference in New Issue
Block a user