Merge pull request #4334 from revant/patch-1

Mode of Payment validate
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
index 51d8117..364b78c 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
@@ -10,12 +10,12 @@
 
 // ***************** Get Account Head *****************
 cur_frm.fields_dict['closing_account_head'].get_query = function(doc, cdt, cdn) {
-	return{
-		filters:{
-			"company": doc.company,
-			"root_type": "Liability",
-			"freeze_account": "No",
-			"is_group": 0
-		}
+	return {
+		filters: [
+			['Account', 'company', '=', doc.company],
+			['Account', 'is_group', '=', '0'],
+			['Account', 'freeze_account', '=', 'No'],
+			['Account', 'root_type', 'in', 'Liability, Equity']
+		]
 	}
 }
diff --git a/erpnext/config/docs.py b/erpnext/config/docs.py
index d85dc1d..dc771bc 100644
--- a/erpnext/config/docs.py
+++ b/erpnext/config/docs.py
@@ -2,22 +2,18 @@
 docs_base_url = "https://frappe.github.io/erpnext"
 headline = "Learn ERPNext Inside Out"
 sub_heading = "Find detailed explanation for all ERPNext features"
-long_description = """
-ERPNext helps you to manage all your business information in one application and use it to manage operations and take decisions based on data.
+long_description = """ERPNext is a fully featured ERP system designed for Small and Medium Sized
+business. ERPNext covers a wide range of features including Accounting, CRM,
+Inventory management, Selling, Purchasing, Manufacturing, Projects, HR &
+Payroll, Website, E-Commerce and much more.
 
-Among other things, ERPNext will help you to:
+ERPNext is based on the Frappe Framework is highly customizable and extendable.
+You can create Custom Form, Fields, Scripts and can also create your own Apps
+to extend ERPNext functionality.
 
-- Track all Invoices and Payments.
-- Know what quantity of which product is available in stock.
-- Identify open customer queries.
-- Manage payroll.
-- Assign tasks and follow up on them.
-- Maintain a database of all your customers, suppliers and their contacts.
-- Prepare quotes.
-- Get reminders on maintenance schedules.
-- Publish your website.
-
-And a lot lot lot more."""
+ERPNext is Open Source under the GNU General Public Licence v3 and has been
+listed as one of the Best Open Source Softwares in the world by my online
+blogs."""
 
 def get_context(context):
 	context.top_bar_items = [
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index bb117c1..8c90b23 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -4,29 +4,7 @@
 app_name = "erpnext"
 app_title = "ERPNext"
 app_publisher = "Frappe Technologies Pvt. Ltd."
-app_description = """## ERPNext
-
-ERPNext is a fully featured ERP system designed for Small and Medium Sized
-business. ERPNext covers a wide range of features including Accounting, CRM,
-Inventory management, Selling, Purchasing, Manufacturing, Projects, HR &
-Payroll, Website, E-Commerce and much more.
-
-ERPNext is based on the Frappe Framework is highly customizable and extendable.
-You can create Custom Form, Fields, Scripts and can also create your own Apps
-to extend ERPNext functionality.
-
-ERPNext is Open Source under the GNU General Public Licence v3 and has been
-listed as one of the Best Open Source Softwares in the world by my online
-blogs.
-
-### Links
-
-- Website: [https://erpnext.com](https://erpnext.com)
-- GitHub: [https://github.com/frappe/erpnext](https://github.com/frappe/erpnext)
-- Forum: [https://discuss.erpnext.com](https://discuss.erpnext.com)
-- Frappe Framework: [https://frappe.io](https://frappe.io)
-
-"""
+app_description = """ERP made simple"""
 app_icon = "icon-th"
 app_color = "#e74c3c"
 app_version = "6.9.2"
diff --git a/erpnext/hr/print_format/offer_letter/offer_letter.json b/erpnext/hr/print_format/offer_letter/offer_letter.json
index d480159..40a3fe1 100644
--- a/erpnext/hr/print_format/offer_letter/offer_letter.json
+++ b/erpnext/hr/print_format/offer_letter/offer_letter.json
@@ -5,8 +5,8 @@
  "doc_type": "Offer Letter", 
  "docstatus": 0, 
  "doctype": "Print Format", 
- "html": "{% if letter_head and not no_letterhead -%}\n    <div class=\"letter-head\">{{ letter_head }}</div>\n    <hr>\n{%- endif %}\n\n<div class=\"page-break\">\n<p>\n\n<!-- offer letter content starts here, <br> is used to create new lines -->\nDate: {{ doc.offer_date }}\n<br><br>\n\nDear {{ doc.applicant_name }}, \n\n<br><br>\n\nWe are pleased to appoint you in the services of {{ doc.company }} on the terms and conditions detailed in this letter.\n\n<br><br>\n\nYour designation shall be <b>{{ doc.designation }}</b>.\n\n<br><br>\n\n<!-- offer letter terms and description from the table -->\n\n{%- if doc.offer_terms -%}\n    {%- for row in doc.offer_terms -%}\n        <b>{{ row.offer_term }}:</b> {{ row.value }}\n\n        <br>\n    {%- endfor -%}\n{%- endif -%}\n\n<br>\n\n<!-- offer letter content continues -->\n\n\nPlease read the detailed terms as below. If you have any queries, feel free to get in touch with us.\nWe look forward to your long and fruitful career association with our organisation.\nIf you decide to join us, 'Welcome to {{ doc.company }} !'\n\n<br><br>\n\n<p class=\"strong\">\n\nYours truly,\n\n<br><br><br><br>\n\nAuthorized Signatory\n\n<br>\n\n{{ doc.company }}\n\n<!-- offer letter content ends here -->\n\n</p>\n</div>\n\n<!-- offer letter terms and conditions -->\n<div> {{ doc.terms }} </div>", 
- "modified": "2015-04-01 05:22:51.345050", 
+ "html": "{% set terms_exist = (doc.terms|striptags).strip() %}\n\n{% if letter_head and not no_letterhead -%}\n    <div class=\"letter-head\">{{ letter_head }}</div>\n    <hr>\n{%- endif %}\n\n<div {% if terms_exist -%} class=\"page-break\" {%- endif %}>\n<p>\n\n<!-- offer letter content starts here, <br> is used to create new lines -->\nDate: {{ doc.offer_date }}\n<br><br>\n\nDear {{ doc.applicant_name }}, \n\n<br><br>\n\nWe are pleased to appoint you in the services of {{ doc.company }} on the terms and conditions detailed in this letter.\n\n<br><br>\n\nYour designation shall be <b>{{ doc.designation }}</b>.\n\n<br><br>\n\n<!-- offer letter terms and description from the table -->\n\n{%- if doc.offer_terms -%}\n    {%- for row in doc.offer_terms -%}\n        <b>{{ row.offer_term }}:</b> {{ row.value }}\n\n        <br>\n    {%- endfor -%}\n{%- endif -%}\n\n<br>\n\n<!-- offer letter content continues -->\n\n\nPlease read the detailed terms as below. If you have any queries, feel free to get in touch with us.\nWe look forward to your long and fruitful career association with our organisation.\nIf you decide to join us, 'Welcome to {{ doc.company }} !'\n\n<br><br>\n\n<p class=\"strong\">\n\nYours truly,\n\n<br><br><br><br>\n\nAuthorized Signatory\n\n<br>\n\n{{ doc.company }}\n\n<!-- offer letter content ends here -->\n\n</p>\n</div>\n\n<!-- offer letter terms and conditions -->\n{% if terms_exist %}\n<div> {{ doc.terms }} </div>\n{% endif %}", 
+ "modified": "2015-11-18 12:53:04.997745", 
  "modified_by": "Administrator", 
  "name": "Offer Letter", 
  "owner": "Administrator", 
diff --git a/erpnext/setup/doctype/email_digest/templates/default.html b/erpnext/setup/doctype/email_digest/templates/default.html
index bd88baf..a931fbb 100644
--- a/erpnext/setup/doctype/email_digest/templates/default.html
+++ b/erpnext/setup/doctype/email_digest/templates/default.html
@@ -117,8 +117,7 @@
 
 <div style="text-align: center; margin: 50px; line-height: 1.5">
     {{ quote.text }}<br><i>- {{ quote.author }}</i>
-    <br><br><br>
-    <span style="color: {{ text_muted }}; font-size: 12px;">Have an intersting thought, quote to share? Email it at hello@erpnext.com</span>
+    <br>
 </div>
 
 </div>