-
%(message_to_show)s
-
{{ frappe.utils.formatdate(doc.reference_date) or '' }}
diff --git a/erpnext/education/doctype/student_group/student_group.js b/erpnext/education/doctype/student_group/student_group.js
index f3f8c886247..5373df9124c 100644
--- a/erpnext/education/doctype/student_group/student_group.js
+++ b/erpnext/education/doctype/student_group/student_group.js
@@ -82,36 +82,39 @@ frappe.ui.form.on("Student Group", {
max_roll_no = d.group_roll_number;
}
});
- frappe.call({
- method: "erpnext.education.doctype.student_group.student_group.get_students",
- args: {
- "academic_year": frm.doc.academic_year,
- "academic_term": frm.doc.academic_term,
- "group_based_on": frm.doc.group_based_on,
- "program": frm.doc.program,
- "batch" : frm.doc.batch,
- "course": frm.doc.course
- },
- callback: function(r) {
- if(r.message) {
- $.each(r.message, function(i, d) {
- if(!in_list(student_list, d.student)) {
- var s = frm.add_child("students");
- s.student = d.student;
- s.student_name = d.student_name;
- if (d.active === 0) {
- s.active = 0;
+
+ if(frm.doc.academic_year) {
+ frappe.call({
+ method: "erpnext.education.doctype.student_group.student_group.get_students",
+ args: {
+ "academic_year": frm.doc.academic_year,
+ "academic_term": frm.doc.academic_term,
+ "group_based_on": frm.doc.group_based_on,
+ "program": frm.doc.program,
+ "batch" : frm.doc.batch,
+ "course": frm.doc.course
+ },
+ callback: function(r) {
+ if(r.message) {
+ $.each(r.message, function(i, d) {
+ if(!in_list(student_list, d.student)) {
+ var s = frm.add_child("students");
+ s.student = d.student;
+ s.student_name = d.student_name;
+ if (d.active === 0) {
+ s.active = 0;
+ }
+ s.group_roll_number = ++max_roll_no;
}
- s.group_roll_number = ++max_roll_no;
- }
- });
- refresh_field("students");
- frm.save();
- } else {
- frappe.msgprint(__("Student Group is already updated."))
+ });
+ refresh_field("students");
+ frm.save();
+ } else {
+ frappe.msgprint(__("Student Group is already updated."))
+ }
}
- }
- })
+ })
+ }
} else {
frappe.msgprint(__("Select students manually for the Activity based Group"));
}
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
index bfb53b83b8e..0b62d8e3684 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_calendar.js
@@ -1,8 +1,8 @@
frappe.views.calendar["Patient Appointment"] = {
field_map: {
- "start": "start",
- "end": "end",
+ "start": "appointment_date",
+ "end": "appointment_datetime",
"id": "name",
"title": "patient",
"allDay": "allDay"
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
index 3cc8dd5036f..507d070444b 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
+++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
@@ -3,8 +3,8 @@
frappe.views.calendar["Holiday List"] = {
field_map: {
- "start": "holiday_date",
- "end": "holiday_date",
+ "start": "from_date",
+ "end": "to_date",
"id": "name",
"title": "description",
"allDay": "allDay"
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 0fa082fddc2..aa78b85bdbd 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -774,7 +774,7 @@ class POSCart {
});
this.numpad.reset_value();
} else {
- const item_code = this.selected_item.attr('data-item-code');
+ const item_code = unescape(this.selected_item.attr('data-item-code'));
const field = this.selected_item.active_field;
const value = this.numpad.get_value();
@@ -819,7 +819,7 @@ class POSCart {
}
update_item(item) {
- const $item = this.$cart_items.find(`[data-item-code="${item.item_code}"]`);
+ const $item = this.$cart_items.find(`[data-item-code="${escape(item.item_code)}"]`);
if(item.qty > 0) {
const is_stock_item = this.get_item_details(item.item_code).is_stock_item;
@@ -841,7 +841,7 @@ class POSCart {
const rate = format_currency(item.rate, this.frm.doc.currency);
const indicator_class = (!is_stock_item || item.actual_qty >= item.qty) ? 'green' : 'red';
return `
-
+
${item.item_name}
@@ -883,18 +883,18 @@ class POSCart {
}
exists(item_code) {
- let $item = this.$cart_items.find(`[data-item-code="${item_code}"]`);
+ let $item = this.$cart_items.find(`[data-item-code="${escape(item_code)}"]`);
return $item.length > 0;
}
highlight_item(item_code) {
- const $item = this.$cart_items.find(`[data-item-code="${item_code}"]`);
+ const $item = this.$cart_items.find(`[data-item-code="${escape(item_code)}"]`);
$item.addClass('highlight');
setTimeout(() => $item.removeClass('highlight'), 1000);
}
scroll_to_item(item_code) {
- const $item = this.$cart_items.find(`[data-item-code="${item_code}"]`);
+ const $item = this.$cart_items.find(`[data-item-code="${escape(item_code)}"]`);
if ($item.length === 0) return;
const scrollTop = $item.offset().top - this.$cart_items.offset().top + this.$cart_items.scrollTop();
this.$cart_items.animate({ scrollTop });
@@ -909,7 +909,7 @@ class POSCart {
'[data-action="increment"], [data-action="decrement"]', function() {
const $btn = $(this);
const $item = $btn.closest('.list-item[data-item-code]');
- const item_code = $item.attr('data-item-code');
+ const item_code = unescape($item.attr('data-item-code'));
const action = $btn.attr('data-action');
if(action === 'increment') {
@@ -932,7 +932,7 @@ class POSCart {
this.$cart_items.on('change', '.quantity input', function() {
const $input = $(this);
const $item = $input.closest('.list-item[data-item-code]');
- const item_code = $item.attr('data-item-code');
+ const item_code = unescape($item.attr('data-item-code'));
events.on_field_change(item_code, 'qty', flt($input.val()));
});
@@ -1200,7 +1200,7 @@ class POSItems {
var me = this;
this.wrapper.on('click', '.pos-item-wrapper', function() {
const $item = $(this);
- const item_code = $item.attr('data-item-code');
+ const item_code = unescape($item.attr('data-item-code'));
me.events.update_cart(item_code, 'qty', '+1');
});
}
@@ -1226,7 +1226,7 @@ class POSItems {
const item_title = item_name || item_code;
const template = `
-