Frappe Client Script

I’m facing an issue with a certain client script. I have a doctype called Quotation which has a field called free_mileage_per_day. I also have another doctyp called Sales Invoice. When the Sales Invoice is created, it must be a Sales Invoice of a particular Quotation which means that these 2 doctypes are lniked. Inside the Sales Invoice client script, I want to get a value from the field free_mileage_per_day from a Quotation that is currently selected and use it inside the Sales Invoice. The challange is to get the for the current Quotation, how can I do that

Hi,

Go to Customization of Sales Invoice and on the field of free_mileage_per_day, set the fetch from as follows:

quotation.free_mileage_per_day

this will automatically fetch the value from quotation to Sales Invoice if quotation reference is already available in sales invoice screen.

Thanks,

Divyesh M.

Thanks very much, let me try that