Merge pull request #5830 from MaxMorais/patch-6

Extend search_fields for customer querie
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index f986eea..605bf09 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -71,7 +71,7 @@
 def update_multi_mode_option(doc, pos_profile):
 	from frappe.model import default_fields
 
-	if not pos_profile:
+	if not pos_profile or not pos_profile.get('payments'):
 		for payment in get_mode_of_payment(doc):
 			payments = doc.append('payments', {})
 			payments.mode_of_payment = payment.parent
@@ -166,13 +166,14 @@
 
 	for docs in doc_list:
 		for name, doc in docs.items():
-			validate_customer(doc)
-			validate_item(doc)
-			si_doc = frappe.new_doc('Sales Invoice')
-			si_doc.offline_pos_name = name
-			si_doc.update(doc)
-			submit_invoice(si_doc, name)
-			name_list.append(name)
+			if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
+				validate_customer(doc)
+				validate_item(doc)
+				si_doc = frappe.new_doc('Sales Invoice')
+				si_doc.offline_pos_name = name
+				si_doc.update(doc)
+				submit_invoice(si_doc, name)
+				name_list.append(name)
 
 	return name_list
 
@@ -213,7 +214,6 @@
 		save_invoice(e, si_doc, name)
 
 def save_invoice(e, si_doc, name):
-	if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name, 'docstatus': 1}):
 		si_doc.docstatus = 0
 		si_doc.name = ''
 		si_doc.save(ignore_permissions=True)
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index 49cbdd0..cb57ff4 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -104,9 +104,10 @@
 
 		this.page.add_menu_item(__("Sync Master Data"), function(){
 			me.get_data_from_server(function(){
-				me.load_data();
+				me.load_data(false);
 				me.make_customer();
 				me.make_item_list();
+				me.set_missing_values();
 			})
 		});
 
@@ -151,7 +152,7 @@
 				if(doc_data){
 					me.frm.doc = doc_data[0][me.name];
 					me.set_missing_values();
-					me.refresh();
+					me.refresh(false);
 					me.disable_input_field();
 					me.list_dialog.hide();
 				}
@@ -177,6 +178,10 @@
 		if(this.frm.doc.payments.length == 0){
 			this.frm.doc.payments = doc.payments;
 		}
+
+		if(this.frm.doc.customer){
+			this.party_field.$input.val(this.frm.doc.customer);
+		}
 	},
 
 	get_invoice_doc: function(si_docs){
@@ -222,15 +227,18 @@
 		var me = this;
 		this.frm = {}
 		this.name = '';
-		this.load_data();
+		this.load_data(true);
 		this.setup();
 	},
 
