Checkbox has_expiry_date in Item to make suer Expiry Date is entered in Batch (#11413)

This commit is contained in:
KanchanChauhan 2017-11-10 11:16:29 +05:30 committed by Nabin Hait
parent 1077c782a3
commit e59c9ce9f4
2 changed files with 3312 additions and 3276 deletions

View File

@ -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({

View File

@ -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",