Hello Dears.
we need to change posting date to be automatically next date
and we have done this in sales order and works fine by that way
frappe.ui.form.on("Delivery Note", "onload", function(frm, cdt, cdn){
if (moment().format('dddd') == 'Thursday'){
frm.set_value("posting_date", frappe.datetime.add_days(frappe.datetime.nowdate(), 3));
} else {
frm.set_value("posting_date", frappe.datetime.add_days(frappe.datetime.nowdate(), 1));
}
})
but in Delivery note it works only onload but when i save th form it come back to Today
whats the issue ??