I need help to write a small custom script which would check the Sales Order Date with the current date at the time of SAVING or SUBMITTING a SO and would not allow the user to save or submit it on a date which earlier than TODAY.
So SO_Date >= Today() is the condition I want to be checked at the time of saving or submitting a SO.
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/NCJtffLcaZYJ.
For more options, visit https://groups.google.com/groups/opt_out.
I need help to write a small custom script which would check the Sales Order Date with the current date at the time of SAVING or SUBMITTING a SO and would not allow the user to save or submit it on a date which earlier than TODAY.
So SO_Date >= Today() is the condition I want to be checked at the time of saving or submitting a SO.
Hi Aditya,There is a syntax error in the reply I sent.. please find the corrected script below:cur_frm.cscript.custom_validate = function(doc, dt, dn) {// if there is existing content in custom_validate paste only this part within the curly braces of custom_validateif (wn.datetime.str_to_obj(doc.transaction_date) < new Date()) {validated = false;msgprint("Sales Order Date cannot be a past date"); // or any other message you want..}// paste till here}Thanks,Anand.
On 11-Aug-2012, at 8:09 PM, Aditya Duggal <aditya...@gmail.com> wrote:
I need help to write a small custom script which would check the Sales Order Date with the current date at the time of SAVING or SUBMITTING a SO and would not allow the user to save or submit it on a date which earlier than TODAY.
So SO_Date >= Today() is the condition I want to be checked at the time of saving or submitting a SO.--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer-forum+unsub...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/6yidCxZcMEcJ.