Try ERPNext Buy Support Partners Foundation

Overriding erpnext js function using custom app

Hi All,
i am trying to add project field in delivery note pop-up(In get items from button)

by default in erpnext as below

how i need to be as below

i found the function to get this pop up in erpnext .

frappe.provide("erpnext.accounts");
erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.extend({
delivery_note_btn: function() {
	var me = this;
	this.$delivery_note_btn = this.frm.add_custom_button(__('Delivery Note'),
		function() {
			erpnext.utils.map_current_doc({
				method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
				source_doctype: "Delivery Note",
				target: me.frm,
				date_field: "posting_date",
				setters: {
					customer: me.frm.doc.customer || undefined
                   // i need to add as this 
                  //project: me.frm.doc.project|| undefined
				},
				get_query: function() {
					var filters = {
						docstatus: 1,
						company: me.frm.doc.company,
						is_return: 0
					};
					if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
                     // i need to set project filter as this
                    //if(me.frm.doc.customer) filters["project"] = me.frm.doc.project;
					return {
						query: "erpnext.controllers.queries.get_delivery_notes_to_be_billed",
                        //i have custom function to replace this in my custom app
						filters: filters
					};
				}
			});
		}, __("Get items from"));
},
});
// for backward compatibility: combine new and previous states
$.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_frm}));

please help me to solve this

@ROHAN_JAIN1