My workflow currently is to create a Timesheet for the work done then using the “Create Sales Invoice” button to generate the invoice. 1 invoice for 1 time sheet. Issue is that different customers have different Price Lists based on the contract, this is specified for each customer. If I create a Sales Invoice directly it sets the price list correctly but when I click the “Create Sales Invoice” from a submitted Timesheet it always defaults to the “Standard Selling” price list.
ERPNext 13.21.0
Frappe 13.21.0
create a new client script for Sales Invoice like below
code for easy copy
frappe.ui.form.on('Sales Invoice', {
onload(frm){
if (frm.is_new()){
frm.trigger('customer');
}
}
}
other code in the screen shot can be ignored.
Worked perfectly after clearing cache, Thanks!