From aef7a6ec444abe9f98c5cf6c0e40e04e686600a2 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 22 Oct 2018 13:51:32 +0530 Subject: [PATCH 1/3] [Fix] User able to edit the rate in offline POS even if it has no permissions --- erpnext/public/js/pos/pos.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/pos/pos.html b/erpnext/public/js/pos/pos.html index af90756963..8e9e2ca20c 100644 --- a/erpnext/public/js/pos/pos.html +++ b/erpnext/public/js/pos/pos.html @@ -73,7 +73,7 @@ {% for(var j=i*3; j <(i+1)*3; j++) { %} {% } %} - + {% } %}
From 3a11f343554b38a30bf91421f56cc9ee6d8ca3cf Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Mon, 22 Oct 2018 10:15:07 +0000 Subject: [PATCH 2/3] fix(): fetch correct warehouse for item in report Fix 'Sales Person-wise Transaction Summary' Report by fetching the correct Warehouse for the Item fron the respective, Sales Order/Sales Invoice/ Delivery Note --- .../sales_person_wise_transaction_summary.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py index 345d608fef..db11ae95c2 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py @@ -20,7 +20,7 @@ def execute(filters=None): for d in entries: if d.stock_qty > 0 or filters.get('show_return_entries', 0): data.append([ - d.name, d.customer, d.territory, d.posting_date, d.item_code, + d.name, d.customer, d.territory, d.warehouse, d.posting_date, d.item_code, item_details.get(d.item_code, {}).get("item_group"), item_details.get(d.item_code, {}).get("brand"), d.stock_qty, d.base_net_amount, d.sales_person, d.allocated_percentage, d.contribution_amt, company_currency ]) @@ -144,10 +144,10 @@ def get_entries(filters): conditions, values = get_conditions(filters, date_field) entries = frappe.db.sql(""" - select + SELECT dt.name, dt.customer, dt.territory, dt.%s as posting_date, dt_item.item_code, - st.sales_person, st.allocated_percentage, - CASE + st.sales_person, st.allocated_percentage, dt_item.warehouse, + CASE WHEN dt.status = "Closed" THEN dt_item.%s * dt_item.conversion_factor ELSE dt_item.stock_qty END as stock_qty, @@ -159,9 +159,9 @@ def get_entries(filters): WHEN dt.status = "Closed" THEN ((dt_item.base_net_rate * dt_item.%s * dt_item.conversion_factor) * st.allocated_percentage/100) ELSE dt_item.base_net_amount * st.allocated_percentage/100 END as contribution_amt - from + FROM `tab%s` dt, `tab%s Item` dt_item, `tabSales Team` st - where + WHERE st.parent = dt.name and dt.name = dt_item.parent and st.parenttype = %s and dt.docstatus = 1 %s order by st.sales_person, dt.name desc """ %(date_field, qty_field, qty_field, qty_field, filters["doc_type"], filters["doc_type"], '%s', conditions), @@ -211,7 +211,7 @@ def get_items(filters): def get_item_details(): item_details = {} - for d in frappe.db.sql("""select name, item_group, brand from `tabItem`""", as_dict=1): + for d in frappe.db.sql("""SELECT `name`, `item_group`, `brand` FROM `tabItem`""", as_dict=1): item_details.setdefault(d.name, d) return item_details From ac64b3956233dddf1ec6ee7ba42b11b7e7b31ce1 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Tue, 23 Oct 2018 07:58:11 +0000 Subject: [PATCH 3/3] bumped to version 10.1.63 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ec3f371a15..425bf786e3 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.1.62' +__version__ = '10.1.63' def get_default_company(user=None): '''Get default company for user'''