Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ebd3c3

Browse files
AravindPraneranabinhait
authored andcommitted
Getting Quotation Document in Sales Invoice
1 parent b8b8dc1 commit 0ebd3c3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

erpnext/accounts/doctype/sales_invoice/sales_invoice.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,26 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
157157
})
158158
}, __("Get items from"));
159159
},
160+
161+
quotation_btn: function() {
162+
var me = this;
163+
this.$quotation_btn = this.frm.add_custom_button(__('Quotation'),
164+
function() {
165+
erpnext.utils.map_current_doc({
166+
method: "erpnext.selling.doctype.quotation.quotation.make_quotation",
167+
source_doctype: "Quotation",
168+
target: me.frm,
169+
setters: {
170+
customer: me.frm.doc.customer || undefined,
171+
},
172+
get_query_filters: {
173+
docstatus: 1,
174+
status: ["!=", "Lost"],
175+
company: me.frm.doc.company
176+
}
177+
})
178+
}, __("Get items from"));
179+
},
160180

161181
delivery_note_btn: function() {
162182
var me = this;

0 commit comments

Comments
 (0)