Merge branch 'develop'
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index 99bfe5c..0433f31 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:05",
"docstatus": 0,
- "modified": "2013-11-18 15:16:50",
+ "modified": "2014-01-16 15:36:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -1091,7 +1091,7 @@
"fieldtype": "Select",
"label": "Recurring Type",
"no_copy": 1,
- "options": "Monthly\nQuarterly\nHalf-yearly\nYearly",
+ "options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly",
"print_hide": 1,
"read_only": 0
},
diff --git a/config.json b/config.json
index c252467..450e2bc 100644
--- a/config.json
+++ b/config.json
@@ -1,6 +1,6 @@
{
"app_name": "ERPNext",
- "app_version": "3.6.2",
+ "app_version": "3.6.3",
"base_template": "app/portal/templates/base.html",
"modules": {
"Accounts": {
@@ -74,5 +74,5 @@
"type": "module"
}
},
- "requires_framework_version": "==3.7.2"
+ "requires_framework_version": "==3.7.3"
}
\ No newline at end of file
diff --git a/hr/doctype/salary_manager/salary_manager.js b/hr/doctype/salary_manager/salary_manager.js
index 032c29e..ec485ca 100644
--- a/hr/doctype/salary_manager/salary_manager.js
+++ b/hr/doctype/salary_manager/salary_manager.js
@@ -43,7 +43,7 @@
jv = locals['Journal Voucher'][jv];
jv.voucher_type = 'Bank Voucher';
jv.user_remark = wn._('Payment of salary for the month: ') + doc.month +
- wn._('and fiscal year: ') + doc.fiscal_year;
+ wn._(' and fiscal year: ') + doc.fiscal_year;
jv.fiscal_year = doc.fiscal_year;
jv.company = doc.company;
jv.posting_date = dateutil.obj_to_str(new Date());
diff --git a/install_erpnext.py b/install_erpnext.py
index e285d4b..8e14483 100644
--- a/install_erpnext.py
+++ b/install_erpnext.py
@@ -20,7 +20,7 @@
"jinja2",
"markdown2",
"markupsafe",
- "mysql-python==1.2.4",
+ "mysql-python",
"pygeoip",
"python-dateutil",
"python-memcached",
diff --git a/patches/1401/update_billing_status_for_zero_value_order.py b/patches/1401/update_billing_status_for_zero_value_order.py
new file mode 100644
index 0000000..afeed55
--- /dev/null
+++ b/patches/1401/update_billing_status_for_zero_value_order.py
@@ -0,0 +1,29 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+import webnotes
+from webnotes.utils import flt
+
+def execute():
+ for order_type in ["Sales", "Purchase"]:
+ for d in webnotes.conn.sql("""select par.name, sum(ifnull(child.qty, 0)) as total_qty
+ from `tab%s Order` par, `tab%s Order Item` child
+ where par.name = child.parent and par.docstatus = 1
+ and ifnull(par.net_total, 0) = 0 group by par.name""" %
+ (order_type, order_type), as_dict=1):
+
+ billed_qty = flt(webnotes.conn.sql("""select sum(ifnull(qty, 0))
+ from `tab%s Invoice Item` where %s=%s and docstatus=1""" %
+ (order_type, "sales_order" if order_type=="Sales" else "purchase_order", '%s'),
+ (d.name))[0][0])
+
+ per_billed = ((d.total_qty if billed_qty > d.total_qty else billed_qty)\
+ / d.total_qty)*100
+ webnotes.conn.set_value(order_type+ " Order", d.name, "per_billed", per_billed)
+
+ if order_type == "Sales":
+ if per_billed < 0.001: billing_status = "Not Billed"
+ elif per_billed >= 99.99: billing_status = "Fully Billed"
+ else: billing_status = "Partly Billed"
+
+ webnotes.conn.set_value("Sales Order", d.name, "billing_status", billing_status)
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 04a9288..2598ae8 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -265,4 +265,5 @@
"patches.1312.p02_update_item_details_in_item_price",
"patches.1401.p01_move_related_property_setters_to_custom_field",
"patches.1401.p01_make_buying_selling_as_check_box_in_price_list",
+ "patches.1401.update_billing_status_for_zero_value_order",
]
\ No newline at end of file
diff --git a/public/js/conf.js b/public/js/conf.js
index 929bfca..1fe21c7 100644
--- a/public/js/conf.js
+++ b/public/js/conf.js
@@ -24,16 +24,17 @@
wn.provide('wn.ui.misc');
wn.ui.misc.about = function() {
if(!wn.ui.misc.about_dialog) {
- var d = new wn.ui.Dialog({title: wn._('About ERPNext')})
+ var d = new wn.ui.Dialog({title: wn._('About')})
$(d.body).html(repl("<div>\
- <p>"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
- to provide an integrated tool to manage most processes in a small organization.\
- For more information about Web Notes, or to buy hosting servies, go to ")+
- "<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\
- <p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
- <hr>\
+ <h2>ERPNext</h2> \
+ <p><strong>v" + wn.boot.app_version + "</strong></p>\
+ <p>"+wn._("An open source ERP made for the web.</p>") +
+ "<p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p> \
+ <p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
<p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
+ <hr>\
+ <p>© 2014 Web Notes Technologies Pvt. Ltd and contributers </p> \
</div>", wn.app));
wn.ui.misc.about_dialog = d;
diff --git a/public/js/toolbar.js b/public/js/toolbar.js
index e0affaf..1d6fa91 100644
--- a/public/js/toolbar.js
+++ b/public/js/toolbar.js
@@ -21,6 +21,6 @@
<i class="icon-fixed-width icon-comments"></i> '+wn._('Live Chat')+'</a></li>');
}
- $("#toolbar-tools").append('<li><a href="#latest-updates">\
+ $("#toolbar-tools").append('<li><a href="https://github.com/webnotes/erpnext/releases" target="_blank">\
<i class="icon-fixed-width icon-rss"></i> Latest Updates</li>');
-}
\ No newline at end of file
+}
diff --git a/selling/doctype/campaign/campaign.js b/selling/doctype/campaign/campaign.js
index 6271a16..3347957 100644
--- a/selling/doctype/campaign/campaign.js
+++ b/selling/doctype/campaign/campaign.js
@@ -1,13 +1,2 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
-// License: GNU General Public License v3. See license.txt
-
-
-
-//--------- ONLOAD -------------
-cur_frm.cscript.onload = function(doc, cdt, cdn) {
-
-}
-
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-
-}
\ No newline at end of file
+// License: GNU General Public License v3. See license.txt
\ No newline at end of file
diff --git a/selling/doctype/campaign/campaign.txt b/selling/doctype/campaign/campaign.txt
index 7025bf5..7170e05 100644
--- a/selling/doctype/campaign/campaign.txt
+++ b/selling/doctype/campaign/campaign.txt
@@ -2,11 +2,12 @@
{
"creation": "2013-01-10 16:34:18",
"docstatus": 0,
- "modified": "2013-07-05 14:29:57",
+ "modified": "2014-01-16 12:52:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
+ "allow_rename": 1,
"autoname": "field:campaign_name",
"description": "Keep Track of Sales Campaigns. Keep track of Leads, Quotations, Sales Order etc from Campaigns to gauge Return on Investment. ",
"doctype": "DocType",
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index 88d9dca..34e5ca4 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -244,8 +244,6 @@
webnotes.conn.set(self.doc, a, account_name)
_set_default_accounts({
- "default_income_account": "Sales",
- "default_expense_account": "Cost of Goods Sold",
"receivables_group": "Accounts Receivable",
"payables_group": "Accounts Payable",
"default_cash_account": "Cash"
@@ -257,8 +255,6 @@
"stock_adjustment_account": "Stock Adjustment",
"expenses_included_in_valuation": "Expenses Included In Valuation"
})
-
-
def create_default_cost_center(self):
cc_list = [
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py
index f783faa..6c515a5 100644
--- a/utilities/transaction_base.py
+++ b/utilities/transaction_base.py
@@ -78,8 +78,9 @@
3. Clears existing Sales Team and fetches the one mentioned in Customer
"""
customer_defaults = self.get_customer_defaults()
-
- customer_defaults["selling_price_list"] = self.get_user_default_price_list("Selling") or \
+
+ customer_defaults["selling_price_list"] = \
+ self.get_user_default_price_list("selling_price_list") or \
customer_defaults.get("price_list") or \
webnotes.conn.get_value("Customer Group", self.doc.customer_group,
"default_price_list") or self.doc.selling_price_list
@@ -91,11 +92,11 @@
if self.meta.get_field("sales_team") and self.doc.customer:
self.set_sales_team_for_customer()
- def get_user_default_price_list(self, price_list_for):
- from webnotes.defaults import get_user_default_as_list
- user_default_price_list = get_user_default_as_list("selling_price_list"
- if price_list_for=="Selling" else "buying_price_list")
- return user_default_price_list[0] if len(user_default_price_list)==1 else ""
+ def get_user_default_price_list(self, price_list):
+ from webnotes.defaults import get_defaults_for
+ user_default_price_list = get_defaults_for(webnotes.session.user).get(price_list)
+ return cstr(user_default_price_list) \
+ if not isinstance(user_default_price_list, list) else ""
def set_sales_team_for_customer(self):
from webnotes.model import default_fields
@@ -128,7 +129,7 @@
if supplier.default_currency:
out["currency"] = supplier.default_currency
- out["buying_price_list"] = self.get_user_default_price_list("Buying") or \
+ out["buying_price_list"] = self.get_user_default_price_list("buying_price_list") or \
supplier.default_price_list or self.doc.buying_price_list
return out