commit
733855a4c3
@ -1 +1,17 @@
|
|||||||
cur_frm.add_fetch("guardian", "guardian_name", "guardian_name");
|
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
|
||||||
|
frappe.ui.form.on("Student Guardian", {
|
||||||
|
guardian: function(frm) {
|
||||||
|
frm.add_fetch("guardian", "guardian_name", "guardian_name");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
frappe.ui.form.on('Student Sibling', {
|
||||||
|
student: function(frm) {
|
||||||
|
frm.add_fetch("student", "title", "full_name");
|
||||||
|
frm.add_fetch("student", "gender", "gender");
|
||||||
|
frm.add_fetch("student", "date_of_birth", "date_of_birth");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@ -6,6 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from frappe.utils import cstr
|
||||||
from erpnext.schools.api import get_student_batch_students, get_student_group_students
|
from erpnext.schools.api import get_student_batch_students, get_student_group_students
|
||||||
|
|
||||||
|
|
||||||
@ -49,11 +50,11 @@ class StudentAttendance(Document):
|
|||||||
attendance_records=None
|
attendance_records=None
|
||||||
if self.course_schedule:
|
if self.course_schedule:
|
||||||
attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
|
attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
|
||||||
student= %s and course_schedule= %s and name != %s and docstatus=1""",
|
student= %s and ifnull(course_schedule, '')= %s and name != %s""",
|
||||||
(self.student, self.course_schedule, self.name))
|
(self.student, cstr(self.course_schedule), self.name))
|
||||||
else:
|
else:
|
||||||
attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
|
attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
|
||||||
student= %s and student_batch= %s and date= %s and name != %s and docstatus=1 and \
|
student= %s and student_batch= %s and date= %s and name != %s and \
|
||||||
(course_schedule is Null or course_schedule='')""",
|
(course_schedule is Null or course_schedule='')""",
|
||||||
(self.student, self.student_batch, self.date, self.name))
|
(self.student, self.student_batch, self.date, self.name))
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
@ -8,7 +9,7 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "",
|
"document_type": "",
|
||||||
"editable_grid": 1,
|
"editable_grid": 0,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -250,17 +251,17 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-24 11:43:01.311010",
|
"modified": "2017-03-08 11:26:41.717041",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Sibling",
|
"name": "Student Sibling",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user