Custom script in event to add hours

Hi,
I am having trouble using functions in a custom script under the doctype event.
I wish to add hours to the get_today() function but can’t seem to get any of the functions i use in the jinja formating to work… ie
var lastdayprev = frappe.utils.add_days(firstdayprev, -1);
var testdate = frappe.datetime.add_to_date(mydate,0,0,0,1);
all cause errors and don’t run.

How can I fix these issues and use frappe calls correctly in v8.

So you have no traceback or examples that do work?

@turbond,

add_to_date method is not available in client side so frappe.datetime.add_to_date will cause the error

1 Like