[minor] fixes to moment.defaultDateFormat and daily work summary eplies
diff --git a/erpnext/crm/doctype/lead/lead.js b/erpnext/crm/doctype/lead/lead.js
index 19bf868..1af4550 100644
--- a/erpnext/crm/doctype/lead/lead.js
+++ b/erpnext/crm/doctype/lead/lead.js
@@ -81,7 +81,7 @@
if (this.frm.doc.contact_date) {
let d = moment(this.frm.doc.contact_date);
d.add(1, "hours");
- this.frm.set_value("ends_on", d.format(moment.defaultDatetimeFormat));
+ this.frm.set_value("ends_on", d.format(frappe.defaultDatetimeFormat));
}
}
});
diff --git a/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py b/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py
index f5eabf5..aa8eea5 100644
--- a/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py
+++ b/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py
@@ -17,13 +17,20 @@
"label": _("User"),
"fieldname": "user",
"fieldtype": "Data",
- "width": 800
+ "width": 300
},
{
- "label": _("Reply Count"),
+ "label": _("Replies"),
"fieldname": "count",
"fieldtype": "data",
- "width": 150,
+ "width": 100,
+ "align": 'right',
+ },
+ {
+ "label": _("Total"),
+ "fieldname": "total",
+ "fieldtype": "data",
+ "width": 100,
"align": 'right',
}
]
@@ -42,8 +49,9 @@
['sent_or_received', '=', 'Received']],
order_by='creation asc')
data = []
+ total = len(daily_summary_emails)
for user in get_user_emails_from_group(filters.group):
- userName = frappe.get_value('User', user, 'full_name')
+ user_name = frappe.get_value('User', user, 'full_name')
count = len([d for d in replies if d.sender == user])
- data.append([userName, "{0} / {1}".format(count, len(daily_summary_emails))])
+ data.append([user_name, count, total])
return data
\ No newline at end of file
diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js
index f719ad8..5234df6 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.js
+++ b/erpnext/projects/doctype/timesheet/timesheet.js
@@ -212,7 +212,7 @@
d.add(child.hours, "hours");
frm._setting_hours = true;
frappe.model.set_value(cdt, cdn, "to_time",
- d.format(moment.defaultDatetimeFormat)).then(() => {
+ d.format(frappe.defaultDatetimeFormat)).then(() => {
frm._setting_hours = false;
});
}
diff --git a/erpnext/public/js/projects/timer.js b/erpnext/public/js/projects/timer.js
index 0a737a6..8b1d1b1 100644
--- a/erpnext/public/js/projects/timer.js
+++ b/erpnext/public/js/projects/timer.js
@@ -79,7 +79,7 @@
let d = moment(row.from_time);
if(row.expected_hours) {
d.add(row.expected_hours, "hours");
- row.to_time = d.format(moment.defaultDatetimeFormat);
+ row.to_time = d.format(frappe.defaultDatetimeFormat);
}
frm.refresh_field("time_logs");
frm.save();