Merge pull request #6039 from rohitwaghchaure/allow_to_edit_change_amount
Allow to edit change amount
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ca55b5f..c433ddb 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.0.21'
+__version__ = '7.0.28'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index c3a01b9..2450a8a 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -47,7 +47,7 @@
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.add_custom_button(__('Chart of Accounts'),
- function() { frappe.set_route("Tree", "Account"); }, __("View"))
+ function() { frappe.set_route("Tree", "Account"); });
if (doc.is_group == 1) {
cur_frm.add_custom_button(__('Group to Non-Group'),
@@ -61,7 +61,7 @@
"company": doc.company
};
frappe.set_route("query-report", "General Ledger");
- }, __("View"));
+ });
cur_frm.add_custom_button(__('Non-Group to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js
index e2e8340..4578f30 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.js
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js
@@ -1,5 +1,6 @@
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
+{% include "erpnext/public/js/controllers/accounts.js" %}
frappe.ui.form.on('Payment Entry', {
onload: function(frm) {
@@ -257,22 +258,6 @@
}
},
- mode_of_payment: function(frm) {
- return frappe.call({
- method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
- args: {
- "mode_of_payment": frm.doc.mode_of_payment,
- "company": frm.doc.company
- },
- callback: function(r, rt) {
- if(r.message) {
- var payment_account_field = frm.doc.payment_type == "Receive" ? "paid_to" : "paid_from";
- frm.set_value(payment_account_field, r.message['account']);
- }
- }
- });
- },
-
paid_from: function(frm) {
if(frm.set_party_account_based_on_party) return;
diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.js b/erpnext/accounts/doctype/pos_profile/pos_profile.js
index 99438a6..c1aa0c3 100755
--- a/erpnext/accounts/doctype/pos_profile/pos_profile.js
+++ b/erpnext/accounts/doctype/pos_profile/pos_profile.js
@@ -1,6 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
+{% include "erpnext/public/js/controllers/accounts.js" %}
+
frappe.ui.form.on("POS Profile", "onload", function(frm) {
frm.set_query("selling_price_list", function() {
return { filters: { selling: 1 } };
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index c655626..c51231e 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -232,7 +232,8 @@
cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(doc, cdt, cdn) {
return {
- query: "erpnext.controllers.queries.item_query"
+ query: "erpnext.controllers.queries.item_query",
+ filters: {'is_purchase_item': 1}
}
}
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index b247e3e..930f25f 100755
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 1,
@@ -121,6 +122,33 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "description": "",
+ "fieldname": "bill_no",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 1,
+ "in_list_view": 0,
+ "label": "Supplier Invoice No",
+ "length": 0,
+ "no_copy": 0,
+ "oldfieldname": "bill_no",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "is_paid",
"fieldtype": "Check",
"hidden": 0,
@@ -146,6 +174,32 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "default": "0",
+ "fieldname": "is_return",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Is Return",
+ "length": 0,
+ "no_copy": 0,
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 1,
+ "print_hide_if_no_value": 0,
+ "read_only": 1,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"hidden": 0,
@@ -198,19 +252,18 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "description": "",
- "fieldname": "bill_no",
- "fieldtype": "Data",
+ "fieldname": "bill_date",
+ "fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
- "label": "Supplier Invoice No",
+ "label": "Supplier Invoice Date",
"length": 0,
"no_copy": 0,
- "oldfieldname": "bill_no",
- "oldfieldtype": "Data",
+ "oldfieldname": "bill_date",
+ "oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
@@ -225,17 +278,17 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "bill_date",
+ "fieldname": "due_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
- "label": "Supplier Invoice Date",
+ "label": "Due Date",
"length": 0,
"no_copy": 0,
- "oldfieldname": "bill_date",
+ "oldfieldname": "due_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
@@ -303,32 +356,6 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "default": "0",
- "fieldname": "is_return",
- "fieldtype": "Check",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_list_view": 0,
- "label": "Is Return",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
"depends_on": "is_return",
"fieldname": "return_against",
"fieldtype": "Link",
@@ -2501,32 +2528,6 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "due_date",
- "fieldtype": "Date",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 1,
- "in_list_view": 0,
- "label": "Due Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "due_date",
- "oldfieldtype": "Date",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
"fieldname": "against_expense_account",
"fieldtype": "Small Text",
"hidden": 1,
@@ -3031,7 +3032,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-06-30 13:40:39.440648",
+ "modified": "2016-08-10 02:45:28.746569",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index d17e80f..38cef31 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -497,6 +497,18 @@
i += 1
+ if self.update_stock and valuation_tax:
+ for cost_center, amount in valuation_tax.items():
+ gl_entries.append(
+ self.get_gl_dict({
+ "account": self.expenses_included_in_valuation,
+ "cost_center": cost_center,
+ "against": self.supplier,
+ "credit": amount,
+ "remarks": self.remarks or "Accounting Entry for Stock"
+ })
+ )
+
def make_payment_gl_entries(self, gl_entries):
# Make Cash GL Entries
if cint(self.is_paid) and self.cash_bank_account and self.paid_amount:
diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js
index 433cda7..a1d8bf8 100644
--- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js
+++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.js
@@ -18,3 +18,13 @@
}
refresh_field('add_deduct_tax', d.name, 'taxes');
});
+
+frappe.ui.form.on("Purchase Taxes and Charges", "category", function(doc, cdt, cdn) {
+ var d = locals[cdt][cdn];
+
+ if (d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
+ msgprint(__("Cannot deduct when category is for 'Valuation' or 'Vaulation and Total'"));
+ d.add_deduct_tax = '';
+ }
+ refresh_field('add_deduct_tax', d.name, 'taxes');
+});
diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py
index 5cb9f76..df0874b 100644
--- a/erpnext/accounts/doctype/sales_invoice/pos.py
+++ b/erpnext/accounts/doctype/sales_invoice/pos.py
@@ -187,6 +187,8 @@
si_doc.update(doc)
submit_invoice(si_doc, name)
name_list.append(name)
+ else:
+ name_list.append(name)
return name_list
@@ -230,6 +232,7 @@
def save_invoice(e, si_doc, name):
if not frappe.db.exists('Sales Invoice', {'offline_pos_name': name}):
+ si_doc.docstatus = 0
si_doc.flags.ignore_mandatory = True
si_doc.insert()
make_scheduler_log(e, si_doc.name)
diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js
index 850564c..06606a9 100644
--- a/erpnext/accounts/page/pos/pos.js
+++ b/erpnext/accounts/page/pos/pos.js
@@ -428,19 +428,25 @@
}
key = this.search.$input.val().toLowerCase();
+ search_status = true
if(key){
return $.grep(window.items, function(item){
- if(in_list(item.batch_nos, me.search.$input.val())){
- return me.item_batch_no[item.item_code] = me.search.$input.val()
- } else if((item.item_code.toLowerCase().match(key)) ||
- (item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key))){
- return true
- }else if(item.barcode == me.search.$input.val()){
- return item.barcode == me.search.$input.val();
- } else if (in_list(Object.keys(item.serial_nos), me.search.$input.val())){
- me.item_serial_no[item.item_code] = [me.search.$input.val(), item.serial_nos[me.search.$input.val()]]
- return true
+ if(search_status){
+ if(in_list(item.batch_nos, me.search.$input.val())){
+ search_status = false;
+ return me.item_batch_no[item.item_code] = me.search.$input.val()
+ } else if(in_list(Object.keys(item.serial_nos), me.search.$input.val())) {
+ search_status = false;
+ me.item_serial_no[item.item_code] = [me.search.$input.val(), item.serial_nos[me.search.$input.val()]]
+ return true
+ } else if(item.barcode == me.search.$input.val()) {
+ search_status = false;
+ return item.barcode == me.search.$input.val();
+ } else if((item.item_code.toLowerCase().match(key)) ||
+ (item.item_name.toLowerCase().match(key)) || (item.item_group.toLowerCase().match(key))) {
+ return true
+ }
}
})
}else{
@@ -759,6 +765,8 @@
this.update_invoice()
}else{
this.name = $.now();
+ this.frm.doc.posting_date = frappe.datetime.get_today();
+ this.frm.doc.posting_time = frappe.datetime.now_time();
invoice_data[this.name] = this.frm.doc
this.si_docs.push(invoice_data)
this.update_localstorage();
diff --git a/erpnext/accounts/print_format/point_of_sale/point_of_sale.json b/erpnext/accounts/print_format/point_of_sale/point_of_sale.json
index 645fce6..605c032 100644
--- a/erpnext/accounts/print_format/point_of_sale/point_of_sale.json
+++ b/erpnext/accounts/print_format/point_of_sale/point_of_sale.json
@@ -6,9 +6,9 @@
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
- "html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"Invoice\") }}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ item.qty }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
+ "html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n<p class=\"text-center\">\n\t{{ company }}<br>\n\t{{ __(\"Invoice\") }}<br>\n</p>\n<p>\n\t<b>{{ __(\"Date\") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ __(\"Item\") }}</b></th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ __(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{% for item in items %}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_name }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ format_number(item.qty, precision(\"difference\")) }}<br>@ {{ format_currency(item.rate, currency) }}</td>\n\t\t\t<td class=\"text-right\">{{ format_currency(item.amount, currency) }}</td>\n\t\t</tr>\n\t\t{% endfor %}\n\t</tbody>\n</table>\n\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% for row in taxes %}\n\t\t{% if not row.included_in_print_rate %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t{{ row.description }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t{% endfor %}\n\t\t{% if discount_amount %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{% endif %}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ __(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t</td>\n\t\t</tr>\n\t</tbody>\n</table>\n\n\n<hr>\n<p class=\"text-center\">{{ __(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
- "modified": "2016-05-21 00:25:20.359074",
+ "modified": "2016-08-11 07:23:04.530676",
"modified_by": "Administrator",
"name": "Point of Sale",
"owner": "Administrator",
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
index 76e0de2..8ed338e 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -56,14 +56,6 @@
"width": 90
},
{
- "fieldname": "payment_document",
- "label": _("Payment Document"),
- "fieldtype": "Link",
- "options": "DocType",
- "width": 120,
- "hidden": 1
- },
- {
"fieldname": "payment_entry",
"label": _("Payment Entry"),
"fieldtype": "Dynamic Link",
diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py
index d10b3d9..15fd299 100644
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@ -25,6 +25,9 @@
return columns, res
def validate_filters(filters, account_details):
+ if not filters.get('company'):
+ frappe.throw(_('{0} is mandatory').format(_('Company')))
+
if filters.get("account") and not account_details.get(filters.account):
frappe.throw(_("Account {0} does not exists").format(filters.account))
@@ -87,7 +90,7 @@
columns += [
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":160",
_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150",
- _("Project") + ":Link/Project:100", _("Cost Center") + ":Link/Cost Center:100",
+ _("Project") + ":Link/Project:100", _("Cost Center") + ":Link/Cost Center:100",
_("Remarks") + "::400"
]
@@ -111,7 +114,7 @@
if filters.get("group_by_voucher") else "group by name"
gl_entries = frappe.db.sql("""
- select
+ select
posting_date, account, party_type, party,
sum(debit) as debit, sum(credit) as credit,
voucher_type, voucher_no, cost_center, project,
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 2e76516..6e27546 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -79,7 +79,8 @@
}
} else {
return{
- query: "erpnext.controllers.queries.item_query"
+ query: "erpnext.controllers.queries.item_query",
+ filters: {'is_purchase_item': 1}
}
}
});
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.html b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.html
new file mode 100644
index 0000000..e26636e
--- /dev/null
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.html
@@ -0,0 +1,132 @@
+
+<head>
+
+
+ <link href="/assets/frappe/css/c3.min.css" rel="stylesheet" type="text/css">
+
+
+ <script type="text/javascript" src="/assets/frappe/js/lib/d3.min.js"></script>
+ <script type="text/javascript" src="/assets/frappe/js/lib/c3.min.js"></script>
+ <script type="text/javascript">
+
+ onReady("#chart_div", function() {
+ var chartData = [];
+ {% var q = 0; %}
+ {% for(var j=0, m=data.length+1; j<m; j++) { %}
+
+ var tempData{%=j%} = [];
+
+ {% for(var i=1, l=report.columns.length; i<l; i++) { %}
+ {% if(__(report.columns[i].label) != __("Quotation")) { %}
+
+ {% if(j == 0) { %}
+ {% if(i == 1) { %}
+ tempData{%=j%}[{%=i%}-1] = \"x\";
+ {% } else { %}
+
+ tempData{%=j%}[{%=i%}-1] = Math.log(parseInt(\"{%= report.columns[i].label %}\".replace(\"Qty: \",\"\"))) / Math.LN10;
+ {% } %}
+ {% } else { %}
+ {% if(i == 1) { %}
+ tempData{%=j%}[{%=i%}-1] = \"{%= data[j-1][report.columns[i].field] %} \";
+ {% } else { %}
+ tempData{%=j%}[{%=i%}-1] = {% if(data[j-1][report.columns[i].field] == "") { if (i > 2) { %}
+ tempData{%=j%}[{%=i%}-2]
+ {% } else { %}
+ 0
+ {% } } else { %}
+ {%= data[j-1][report.columns[i].field] %}
+ {% } %};
+ {% } %};
+ {% } %}
+ {% } else { %}
+ {% if(j == 0) { %}
+ {% if(i < l-1) { %}
+ tempData{%=j%}[{%=i%}-1] = Math.log(parseInt(\"{%= report.columns[i+1].label %}\".replace(\"Qty: \",\"\"))-1) / Math.LN10;
+ {% } else { %}
+ tempData{%=j%}[{%=i%}-1] = Math.log(2*parseInt(\"{%= report.columns[i-1].label %}\".replace(\"Qty: \",\"\"))) / Math.LN10;
+ {% } %}
+ {% } else { %}
+
+ tempData{%=j%}[{%=i%}-1] = tempData{%=j%}[{%=i%}-2];
+ {% } %}
+
+ {% } %}
+
+ {% } %}
+ chartData[{%=j%}] = tempData{%=j%};
+ {% } %}
+ console.log(chartData);
+
+ hold = {
+ bindto: "#chart_div" ,data: {
+ x: "x",
+ columns: chartData
+ },
+ axis: {
+ x: {
+ tick: {
+ format: function (x22) { return Math.pow(10,x22).toFixed(0); },
+ culling: {
+ max: {%=report.columns.length%} / 2
+ }
+
+ }
+ }
+ },
+ point: {
+ show: false
+ }
+ };
+ console.log(hold);
+ var chart = c3.generate(hold);
+ });
+
+ function onReady(selector, callback) {
+ var intervalID = window.setInterval(function() {
+ if (document.querySelector(selector) !== undefined) {
+ window.clearInterval(intervalID);
+ callback.call(this);
+ }
+ }, 500);}
+
+
+ </script>
+
+ </head>
+<div style="margin-bottom: 7px;" class="text-center">
+ {%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
+</div>
+<h2 class="text-center">{%= __(report.report_name) %}</h2>
+<h4 class="text-center">{%= filters.item %} </h4>
+
+<hr>
+<table class="table table-bordered">
+ <thead>
+ <tr>
+ {% for(var i=0, l=report.columns.length; i<l; i++) { %}
+ <th style="width: 15%">{%= report.columns[i].label %}</th>
+ {% } %}
+
+ </tr>
+ </thead>
+ <tbody>
+
+ {% for(var i=0, l=data.length; i<l; i++) { %}
+ <tr>
+
+ {% for(var j=0,m=report.columns.length; j<m; j++) { %}
+ <td style="width: 15%">{%= data[i][report.columns[j].field] %}</td>
+ {% } %}
+
+ </tr>
+ {% } %}
+ </tbody>
+</table>
+
+<h4 class="text-center"> Analysis Chart </h4>
+<div id="chart_div"></div>
+
+
+
+<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
\ No newline at end of file
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
index 45bc738..0f44baa 100644
--- a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.js
@@ -11,5 +11,72 @@
"default": ""
}
- ]
+ ],
+ onload: function(report) {
+ //Create a button for setting the default supplier
+ report.page.add_inner_button(__("Select Default Supplier"), function() {
+
+ var reporter = frappe.query_reports["Quoted Item Comparison"];
+
+ //Always make a new one so that the latest values get updated
+ reporter.make_default_supplier_dialog(report);
+ report.dialog.show();
+ setTimeout(function() { report.dialog.input.focus(); }, 1000);
+
+ }, 'Tools');
+
+ },
+ "make_default_supplier_dialog": function (report) {
+ //Get the name of the item to change
+ var filters = report.get_values();
+ var item_code = filters.item;
+
+ //Get a list of the suppliers (with a blank as well) for the user to select
+ var select_options = "";
+ for (let supplier of report.data)
+ {
+ select_options += supplier.supplier_name+ '\n'
+ }
+
+ //Create a dialog window for the user to pick their supplier
+ var d = new frappe.ui.Dialog({
+ title: __('Select Default Supplier'),
+ fields: [
+ {fieldname: 'supplier', fieldtype:'Select', label:'Supplier', reqd:1,options:select_options},
+ {fieldname: 'ok_button', fieldtype:'Button', label:'Set Default Supplier'},
+ ]
+ });
+
+ //On the user clicking the ok button
+ d.fields_dict.ok_button.input.onclick = function() {
+ var btn = d.fields_dict.ok_button.input;
+ var v = report.dialog.get_values();
+ if(v) {
+ $(btn).set_working();
+
+ //Set the default_supplier field of the appropriate Item to the selected supplier
+ frappe.call({
+ method: "frappe.client.set_value",
+ args: {
+ doctype: "Item",
+ name: item_code,
+ fieldname: "default_supplier",
+ value: v.supplier,
+ },
+ callback: function (r){
+ $(btn).done_working();
+ msgprint("Successfully Set Supplier");
+ report.dialog.hide();
+
+ }
+ });
+ }
+ }
+ report.dialog = d;
+
+
+ }
+
}
+
+
diff --git a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
index 5bf9c7b..1793fc3 100644
--- a/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
+++ b/erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
@@ -2,6 +2,8 @@
# For license information, please see license.txt
from __future__ import unicode_literals
+from erpnext.setup.utils import get_exchange_rate
+
import frappe
def execute(filters=None):
@@ -22,6 +24,7 @@
if item:
price_data = []
suppliers = []
+ company_currency = frappe.db.get_default("currency")
# 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):
@@ -35,6 +38,9 @@
#Add a row for each supplier
for root in set(suppliers):
+ supplier_currency = frappe.db.get_value("Supplier",root,"default_currency")
+ exg = get_exchange_rate(supplier_currency,company_currency)
+
row = frappe._dict({
"supplier_name": root
})
@@ -42,7 +48,7 @@
# 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] = item_price.rate * exg
row[col.key + "QUOTE"] = item_price.parent
break
else:
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 21a7429..c9f1ffb 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -51,7 +51,8 @@
this.frm.set_query("item_code", "items", function() {
return {
- query: "erpnext.controllers.queries.item_query"
+ query: "erpnext.controllers.queries.item_query",
+ filters: {'is_sales_item': 1}
};
});
diff --git a/erpnext/docs/assets/img/accounts/perpetual-2.png b/erpnext/docs/assets/img/accounts/perpetual-2.png
new file mode 100644
index 0000000..5a2b20b
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/perpetual-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/accounts/perpetual-3.png b/erpnext/docs/assets/img/accounts/perpetual-3.png
new file mode 100644
index 0000000..faa7724
--- /dev/null
+++ b/erpnext/docs/assets/img/accounts/perpetual-3.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-1.gif b/erpnext/docs/assets/img/articles/fixed-asset-dep-1.gif
deleted file mode 100644
index e6330ad..0000000
--- a/erpnext/docs/assets/img/articles/fixed-asset-dep-1.gif
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.png b/erpnext/docs/assets/img/articles/fixed-asset-dep-2.png
deleted file mode 100644
index 0679403..0000000
--- a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/freeze-account-1.png b/erpnext/docs/assets/img/articles/freeze-account-1.png
new file mode 100644
index 0000000..c2f4257
--- /dev/null
+++ b/erpnext/docs/assets/img/articles/freeze-account-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/freeze-account-2.png b/erpnext/docs/assets/img/articles/freeze-account-2.png
new file mode 100644
index 0000000..4562a26
--- /dev/null
+++ b/erpnext/docs/assets/img/articles/freeze-account-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/post-dated-1.gif b/erpnext/docs/assets/img/articles/post-dated-1.gif
deleted file mode 100644
index 3bb03b5..0000000
--- a/erpnext/docs/assets/img/articles/post-dated-1.gif
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/post-dated-1.png b/erpnext/docs/assets/img/articles/post-dated-1.png
new file mode 100644
index 0000000..50696b7
--- /dev/null
+++ b/erpnext/docs/assets/img/articles/post-dated-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/assets/img/schools/__init__.py
similarity index 100%
rename from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
rename to erpnext/docs/assets/img/schools/__init__.py
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/assets/img/schools/fees/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/assets/img/schools/fees/__init__.py
diff --git a/erpnext/docs/assets/img/schools/fees/fee-category.png b/erpnext/docs/assets/img/schools/fees/fee-category.png
new file mode 100644
index 0000000..6c8d2e9
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/fees/fee-category.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/fees/fee-structure.png b/erpnext/docs/assets/img/schools/fees/fee-structure.png
new file mode 100644
index 0000000..81f3e20
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/fees/fee-structure.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/fees/fees-section.png b/erpnext/docs/assets/img/schools/fees/fees-section.png
new file mode 100644
index 0000000..119877a
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/fees/fees-section.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/fees/fees.png b/erpnext/docs/assets/img/schools/fees/fees.png
new file mode 100644
index 0000000..e2a2fd7
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/fees/fees.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/home.png b/erpnext/docs/assets/img/schools/home.png
new file mode 100644
index 0000000..4c27d5b
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/home.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/assets/img/schools/schedule/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/assets/img/schools/schedule/__init__.py
diff --git a/erpnext/docs/assets/img/schools/schedule/course-schedule-att-1.png b/erpnext/docs/assets/img/schools/schedule/course-schedule-att-1.png
new file mode 100644
index 0000000..07130ca
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/course-schedule-att-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/schedule/course-schedule-att.png b/erpnext/docs/assets/img/schools/schedule/course-schedule-att.png
new file mode 100644
index 0000000..df1b3af
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/course-schedule-att.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/schedule/course-schedule.png b/erpnext/docs/assets/img/schools/schedule/course-schedule.png
new file mode 100644
index 0000000..c58cabf
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/course-schedule.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/schedule/examination.png b/erpnext/docs/assets/img/schools/schedule/examination.png
new file mode 100644
index 0000000..4e58565
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/examination.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/schedule/schedule-section.png b/erpnext/docs/assets/img/schools/schedule/schedule-section.png
new file mode 100644
index 0000000..c942a0f
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/schedule-section.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/schedule/scheduling-tool.png b/erpnext/docs/assets/img/schools/schedule/scheduling-tool.png
new file mode 100644
index 0000000..da20eaf
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/scheduling-tool.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/schedule/student-attendance.png b/erpnext/docs/assets/img/schools/schedule/student-attendance.png
new file mode 100644
index 0000000..5cc4086
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/schedule/student-attendance.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/assets/img/schools/setup/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/assets/img/schools/setup/__init__.py
diff --git a/erpnext/docs/assets/img/schools/setup/academic-term.png b/erpnext/docs/assets/img/schools/setup/academic-term.png
new file mode 100644
index 0000000..6230f49
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/academic-term.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/setup/academic-year.png b/erpnext/docs/assets/img/schools/setup/academic-year.png
new file mode 100644
index 0000000..83aa64c
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/academic-year.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/setup/course.png b/erpnext/docs/assets/img/schools/setup/course.png
new file mode 100644
index 0000000..fe9fbb3
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/course.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/setup/instructor.png b/erpnext/docs/assets/img/schools/setup/instructor.png
new file mode 100644
index 0000000..8ea86bb
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/instructor.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/setup/program.png b/erpnext/docs/assets/img/schools/setup/program.png
new file mode 100644
index 0000000..2498716
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/program.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/setup/room.png b/erpnext/docs/assets/img/schools/setup/room.png
new file mode 100644
index 0000000..fd1831e
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/room.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/setup/setup-section.png b/erpnext/docs/assets/img/schools/setup/setup-section.png
new file mode 100644
index 0000000..c02bbc4
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/setup/setup-section.png
Binary files differ
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/assets/img/schools/student/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/assets/img/schools/student/__init__.py
diff --git a/erpnext/docs/assets/img/schools/student/program-enrollment.png b/erpnext/docs/assets/img/schools/student/program-enrollment.png
new file mode 100644
index 0000000..df96f3c
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/program-enrollment.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/student/student-applicant-enroll.png b/erpnext/docs/assets/img/schools/student/student-applicant-enroll.png
new file mode 100644
index 0000000..fb92a67
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/student-applicant-enroll.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/student/student-applicant.png b/erpnext/docs/assets/img/schools/student/student-applicant.png
new file mode 100644
index 0000000..4834cf6
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/student-applicant.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/student/student-group-creation-tool.png b/erpnext/docs/assets/img/schools/student/student-group-creation-tool.png
new file mode 100644
index 0000000..32e6498
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/student-group-creation-tool.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/student/student-group.png b/erpnext/docs/assets/img/schools/student/student-group.png
new file mode 100644
index 0000000..894ef91
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/student-group.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/student/student-section.png b/erpnext/docs/assets/img/schools/student/student-section.png
new file mode 100644
index 0000000..009443d
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/student-section.png
Binary files differ
diff --git a/erpnext/docs/assets/img/schools/student/student.png b/erpnext/docs/assets/img/schools/student/student.png
new file mode 100644
index 0000000..79dc0f9
--- /dev/null
+++ b/erpnext/docs/assets/img/schools/student/student.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup-wizard/step-1.png b/erpnext/docs/assets/img/setup-wizard/step-1.png
new file mode 100644
index 0000000..0a3c230
--- /dev/null
+++ b/erpnext/docs/assets/img/setup-wizard/step-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/dropbox-1.png b/erpnext/docs/assets/img/setup/dropbox-1.png
new file mode 100644
index 0000000..f839d25
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/dropbox-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/dropbox-2.png b/erpnext/docs/assets/img/setup/dropbox-2.png
new file mode 100644
index 0000000..d0a6558
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/dropbox-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/dropbox-3.png b/erpnext/docs/assets/img/setup/dropbox-3.png
new file mode 100644
index 0000000..0275597
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/dropbox-3.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/dropbox-open-1.png b/erpnext/docs/assets/img/setup/dropbox-open-1.png
new file mode 100644
index 0000000..cc1d57c
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/dropbox-open-1.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/dropbox-open-2.png b/erpnext/docs/assets/img/setup/dropbox-open-2.png
new file mode 100644
index 0000000..969d7a7
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/dropbox-open-2.png
Binary files differ
diff --git a/erpnext/docs/assets/img/setup/dropbox-open-3.png b/erpnext/docs/assets/img/setup/dropbox-open-3.png
new file mode 100644
index 0000000..150a95a
--- /dev/null
+++ b/erpnext/docs/assets/img/setup/dropbox-open-3.png
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/permissions-lead-list.png b/erpnext/docs/assets/img/users-and-permissions/permissions-lead-list.png
new file mode 100644
index 0000000..c2fdc7c
--- /dev/null
+++ b/erpnext/docs/assets/img/users-and-permissions/permissions-lead-list.png
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/user-permission-company.png b/erpnext/docs/assets/img/users-and-permissions/user-permission-company.png
new file mode 100644
index 0000000..eb529f1
--- /dev/null
+++ b/erpnext/docs/assets/img/users-and-permissions/user-permission-company.png
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/user-permission-quotation.png b/erpnext/docs/assets/img/users-and-permissions/user-permission-quotation.png
new file mode 100644
index 0000000..ee7a19b
--- /dev/null
+++ b/erpnext/docs/assets/img/users-and-permissions/user-permission-quotation.png
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/user-permission-user-limited-by-company.png b/erpnext/docs/assets/img/users-and-permissions/user-permission-user-limited-by-company.png
deleted file mode 100644
index e23f122..0000000
--- a/erpnext/docs/assets/img/users-and-permissions/user-permission-user-limited-by-company.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/user-permissions-company-wind-power-llc.png b/erpnext/docs/assets/img/users-and-permissions/user-permissions-company-wind-power-llc.png
deleted file mode 100644
index 6d78e5d..0000000
--- a/erpnext/docs/assets/img/users-and-permissions/user-permissions-company-wind-power-llc.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/user-permissions-company.png b/erpnext/docs/assets/img/users-and-permissions/user-permissions-company.png
deleted file mode 100644
index e091a61..0000000
--- a/erpnext/docs/assets/img/users-and-permissions/user-permissions-company.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/img/users-and-permissions/user-permissions-new.gif b/erpnext/docs/assets/img/users-and-permissions/user-permissions-new.gif
new file mode 100644
index 0000000..609bf25
--- /dev/null
+++ b/erpnext/docs/assets/img/users-and-permissions/user-permissions-new.gif
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/accounting-for-stock-2.png b/erpnext/docs/assets/old_images/erpnext/accounting-for-stock-2.png
deleted file mode 100644
index f194360..0000000
--- a/erpnext/docs/assets/old_images/erpnext/accounting-for-stock-2.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/accounting-for-stock-3.png b/erpnext/docs/assets/old_images/erpnext/accounting-for-stock-3.png
deleted file mode 100644
index c6e336f..0000000
--- a/erpnext/docs/assets/old_images/erpnext/accounting-for-stock-3.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/user-permissions-lead-based-on-territory.png b/erpnext/docs/assets/old_images/erpnext/user-permissions-lead-based-on-territory.png
deleted file mode 100644
index e0b2373..0000000
--- a/erpnext/docs/assets/old_images/erpnext/user-permissions-lead-based-on-territory.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/assets/old_images/erpnext/user-permissions-quotation-list.png b/erpnext/docs/assets/old_images/erpnext/user-permissions-quotation-list.png
deleted file mode 100644
index 8a7e9c6..0000000
--- a/erpnext/docs/assets/old_images/erpnext/user-permissions-quotation-list.png
+++ /dev/null
Binary files differ
diff --git a/erpnext/docs/user/manual/en/accounts/articles/cheque-print.md b/erpnext/docs/user/manual/en/accounts/articles/cheque-print.md
deleted file mode 100644
index 811e948..0000000
--- a/erpnext/docs/user/manual/en/accounts/articles/cheque-print.md
+++ /dev/null
@@ -1,36 +0,0 @@
-#Cheque Print
-
-** Whats is Cheque Print? **
-
-You can choose to print Cheques at the time of making payments to Creditors/ parties during Voucher Entry i.e., directly from the Payment Vouchers and Inter-bank payment or transfers through Contra Vouchers.
-
-###Setup Cheque Print
-
-To enable cheque printing,
-
-1. Create cheque settings under `Accounts > Cheque Print Template`.
-
-
-
-You can see a preview of cheque print by attaching scanned copy of cheque to avoid miss printing.
-
-
-
-
-
-2. After saving cheque print settings, you can Create / Update print format for settings.
-
-To create print format, click on `Create Print Format`.
-
-
-
-If you have already created a Print Format, you can update it by clicking on `Update Print Format`.
-
-3. You will see newly created / updated print format under Journal Entry.
-
-
-
-
-###Cheque Print
-
-
diff --git a/erpnext/docs/user/manual/en/accounts/articles/depreciation-for-fixed-asset-items.md b/erpnext/docs/user/manual/en/accounts/articles/depreciation-for-fixed-asset-items.md
deleted file mode 100644
index f7d1c5b..0000000
--- a/erpnext/docs/user/manual/en/accounts/articles/depreciation-for-fixed-asset-items.md
+++ /dev/null
@@ -1,41 +0,0 @@
-#Depreciation for Fixed Asset Items
-
-Depreciation is when you write off certain value of your assets as an expense. For example, office computer will be used for five years. Hence total value of computer should be booked as expense over the period of five years.
-
-As per perpetual inventory valuation system (set by default), you should create Stock Reconciliation for depreciating value of fixed asset items. Check below steps to learn more.
-
-#### Step 1: Depreciation Account
-
-Depreciation account is auto-created, under Indirect Expenses account.
-
-<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/depreciation-1.png">
-
-#### Step 2: Stock Reconciliation
-
-To create new Stock Reconciliation, go to:
-
-`Stock > Setup > Stock Reconciliation > New`
-
-Set Posting Date and Time of Stock Reconciliation will when you wish depreciation entry to be posted in your accounts.
-
-#### Step 3: Item
-
-Select Fixed Asset Items in the item table. Update Warehouse of an item. For item valuation, update post-depreciation value. For example, item value was 100. Depreciation amount is 20. As per this post-depreciation valuation of an item will be 80. Hence 80 should be posted as valuation in the Stock Reconciliation.
-
-<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/depreciation-2.png">
-
-#### Step 4: Depreciation Account
-
-Select Depereciation Account in which depereciation amount will be booked.
-
-<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/depreciation-3.png">
-
-#### Step 5: Submit
-
-On submission of Stock Reconciliation, depreciation will booked for items asset items.
-
-<img alt="Project Default Cost Center" class="screenshot" src="{{docs_base_url}}/assets/img/articles/depreciation-4.png">
-
-Click [here]({{docs_base_url}}/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item.html) for steps to be followed when making Stock Reconciliation entry.
-
-<!-- markdown -->
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/accounts/articles/how-to-freeze-accounting-ledger.md b/erpnext/docs/user/manual/en/accounts/articles/how-to-freeze-accounting-ledger.md
index f21bf2d..80aed6d 100644
--- a/erpnext/docs/user/manual/en/accounts/articles/how-to-freeze-accounting-ledger.md
+++ b/erpnext/docs/user/manual/en/accounts/articles/how-to-freeze-accounting-ledger.md
@@ -1,28 +1,36 @@
#How To Freeze Accounting Ledger?
-You can freeze any accounting ledger in ERPNext. So that frozen accounting ledger became unsearchable in accounting transaction. Follow below step to understand the process.
+If you want to discontinue using specific Account, you can freeze it.
-#### 1. Set Frozen Accounts Modifier
+>Account can be Frozen by the User having specific Role. This Role for set in the Account Settings, in the field "Role Allowed to Set Frozen Accounts & Edit Frozen Entries".
-To set frozen accounts modifier go to `Accounts > Setup > Accounts Setting`
+Please check following steps to freeze an Account from the Chart of Accounts master.
-Search and select Role under Frozen Accounts Modifier field and save the Account Settings form.
-
-
+####Step 1: Chart of Accounts
-#### 2. Edit Accounting Ledger.
+To edit an Account, go to Chart of Accounts:
-To edit accounting ledger go to `Accounts > Setup > Chart of Accounts`
+`Explore > Accounts > Chart of Accounts`
-
+<img class="screenshot" alt="Freeze Account" src="{{docs_base_url}}/assets/img/articles/freeze-account-1.png">
-#### 3. Set Frozen Status of Ledger.
+Click on Account in which Frozen Date is to be updated.
-
+####Step 2: Set Account as Frozen
-Set Frozen field status of ledger as 'Yes' and save the ledger form. On save this ledger will be frozen and you will became unable to search this ledger in accounting transactions.
+In the Account form, you will find a field called **Frozen**. Set value in this field as 'Yes'
-<div class ="well"> Note: If you want to make accounting transaction against this ledger in the future, then that time again set frozen field status as 'No'.</div>
+<img class="screenshot" alt="Freeze Account" src="{{docs_base_url}}/assets/img/articles/freeze-account-2.png">
+
+####Step 3: Save
+
+After update Save an Account.
+
+On saving, this Account will be frozen and will not be selectable in any accounting transaction.
+
+<div class ="well"> Note: In future, if you want to make an accounting transaction against this Account, then you can unfreeze this account by setting values in the Frozen field as 'No'.</div>
+
+
<!-- markdown -->
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/accounts/articles/index.txt b/erpnext/docs/user/manual/en/accounts/articles/index.txt
index d54f0cd..c2fbf70 100644
--- a/erpnext/docs/user/manual/en/accounts/articles/index.txt
+++ b/erpnext/docs/user/manual/en/accounts/articles/index.txt
@@ -1,7 +1,5 @@
tracking-project-profitability-using-cost-center
-c-form
changing-parent-account
-depreciation-for-fixed-asset-items
difference-entry-button
fiscal-year-error
freeze-accounting-entries
@@ -13,4 +11,4 @@
update-stock-option-in-sales-invoice
what-is-the-differences-of-total-and-valuation-in-tax-and-charges
withdrawing-salary-from-owners-equity-account
-cheque-print
\ No newline at end of file
+c-form
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/accounts/articles/post-dated-cheque-entry.md b/erpnext/docs/user/manual/en/accounts/articles/post-dated-cheque-entry.md
index 66da24e..0b61000 100644
--- a/erpnext/docs/user/manual/en/accounts/articles/post-dated-cheque-entry.md
+++ b/erpnext/docs/user/manual/en/accounts/articles/post-dated-cheque-entry.md
@@ -1,32 +1,32 @@
#Post Dated Cheque Entry
-Post Dated Cheque is a cheque dated on future date. Party generally give post dated cheque, as advance payment. This cheque would be cleared only after cheque date has arrived.
+Post Dated Cheque is a cheque dated on future date. Party generally give post dated cheque, as advance payment. This cheque would be cleared only when cheque date arrives.
-In ERPNext, create Journal Entries for post dated cheque.
+In ERPNext, create Payment Entry for post dated cheque.
-####New Journal Entry
+####New Payment Entry
To open new journal voucher go to
-`Accounts > Documents > Journal Entry > New`
+`Explore > Accounts > Payment Entry > New`
#### Set Posting Date
Assuming your Cheque Date is 31st December, 2016 (or any future date). As a result, this posting in your bank ledger will appear on Posting Date updated.
-<img alt="JE Posting Date" class="screenshot" src="{{docs_base_url}}/assets/img/articles/post-dated-1.gif">
+<img alt="JE Posting Date" class="screenshot" src="{{docs_base_url}}/assets/img/articles/post-dated-1.png">
-Note: Journal Voucher Reference Date should equal to or less than Posting Date.
+Note: Payment Entry Reference Date should equal to or less than Posting Date.
####Step 3: Save and Submit
-After entering required details, Save and Submit the Journal Entry.
+After entering required details, Save and Submit the Payment Entry.
####Adjusting Post Dated Cheque Entry
-If Post Dated Journal Entry needs to be adjusted against any invoice, it can be accomplished via [Payment Reconciliation Tool]({{docs_base_url}}/user/manual/en/accounts/tools/payment-reconciliation.html).
+You can adjust Post Dated Payment Entry against an invoice via [Payment Reconciliation Tool]({{docs_base_url}}/user/manual/en/accounts/tools/payment-reconciliation.html).
When cheque is cleared, i.e. on actual date on the cheque, you can update its Clearance Date via [Bank Reconciliation Tool]({{docs_base_url}}/user/manual/en/accounts/tools/bank-reconciliation.html).
-You might find value of this Journal Entry already reflecting against bank's ledger. You should check **Bank Reconciliation Statement**, a report in the account module to know difference of bank balance as per system, and actual balance in a account.
+In the Chart of Accounts, you might find value of this Payment Entry already reflecting against bank Account. You should check **Bank Reconciliation Statement**, a report in the account module to know difference of bank balance as per system, and actual balance in the bank's statement.
<!-- markdown -->
\ No newline at end of file
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/user/manual/en/schools/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/user/manual/en/schools/__init__.py
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/user/manual/en/schools/fees/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/user/manual/en/schools/fees/__init__.py
diff --git a/erpnext/docs/user/manual/en/schools/fees/fee-category.md b/erpnext/docs/user/manual/en/schools/fees/fee-category.md
new file mode 100644
index 0000000..d6694b5
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/fees/fee-category.md
@@ -0,0 +1,7 @@
+# Fee Category
+
+List of all different type of fees collected.
+
+<img class="screenshot" alt="Fees Category" src="{{url_prefix}}/assets/img/schools/fees/fee-category.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/fees/fee-structure.md b/erpnext/docs/user/manual/en/schools/fees/fee-structure.md
new file mode 100644
index 0000000..08d09e5
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/fees/fee-structure.md
@@ -0,0 +1,7 @@
+# Fee Structure
+
+A Fee Structure is a template that can be used while making fee records.
+
+<img class="screenshot" alt="Fees Structure" src="{{url_prefix}}/assets/img/schools/fees/fee-structure.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/fees/fees.md b/erpnext/docs/user/manual/en/schools/fees/fees.md
new file mode 100644
index 0000000..242abf8
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/fees/fees.md
@@ -0,0 +1,8 @@
+# Fees
+
+Maintain a record of fees collected from students.
+The [Fee Structure]({{docs_base_url}}/user/manual/en/schools/fees/fee-structure.html) is fetched based on the selected Program and Academic Term.
+
+<img class="screenshot" alt="Fees" src="{{url_prefix}}/assets/img/schools/fees/fees.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/fees/index.md b/erpnext/docs/user/manual/en/schools/fees/index.md
new file mode 100644
index 0000000..f75c537
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/fees/index.md
@@ -0,0 +1,9 @@
+# Fees
+
+This section contains 'Fee' related documents.
+
+<img class="screenshot" alt="Fees Section" src="{{url_prefix}}/assets/img/schools/fees/fees-section.png">
+
+### Topics
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/fees/index.txt b/erpnext/docs/user/manual/en/schools/fees/index.txt
new file mode 100644
index 0000000..265ac6a
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/fees/index.txt
@@ -0,0 +1,3 @@
+fees
+fee-structure
+fee-category
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/index.md b/erpnext/docs/user/manual/en/schools/index.md
new file mode 100644
index 0000000..0dff60b
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/index.md
@@ -0,0 +1 @@
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/index.txt b/erpnext/docs/user/manual/en/schools/index.txt
new file mode 100644
index 0000000..780bfa5
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/index.txt
@@ -0,0 +1,4 @@
+student
+schedule
+fees
+setup
\ No newline at end of file
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/user/manual/en/schools/schedule/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/user/manual/en/schools/schedule/__init__.py
diff --git a/erpnext/docs/user/manual/en/schools/schedule/course-schedule.md b/erpnext/docs/user/manual/en/schools/schedule/course-schedule.md
new file mode 100644
index 0000000..9c27f61
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/schedule/course-schedule.md
@@ -0,0 +1,25 @@
+# Course Schedule
+
+Course Schedule is the schedule of a session conducted by an Instructor for a particular Course.
+You can see the overall course schedule in the Calendar view.
+
+<img class="screenshot" alt="Course Schedule" src="{{url_prefix}}/assets/img/schools/schedule/course-schedule.png">
+
+### Marking Attendance
+
+You can mark attendance for a Student Group against a Course Schedule.
+
+<img class="screenshot" alt="Course Schedule Attendance" src="{{url_prefix}}/assets/img/schools/schedule/course-schedule-att.png">
+
+- To make attendance, expand the attendance section.
+- Check the students who were present for that session.
+- Click on 'Mark Attendance'. The system will create the Attendance records.
+
+###View Attendance
+
+Once you have marked Attendance against a Course Schedule the Attendance section in the Course Schedule shall be hidden.
+A View Attendance button shall appear. Click on that button to view all attendance records created against that Course Schedule.
+
+<img class="screenshot" alt="Course Schedule Attendance" src="{{url_prefix}}/assets/img/schools/schedule/course-schedule-att-1.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/schedule/examination.md b/erpnext/docs/user/manual/en/schools/schedule/examination.md
new file mode 100644
index 0000000..cd5d838
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/schedule/examination.md
@@ -0,0 +1,8 @@
+# Examination
+
+The Examination record can be used to track the exam schedule and the results of that exam.
+
+<img class="screenshot" alt="Examination" src="{{url_prefix}}/assets/img/schools/schedule/examination.png">
+
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/schedule/index.md b/erpnext/docs/user/manual/en/schools/schedule/index.md
new file mode 100644
index 0000000..3fd993e
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/schedule/index.md
@@ -0,0 +1,7 @@
+# Schedule
+
+<img class="screenshot" alt="Schedule Section" src="{{url_prefix}}/assets/img/schools/schedule/schedule-section.png">
+
+### Topics
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/schedule/index.txt b/erpnext/docs/user/manual/en/schools/schedule/index.txt
new file mode 100644
index 0000000..704ad84
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/schedule/index.txt
@@ -0,0 +1,4 @@
+course-schedule
+student-attendance
+scheduling-tool
+examination
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/schedule/scheduling-tool.md b/erpnext/docs/user/manual/en/schools/schedule/scheduling-tool.md
new file mode 100644
index 0000000..84b3908
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/schedule/scheduling-tool.md
@@ -0,0 +1,23 @@
+# Scheduling Tool
+
+This tool can be used to create 'Course Schedules'.
+
+<img class="screenshot" alt="Scheduling Tool" src="{{url_prefix}}/assets/img/schools/schedule/scheduling-tool.png">
+
+### Creating Course Schedules
+
+- Select Student Group for which you need to create Course Schedules.
+- Select Course, Room and Instructor for Course Schedules.
+- Enter From Time and To Time for Course Schedule.
+- Enter Start Date and End Date of the Course (Course Schedules will be created within this date range)
+- Enter Day of the week on which you want to schedule the Course.
+- Click on the 'Schedule Course' button
+- The system will create Course Schedules if the Room and Instructor are available and there is no conflict for the selected Student Group with other Course Schedules.
+
+###Rescheduling
+
+- If you wish to reschedule Course Schedules created against a Course, follow the instructions for creating course schedules
+- Check the 'Reschedule' checkbox and then click 'Schedule Course' button.
+- System will delete existing Course Schedules for specified Course within the mentioned Course Start Date and Course End Date and crate new Course Schedules.
+
+{next}
diff --git a/erpnext/docs/user/manual/en/schools/schedule/student-attendance.md b/erpnext/docs/user/manual/en/schools/schedule/student-attendance.md
new file mode 100644
index 0000000..474b543
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/schedule/student-attendance.md
@@ -0,0 +1,7 @@
+# Student Attendance
+
+Maintains attendance record of the student. Attendance Records can be created against Course Schedules.
+
+<img class="screenshot" alt="Student Attendance" src="{{url_prefix}}/assets/img/schools/schedule/student-attendance.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/user/manual/en/schools/setup/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/user/manual/en/schools/setup/__init__.py
diff --git a/erpnext/docs/user/manual/en/schools/setup/academic-term.md b/erpnext/docs/user/manual/en/schools/setup/academic-term.md
new file mode 100644
index 0000000..dbce6d9
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/academic-term.md
@@ -0,0 +1,6 @@
+# Academic Term
+
+<img class="screenshot" alt="Academic Term" src="{{url_prefix}}/assets/img/schools/setup/academic-term.png">
+
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/academic-year.md b/erpnext/docs/user/manual/en/schools/setup/academic-year.md
new file mode 100644
index 0000000..4a15393
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/academic-year.md
@@ -0,0 +1,5 @@
+# Academic Year
+
+<img class="screenshot" alt="Academic Year" src="{{url_prefix}}/assets/img/schools/setup/academic-year.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/course.md b/erpnext/docs/user/manual/en/schools/setup/course.md
new file mode 100644
index 0000000..da5fa37
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/course.md
@@ -0,0 +1,5 @@
+# Course
+
+<img class="screenshot" alt="Course" src="{{url_prefix}}/assets/img/schools/setup/course.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/index.md b/erpnext/docs/user/manual/en/schools/setup/index.md
new file mode 100644
index 0000000..5a360dd
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/index.md
@@ -0,0 +1,7 @@
+# Setup
+
+<img class="screenshot" alt="Setup Section" src="{{url_prefix}}/assets/img/schools/setup/setup-section.png">
+
+### Topics
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/index.txt b/erpnext/docs/user/manual/en/schools/setup/index.txt
new file mode 100644
index 0000000..fb9ba05
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/index.txt
@@ -0,0 +1,6 @@
+course
+program
+instructor
+room
+academic-term
+academic-year
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/instructor.md b/erpnext/docs/user/manual/en/schools/setup/instructor.md
new file mode 100644
index 0000000..adbfe2a
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/instructor.md
@@ -0,0 +1,5 @@
+# Instructor
+
+<img class="screenshot" alt="Instructor" src="{{url_prefix}}/assets/img/schools/setup/instructor.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/program.md b/erpnext/docs/user/manual/en/schools/setup/program.md
new file mode 100644
index 0000000..813019b
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/program.md
@@ -0,0 +1,5 @@
+# Program
+
+<img class="screenshot" alt="Program" src="{{url_prefix}}/assets/img/schools/setup/program.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/setup/room.md b/erpnext/docs/user/manual/en/schools/setup/room.md
new file mode 100644
index 0000000..052e962
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/setup/room.md
@@ -0,0 +1,6 @@
+# Room
+
+
+<img class="screenshot" alt="Room" src="{{url_prefix}}/assets/img/schools/setup/room.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping b/erpnext/docs/user/manual/en/schools/student/__init__.py
similarity index 100%
copy from erpnext/docs/assets/img/articles/fixed-asset-dep-2.textClipping
copy to erpnext/docs/user/manual/en/schools/student/__init__.py
diff --git a/erpnext/docs/user/manual/en/schools/student/index.md b/erpnext/docs/user/manual/en/schools/student/index.md
new file mode 100644
index 0000000..12d8b82
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/index.md
@@ -0,0 +1,9 @@
+# Student
+
+This section contains student related documents.
+
+<img class="screenshot" alt="Student Section" src="{{url_prefix}}/assets/img/schools/student/student-section.png">
+
+### Topics
+
+{index}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/student/index.txt b/erpnext/docs/user/manual/en/schools/student/index.txt
new file mode 100644
index 0000000..1e34141
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/index.txt
@@ -0,0 +1,5 @@
+student-applicant
+student
+program-enrollment
+student-group
+student-group-creation-tool
diff --git a/erpnext/docs/user/manual/en/schools/student/program-enrollment.md b/erpnext/docs/user/manual/en/schools/student/program-enrollment.md
new file mode 100644
index 0000000..2c8ec12
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/program-enrollment.md
@@ -0,0 +1,5 @@
+This form allows you to enroll a student to a program. A student can be enrolled to multiple programs.
+
+<img class="screenshot" alt="Student Applicant Enrollment" src="{{url_prefix}}/assets/img/schools/student/program-enrollment.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/schools/student/student-applicant.md b/erpnext/docs/user/manual/en/schools/student/student-applicant.md
new file mode 100644
index 0000000..cd4426c
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/student-applicant.md
@@ -0,0 +1,28 @@
+# Student Applicant
+
+A Student Applicant record needs to be created when a student applies for a program at your institute.
+You can Approve or Reject a student applicant. By accepting a student applicant you can add them to the student master.
+
+<img class="screenshot" alt="Student Applicant" src="{{url_prefix}}/assets/img/schools/student/student-applicant.png">
+
+### Application Status
+
+- By default when a student applicant is created in the system, the application status is set to 'Applied'
+
+- You can update the status to 'Approved' once you approve the applicant to join your institute.
+
+- Once the application status is set to 'Approved', the 'Enroll' button should show up.
+ You can create a student record against the student applicant and enroll them to a program by clicking on this button.
+
+- Once a student is created against the student applicant, the system shall set the application status to 'Admitted'
+ and will not allow you to change the application status unless the student record is deleted.
+
+### Student Enrollment
+
+
+Once you approve a Student Applicant you can enroll them to a program. When you click the 'Enroll' buttom,
+the system shall create a student against that applicant and redirect you to the [Program Enrollment form]({{docs_base_url}}/user/manual/en/schools/student/program-enrollment.html).
+
+<img class="screenshot" alt="Student Applicant Enrollment" src="{{url_prefix}}/assets/img/schools/student/student-applicant-enroll.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/schools/student/student-group-creation-tool.md b/erpnext/docs/user/manual/en/schools/student/student-group-creation-tool.md
new file mode 100644
index 0000000..1fcd87c
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/student-group-creation-tool.md
@@ -0,0 +1,6 @@
+This tool allows you to create student groups in bulk. You can specify multiple parameters to create them.
+
+
+<img class="screenshot" alt="Student Group Creation Tool" src="{{url_prefix}}/assets/img/schools/student/student-group-creation-tool.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/student/student-group.md b/erpnext/docs/user/manual/en/schools/student/student-group.md
new file mode 100644
index 0000000..eaa60f7
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/student-group.md
@@ -0,0 +1,8 @@
+# Student Group
+
+A student group is a collection of students taking a same course. You can create Course Schedules and Examinations against a Student Group.
+A student group needs to be created for every course in a particular academic term and academic year.
+
+<img class="screenshot" alt="Student Group" src="{{url_prefix}}/assets/img/schools/student/student-group.png">
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/schools/student/student.md b/erpnext/docs/user/manual/en/schools/student/student.md
new file mode 100644
index 0000000..d0b1089
--- /dev/null
+++ b/erpnext/docs/user/manual/en/schools/student/student.md
@@ -0,0 +1,10 @@
+# Student
+
+A Student is defined as a person who has enrolled at your institute and you have accepted their application.
+The student doctype maintains personal details of the student.
+
+You can view everything related to a particular student on this page. Eg : Fees, Student Group, etc
+
+<img class="screenshot" alt="Student" src="{{url_prefix}}/assets/img/schools/student/student.png">
+
+{next}
diff --git a/erpnext/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups.html b/erpnext/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups.html
deleted file mode 100644
index 1b7e4f7..0000000
--- a/erpnext/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<h1>Setting Up Dropbox Backups</h1>
-
-<h1>Setting Up Dropbox Backups</h1>
-
-<p style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px;">If you wish to store your backups on a periodic basis,on Dropbox, you can do it directly through ERPNext.</p>
-<blockquote style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px; background-color: rgb(247, 247, 247);">
- <p>Setup > Manage 3rd Party Backups</p>
-</blockquote>
-<p style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px;"><strong>Step 1:</strong> Click on Integrations > Backup Manager
- <br>
-</p>
-<br>
-<div>
- <p style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px;">In the Backup Manager page, enter the email addresses of those people whom you wish to notify about the upload status. Under the topic 'Sync with Dropbox', select whether you wish to upload Daily, Weekly or Never.</p>
- <p style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px;"><strong>Step 2</strong> Click on <strong>Allow Dropbox Access</strong>.</p>
- <blockquote style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px; background-color: rgb(247, 247, 247);">
- <p>Tip: In future, if you wish to discontinue uploading backups to dropbox, then select the Never option.</p>
- </blockquote>
- <img src="{{docs_base_path}}/assets/img/articles/Screen Shot 2015-09-23 at 1.02.52 pm.png">
-</div>
-<div>
- <br>
-</div>
-<div><b>
- Step 3</b>
- <br>
-</div>
-<div>
- <p style="font-family: 'Noto Sans', sans-serif; line-height: 23.7999992370605px;">You need to login to your dropbox account, with your user id and password.</p>
-</div>
-<div>
- <img src="{{docs_base_path}}/assets/img/articles/dropbox-access.png" style="line-height: 1.42857143;">
- <br>
-</div>
-<div>
- <br>
- <hr>
-</div>
-<div>
- <h3 style="font-family: 'Noto Sans', Helvetica, Arial, sans-serif; color: rgb(51, 51, 51);">Open Source Users</h3>
-
-</div>
-<div>
- <br>
-</div>
-<div><b>Step 1: </b>Go to <a href="https://www.dropbox.com/developers/apps" target="_blank" style="line-height: 1.42857143;">https://www.dropbox.com/developers/apps</a>
-
-</div>
-<div><b>Step 2:</b> Create a new app</div>
-<div>
- <img src="{{docs_base_path}}/assets/img/articles/Screen Shot 2014-11-11 at 11.22.38 pm.png">
- <br>
-</div>
-<div><b>Step 3: </b>Fill in details for the app.</div>
-<div>
- <img src="{{docs_base_path}}/assets/img/articles/Screen Shot 2014-11-11 at 11.23.32 pm.png">
- <br>
-</div>
-<div>
- <br>
-</div>
-<div><b>Step 4: </b>After the app is created, note the app key and app secret and enter in `sites/{sitename}/site_config.json` as follows,</div>
-<div>
- <br>
-</div>
-<div><pre><code>{
- "db_name": "demo",
- "db_password": "DZ1Idd55xJ9qvkHvUH",
- "dropbox_access_key": "ACCESSKEY",
- "dropbox_secret_key": "SECRECTKEY"
-} </code></pre>
- <br>
-</div>
-<div><b>Step 5: </b>Setup dropbox backups from the backup manager as shown in previous section.</div>
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups.md b/erpnext/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups.md
new file mode 100644
index 0000000..68e4031
--- /dev/null
+++ b/erpnext/docs/user/manual/en/setting-up/articles/setting-up-dropbox-backups.md
@@ -0,0 +1,74 @@
+#Setting Up Dropbox Backups
+
+We always recommend customers to maintain backup of their data in ERPNext. he database backup is downloaded in the form of an SQL file. If needed, this SQL file of backup can be restored in the another ERPNext account as well.
+
+You can automate database backup download of your ERPNext account into your Dropbox account.
+
+####Step 1: Go to Setup
+
+`Explore > Setup > Integrations > Dropbox Backup`
+
+####Step 2: Activate
+
+In the Dropbox Backup, check "Send Backups to Dropbox" to active this feature. On checking this field, you will find field to set Frequency and notification Email.
+
+####Step 3: Set Frequency
+
+Set Frequency to download backup in your Dropbox account.
+
+<img class="screenshot" alt="set frequency" src="{{docs_base_url}}/assets/img/setup/dropbox-1.png">
+
+####Step 4: Allow Dropbox Access
+
+After setting frequency and updating notification email, click on `Allow Dropbox access`. On clicking this button, the Dropbox login page will open in the new tab. This might require you to allow pop-up for your ERPNext account.
+
+####Step 5: Login to Dropbox
+
+Login to your Dropbox account by entering login credentials.
+
+<img class="screenshot" alt="Login" src="{{docs_base_url}}/assets/img/setup/dropbox-2.png">
+
+####Step 6: Allow
+
+On successfull login, you will find a confirmation message as following. Click on "Allow" to let your ERPNext account have access to your Dropbox account.
+
+<img class="screenshot" alt="Allow" src="{{docs_base_url}}/assets/img/setup/dropbox-3.png">
+
+With this, a folder called "ERPNext" will be created in your Dropbox account, and database backup will start to auto-download in it.
+
+##Open Source Users
+
+####Step 1: Go to
+
+<a href="https://www.dropbox.com/developers/apps" target="_blank" style="line-height: 1.42857143;">https://www.dropbox.com/developers/apps</a>
+
+####Step 2:Create a new app
+
+<img class="screenshot" alt="Create new" src="{{docs_base_url}}/assets/img/setup/dropbox-open-3.png">
+
+####Step 3: Fill in details for the app
+
+<img class="screenshot" alt="Create new" src="{{docs_base_url}}/assets/img/setup/dropbox-open-1.png">
+
+-
+<img class="screenshot" alt="Create new" src="{{docs_base_url}}/assets/img/setup/dropbox-open-2.png">
+
+####Step 4: Settings in Site Config
+
+After the app is created, note the app key and app secret and enter in `sites/{sitename}/site_config.json` as follows,
+
+<div>
+ <pre>
+ <code>{
+ "db_name": "demo",
+ "db_password": "DZ1Idd55xJ9qvkHvUH",
+ "dropbox_access_key": "ACCESSKEY",
+ "dropbox_secret_key": "SECRECTKEY"
+}
+ </code>
+ </pre>
+</div>
+
+####Step 5: Complete Backup
+
+Setup dropbox backups from the backup manager as shown in previous section.
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/setting-up/print/letter-head.md b/erpnext/docs/user/manual/en/setting-up/print/letter-head.md
index d3c24f2..72b79e1 100644
--- a/erpnext/docs/user/manual/en/setting-up/print/letter-head.md
+++ b/erpnext/docs/user/manual/en/setting-up/print/letter-head.md
@@ -1,23 +1,38 @@
-# Letter Heads
+#Letter Head
-You can manage multiple letter heads in ERPNext. In a letter head you can:
+Each company has default Letter Head for their company. This Letter Head values are generally set as Header and Footer in the documents. In ERPNext, you can capture the these details in the Letter Head master.
- * Create an image with your logo, brand and other information that you want to put on your letter head.
- * Attach the image in your Letter Head record by clicking on image icon to automatically generate the HTML required for this Letter Head.
- * If you want to make this the default letter head, click on “Is Default”.
+In the Letter Head master, you can track Header and Footer details of the company. These details will appear in the Print Format of the transactions like Sales Order, Sales Invoice, Salary Slip, Purchase Order etc.
-Your letter head will now appear in all Prints and Emails of documents.
+####Step 1: Go to Setup
-You can create / manage Letter Heads from:
+`Explore > Setup > Printing > Letter Head > New Letter Head`
-> Setup > Printing > Letter Head > New Letter Head
+####Step 2: Letter Head Name
-### Example
+In one ERPNext account, you can enter multiple Letter Head, hence name Letter Head so that you can identify it easily. For example, if your Letter Head also contains office address, then you should create separate Letter Head for each office location.
+
+####Step 3: Enter Details
+
+Following is how you can enter details in the Letter Head.
+
+ * Logo Image: You can insert the image in your Letter Head record by clicking on image icon. Once image is inserted, HTML for it will be generated automatically.
+ * Other information (like Address, tax ID etc.) that you want to put on your letter head.
<img class="screenshot" alt="Print Heading" src="{{docs_base_url}}/assets/img/setup/print/letter-head.png">
+
+> If you want to make this the default letter head, click on “Is Default”.
-This is how the letter head looks in a document print:
+####Step 4: Save
+
+After enter values in the Header and Footer section, Save Letter Head.
+
+####Letter Head in the Print Format
+
+This is how the letter head looks in a document's print.
<img class="screenshot" alt="Print Heading" src="{{docs_base_url}}/assets/img/setup/print/letter-head-1.png">
-{next}
+> Please note that Footer will be visible only when document's print is seen in the PDF. Footer will not be visible in the HTML based print preview.
+
+{next}
\ No newline at end of file
diff --git a/erpnext/docs/user/manual/en/setting-up/users-and-permissions/user-permissions.md b/erpnext/docs/user/manual/en/setting-up/users-and-permissions/user-permissions.md
index c1cefc6..7fae95c 100644
--- a/erpnext/docs/user/manual/en/setting-up/users-and-permissions/user-permissions.md
+++ b/erpnext/docs/user/manual/en/setting-up/users-and-permissions/user-permissions.md
@@ -1,72 +1,60 @@
# User Permissions
-Limit access for a User to a set of documents using User Permissions Manager
-
Role Base Permissions define the periphery of document types within which a user with a set of Roles can move around in. However, you can have an even finer control by defining User Permissions for a User. By setting specific documents in User Permissions list, you can limit access for that User to specific documents of a particular DocType, on the condition that "Apply User Permissions" is checked in Role Permissions Manager.
To start with, go to:
+
> Setup > Permissions > User Permissions Manager
-<figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-company.png"
- class="img-responsive" alt="User Permissions Manager">
- <figcaption>User Permissions Manager displaying how users can access only a specific Company.</figcaption>
-</figure>
+User Permissions Manager displaying how users can access only a specific Company.
#### Example
-User 'aromn@example.com' has Sales User role and we want to limit the user to access records for only a specific Company 'Wind Power LLC'.
+User 'tom.hagen@riosolutions.com' has Sales User role and we want to limit the user to access records for only a specific Company 'Rio Solutions'.
1. We add a User Permissions row for Company.
- <figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permission-user-limited-by-company.png"
- class="img-responsive" alt="User Permissions For Company">
- <figcaption>Add User Permissions row for a combination of User 'aromn@example.com' and Company 'Wind Power LLC'.</figcaption>
- </figure>
+
+ <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-new.gif" class="screen" alt="User Permissions For Company">
+
+ Add User Permissions row for a combination of User 'tom.hagen@riosolutions.com' and Company 'Rio Solutions'.
1. Also Role "All" has only Read permission for Company, with 'Apply User Permissions' checked.
- <figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-company-role-all.png"
- class="img-responsive" alt="Role Permissions for All on Company">
- <figcaption>Read Permission with Apply User Permissions checked for DocType Company.</figcaption>
- </figure>
+
+ <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-company-role-all.png" class="screen" alt="Role Permissions for All on Company">
- 1. The combined effect of the above two rules lead to User 'aromn@example.com' having only Read access to Company 'Wind Power LLC'.
- <figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-company-wind-power-llc.png"
- class="img-responsive" alt="Effect of Role and User Permissions on Company">
- <figcaption>Access is limited to Company 'Wind Power LLC'.</figcaption>
- </figure>
+ Read Permission with Apply User Permissions checked for DocType Company.
+
+ 1. The combined effect of the above two rules lead to User 'tom.hagen@riosolutions.com' having only Read access to Company 'Rio Solutions'.
+
+ <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permission-company.png" class="screen" alt="Effect of Role and User Permissions on Company">
+
+ Access is limited to Company 'Rio Solutions'.
1. We want this User Permission on Company to get applied on other documents like Quotation, Sales Order, etc.
-These forms have a **Link Field based on Company**. As a result, User Permissions on Company also get applied on these documents, which leads to User 'aromn@example.com' to acces these documents having Company 'Wind Power LLC'.
- <figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-quotation-sales-user.png"
- class="img-responsive" alt="Sales User Role Permissions for Quotation">
- <figcaption>Users with Sales User Role can Read, Write, Create, Submit and Cancel Quotations based on their User Permissions, since 'Apply User Permissions' is checked.</figcaption>
- </figure>
- <figure>
- <img src="{{docs_base_url}}/assets/old_images/erpnext/user-permissions-quotation-list.png"
- class="img-responsive" alt="Quotation List limited to results for Company 'Wind Power LLC'">
- <figcaption>Quotation List is limited to results for Company 'Wind Power LLC' for User 'aromn@example.com'.</figcaption>
- </figure>
+
+ These forms have a **Link Field based on Company**. As a result, User Permissions on Company also get applied on these documents, which leads to User 'tom.hagen@riosolutions' to acces these documents having Company 'Rio Solutions'.
- 1. User Permissions get applied automatically based on Link Fields, just like how it worked for Quotation. But, Lead Form has 4 Link fields: Territory, Company, Lead Owner and Next Contact By. Say, you want Leads to limit access to Users based only on Territory, even though you have defined User Permissions for DocTypes User, Territory and Company. You can do this by setting 'Ignore User Permissions' for Link fields: Company, Lead Owner and Next Contact By.
- <figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-lead-role-permissions.png"
- class="img-responsive" alt="Role Permissions on Lead for Sales User Role">
- <figcaption>Sales User can Read, Write and Create Leads limited by User Permissions.</figcaption>
- </figure>
- <figure>
- <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-ignore-user-permissions.png"
- class="img-responsive" alt="Set Ingore User Permissions from Setup > Customize > Customize Form">
- <figcaption>Check 'Ingore User Permissions' for Company, Lead Owner and Next Contact By fields using Setup > Customize > Customize Form for Lead.</figcaption>
- </figure>
- <figure>
- <img src="{{docs_base_url}}/assets/old_images/erpnext/user-permissions-lead-based-on-territory.png"
- class="img-responsive" alt="Lead List is limited to records with Territory 'United States'">
- <figcaption>Due to the effect of the above combination, User 'aromn@example.com' can only access Leads with Territory 'United States'.</figcaption>
- </figure>
+ <img class="screen" alt="Sales User Role Permissions for Quotation" src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-quotation-sales-user.png" >
+
+ Users with Sales User Role can Read, Write, Create, Submit and Cancel Quotations based on their User Permissions, since 'Apply User Permissions' is checked.
+
+ <img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permission-quotation.png" class="screenshot" alt="Quotation List limited to results for Company 'Rio Solutions'">
+
+ Quotation List is limited to results for Company 'Rio Solutions' for User 'tom.hagen@riosolutions.com'.
+
+ 1. User Permissions get applied automatically based on Link Fields, just like how it worked for Quotation. But, Lead Form has 4 Link fields: Territory, Company, Lead Owner and Next Contact By. Say, you want Leads to limit access to Users based only on Territory, even though you have defined User Permissions for DocTypes User, Territory and Company. You can do this by setting 'Ignore User Permissions' for Link fields: Company, Lead Owner and Next Contact By.
+
+<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-lead-role-permissions.png" class="screen" alt="Role Permissions on Lead for Sales User Role">
+
+Sales User can Read, Write and Create Leads limited by User Permissions.
+
+<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-ignore-user-permissions.png" class="screenshot" alt="Set Ingore User Permissions from Setup > Customize > Customize Form">
+
+Check 'Ingore User Permissions' for Company, Lead Owner and Next Contact By fields using Setup > Customize > Customize Form for Lead.
+
+<img src="{{docs_base_url}}/assets/img/users-and-permissions/permissions-lead-list.png" class="screenshot" alt="Lead List is limited to records with Territory 'United States'">
+
+Due to the effect of the above combination, User 'tom.hagen@riosolutions.com' can only access Leads with Territory 'United States'.
{next}
diff --git a/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md b/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md
index c31d1ac..84fe545 100644
--- a/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md
+++ b/erpnext/docs/user/manual/en/stock/accounting-of-inventory-stock/perpetual-inventory.md
@@ -1,42 +1,38 @@
-In perpetual inventory, system creates accounting entries for each stock
-transactions, so that stock and account balance will always remain same. The
-account balance will be posted against their respective account heads for each
-Warehouse. On saving of a Warehouse, the system will automatically create an
-account head with the same name as warehouse. As account balance is maintained
-for each Warehouse, you should create Warehouses, based on the type of items
-(Current / Fixed Assets) it stores.
+As per the perpetual inventory system, accounts posting is done for every stock transaction.
-At the time of items received in a particular warehouse, the balance of asset
-account (linked to that warehouse) will be increased. Similarly when you
-deliver some items from that warehouse, an expense will be booked and the
-asset account will be reduced, based on the valuation amount of those items.
+On creating new Warehouse, the system will automatically create an Account in the Chart of Accout, with the same name as Warehouse Name.
-## **Activation**
+On receipt of items in a particular warehouse, the balance in the Warehouse Account will increase. Similarly when items are delivered from the Warehouse, an expense will be booked, and balance in the Warehouse Account will reduce.
- 1. Setup the following default accounts for each Company
+##Activation
+
+ 1. Setup the following default accounts for each Company. These accounts are created automatically in the new ERPNext accounts.
* Stock Received But Not Billed
* Stock Adjustment Account
* Expenses Included In Valuation
* Cost Center
- 2. In perpetual inventory, the system will maintain separate account balance for each warehouse under separate account head. To create that account head, enter "Create Account Under" in Warehouse master.
+
+ 2. Ensure each Warehouse is an Account in the Chart of Accounts master. As per the default configuration, Accounts for Warehouse are created under `Assets > Current Asset > Stock Assets > (Warehouse)`
3. Activate Perpetual Inventory
-> Setup > Accounts Settings > Make Accounting Entry For Every Stock Movement
+ > Explore > Accounts > Accounts Settings > "Make Accounting Entry For Every Stock Movement"
+
+<img class="screenshot" alt="Perpetual Inventory" src="{{docs_base_url}}/assets/img/accounts/perpetual-1.png">
* * *
-## **Example**
+##Example
Consider following Chart of Accounts and Warehouse setup for your company:
-#### Chart of Accounts
+####Chart of Accounts
* Assets (Dr)
* Current Assets
* Accounts Receivable
- * Jane Doe
+ * Debtor
* Stock Assets
* Stores
* Finished Goods
@@ -44,11 +40,11 @@
* Tax Assets
* VAT
* Fixed Assets
- * Fixed Asset Warehouse
+ * Fixed Asset Warehouse
* Liabilities (Cr)
* Current Liabilities
* Accounts Payable
- * East Wind Inc.
+ * Creditors
* Stock Liabilities
* Stock Received But Not Billed
* Tax Liabilities
@@ -65,18 +61,15 @@
* Shipping Charges
* Customs Duty
-#### Warehouse - Account Configuration
+####Warehouse - Account Configuration
* Stores
* Work In Progress
* Finished Goods
- * Fixed Asset Warehouse
-### **Purchase Receipt**
+###Purchase Receipt
-Suppose you have purchased _10 nos_ of item "RM0001" at _$200_ and _5 nos_ of
-item "Desktop" at **$100** from supplier "East Wind Inc". Following are the
-details of Purchase Receipt:
+Suppose you have purchased _10 nos_ of item "RM0001" at _$200_ and _5 nos_ of item "Base Plate" at **$100** from supplier "East Wind Inc". Following are the details of Purchase Receipt:
**Supplier:** East Wind Inc.
@@ -100,15 +93,7 @@
<td>10</td>
<td>200</td>
<td>2000</td>
- <td>2200</td>
- </tr>
- <tr>
- <td>Desktop</td>
- <td>Fixed Asset Warehouse</td>
- <td>5</td>
- <td>100</td>
- <td>500</td>
- <td>550</td>
+ <td>2250</td>
</tr>
</tbody>
</table>
@@ -129,8 +114,8 @@
<td>Total and Valuation</td>
</tr>
<tr>
- <td>VAT</td>
- <td>120</td>
+ <td>VAT (10%)</td>
+ <td>200</td>
<td>Total</td>
</tr>
<tr>
@@ -140,25 +125,22 @@
</tr>
</tbody>
</table>
-<p><strong>Stock Ledger</strong>
-</p>
-<img alt="Stock" class="screenshot" src="{{docs_base_url}}/assets/old_images/erpnext/accounting-for-stock-2.png">
+**Stock Ledger**
+
+<img class="screenshot" alt="Perpetual Inventory" src="{{docs_base_url}}/assets/img/accounts/perpetual-2.png">
**General Ledger**
-<img alt="Leger" class="screenshot" src="{{docs_base_url}}/assets/old_images/erpnext/accounting-for-stock-3.png">
+<img class="screenshot" alt="Perpetual Inventory" src="{{docs_base_url}}/assets/img/accounts/perpetual-3.png">
-As stock balance increases through Purchase Receipt, "Store" and "Fixed Asset
-Warehouse" accounts are debited and a temporary account "Stock Receipt But Not
-Billed" account is credited, to maintain double entry accounting system. At the same time, negative expense is booked in account "Expense included in Valuation" for the amount added for valuation purpose, to avoid double expense booking.
+As stock balance increases through Purchase Receipt, "Store" accounts are debited and a temporary account "Stock Receipt But Not Billed" account is credited, to maintain double entry accounting system. At the same time, negative expense is booked in account "Expense included in Valuation" for the amount added for valuation purpose, to avoid double expense booking.
* * *
-### **Purchase Invoice**
+###Purchase Invoice
-On receiving Bill from supplier, for the above Purchase Receipt, you will make
-Purchase Invoice for the same. The general ledger entries are as follows:
+On receiving Bill from supplier, for the above Purchase Receipt, you will make Purchase Invoice for the same. The general ledger entries are as follows:
**General Ledger**
@@ -169,7 +151,7 @@
* * *
-### **Delivery Note**
+###Delivery Note
Lets say, you have an order from "Jane Doe" to deliver 5 nos of item "RM0001"
at $300. Following are the details of Delivery Note:
@@ -246,7 +228,7 @@
* * *
-### **Sales Invoice with Update Stock**
+###Sales Invoice with Update Stock
Lets say, you did not make Delivery Note against the above order and instead
you have made Sales Invoice directly, with "Update Stock" options. The details
@@ -265,7 +247,7 @@
* * *
-### **Stock Entry (Material Receipt)**
+###Stock Entry (Material Receipt)
**Items:**
@@ -300,7 +282,7 @@
* * *
-### **Stock Entry (Material Issue)**
+###Stock Entry (Material Issue)
**Items:**
@@ -335,7 +317,7 @@
* * *
-### **Stock Entry (Material Transfer)**
+###Stock Entry (Material Transfer)
**Items:**
diff --git a/erpnext/docs/user/manual/en/website/shopping-cart.md b/erpnext/docs/user/manual/en/website/shopping-cart.md
index 773e162..1682084 100644
--- a/erpnext/docs/user/manual/en/website/shopping-cart.md
+++ b/erpnext/docs/user/manual/en/website/shopping-cart.md
@@ -14,14 +14,10 @@

-
-
#### Step 2: Enter Price List, Tax Master and Shipping Rule.

-
-
#### Shopping Cart Display
On the Website, the shopping cart image will be seen below the Item price.
@@ -31,8 +27,6 @@

-
-
Click on the flower sign on the right hand side to see the cart details. Click
on the cart to get the final amount details.
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 566a98b..c1cee0c 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -101,7 +101,7 @@
{"title": _("Addresses"), "route": "/addresses", "reference_doctype": "Address"},
{"title": _("Announcements"), "route": "/announcement", "reference_doctype": "Announcement"},
{"title": _("Courses"), "route": "/course", "reference_doctype": "Course"},
- {"title": _("Assessment Schedule"), "route": "/Assessment", "reference_doctype": "Assessment"},
+ {"title": _("Assessment Schedule"), "route": "/assessment", "reference_doctype": "Assessment"},
{"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees"}
]
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py
index 836e524..c2f95af 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.py
@@ -99,7 +99,7 @@
for d in source.get(key):
target.append(key, {
'amount': d.amount,
- 'default_amount': d.default_amount,
+ 'default_amount': d.amount,
'depends_on_lwp' : d.depends_on_lwp,
'salary_component' : d.salary_component
})
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 73eac92..ef9f4da 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -22,6 +22,7 @@
execute:frappe.reload_doc('selling', 'doctype', 'customer') # 2014-01-29
execute:frappe.reload_doc('buying', 'doctype', 'supplier') # 2014-01-29
execute:frappe.reload_doc('accounts', 'doctype', 'asset_category')
+execute:frappe.reload_doc('accounts', 'doctype', 'pricing_rule')
execute:frappe.reload_doctype('Item')
erpnext.patches.v4_0.map_charge_to_taxes_and_charges
execute:frappe.reload_doc('support', 'doctype', 'newsletter') # 2014-01-31
@@ -103,7 +104,6 @@
erpnext.patches.v5_0.update_dn_against_doc_fields
execute:frappe.db.sql("update `tabMaterial Request` set material_request_type = 'Material Transfer' where material_request_type = 'Transfer'")
execute:frappe.reload_doc('stock', 'doctype', 'item')
-execute:frappe.db.sql("update `tabItem` i set apply_warehouse_wise_reorder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from `tabItem Reorder` where parent=i.name)")
erpnext.patches.v5_0.set_default_company_in_bom
execute:frappe.reload_doc('crm', 'doctype', 'lead')
execute:frappe.reload_doc('crm', 'doctype', 'opportunity')
@@ -235,6 +235,7 @@
erpnext.patches.v6_4.set_user_in_contact
erpnext.patches.v6_4.make_image_thumbnail #2015-10-20
erpnext.patches.v6_5.show_in_website_for_template_item
+erpnext.patches.v7_0.create_budget_record
erpnext.patches.v6_4.fix_expense_included_in_valuation
execute:frappe.delete_doc_if_exists("Report", "Item-wise Last Purchase Rate")
erpnext.patches.v6_6.fix_website_image
@@ -267,10 +268,8 @@
erpnext.patches.v6_20x.update_product_bundle_description
erpnext.patches.v7_0.update_party_status
erpnext.patches.v7_0.update_item_projected
-erpnext.patches.v7_0.fix_duplicate_icons
erpnext.patches.v7_0.remove_features_setup
erpnext.patches.v7_0.update_home_page
-erpnext.patches.v7_0.create_budget_record
execute:frappe.delete_doc_if_exists("Page", "financial-analytics")
erpnext.patches.v7_0.update_project_in_gl_entry
execute:frappe.db.sql('update tabQuotation set status="Cancelled" where docstatus=2')
@@ -309,4 +308,6 @@
erpnext.patches.v7_0.update_refdoc_in_landed_cost_voucher
erpnext.patches.v7_0.set_material_request_type_in_item
erpnext.patches.v7_0.rename_examination_to_assessment
+erpnext.patches.v7_0.set_portal_settings
erpnext.patches.v7_0.repost_future_gle_for_purchase_invoice
+erpnext.patches.v7_0.fix_duplicate_icons
\ No newline at end of file
diff --git a/erpnext/patches/v5_0/rename_table_fieldnames.py b/erpnext/patches/v5_0/rename_table_fieldnames.py
index d9af7b8..e6667de 100644
--- a/erpnext/patches/v5_0/rename_table_fieldnames.py
+++ b/erpnext/patches/v5_0/rename_table_fieldnames.py
@@ -219,6 +219,7 @@
frappe.reload_doc("manufacturing", "doctype", "production_order_operation")
frappe.reload_doc("manufacturing", "doctype", "workstation_working_hour")
frappe.reload_doc("stock", "doctype", "item_variant")
+ frappe.reload_doc("hr", "doctype", "salary_detail")
frappe.reload_doc("accounts", "doctype", "party_account")
frappe.reload_doc("accounts", "doctype", "fiscal_year_company")
diff --git a/erpnext/patches/v5_2/change_item_selects_to_checks.py b/erpnext/patches/v5_2/change_item_selects_to_checks.py
index dde0b56..1ee8f6c 100644
--- a/erpnext/patches/v5_2/change_item_selects_to_checks.py
+++ b/erpnext/patches/v5_2/change_item_selects_to_checks.py
@@ -4,8 +4,7 @@
def execute():
fields = ("is_stock_item", "is_asset_item", "has_batch_no", "has_serial_no",
- "inspection_required", "is_sub_contracted_item")
-
+ "is_sales_item", "is_purchase_item", "inspection_required", "is_sub_contracted_item")
# convert to 1 or 0
update_str = ", ".join(["`{0}`=if(`{0}`='Yes',1,0)".format(f) for f in fields])
diff --git a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
index cb16466..b802656 100644
--- a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
+++ b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py
@@ -1,18 +1,29 @@
import frappe
-
-from erpnext.manufacturing.doctype.production_order.production_order import make_timesheet, add_timesheet_detail
+from erpnext.manufacturing.doctype.production_order.production_order \
+ import make_timesheet, add_timesheet_detail
def execute():
frappe.reload_doc('projects', 'doctype', 'timesheet')
- for data in frappe.get_all('Time Log', fields=["*"],
- filters = [["docstatus", "<", "2"]]):
+ for data in frappe.get_all('Time Log', fields=["*"], filters = [["docstatus", "<", "2"]]):
+ if data.task:
+ company = frappe.db.get_value("Task", data.task, "company")
+ elif data.production_order:
+ company = frappe.db.get_value("Prodction Order", data.production_order, "company")
+ else:
+ company = frappe.db.get_single_value('Global Defaults', 'default_company')
+
time_sheet = make_timesheet(data.production_order)
args = get_timelog_data(data)
add_timesheet_detail(time_sheet, args)
time_sheet.docstatus = data.docstatus
time_sheet.note = data.note
- time_sheet.company = frappe.db.get_single_value('Global Defaults', 'default_company')
+ time_sheet.company = company
+
+ time_sheet.set_status()
+ time_sheet.update_cost()
+ time_sheet.calculate_total_amounts()
+ time_sheet.flags.ignore_validate = True
time_sheet.save(ignore_permissions=True)
def get_timelog_data(data):
diff --git a/erpnext/patches/v7_0/make_guardian.py b/erpnext/patches/v7_0/make_guardian.py
index f654b79..0839c4f 100644
--- a/erpnext/patches/v7_0/make_guardian.py
+++ b/erpnext/patches/v7_0/make_guardian.py
@@ -2,19 +2,25 @@
import frappe
def execute():
- if frappe.db.exists("DocType", "Student") and "father_name" in frappe.db.get_table_columns("Student"):
- frappe.reload_doc("schools", "doctype", "student")
- frappe.reload_doc("schools", "doctype", "guardian")
- frappe.reload_doc("schools", "doctype", "guardian_interest")
- frappe.reload_doc("hr", "doctype", "interest")
+ if frappe.db.exists("DocType", "Student"):
+ student_table_cols = frappe.db.get_table_columns("Student")
+ if "father_name" in student_table_cols:
+ frappe.reload_doc("schools", "doctype", "student")
+ frappe.reload_doc("schools", "doctype", "guardian")
+ frappe.reload_doc("schools", "doctype", "guardian_interest")
+ frappe.reload_doc("hr", "doctype", "interest")
+
+ fields = ["name", "father_name", "mother_name"]
+
+ if "father_email_id" in student_table_cols:
+ fields += ["father_email_id", "mother_email_id"]
- students = frappe.get_all("Student", fields=["name", "father_name", "father_email_id",
- "mother_name", "mother_email_id"])
- for stud in students:
- if stud.father_name:
- make_guardian(stud.father_name, stud.name, stud.father_email_id)
- if stud.mother_name:
- make_guardian(stud.mother_name, stud.name, stud.mother_email_id)
+ students = frappe.get_all("Student", fields)
+ for stud in students:
+ if stud.father_name:
+ make_guardian(stud.father_name, stud.name, stud.father_email_id)
+ if stud.mother_name:
+ make_guardian(stud.mother_name, stud.name, stud.mother_email_id)
def make_guardian(name, student, email=None):
frappe.get_doc({
diff --git a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py
index 9933743..f64f400 100644
--- a/erpnext/patches/v7_0/migrate_schools_to_erpnext.py
+++ b/erpnext/patches/v7_0/migrate_schools_to_erpnext.py
@@ -1,6 +1,6 @@
from __future__ import unicode_literals
-import frappe
-from erpnext.setup.setup_wizard import domainify
+import frappe, os
+from frappe.installer import remove_from_installed_apps
def execute():
reload_doctypes_for_schools_icons()
@@ -10,23 +10,16 @@
frappe.reload_doc('buying', 'doctype', 'request_for_quotation')
if 'schools' in frappe.get_installed_apps():
- frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu()
frappe.db.sql("""delete from `tabDesktop Icon`""")
- if not frappe.db.exists('Module Def', 'Schools'):
- frappe.get_doc({
- 'doctype': 'Module Def',
- 'module_name': 'Schools',
- 'app_name': 'erpnext'
- }).insert()
- frappe.db.sql("""update `tabDocType` set module='Schools' where module='Academics'""")
- from frappe.installer import remove_from_installed_apps
+
+ if not frappe.db.exists('Module Def', 'Schools') and frappe.db.exists('Module Def', 'Academics'):
+ frappe.rename_doc("Module Def", "Academics", "Schools")
+
remove_from_installed_apps("schools")
- domainify.setup_domain('Education')
- else:
- frappe.get_doc('Portal Settings', 'Portal Settings').sync_menu()
- domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))
def reload_doctypes_for_schools_icons():
- for name in ('student', 'student_group', 'course_schedule', 'student_attendance',
- 'course', 'program', 'student_applicant', 'examination', 'fees', 'instructor', 'announcement'):
- frappe.reload_doc('schools', 'doctype', name)
+ base_path = frappe.get_app_path('erpnext', 'schools', 'doctype')
+ for doctype in os.listdir(base_path):
+ if os.path.exists(os.path.join(base_path, doctype, doctype + '.json')) \
+ and doctype not in ("fee_component", "assessment", "assessment_result"):
+ frappe.reload_doc('schools', 'doctype', doctype)
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/rename_advance_table_fields.py b/erpnext/patches/v7_0/rename_advance_table_fields.py
index ba8b2da..34d8134 100644
--- a/erpnext/patches/v7_0/rename_advance_table_fields.py
+++ b/erpnext/patches/v7_0/rename_advance_table_fields.py
@@ -8,8 +8,11 @@
def execute():
for dt in ("Sales Invoice Advance", "Purchase Invoice Advance"):
frappe.reload_doctype(dt)
-
+
frappe.db.sql("update `tab{0}` set reference_type = 'Journal Entry'".format(dt))
-
- rename_field(dt, "journal_entry", "reference_name")
- rename_field(dt, "jv_detail_no", "reference_row")
\ No newline at end of file
+
+ if frappe.get_meta(dt).has_field('journal_entry'):
+ rename_field(dt, "journal_entry", "reference_name")
+
+ if frappe.get_meta(dt).has_field('jv_detail_no'):
+ rename_field(dt, "jv_detail_no", "reference_row")
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/rename_examination_to_assessment.py b/erpnext/patches/v7_0/rename_examination_to_assessment.py
index 31c8aed..1d6e688 100644
--- a/erpnext/patches/v7_0/rename_examination_to_assessment.py
+++ b/erpnext/patches/v7_0/rename_examination_to_assessment.py
@@ -9,7 +9,10 @@
def execute():
if frappe.db.exists("DocType", "Examination"):
frappe.rename_doc("DocType", "Examination", "Assessment")
- frappe.reload_doctype("Assessment")
+ frappe.rename_doc("DocType", "Examination Result", "Assessment Result")
+ frappe.reload_doc("schools", "doctype", "assessment")
+ frappe.reload_doc("schools", "doctype", "assessment_result")
rename_field("Assessment", "exam_name", "assessment_name")
rename_field("Assessment", "exam_code", "assessment_code")
-
\ No newline at end of file
+
+ frappe.db.sql("delete from `tabPortal Menu Item` where route = '/examination'")
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py b/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py
index 3a6526c..ebc1e69 100644
--- a/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py
+++ b/erpnext/patches/v7_0/repost_future_gle_for_purchase_invoice.py
@@ -9,7 +9,8 @@
def execute():
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
return
-
+
+ frappe.reload_doctype("Purchase Invoice")
wh_account = get_warehouse_account()
for pi in frappe.get_all("Purchase Invoice", filters={"docstatus": 1, "update_stock": 1}):
diff --git a/erpnext/patches/v7_0/set_portal_settings.py b/erpnext/patches/v7_0/set_portal_settings.py
new file mode 100644
index 0000000..3e3b729
--- /dev/null
+++ b/erpnext/patches/v7_0/set_portal_settings.py
@@ -0,0 +1,18 @@
+# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+
+import frappe
+from erpnext.setup.setup_wizard import domainify
+
+def execute():
+ for dt in ("assessment", "announcement", "course", "fees"):
+ frappe.reload_doc("schools", "doctype", dt)
+
+ frappe.get_doc('Portal Settings').sync_menu()
+
+ if 'schools' in frappe.get_installed_apps():
+ domainify.setup_domain('Education')
+ else:
+ domainify.setup_sidebar_items(domainify.get_domain('Manufacturing'))
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/setup_account_table_for_expense_claim_type_if_exists.py b/erpnext/patches/v7_0/setup_account_table_for_expense_claim_type_if_exists.py
index 2c07e30..a067e71 100644
--- a/erpnext/patches/v7_0/setup_account_table_for_expense_claim_type_if_exists.py
+++ b/erpnext/patches/v7_0/setup_account_table_for_expense_claim_type_if_exists.py
@@ -4,7 +4,10 @@
def execute():
frappe.reload_doc("hr", "doctype", "expense_claim_type")
frappe.reload_doc("hr", "doctype", "expense_claim_account")
-
+
+ if not frappe.db.has_column('Expense Claim Type', 'default_account'):
+ return
+
for expense_claim_type in frappe.get_all("Expense Claim Type", fields=["name", "default_account"]):
if expense_claim_type.default_account:
doc = frappe.get_doc("Expense Claim Type", expense_claim_type.name)
diff --git a/erpnext/portal/doctype/homepage/homepage.json b/erpnext/portal/doctype/homepage/homepage.json
index cbe58c7..51d7955 100644
--- a/erpnext/portal/doctype/homepage/homepage.json
+++ b/erpnext/portal/doctype/homepage/homepage.json
@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Setup",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -40,6 +41,31 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "title",
+ "fieldtype": "Data",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "TItle",
+ "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,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"description": "Company Tagline for website homepage",
"fieldname": "tag_line",
"fieldtype": "Data",
@@ -145,13 +171,14 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-05-12 14:19:41.689519",
+ "modified": "2016-08-09 05:01:30.287861",
"modified_by": "Administrator",
"module": "Portal",
"name": "Homepage",
diff --git a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
index f3f9ce9..870c8b1 100644
--- a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
+++ b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.json
@@ -98,6 +98,31 @@
{
"allow_on_submit": 0,
"bold": 0,
+ "collapsible": 0,
+ "fieldname": "view",
+ "fieldtype": "Button",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 1,
+ "label": "View",
+ "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,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
"collapsible": 1,
"fieldname": "section_break_5",
"fieldtype": "Section Break",
@@ -260,7 +285,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2016-07-11 03:28:00.729983",
+ "modified": "2016-08-09 06:09:34.731971",
"modified_by": "Administrator",
"module": "Portal",
"name": "Homepage Featured Product",
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index f5ff2de..bdf3c3b 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -18,8 +18,10 @@
if not self.get('__unsaved') and not self.get("tasks"):
self.load_tasks()
- self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
- from `tabTimesheet Detail` where project=%s group by activity_type order by total_hours desc''', self.name, as_dict=True))
+ self.set_onload('activity_summary', frappe.db.sql('''select activity_type,
+ sum(hours) as total_hours
+ from `tabTimesheet Detail` where project=%s and docstatus < 2 group by activity_type
+ order by total_hours desc''', self.name, as_dict=True))
def __setup__(self):
self.onload()
@@ -187,12 +189,12 @@
"row_template": "templates/includes/projects/project_row.html"
}
-def get_users_for_project(doctype, txt, searchfield, start, page_len, filters):
+def get_users_for_project(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
- from `tabUser`
- where enabled=1
+ from `tabUser`
+ where enabled=1
and name not in ("Guest", "Administrator")
- order by
+ order by
name asc""")
@frappe.whitelist()
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 9140927..0379f90 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -159,8 +159,8 @@
existing = self.get_overlap_for(fieldname, args, value)
if existing:
- frappe.throw(_("Row {0}: From Time and To Time overlap with existing from and to time").format(args.idx),
- OverlapError)
+ frappe.throw(_("Row {0}: From Time and To Time of {1} is overlapping with {2}")
+ .format(args.idx, self.name, existing.name), OverlapError)
def get_overlap_for(self, fieldname, args, value):
cond = "ts.`{0}`".format(fieldname)
diff --git a/erpnext/public/css/erpnext.css b/erpnext/public/css/erpnext.css
index 475b44b..535f83a 100644
--- a/erpnext/public/css/erpnext.css
+++ b/erpnext/public/css/erpnext.css
@@ -46,9 +46,10 @@
line-height: 0;
color: #d1d8dd;
font-size: 30px;
- background-size: cover;
+ background-size: contain;
border: 1px solid transparent;
- background-position: top center;
+ background-position: center;
+ background-repeat: no-repeat;
}
.pos-item-area {
border: 1px solid #d1d8dd;
diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js
index 202000f..37ce5de 100644
--- a/erpnext/public/js/controllers/accounts.js
+++ b/erpnext/public/js/controllers/accounts.js
@@ -55,6 +55,48 @@
}
});
+frappe.ui.form.on('Sales Invoice Payment', {
+ mode_of_payment: function(frm, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ get_payment_mode_account(frm, d.mode_of_payment, function(account){
+ frappe.model.set_value(cdt, cdn, 'account', account)
+ })
+ }
+})
+
+frappe.ui.form.on('Purchase Invoice', {
+ mode_of_payment: function(frm) {
+ get_payment_mode_account(frm, frm.doc.mode_of_payment, function(account){
+ frm.set_value('cash_bank_account', account);
+ })
+ }
+})
+
+frappe.ui.form.on('Payment Entry', {
+ mode_of_payment: function(frm) {
+ get_payment_mode_account(frm, frm.doc.mode_of_payment, function(account){
+ var payment_account_field = frm.doc.payment_type == "Receive" ? "paid_to" : "paid_from";
+ frm.set_value(payment_account_field, account);
+ })
+ }
+})
+
+get_payment_mode_account = function(frm, mode_of_payment, callback){
+ return frappe.call({
+ method: "erpnext.accounts.doctype.sales_invoice.sales_invoice.get_bank_cash_account",
+ args: {
+ "mode_of_payment": mode_of_payment,
+ "company": frm.doc.company
+ },
+ callback: function(r, rt) {
+ if(r.message) {
+ callback(r.message.account)
+ }
+ }
+ });
+}
+
+
cur_frm.cscript.account_head = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.account_head){
diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js
index 55d3296..0013fdb 100644
--- a/erpnext/public/js/setup_wizard.js
+++ b/erpnext/public/js/setup_wizard.js
@@ -311,6 +311,8 @@
slide.fields.push({fieldtype: "Section Break"});
slide.fields.push({fieldtype: "Check", fieldname: "add_sample_data",
label: __("Add a few sample records"), "default": 1});
+ slide.fields.push({fieldtype: "Check", fieldname: "setup_website",
+ label: __("Setup a simple website for my organization"), "default": 1});
},
css_class: "two-column"
},
diff --git a/erpnext/public/less/erpnext.less b/erpnext/public/less/erpnext.less
index 0400b6c..2d74b5f 100644
--- a/erpnext/public/less/erpnext.less
+++ b/erpnext/public/less/erpnext.less
@@ -58,9 +58,10 @@
line-height: 0;
color: @text-extra-muted;
font-size: 30px;
- background-size: cover;
+ background-size: contain;
border: 1px solid transparent;
- background-position: top center;
+ background-position: center;
+ background-repeat: no-repeat;
}
.pos-item-area {
diff --git a/erpnext/schools/doctype/course/course.py b/erpnext/schools/doctype/course/course.py
index beeb6ec..b590acb 100644
--- a/erpnext/schools/doctype/course/course.py
+++ b/erpnext/schools/doctype/course/course.py
@@ -14,9 +14,9 @@
user = frappe.session.user
student = frappe.db.sql("select name from `tabStudent` where student_email_id= %s", user)
if student:
- return frappe.db.sql('''select group_name, course, academic_term, academic_year, SG.name from `tabStudent Group`
- as SG, `tabStudent Group Student` as SGS where SG.group_name = SGS.parent and SGS.student = %s
- order by SG.group_name asc limit {0} , {1}'''.format(limit_start, limit_page_length), student, as_dict=True)
+ return frappe.db.sql('''select course, academic_term, academic_year, SG.name from `tabStudent Group`
+ as SG, `tabStudent Group Student` as SGS where SG.name = SGS.parent and SGS.student = %s
+ order by SG.name asc limit {0} , {1}'''.format(limit_start, limit_page_length), student, as_dict=True)
def get_list_context(context=None):
return {
diff --git a/erpnext/schools/doctype/guardian/guardian.json b/erpnext/schools/doctype/guardian/guardian.json
index 89e4bd0..390a52f 100644
--- a/erpnext/schools/doctype/guardian/guardian.json
+++ b/erpnext/schools/doctype/guardian/guardian.json
@@ -91,14 +91,14 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "mobile_nuber",
+ "fieldname": "mobile_number",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
- "label": "Mobile Nuber",
+ "label": "Mobile Number",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -116,8 +116,8 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
- "fieldname": "section_break_5",
- "fieldtype": "Section Break",
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -140,6 +140,31 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach Image",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image",
+ "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,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"fieldname": "interests",
"fieldtype": "Table",
"hidden": 0,
@@ -166,6 +191,7 @@
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
+ "image_field": "image",
"image_view": 0,
"in_create": 0,
"in_dialog": 0,
@@ -173,7 +199,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2016-07-25 07:20:11.458757",
+ "modified": "2016-08-11 07:57:21.708354",
"modified_by": "Administrator",
"module": "Schools",
"name": "Guardian",
diff --git a/erpnext/schools/doctype/program_enrollment/program_enrollment.json b/erpnext/schools/doctype/program_enrollment/program_enrollment.json
index 6977a24..c7c5eed 100644
--- a/erpnext/schools/doctype/program_enrollment/program_enrollment.json
+++ b/erpnext/schools/doctype/program_enrollment/program_enrollment.json
@@ -9,6 +9,7 @@
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
+ "editable_grid": 0,
"fields": [
{
"allow_on_submit": 0,
@@ -239,11 +240,38 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "fieldname": "image",
+ "fieldtype": "Attach Image",
+ "hidden": 1,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Image",
+ "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,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
}
],
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
+ "image_field": "image",
+ "image_view": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 1,
@@ -251,7 +279,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
- "modified": "2016-07-18 10:30:50.243271",
+ "modified": "2016-08-11 08:50:24.317353",
"modified_by": "Administrator",
"module": "Schools",
"name": "Program Enrollment",
diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json
index c53c6b6..53bd725 100644
--- a/erpnext/selling/doctype/quotation/quotation.json
+++ b/erpnext/selling/doctype/quotation/quotation.json
@@ -5,10 +5,11 @@
"autoname": "naming_series:",
"beta": 0,
"creation": "2013-05-24 19:29:08",
- "custom": 0,
+ "custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "Document",
+ "editable_grid": 1,
"fields": [
{
"allow_on_submit": 0,
@@ -36,30 +37,6 @@
"unique": 0
},
{
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "fieldname": "column_break0",
- "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,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0,
- "width": "50%"
- },
- {
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
@@ -207,7 +184,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
- "label": "Custome Name",
+ "label": "Customer Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -2133,7 +2110,7 @@
"istable": 0,
"max_attachments": 1,
"menu_index": 0,
- "modified": "2016-07-05 16:44:01.301063",
+ "modified": "2016-08-11 08:52:09.666306",
"modified_by": "Administrator",
"module": "Selling",
"name": "Quotation",
@@ -2313,4 +2290,4 @@
"timeline_field": "customer",
"title_field": "title",
"track_seen": 0
-}
\ No newline at end of file
+}
diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js
index d58adce..402ff11 100644
--- a/erpnext/selling/sales_common.js
+++ b/erpnext/selling/sales_common.js
@@ -66,7 +66,8 @@
if(this.frm.fields_dict["items"].grid.get_field('item_code')) {
this.frm.set_query("item_code", "items", function() {
return {
- query: "erpnext.controllers.queries.item_query"
+ query: "erpnext.controllers.queries.item_query",
+ filters: {'is_sales_item': 1}
}
});
}
diff --git a/erpnext/setup/setup_wizard/sample_data.py b/erpnext/setup/setup_wizard/sample_data.py
index 8078ebc..955f663 100644
--- a/erpnext/setup/setup_wizard/sample_data.py
+++ b/erpnext/setup/setup_wizard/sample_data.py
@@ -11,7 +11,7 @@
def make_sample_data():
"""Create a few opportunities, quotes, material requests, issues, todos, projects
to help the user get started"""
- items = frappe.get_all("Item")
+ items = frappe.get_all("Item", {'is_sales_item': 1})
customers = frappe.get_all("Customer")
warehouses = frappe.get_all("Warehouse")
@@ -25,7 +25,7 @@
make_projects()
if items and warehouses:
- make_material_request(items)
+ make_material_request(frappe.get_all("Item"))
frappe.db.commit()
diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index 97ca7a3..191f169 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -41,7 +41,9 @@
create_instructor(args)
create_room(args)
- website_maker(args)
+ if args.get('setup_website'):
+ website_maker(args)
+
create_logo(args)
frappe.local.message_log = []
@@ -316,6 +318,8 @@
"item_name": item,
"description": item,
"show_in_website": 1,
+ "is_sales_item": is_sales_item,
+ "is_purchase_item": is_purchase_item,
"is_stock_item": is_stock_item and 1 or 0,
"item_group": item_group,
"stock_uom": args.get("item_uom_" + str(i)),
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index b86378d..18fdad7 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -1058,6 +1058,32 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "default": "1",
+ "fieldname": "is_purchase_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Is Purchase Item",
+ "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,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"default": "0.00",
"depends_on": "is_stock_item",
"description": "",
@@ -1487,6 +1513,32 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
+ "default": "1",
+ "fieldname": "is_sales_item",
+ "fieldtype": "Check",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_list_view": 0,
+ "label": "Is Sales Item",
+ "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,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
"default": "0",
"description": "Publish Item to hub.erpnext.com",
"fieldname": "publish_in_hub",
@@ -2335,7 +2387,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 1,
- "modified": "2016-08-03 17:30:51.323382",
+ "modified": "2016-08-17 17:30:51.323382",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item",
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index 82b7e11..0f5cb96 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -78,10 +78,6 @@
default_currency = frappe.db.get_default("currency")
- # validate no of rows
- if len(self.items) > 100:
- frappe.throw(_("""Max 100 rows for Stock Reconciliation."""))
-
for row_num, row in enumerate(self.items):
# find duplicates
if [row.item_code, row.warehouse] in item_warehouse_combinations:
diff --git a/erpnext/templates/includes/course/course_row.html b/erpnext/templates/includes/course/course_row.html
index 9b9317b..fddfc3c 100644
--- a/erpnext/templates/includes/course/course_row.html
+++ b/erpnext/templates/includes/course/course_row.html
@@ -5,7 +5,7 @@
{{ doc.course }}
</div>
<div class="col-xs-3">
- {{ doc.group_name }}
+ {{ doc.name }}
</div>
<div class="col-xs-2">
{{doc.academic_term }}
diff --git a/erpnext/templates/pages/home.py b/erpnext/templates/pages/home.py
index 00cd3a9..9a4c89c 100644
--- a/erpnext/templates/pages/home.py
+++ b/erpnext/templates/pages/home.py
@@ -15,6 +15,8 @@
if route:
item.route = '/' + route
+ context.title = homepage.title or homepage.company
+
# show atleast 3 products
if len(homepage.products) < 3:
for i in xrange(3 - len(homepage.products)):
@@ -24,6 +26,4 @@
'route': '#'
})
- return {
- 'homepage': homepage
- }
+ context.homepage = homepage
diff --git a/erpnext/tests/test_client.py b/erpnext/tests/test_client.py
index 153ce75..bf88341 100644
--- a/erpnext/tests/test_client.py
+++ b/erpnext/tests/test_client.py
@@ -6,7 +6,7 @@
from frappe.utils import sel
from frappe.utils import formatdate
-selenium_tests = True
+#selenium_tests = True
# class TestLogin(unittest.TestCase):
# def setUp(self):