From 7844b79274b7f6cc7beb20e66383d07e03cdfaeb Mon Sep 17 00:00:00 2001
From: Bibin <17405044+bibinqcs@users.noreply.github.com>
Date: Mon, 15 Oct 2018 16:55:26 +0400
Subject: [PATCH 1/6] [Bug-Fix] accounts_receivable.html (#15688)
* Update accounts_receivable.html
In the print format and PDF the total was showing as 0 (Zero) , when I made these changes it fixed the issue
* Update accounts_receivable.html
---
.../accounts_receivable/accounts_receivable.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
index 0a21181399f..7f663d8dede 100644
--- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
+++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.html
@@ -167,7 +167,7 @@
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %} |
- {%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %} |
+ {%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %}
{% } %}
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %} |
@@ -189,15 +189,15 @@
{% } %}
{%= __("Total") %} |
- {%= format_currency(data[i]["Invoiced Amount"], data[i]["currency"] ) %} |
+ {%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %}
{% if(!filters.show_pdc_in_print) { %}
- {%= format_currency(data[i]["Paid Amount"], data[i]["currency"]) %} |
- {%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["Credit Note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %} |
+ {%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}
+ {%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %} |
{% } %}
- {%= format_currency(data[i]["Outstanding Amount"], data[i]["currency"]) %} |
+ {%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}
{% if(filters.show_pdc_in_print) { %}
{% if(report.report_name === "Accounts Receivable") { %}
@@ -238,4 +238,4 @@
{% } %}
-{{ __("Printed On ") }}{%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}
\ No newline at end of file
+{{ __("Printed On ") }}{%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}
From 44ec05f79bfa3a2d76d160ac4805d36450ea8b8e Mon Sep 17 00:00:00 2001
From: Nabin Hait
Date: Mon, 15 Oct 2018 18:56:16 +0530
Subject: [PATCH 2/6] fix(bom): deadlock issue via bom replace tool (#15694)
---
erpnext/manufacturing/doctype/bom/bom.py | 3 ++-
.../manufacturing/doctype/bom_update_tool/bom_update_tool.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 7a2aa8a06b8..0af7a86b93d 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -354,7 +354,8 @@ class BOM(WebsiteGenerator):
bom_list = self.traverse_tree(bom_list)
for bom in bom_list:
bom_obj = frappe.get_doc("BOM", bom)
- bom_obj.on_update()
+ bom_obj.check_recursion()
+ bom_obj.update_exploded_items()
return bom_list
diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
index 3f6cb44c490..59861ceba3a 100644
--- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
+++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py
@@ -62,7 +62,7 @@ class BOMUpdateTool(Document):
bom_list.append(d[0])
self.get_parent_boms(d[0], bom_list)
- return bom_list
+ return list(set(bom_list))
@frappe.whitelist()
def enqueue_replace_bom(args):
From 4bb90add1df6e6b5aa9cc69e6589ef7e8e902ae0 Mon Sep 17 00:00:00 2001
From: deepeshgarg007 <42651287+deepeshgarg007@users.noreply.github.com>
Date: Mon, 15 Oct 2018 19:07:49 +0530
Subject: [PATCH 3/6] Currency symbol bug fix (#15698)
---
.../sales_person_wise_transaction_summary.py | 110 ++++++++++++++++--
1 file changed, 103 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 ae2cf8c550e..345d608fefd 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
@@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.utils import flt
+from erpnext import get_company_currency
def execute(filters=None):
if not filters: filters = {}
@@ -14,12 +15,14 @@ def execute(filters=None):
item_details = get_item_details()
data = []
+ company_currency = get_company_currency(filters["company"])
+
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,
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
+ d.stock_qty, d.base_net_amount, d.sales_person, d.allocated_percentage, d.contribution_amt, company_currency
])
if data:
@@ -32,12 +35,105 @@ def get_columns(filters):
if not filters.get("doc_type"):
msgprint(_("Please select the document type first"), raise_exception=1)
- return [filters["doc_type"] + ":Link/" + filters["doc_type"] + ":140",
- _("Customer") + ":Link/Customer:140", _("Territory") + ":Link/Territory:100", _("Posting Date") + ":Date:100",
- _("Item Code") + ":Link/Item:120", _("Item Group") + ":Link/Item Group:120",
- _("Brand") + ":Link/Brand:120", _("Qty") + ":Float:100", _("Amount") + ":Currency:120",
- _("Sales Person") + ":Link/Sales Person:140", _("Contribution %") + "::110",
- _("Contribution Amount") + ":Currency:140"]
+ columns = [
+ {
+ "label": _(filters["doc_type"]),
+ "options": filters["doc_type"],
+ "fieldname": frappe.scrub(filters['doc_type']),
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Customer"),
+ "options": "Customer",
+ "fieldname": "customer",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Territory"),
+ "options": "Territory",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Warehouse"),
+ "options": "Warehouse",
+ "fieldname": "warehouse",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Posting Date"),
+ "fieldname": "posting_date",
+ "fieldtype": "Date",
+ "width": 140
+ },
+ {
+ "label": _("Item Code"),
+ "options": "Item",
+ "fieldname": "item_code",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Item Group"),
+ "options": "Item Group",
+ "fieldname": "item_group",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Brand"),
+ "options": "Brand",
+ "fieldname": "brand",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Qty"),
+ "fieldname": "qty",
+ "fieldtype": "Float",
+ "width": 140
+ },
+ {
+ "label": _("Amount"),
+ "options": "currency",
+ "fieldname": "amount",
+ "fieldtype": "Currency",
+ "width": 140
+ },
+ {
+ "label": _("Sales Person"),
+ "options": "Sales Person",
+ "fieldname": "sales_person",
+ "fieldtype": "Link",
+ "width": 140
+ },
+ {
+ "label": _("Contribution %"),
+ "fieldname": "contribution",
+ "fieldtype": "Float",
+ "width": 140
+ },
+ {
+ "label": _("Contribution Amount"),
+ "options": "currency",
+ "fieldname": "contribution_amt",
+ "fieldtype": "Currency",
+ "width": 140
+ },
+ {
+ "label":_("Currency"),
+ "options": "Currency",
+ "fieldname":"currency",
+ "fieldtype":"Link",
+ "hidden" : 1
+ }
+ ]
+
+ return columns
def get_entries(filters):
date_field = filters["doc_type"] == "Sales Order" and "transaction_date" or "posting_date"
From ff0deedca93eb056992f59558812ce3390bc9c88 Mon Sep 17 00:00:00 2001
From: Shreya Shah
Date: Tue, 16 Oct 2018 14:34:30 +0530
Subject: [PATCH 4/6] fix(discount-amount): Print hide discount_amount if print
without amount (#15704)
---
erpnext/stock/doctype/delivery_note/delivery_note.js | 4 +++-
erpnext/stock/doctype/delivery_note/delivery_note.py | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index e0ee3708f43..d6a3c0ea0c2 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -255,13 +255,13 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
var dn_item_fields = frappe.meta.docfield_map['Delivery Note Item'];
var dn_fields_copy = dn_fields;
var dn_item_fields_copy = dn_item_fields;
-
if (doc.print_without_amount) {
dn_fields['currency'].print_hide = 1;
dn_item_fields['rate'].print_hide = 1;
dn_item_fields['discount_percentage'].print_hide = 1;
dn_item_fields['price_list_rate'].print_hide = 1;
dn_item_fields['amount'].print_hide = 1;
+ dn_item_fields['discount_amount'].print_hide = 1;
dn_fields['taxes'].print_hide = 1;
} else {
if (dn_fields_copy['currency'].print_hide != 1)
@@ -270,6 +270,8 @@ erpnext.stock.delivery_note.set_print_hide = function(doc, cdt, cdn){
dn_item_fields['rate'].print_hide = 0;
if (dn_item_fields_copy['amount'].print_hide != 1)
dn_item_fields['amount'].print_hide = 0;
+ if (dn_item_fields_copy['discount_amount'].print_hide != 1)
+ dn_item_fields['discount_amount'].print_hide = 0;
if (dn_fields_copy['taxes'].print_hide != 1)
dn_fields['taxes'].print_hide = 0;
}
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 70a061208ff..ccc6da40316 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -75,7 +75,7 @@ class DeliveryNote(SellingController):
item_meta = frappe.get_meta("Delivery Note Item")
print_hide_fields = {
"parent": ["grand_total", "rounded_total", "in_words", "currency", "total", "taxes"],
- "items": ["rate", "amount", "price_list_rate", "discount_percentage"]
+ "items": ["rate", "amount", "discount_amount", "price_list_rate", "discount_percentage"]
}
for key, fieldname in print_hide_fields.items():
From 8e71074e1cb95ebe07a4bdd3b7eadb171e676eab Mon Sep 17 00:00:00 2001
From: Shreya Shah
Date: Tue, 16 Oct 2018 14:36:49 +0530
Subject: [PATCH 5/6] fix(report): Add column for Item Name (#15702)
---
.../report/item_price_stock/item_price_stock.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/erpnext/stock/report/item_price_stock/item_price_stock.py b/erpnext/stock/report/item_price_stock/item_price_stock.py
index ed010cd17aa..3a72697b04e 100644
--- a/erpnext/stock/report/item_price_stock/item_price_stock.py
+++ b/erpnext/stock/report/item_price_stock/item_price_stock.py
@@ -13,12 +13,18 @@ def execute(filters=None):
def get_columns():
return [
{
- "label": _("Item Name"),
- "fieldname": "item_name",
+ "label": _("Item Code"),
+ "fieldname": "item_code",
"fieldtype": "Link",
"options": "Item",
"width": 120
},
+ {
+ "label": _("Item Name"),
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "width": 120
+ },
{
"label": _("Warehouse"),
"fieldname": "warehouse",
@@ -70,7 +76,7 @@ def get_item_price_qty_data(filters):
if filters.get("item_code"):
conditions += "where a.item_code=%(item_code)s"
- item_results = frappe.db.sql("""select a.item_code as item_name, a.name as price_list_name,
+ item_results = frappe.db.sql("""select a.item_code, a.item_name, a.name as price_list_name,
b.warehouse as warehouse, b.actual_qty as actual_qty
from `tabItem Price` a left join `tabBin` b
ON a.item_code = b.item_code
@@ -86,6 +92,7 @@ def get_item_price_qty_data(filters):
if item_results:
for item_dict in item_results:
data = {
+ 'item_code': item_dict.item_code,
'item_name': item_dict.item_name,
'warehouse': item_dict.warehouse,
'stock_available': item_dict.actual_qty or 0,
From bb1b6b42e2a4dcfb837a03c876b49ca213de5d90 Mon Sep 17 00:00:00 2001
From: Ameya Shenoy
Date: Wed, 17 Oct 2018 09:04:11 +0000
Subject: [PATCH 6/6] bumped to version 10.1.60
---
erpnext/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ccd8a19cf30..bae7915e317 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.59'
+__version__ = '10.1.60'
def get_default_company(user=None):
'''Get default company for user'''