Hi Everyone,
I had a client who needs to put the delivery date after 5 days of the sales order date, how to do that?
Thank you
Hi Everyone,
I had a client who needs to put the delivery date after 5 days of the sales order date, how to do that?
Thank you
Use Below Custom Script
cur_frm.cscript.transaction_date = function(doc, cdt, cd){
cur_frm.set_value(“delivery_date”, frappe.datetime.add_days(doc.transaction_date, 5));
}
Please edit inverted commas before delivery date from “ to " .
After changing color for delivery_date should change to green
Just use this code
cur_frm.cscript.transaction_date = function(doc, cdt, cd){
cur_frm.set_value(“delivery_date”, frappe.datetime.add_days(doc.transaction_date, 5));
}
Also you have entered single inverted commas instead of double.
Do not enter anything. Its working, I have tested on my side
Hii @fsorur and @mohitchechani,
Please check:
Code is here:
cur_frm.cscript.transaction_date = function(doc, cdt, cd)
{
cur_frm.set_value("delivery_date", frappe.datetime.add_days(doc.transaction_date, 5));
};
Thank You!