Dear Experts,
I created following script for purchase order to stop back date entry.
frappe.ui.form.on(“Purchase Order”, “validate”, function(frm) {
var date = frappe.datetime.add_days(get_today(), -3);
if (frm.doc.transaction_date <= date) {
msgprint(__(“You can not select this date”));
validated = false;
}
});
It is working successfully for purchase order and sales order (separate script for doctype sales order).
The problem is that it does not work on journal entry,purchase invoice and sales invoice. Please suggest the required changes.
Regards,
Zahid