From 76dd468f0ed39d5bd09fb06107b7fd479e5deb02 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 15 Jan 2014 14:23:38 +0530 Subject: [PATCH 1/7] update about erpnext with version number --- public/js/conf.js | 15 ++++++++------- public/js/toolbar.js | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/public/js/conf.js b/public/js/conf.js index 929bfcaa59..1fe21c7611 100644 --- a/public/js/conf.js +++ b/public/js/conf.js @@ -24,16 +24,17 @@ $(document).bind('toolbar_setup', function() { 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("
\ -

"+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 ")+ - "https://erpnext.com.

\ -

"+wn._("To report an issue, go to ")+"GitHub Issues

\ -
\ +

ERPNext

\ +

v" + wn.boot.app_version + "

\ +

"+wn._("An open source ERP made for the web.

") + + "

"+wn._("To report an issue, go to ")+"GitHub Issues

\ +

http://erpnext.org.

\

License: GNU General Public License Version 3

\ +
\ +

© 2014 Web Notes Technologies Pvt. Ltd and contributers

\
", wn.app)); wn.ui.misc.about_dialog = d; diff --git a/public/js/toolbar.js b/public/js/toolbar.js index e0affaf61d..1d6fa919b2 100644 --- a/public/js/toolbar.js +++ b/public/js/toolbar.js @@ -21,6 +21,6 @@ erpnext.toolbar.setup = function() { '+wn._('Live Chat')+''); } - $("#toolbar-tools").append('
  • \ + $("#toolbar-tools").append('
  • \ Latest Updates
  • '); -} \ No newline at end of file +} From f6b77479d75318ee2cfe17c68d63a40ac14e6160 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 Jan 2014 18:18:49 +0530 Subject: [PATCH 2/7] Patch: Update billing status for zero value order --- hr/doctype/salary_manager/salary_manager.js | 2 +- ...ate_billing_status_for_zero_value_order.py | 29 +++++++++++++++++++ patches/patch_list.py | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 patches/1401/update_billing_status_for_zero_value_order.py diff --git a/hr/doctype/salary_manager/salary_manager.js b/hr/doctype/salary_manager/salary_manager.js index 032c29e509..ec485ca671 100644 --- a/hr/doctype/salary_manager/salary_manager.js +++ b/hr/doctype/salary_manager/salary_manager.js @@ -43,7 +43,7 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) { 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/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 0000000000..afeed55ed4 --- /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 04a9288c60..2598ae8c94 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -265,4 +265,5 @@ patch_list = [ "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 From f32314dd0b2fbbe0d183f77ad8ac5af4ef42a223 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 17 Jan 2014 11:53:25 +0530 Subject: [PATCH 3/7] Do not set income/expense account automatically in company master --- setup/doctype/company/company.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index 88d9dcaaa5..34e5ca4a59 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -244,8 +244,6 @@ class DocType: 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 @@ class DocType: "stock_adjustment_account": "Stock Adjustment", "expenses_included_in_valuation": "Expenses Included In Valuation" }) - - def create_default_cost_center(self): cc_list = [ From bc99c9d6e0d7871decb8b092c94bad70db520e67 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 17 Jan 2014 12:04:24 +0530 Subject: [PATCH 4/7] Priority to user's deafult price list over customer's default price list --- utilities/transaction_base.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py index f783faa9ec..6c515a52b6 100644 --- a/utilities/transaction_base.py +++ b/utilities/transaction_base.py @@ -78,8 +78,9 @@ class TransactionBase(StatusUpdater): 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 @@ class TransactionBase(StatusUpdater): 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 @@ class TransactionBase(StatusUpdater): 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 From da08124df2d7cc1ba7ce47ede4b8b988ce3b7f77 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Fri, 17 Jan 2014 15:27:19 +0530 Subject: [PATCH 5/7] remove mysql-python pinning to 1.2.4 --- install_erpnext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_erpnext.py b/install_erpnext.py index e285d4bbfe..8e1448362b 100644 --- a/install_erpnext.py +++ b/install_erpnext.py @@ -20,7 +20,7 @@ requirements = [ "jinja2", "markdown2", "markupsafe", - "mysql-python==1.2.4", + "mysql-python", "pygeoip", "python-dateutil", "python-memcached", From 96db41d996472f7f40a8267171dd01cf51de0d44 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Fri, 17 Jan 2014 17:26:31 +0600 Subject: [PATCH 6/7] bumped to version 3.6.3 --- config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index c2524671a0..450e2bca6d 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 From ed87335513986af2ba6766e331906078c830a9bd Mon Sep 17 00:00:00 2001 From: Akhilesh Darjee Date: Fri, 17 Jan 2014 18:57:21 +0530 Subject: [PATCH 7/7] decimal places fix in item prices report --- stock/report/item_prices/item_prices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock/report/item_prices/item_prices.py b/stock/report/item_prices/item_prices.py index e744cc73e4..5eee7df42d 100644 --- a/stock/report/item_prices/item_prices.py +++ b/stock/report/item_prices/item_prices.py @@ -15,7 +15,7 @@ def execute(filters=None): bom_rate = get_item_bom_rate() val_rate_map = get_valuation_rate() - precision = get_currency_precision or 2 + precision = get_currency_precision() or 2 data = [] for item in sorted(item_map):