-	load_data: function(){
+	load_data: function(load_doc){
 		this.items = window.items;
 		this.customers = window.customers;
 		this.pricing_rules = window.pricing_rules;
-		this.frm.doc =  JSON.parse(localStorage.getItem('doc'));
+
+		if(load_doc) {
+			this.frm.doc =  JSON.parse(localStorage.getItem('doc'));
+		}
 
 		$.each(window.meta, function(i, data){
 			frappe.meta.sync(data)
@@ -302,7 +310,7 @@
 	make_customer: function() {
 		var me = this;
 
-		if(this.default_customer){
+		if(this.default_customer && !this.frm.doc.customer){
 			this.party_field.$input.val(this.default_customer);
 			this.frm.doc.customer = this.default_customer;
 		}
@@ -535,7 +543,6 @@
 
 	customer_validate: function(){
 		var me = this;
-
 		if(!this.frm.doc.customer){
 			frappe.throw(__("Please select customer"))
 		}
@@ -598,21 +605,21 @@
 			? this.item_serial_no[this.child.item_code][0] : '');
 	},
 
-	refresh: function() {
+	refresh: function(update_paid_amount) {
 		var me = this;
-		this.refresh_fields();
+		this.refresh_fields(update_paid_amount);
 		this.update_qty();
 		this.update_rate();
 		this.set_primary_action();
 	},
-	refresh_fields: function() {
+	refresh_fields: function(update_paid_amount) {
 		this.apply_pricing_rule();
 		this.discount_amount_applied = false;
 		this._calculate_taxes_and_totals();
 		this.calculate_discount_amount();
 		this.show_items_in_item_cart();
 		this.set_taxes();
-		this.calculate_outstanding_amount();
+		this.calculate_outstanding_amount(update_paid_amount);
 		this.set_totals();
 	},
 
diff --git a/erpnext/buying/report/quoted_item_comparison/__init__.py b/erpnext/buying/report/quoted_item_comparison/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/buying/report/quoted_item_comparison/__init__.py
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
new file mode 100644
index 0000000..45bc738
--- /dev/null
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
@@ -0,0 +1,15 @@
+// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
+// For license information, please see license.txt
+
+frappe.query_reports["Quoted Item Comparison"] = {
+	"filters": [
+	{
+		"fieldname":"item",
+		"label": __("Item"),
+		"fieldtype": "Link",
+		"options": "Item",
+		"default": ""
+		
+	}
+	]
+}
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json
new file mode 100644
index 0000000..00e89f0
--- /dev/null
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.json
@@ -0,0 +1,18 @@
+{
+ "add_total_row": 0, 
+ "apply_user_permissions": 1, 
+ "creation": "2016-07-21 08:31:05.890362", 
+ "disabled": 0, 
+ "docstatus": 0, 
+ "doctype": "Report", 
+ "idx": 0, 
+ "is_standard": "Yes", 
+ "modified": "2016-07-21 12:32:45.733155", 
+ "modified_by": "Administrator", 
+ "module": "Buying", 
+ "name": "Quoted Item Comparison", 
+ "owner": "Administrator", 
+ "ref_doctype": "Supplier Quotation", 
+ "report_name": "Quoted Item Comparison", 
+ "report_type": "Script Report"
+}
\ No newline at end of file
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
new file mode 100644
index 0000000..5bf9c7b
--- /dev/null
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
@@ -0,0 +1,100 @@
+# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
+# For license information, please see license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute(filters=None):
+	
+	qty_list = get_quantity_list(filters.item)
+	
+	data = get_quote_list(filters.item, qty_list)
+	
+	columns = get_columns(qty_list)
+	
+	return columns, data
+
+	
+def get_quote_list(item, qty_list):
+	
+	out = []
+	
+	if item:
+		price_data = []
+		suppliers = []
+		# Get the list of suppliers
+		for root in frappe.db.sql("""select parent, qty, rate from `tabSupplier Quotation Item` where item_code=%s and docstatus < 2""", item, as_dict=1):
+			for splr in frappe.db.sql("""SELECT supplier from `tabSupplier Quotation` where name =%s and docstatus < 2""", root.parent, as_dict=1):
+				ip = frappe._dict({
+				"supplier": splr.supplier,
+				"qty": root.qty,
+				"parent": root.parent,
+				"rate": root.rate})
+				price_data.append(ip)
+				suppliers.append(splr.supplier)
+			
+		#Add a row for each supplier
+		for root in set(suppliers):
+			row = frappe._dict({
+				"supplier_name": root
+			})
+			for col in qty_list:
+				# Get the quantity for this row
+				for item_price in price_data:
+					if str(item_price.qty) == col.key and item_price.supplier == root:
+						row[col.key] = item_price.rate
+						row[col.key + "QUOTE"] = item_price.parent
+						break
+					else:
+						row[col.key] = ""
+						row[col.key + "QUOTE"] = ""
+			out.append(row)
+			
+
+	
+	return out
+	
+def get_quantity_list(item):
+	
+	out = []
+	
+			
+	if item:
+		qty_list = frappe.db.sql("""select distinct qty from `tabSupplier Quotation Item` where ifnull(item_code,'')=%s and docstatus < 2""", item, as_dict=1)
+		qty_list.sort(reverse=False)
+		for qt in qty_list:
+			col = frappe._dict({
+				"key": str(qt.qty),
+				"label": "Qty: " + str(int(qt.qty))
+			})
+			out.append(col)
+
+	return out
+	
+def get_columns(qty_list):
+	columns = [{
+		"fieldname": "supplier_name",
+		"label": "Supplier",
+		"fieldtype": "Link",
+		"options": "Supplier",
+		"width": 200
+	}]
+
+	for qty in qty_list:
+		columns.append({
+			"fieldname": qty.key,
+			"label": qty.label,
+			"fieldtype": "Currency",
+			"options": "currency",
+			"width": 80
+		})
+		columns.append({
+			"fieldname": qty.key + "QUOTE",
+			"label": "Quotation",
+			"fieldtype": "Link",
+			"options": "Supplier Quotation",
+			"width": 90
+		})
+
+
+	return columns
\ No newline at end of file
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index df2a0ee..08f9d23 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -171,7 +171,7 @@
 			"icon": "octicon octicon-person",
 			"label": _("Student"),
 			"link": "List/Student",
-			"doctype": "Student",
+			"_doctype": "Student",
 			"type": "list"
 		},
 		{
@@ -180,7 +180,7 @@
 			"icon": "octicon octicon-organization",
 			"label": _("Student Group"),
 			"link": "List/Student Group",
-			"doctype": "Student Group",
+			"_doctype": "Student Group",
 			"type": "list"
 		},
 		{
@@ -189,7 +189,7 @@
 			"icon": "octicon octicon-calendar",
 			"label": _("Course Schedule"),
 			"link": "Calendar/Course Schedule",
-			"doctype": "Course Schedule",
+			"_doctype": "Course Schedule",
 			"type": "list"
 		},
 		{
@@ -198,7 +198,7 @@
 			"icon": "octicon octicon-checklist",
 			"label": _("Student Attendance"),
 			"link": "List/Student Attendance",
-			"doctype": "Student Attendance",
+			"_doctype": "Student Attendance",
 			"type": "list"
 		},
 		{
@@ -207,7 +207,7 @@
 			"icon": "octicon octicon-book",
 			"label": _("Course"),
 			"link": "List/Course",
-			"doctype": "Course",
+			"_doctype": "Course",
 			"type": "list"
 		},
 		{
@@ -216,7 +216,7 @@
 			"icon": "octicon octicon-repo",
 			"label": _("Program"),
 			"link": "List/Program",
-			"doctype": "Program",
+			"_doctype": "Program",
 			"type": "list"
 		},
 		{
@@ -225,7 +225,7 @@
 			"icon": "octicon octicon-clippy",
 			"label": _("Student Applicant"),
 			"link": "List/Student Applicant",
-			"doctype": "Student Applicant",
+			"_doctype": "Student Applicant",
 			"type": "list"
 		},
 		{
@@ -234,7 +234,7 @@
 			"icon": "icon-file-text-alt",
 			"label": _("Examination"),
 			"link": "List/Examination",
-			"doctype": "Examination",
+			"_doctype": "Examination",
 			"type": "list"
 		},
 		{
@@ -243,7 +243,7 @@
 			"icon": "icon-money",
 			"label": _("Fees"),
 			"link": "List/Fees",
-			"doctype": "Fees",
+			"_doctype": "Fees",
 			"type": "list"
 		},
 		{
@@ -252,7 +252,7 @@
 			"icon": "octicon octicon-broadcast",
 			"label": _("Instructor"),
 			"link": "List/Instructor",
-			"doctype": "Instructor",
+			"_doctype": "Instructor",
 			"type": "list"
 		},
 		{
@@ -261,7 +261,7 @@
 			"icon": "icon-map-marker",
 			"label": _("Room"),
 			"link": "List/Room",
-			"doctype": "Examination",
+			"_doctype": "Examination",
 			"type": "list"
 		},
 		{
diff --git a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
index ce8c569..9413629 100644
--- a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
+++ b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
@@ -394,7 +394,7 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
-   "depends_on": "project", 
+   "depends_on": "", 
    "fieldname": "task", 
    "fieldtype": "Link", 
    "hidden": 0, 
@@ -532,7 +532,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-07-18 13:57:29.873073", 
+ "modified": "2016-07-21 09:59:01.622745", 
  "modified_by": "Administrator", 
  "module": "Projects", 
  "name": "Timesheet Detail", 
diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js
index 236eb82..8405e3d 100644
--- a/erpnext/public/js/controllers/taxes_and_totals.js
+++ b/erpnext/public/js/controllers/taxes_and_totals.js
@@ -75,7 +75,7 @@
 		this.frm.doc.conversion_rate = flt(this.frm.doc.conversion_rate, precision("conversion_rate"));
 		var conversion_rate_label = frappe.meta.get_label(this.frm.doc.doctype, "conversion_rate",
 			this.frm.doc.name);
-		var company_currency = this.get_company_currency();
+		var company_currency = this.frm.doc.currency || this.get_company_currency();
 
 		if(!this.frm.doc.conversion_rate) {
 			if(this.frm.doc.currency == company_currency) {
@@ -427,7 +427,7 @@
 				this.frm.doc.currency, precision("rounded_total"));
 		}
 		if(frappe.meta.get_docfield(this.frm.doc.doctype, "base_rounded_total", this.frm.doc.name)) {
-			var company_currency = this.get_company_currency();
+			var company_currency = this.frm.doc.currency || this.get_company_currency();
 
 			this.frm.doc.base_rounded_total =
 				round_based_on_smallest_currency_fraction(this.frm.doc.base_grand_total,
@@ -587,7 +587,7 @@
 				if(data.type == "Cash" && payment_status) {
 					data.amount = total_amount_to_pay;
 					payment_status = false;
-				}else{
+				}else if(me.frm.doc.paid_amount){
 					data.amount = 0.0;
 				}
 			})
diff --git a/erpnext/schools/doctype/attendance_tool_student/attendance_tool_student.json b/erpnext/schools/doctype/attendance_tool_student/attendance_tool_student.json
index 47a71f0..731de83 100644
--- a/erpnext/schools/doctype/attendance_tool_student/attendance_tool_student.json
+++ b/erpnext/schools/doctype/attendance_tool_student/attendance_tool_student.json
@@ -2,11 +2,13 @@
  "allow_copy": 0, 
  "allow_import": 0, 
  "allow_rename": 0, 
+ "beta": 0, 
  "creation": "2015-11-10 16:28:51.366668", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -16,14 +18,17 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student", 
+   "length": 0, 
    "no_copy": 0, 
    "options": "Student", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -39,13 +44,16 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student Name", 
+   "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 1, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -61,14 +69,17 @@
    "fieldtype": "Select", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Status", 
+   "length": 0, 
    "no_copy": 0, 
    "options": "Absent\nPresent\n", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -79,20 +90,25 @@
  ], 
  "hide_heading": 0, 
  "hide_toolbar": 0, 
+ "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
- "issingle": 1, 
+ "issingle": 0, 
  "istable": 1, 
- "modified": "2016-07-18 10:30:50.243271",
+ "max_attachments": 0, 
+ "modified": "2016-07-21 12:30:02.983801", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Attendance Tool Student", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
  "sort_field": "modified", 
- "sort_order": "DESC"
+ "sort_order": "DESC", 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/examination_result/examination_result.json b/erpnext/schools/doctype/examination_result/examination_result.json
index 4758c29..932dff1 100644
--- a/erpnext/schools/doctype/examination_result/examination_result.json
+++ b/erpnext/schools/doctype/examination_result/examination_result.json
@@ -2,11 +2,13 @@
  "allow_copy": 0, 
  "allow_import": 0, 
  "allow_rename": 0, 
+ "beta": 0, 
  "creation": "2015-11-13 17:18:06.468332", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -16,14 +18,17 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student", 
+   "length": 0, 
    "no_copy": 0, 
    "options": "Student", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -39,13 +44,16 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student Name", 
+   "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 1, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -61,12 +69,15 @@
    "fieldtype": "Column Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -82,13 +93,16 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Result", 
+   "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -99,20 +113,25 @@
  ], 
  "hide_heading": 0, 
  "hide_toolbar": 0, 
+ "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 1, 
- "modified": "2016-07-18 10:30:50.243271",
+ "max_attachments": 0, 
+ "modified": "2016-07-21 12:27:02.405667", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Examination Result", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
  "sort_field": "modified", 
- "sort_order": "DESC"
+ "sort_order": "DESC", 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/fee_amount/fee_amount.json b/erpnext/schools/doctype/fee_amount/fee_amount.json
index d7156cb..942b6ef 100644
--- a/erpnext/schools/doctype/fee_amount/fee_amount.json
+++ b/erpnext/schools/doctype/fee_amount/fee_amount.json
@@ -9,7 +9,7 @@
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "Setup", 
- "editable_grid": 0, 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -104,8 +104,8 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-07-18 10:30:50.243271",
- "modified_by": "Administrator", 
+ "modified": "2016-07-21 12:25:44.368245", 
+ "modified_by": "r@r.com", 
  "module": "Schools", 
  "name": "Fee Amount", 
  "name_case": "", 
diff --git a/erpnext/schools/doctype/program_course/program_course.json b/erpnext/schools/doctype/program_course/program_course.json
index 81aad68..e9a397e 100644
--- a/erpnext/schools/doctype/program_course/program_course.json
+++ b/erpnext/schools/doctype/program_course/program_course.json
@@ -2,11 +2,13 @@
  "allow_copy": 0, 
  "allow_import": 0, 
  "allow_rename": 0, 
+ "beta": 0, 
  "creation": "2015-09-07 14:37:01.886859", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -16,6 +18,7 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Course", 
@@ -25,6 +28,7 @@
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -40,6 +44,7 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Academic Term", 
@@ -49,6 +54,7 @@
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -64,6 +70,7 @@
    "fieldtype": "Column Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "length": 0, 
@@ -71,6 +78,7 @@
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -86,6 +94,7 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Course Code", 
@@ -94,6 +103,7 @@
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 1, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -109,6 +119,7 @@
    "fieldtype": "Check", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Required", 
@@ -117,6 +128,7 @@
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -128,6 +140,7 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
@@ -135,16 +148,17 @@
  "istable": 1, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2016-07-18 10:30:50.243271",
+ "modified": "2016-07-21 12:27:02.330118", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Program Course", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
- "version": 0
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/program_enrollment_fee/program_enrollment_fee.json b/erpnext/schools/doctype/program_enrollment_fee/program_enrollment_fee.json
index 3ed340d..6760384 100644
--- a/erpnext/schools/doctype/program_enrollment_fee/program_enrollment_fee.json
+++ b/erpnext/schools/doctype/program_enrollment_fee/program_enrollment_fee.json
@@ -8,6 +8,7 @@
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -139,13 +140,14 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-07-18 10:30:50.243271",
+ "modified": "2016-07-21 12:27:02.547926", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Program Enrollment Fee", 
diff --git a/erpnext/schools/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json b/erpnext/schools/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json
index a72feb4..9e200d7 100644
--- a/erpnext/schools/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json
+++ b/erpnext/schools/doctype/program_enrollment_tool_student/program_enrollment_tool_student.json
@@ -8,6 +8,7 @@
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -116,14 +117,15 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-07-18 10:30:50.243271",
- "modified_by": "Administrator", 
+ "modified": "2016-07-21 12:32:12.784608", 
+ "modified_by": "r@r.com", 
  "module": "Schools", 
  "name": "Program Enrollment Tool Student", 
  "name_case": "", 
diff --git a/erpnext/schools/doctype/program_fee/program_fee.json b/erpnext/schools/doctype/program_fee/program_fee.json
index ef3b9a6..6b320a0 100644
--- a/erpnext/schools/doctype/program_fee/program_fee.json
+++ b/erpnext/schools/doctype/program_fee/program_fee.json
@@ -8,6 +8,7 @@
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -146,7 +147,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-07-18 10:30:50.243271",
+ "modified": "2016-07-21 12:27:02.153696", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Program Fee", 
diff --git a/erpnext/schools/doctype/sg_creation_tool_course/sg_creation_tool_course.json b/erpnext/schools/doctype/sg_creation_tool_course/sg_creation_tool_course.json
index 872b1dc..8814f88 100644
--- a/erpnext/schools/doctype/sg_creation_tool_course/sg_creation_tool_course.json
+++ b/erpnext/schools/doctype/sg_creation_tool_course/sg_creation_tool_course.json
@@ -2,11 +2,13 @@
  "allow_copy": 0, 
  "allow_import": 0, 
  "allow_rename": 0, 
+ "beta": 0, 
  "creation": "2016-01-04 15:03:57.940079", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -16,6 +18,7 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Course", 
@@ -41,6 +44,7 @@
    "fieldtype": "Read Only", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "label": "Course Code", 
@@ -66,6 +70,7 @@
    "fieldtype": "Column Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
    "length": 0, 
@@ -89,6 +94,7 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student Group Name", 
@@ -113,6 +119,7 @@
    "fieldtype": "Int", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Max Strength", 
@@ -133,21 +140,24 @@
  "hide_heading": 0, 
  "hide_toolbar": 0, 
  "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
- "issingle": 1, 
+ "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-07-18 10:30:50.243271",
- "modified_by": "Administrator", 
+ "modified": "2016-07-21 12:31:41.252860", 
+ "modified_by": "r@r.com", 
  "module": "Schools", 
  "name": "SG Creation Tool Course", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
  "sort_field": "modified", 
- "sort_order": "DESC"
+ "sort_order": "DESC", 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_group_student/student_group_student.json b/erpnext/schools/doctype/student_group_student/student_group_student.json
index 1d8a9bb..94493ae 100644
--- a/erpnext/schools/doctype/student_group_student/student_group_student.json
+++ b/erpnext/schools/doctype/student_group_student/student_group_student.json
@@ -2,11 +2,13 @@
  "allow_copy": 0, 
  "allow_import": 0, 
  "allow_rename": 0, 
+ "beta": 0, 
  "creation": "2015-09-11 15:14:58.501830", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
+ "editable_grid": 1, 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -16,14 +18,17 @@
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student", 
+   "length": 0, 
    "no_copy": 0, 
    "options": "Student", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -39,12 +44,15 @@
    "fieldtype": "Column Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -60,13 +68,16 @@
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
    "label": "Student Name", 
+   "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
    "read_only": 1, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -77,20 +88,25 @@
  ], 
  "hide_heading": 0, 
  "hide_toolbar": 0, 
+ "idx": 0, 
+ "image_view": 0, 
  "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 1, 
- "modified": "2016-07-18 10:30:50.243271",
+ "max_attachments": 0, 
+ "modified": "2016-07-21 12:27:02.479077", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Student Group Student", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
+ "quick_entry": 0, 
  "read_only": 0, 
  "read_only_onload": 0, 
  "sort_field": "modified", 
- "sort_order": "DESC"
+ "sort_order": "DESC", 
+ "track_seen": 0
 }
\ No newline at end of file