Merge pull request #22512 from AfshanKhan/FR_ISS_204863

feat: Autofill Supplier pop-up when only 1 Supplier in RFQ
This commit is contained in:
Marica 2020-07-01 11:56:42 +05:30 committed by GitHub
commit 25b6c5d55a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,8 @@ frappe.ui.form.on("Request for Quotation",{
{ "fieldtype": "Select", "label": __("Supplier"),
"fieldname": "supplier",
"options": doc.suppliers.map(d => d.supplier),
"reqd": 1 },
"reqd": 1,
"default": doc.suppliers.length === 1 ? doc.suppliers[0].supplier_name : "" },
{ "fieldtype": "Button", "label": __('Create Supplier Quotation'),
"fieldname": "make_supplier_quotation", "cssClass": "btn-primary" },
]