Custom Script For Due Date

Dear All
I attached a screen shot sales invoice form. I added some custom fields in it. One of bill of lading date field. I need to calculate due based on bill of lading date with plus 90 days.
Kindly can any of you write a custom script for this or guide me how to create it. thanks .
please find the attachmentCapture .

Enter this in client script of Sales Invoice form, make sure to check the field name as per your Sales Invoice Form.

   cur_frm.cscript.bill_of_lading_date = function(doc, cdt, cd){
    cur_frm.set_value("payment_due_date", frappe.datetime.add_days(doc.bill_of_lading_date, 90));