fix: allow to changes to date in the blanket order

This commit is contained in:
Rohit Waghchaure 2021-06-29 00:31:14 +05:30
parent c1853ddf73
commit 2d1c4fee1d
2 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,7 @@ frappe.ui.form.on('Blanket Order', {
refresh: function(frm) {
erpnext.hide_company();
if (frm.doc.customer && frm.doc.docstatus === 1) {
if (frm.doc.customer && frm.doc.docstatus === 1 && frm.doc.to_date > frappe.datetime.get_today()) {
frm.add_custom_button(__("Sales Order"), function() {
frappe.model.open_mapped_doc({
method: "erpnext.manufacturing.doctype.blanket_order.blanket_order.make_order",

View File

@ -1,4 +1,5 @@
{
"actions": [],
"autoname": "naming_series:",
"creation": "2018-05-24 07:18:08.256060",
"doctype": "DocType",
@ -79,6 +80,7 @@
"reqd": 1
},
{
"allow_on_submit": 1,
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
@ -129,8 +131,10 @@
"label": "Terms and Conditions Details"
}
],
"index_web_pages_for_search": 1,
"is_submittable": 1,
"modified": "2019-11-18 19:37:37.151686",
"links": [],
"modified": "2021-06-29 00:30:30.621636",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Blanket Order",