mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
Lint and fix JS files
This commit is contained in:
@@ -71,7 +71,7 @@ erpnext.maintenance.MaintenanceSchedule = frappe.ui.form.Controller.extend({
|
||||
|
||||
if (item.start_date && item.end_date && item.periodicity) {
|
||||
if(item.start_date > item.end_date) {
|
||||
msgprint(__("Row {0}:Start Date must be before End Date", [item.idx]));
|
||||
frappe.msgprint(__("Row {0}:Start Date must be before End Date", [item.idx]));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
|
||||
|
||||
if(doc.__islocal){
|
||||
set_multiple(dt,dn,{transaction_date:get_today()});
|
||||
set_multiple(dt,dn,{transaction_date: frappe.datetime.get_today()});
|
||||
}
|
||||
|
||||
// set add fetch for item_code's item_name and description
|
||||
@@ -108,12 +108,12 @@ cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
|
||||
cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
|
||||
if (!doc.__islocal) {
|
||||
return $c('runserverobj', args={'method':'generate_schedule', 'docs':doc},
|
||||
return $c('runserverobj', {'method':'generate_schedule', 'docs':doc},
|
||||
function(r, rt) {
|
||||
refresh_field('schedules');
|
||||
});
|
||||
} else {
|
||||
msgprint(__("Please save the document before generating maintenance schedule"));
|
||||
frappe.msgprint(__("Please save the document before generating maintenance schedule"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
frappe.provide("erpnext.maintenance");
|
||||
me.frm.set_query('contact_person', erpnext.queries.contact_query);
|
||||
|
||||
|
||||
frappe.ui.form.on('Maintenance Visit', {
|
||||
setup: function(frm) {
|
||||
@@ -85,7 +83,7 @@ $.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceVisit({frm: cur_frm
|
||||
|
||||
cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
|
||||
if(doc.__islocal) set_multiple(dt,dn,{mntc_date:get_today()});
|
||||
if(doc.__islocal) set_multiple(dt,dn,{mntc_date: frappe.datetime.get_today()});
|
||||
|
||||
// set add fetch for item_code's item_name and description
|
||||
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
|
||||
|
||||
Reference in New Issue
Block a user