diff --git a/erpnext/education/doctype/student/student.js b/erpnext/education/doctype/student/student.js index 2c933e28b7..b6e741c4da 100644 --- a/erpnext/education/doctype/student/student.js +++ b/erpnext/education/doctype/student/student.js @@ -27,3 +27,16 @@ frappe.ui.form.on('Student', { } } }); + +frappe.ui.form.on('Student Guardian', { + guardians_add: function(frm){ + frm.fields_dict['guardians'].grid.get_field('guardian').get_query = function(doc){ + var guardian_list = []; + if(!doc.__islocal) guardian_list.push(doc.guardian); + $.each(doc.guardians, function(idx, val){ + if (val.guardian) guardian_list.push(val.guardian); + }); + return { filters: [['Guardian', 'name', 'not in', guardian_list]] }; + }; + } +}); diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index a2b85446be..85e81436d1 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -150,7 +150,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( // delivery note if(flt(doc.per_delivered, 6) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) { - this.frm.add_custom_button(__('Delivery'), () => this.make_delivery_note_based_on_delivery_date(), __('Create')); + this.frm.add_custom_button(__('Delivery Note'), () => this.make_delivery_note_based_on_delivery_date(), __('Create')); this.frm.add_custom_button(__('Work Order'), () => this.make_work_order(), __('Create')); }