From 668ec25d198032d9a64c5da836ed06177bb266b4 Mon Sep 17 00:00:00 2001 From: Vishal Dhayagude Date: Wed, 7 Mar 2018 15:31:08 +0530 Subject: [PATCH 01/11] Allow Item variant Rename (#13161) * [WIP] Item varient rename * [wip] Item Variant * [fix] Item Varient Rename * [fix] Item Attribution Rename * removed unwanted code --- erpnext/controllers/item_variant.py | 5 ++- .../item_variant_settings.json | 34 ++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 9eee6cc6df..bf8c88cfb0 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -92,7 +92,10 @@ def validate_is_incremental(numeric_attribute, attribute, value, item): InvalidItemAttributeValueError, title=_('Invalid Attribute')) def validate_item_attribute_value(attributes_list, attribute, attribute_value, item): - if attribute_value not in attributes_list: + allow_rename_attribute_value = frappe.db.get_single_value('Item Variant Settings', 'allow_rename_attribute_value') + if allow_rename_attribute_value: + pass + elif attribute_value not in attributes_list: frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values for Item {2}").format( attribute_value, attribute, item), InvalidItemAttributeValueError, title=_('Invalid Attribute')) diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json index 8ad73d19d5..14808c27f3 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.json @@ -72,6 +72,38 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "", + "description": "Rename Attribute Value in Item Attribute.", + "fieldname": "allow_rename_attribute_value", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Allow Rename Attribute Value", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -144,7 +176,7 @@ "issingle": 1, "istable": 0, "max_attachments": 0, - "modified": "2017-11-14 15:54:12.190518", + "modified": "2018-02-19 11:39:54.401128", "modified_by": "Administrator", "module": "Stock", "name": "Item Variant Settings", From 586e9400b113c8f627867b1be752bc9796f729d8 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Wed, 7 Mar 2018 16:28:21 +0530 Subject: [PATCH 02/11] minor fix for key error --- .../final_assessment_grades.py | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/erpnext/education/report/final_assessment_grades/final_assessment_grades.py b/erpnext/education/report/final_assessment_grades/final_assessment_grades.py index efc9aff083..e6e0ba2ebc 100644 --- a/erpnext/education/report/final_assessment_grades/final_assessment_grades.py +++ b/erpnext/education/report/final_assessment_grades/final_assessment_grades.py @@ -27,26 +27,27 @@ def execute(filters=None): course_dict = values.get("course_dict") for student in args.students: - student_row = {} - student_row["student"] = student - student_row["student_name"] = student_details[student] - for course in course_dict: - scrub_course = frappe.scrub(course) - if assessment_group in assessment_result[student][course]: - student_row["grade_" + scrub_course] = assessment_result[student][course][assessment_group]["Total Score"]["grade"] - student_row["score_" + scrub_course] = assessment_result[student][course][assessment_group]["Total Score"]["score"] + if student_details.get(student): + student_row = {} + student_row["student"] = student + student_row["student_name"] = student_details[student] + for course in course_dict: + scrub_course = frappe.scrub(course) + if assessment_group in assessment_result[student][course]: + student_row["grade_" + scrub_course] = assessment_result[student][course][assessment_group]["Total Score"]["grade"] + student_row["score_" + scrub_course] = assessment_result[student][course][assessment_group]["Total Score"]["score"] - # create the list of possible grades - if student_row["grade_" + scrub_course] not in grades: - grades.append(student_row["grade_" + scrub_course]) + # create the list of possible grades + if student_row["grade_" + scrub_course] not in grades: + grades.append(student_row["grade_" + scrub_course]) - # create the dict of for gradewise analysis - if student_row["grade_" + scrub_course] not in course_wise_analysis[course]: - course_wise_analysis[course][student_row["grade_" + scrub_course]] = 1 - else: - course_wise_analysis[course][student_row["grade_" + scrub_course]] += 1 + # create the dict of for gradewise analysis + if student_row["grade_" + scrub_course] not in course_wise_analysis[course]: + course_wise_analysis[course][student_row["grade_" + scrub_course]] = 1 + else: + course_wise_analysis[course][student_row["grade_" + scrub_course]] += 1 - data.append(student_row) + data.append(student_row) course_list = [d for d in course_dict] columns = get_column(course_dict) From 1643cce47991ab697923f1adf656661e18d1c85b Mon Sep 17 00:00:00 2001 From: tundebabzy Date: Thu, 8 Mar 2018 06:47:17 +0100 Subject: [PATCH 03/11] fetch journal entry details (#13218) --- .../doctype/payment_entry/payment_entry.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 305c08babd..7dfa5c8561 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -684,6 +684,24 @@ def get_company_defaults(company): return ret +def get_outstanding_on_journal_entry(name): + res = frappe.db.sql( + 'SELECT ' + 'CASE WHEN party_type IN ("Customer", "Student") ' + 'THEN ifnull(sum(debit_in_account_currency - credit_in_account_currency), 0) ' + 'ELSE ifnull(sum(credit_in_account_currency - debit_in_account_currency), 0) ' + 'END as outstanding_amount ' + 'FROM `tabGL Entry` WHERE (voucher_no=%s OR against_voucher=%s) ' + 'AND party_type IS NOT NULL ' + 'AND party_type != ""', + (name, name), as_dict=1 + ) + + outstanding_amount = res[0].get('outstanding_amount', 0) if res else 0 + + return outstanding_amount + + @frappe.whitelist() def get_reference_details(reference_doctype, reference_name, party_account_currency): total_amount = outstanding_amount = exchange_rate = None @@ -694,6 +712,13 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre total_amount = ref_doc.get("grand_total") exchange_rate = 1 outstanding_amount = ref_doc.get("outstanding_amount") + elif reference_doctype == "Journal Entry" and ref_doc.docstatus == 1: + total_amount = ref_doc.get("total_amount") + if ref_doc.multi_currency: + exchange_rate = get_exchange_rate(party_account_currency, company_currency, ref_doc.posting_date) + else: + exchange_rate = 1 + outstanding_amount = get_outstanding_on_journal_entry(reference_name) elif reference_doctype != "Journal Entry": if party_account_currency == company_currency: if ref_doc.doctype == "Expense Claim": From a3a63177a147c5456fee1a2fd5119890541b0f8c Mon Sep 17 00:00:00 2001 From: Ranjith Kurungadam Date: Thu, 8 Mar 2018 16:20:22 +0530 Subject: [PATCH 04/11] fix- cannot cancel consultation, remove updating age (#13226) --- erpnext/healthcare/doctype/consultation/consultation.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/erpnext/healthcare/doctype/consultation/consultation.js b/erpnext/healthcare/doctype/consultation/consultation.js index 8ed01c35b8..8b3ecd81b8 100644 --- a/erpnext/healthcare/doctype/consultation/consultation.js +++ b/erpnext/healthcare/doctype/consultation/consultation.js @@ -23,11 +23,6 @@ frappe.ui.form.on('Consultation', { patient: frm.doc.patient }, callback: function (data) { - var age = null; - if(data.message.dob){ - age = calculate_age(data.message.dob); - } - frappe.model.set_value(frm.doctype,frm.docname, "patient_age", age); show_details(data.message); } }); From a32e57ae82a5eba8c8aadc611f9b922d1b41298d Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 8 Mar 2018 16:21:13 +0530 Subject: [PATCH 05/11] [Fix] Discount in offline POS is enabled even is it's disabled in POS Profile (#13233) --- erpnext/accounts/page/pos/pos.js | 6 +++-- erpnext/public/js/pos/pos.html | 28 +++++++++++--------- erpnext/public/js/pos/pos_selected_item.html | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index 29f27fb70c..fe71f28e61 100644 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -393,7 +393,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ this.frm = {} this.frm.doc = this.doc this.set_transaction_defaults("Customer"); - this.frm.doc["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false, + this.frm.doc["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false; + this.frm.doc["allow_user_to_edit_discount"] = this.pos_profile_data["allow_user_to_edit_discount"] ? true : false; this.wrapper.html(frappe.render_template("pos", this.frm.doc)); this.make_search(); this.make_customer(); @@ -1256,6 +1257,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ $(this.wrapper).find('.selected-item').empty(); if(this.child_doc.length) { this.child_doc[0]["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false, + this.child_doc[0]["allow_user_to_edit_discount"] = this.pos_profile_data["allow_user_to_edit_discount"] ? true : false; this.selected_row = $(frappe.render_template("pos_selected_item", this.child_doc[0])) $(this.wrapper).find('.selected-item').html(this.selected_row) } @@ -1683,7 +1685,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ setInterval(function () { me.freeze_screen = false; me.sync_sales_invoice() - }, 60000) + }, 180000) }, sync_sales_invoice: function () { diff --git a/erpnext/public/js/pos/pos.html b/erpnext/public/js/pos/pos.html index 1d9fd7c20f..af90756963 100644 --- a/erpnext/public/js/pos/pos.html +++ b/erpnext/public/js/pos/pos.html @@ -37,20 +37,22 @@
-
-
-
{%= __("Discount") %}
-
-
- % - -
-
- {%= get_currency_symbol(currency) %} - + {% if(allow_user_to_edit_discount) { %} +
+
+
{%= __("Discount") %}
+
+
+ % + +
+
+ {%= get_currency_symbol(currency) %} + +
-
+ {% } %}
{% } %}
diff --git a/erpnext/public/js/pos/pos_selected_item.html b/erpnext/public/js/pos/pos_selected_item.html index 085e048184..03c73411a4 100644 --- a/erpnext/public/js/pos/pos_selected_item.html +++ b/erpnext/public/js/pos/pos_selected_item.html @@ -9,7 +9,7 @@
{{ __("Discount") }}: %
- +
{{ __("Price") }}:
From acd3479269b87cb484d7b3fdb9898f5fa2d93f7f Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 8 Mar 2018 16:22:39 +0530 Subject: [PATCH 06/11] Bank POS transactions in bank reconciliation (#13225) --- .../bank_reconciliation.json | 32 ++++++++++++++++++- .../bank_reconciliation.py | 22 +++++++++++-- .../test_bank_reconciliation.py | 8 +++++ .../sales_invoice_payment.json | 32 ++++++++++++++++++- .../bank_reconciliation_statement.js | 7 +++- .../bank_reconciliation_statement.py | 18 ++++++++++- 6 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 erpnext/accounts/doctype/bank_reconciliation/test_bank_reconciliation.py diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json index 029421990b..3ab73b717d 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json @@ -159,6 +159,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "include_pos_transactions", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Include POS Transactions", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -292,7 +322,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2017-04-21 16:58:26.902732", + "modified": "2018-03-07 18:58:48.658687", "modified_by": "Administrator", "module": "Accounts", "name": "Bank Reconciliation", diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py index 0aaed8f530..b6336626be 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py @@ -53,10 +53,26 @@ class BankReconciliation(Document): posting_date ASC, name DESC """.format(condition), {"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1) - - entries = sorted(list(payment_entries)+list(journal_entries), + + pos_entries = [] + if self.include_pos_transactions: + pos_entries = frappe.db.sql(""" + select + "Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit, + si.posting_date, si.debit_to as against_account, sip.clearance_date, + account.account_currency, 0 as credit + from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account + where + sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name + and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s {0} + order by + si.posting_date ASC, si.name DESC + """.format(condition), + {"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1) + + entries = sorted(list(payment_entries)+list(journal_entries+list(pos_entries)), key=lambda k: k['posting_date'] or getdate(nowdate())) - + self.set('payment_entries', []) self.total_amount = 0.0 diff --git a/erpnext/accounts/doctype/bank_reconciliation/test_bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/test_bank_reconciliation.py new file mode 100644 index 0000000000..932fb3384c --- /dev/null +++ b/erpnext/accounts/doctype/bank_reconciliation/test_bank_reconciliation.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals +import unittest + +class TestBankReconciliation(unittest.TestCase): + pass diff --git a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json index 531622d6ac..b9e5c8d517 100644 --- a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json +++ b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.json @@ -227,6 +227,36 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "clearance_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Clearance Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 1, + "print_hide_if_no_value": 0, + "read_only": 1, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "has_web_view": 0, @@ -239,7 +269,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2017-07-24 17:25:03.765856", + "modified": "2018-03-07 18:34:39.552769", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice Payment", diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js index 0f9fdd7c02..57fe4b05be 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js @@ -28,5 +28,10 @@ frappe.query_reports["Bank Reconciliation Statement"] = { "default": frappe.datetime.get_today(), "reqd": 1 }, + { + "fieldname":"include_pos_transactions", + "label": __("Include POS Transactions"), + "fieldtype": "Check" + }, ] -} +} \ No newline at end of file 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 95b7ff7545..eca59750d5 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -138,7 +138,23 @@ def get_entries(filters): and ifnull(clearance_date, '4000-01-01') > %(report_date)s """, filters, as_dict=1) - return sorted(list(payment_entries)+list(journal_entries), + pos_entries = [] + if filters.include_pos_transactions: + pos_entries = frappe.db.sql(""" + select + "Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit, + si.posting_date, si.debit_to as against_account, sip.clearance_date, + account.account_currency, 0 as credit + from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account + where + sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name + and account.name = sip.account and si.posting_date <= %(report_date)s and + ifnull(sip.clearance_date, '4000-01-01') > %(report_date)s + order by + si.posting_date ASC, si.name DESC + """, filters, as_dict=1) + + return sorted(list(payment_entries)+list(journal_entries+list(pos_entries)), key=lambda k: k['posting_date'] or getdate(nowdate())) def get_amounts_not_reflected_in_system(filters): From 22e6f8d4c29829015cc5add1217b09cdd7724182 Mon Sep 17 00:00:00 2001 From: Harsh Patel Date: Thu, 8 Mar 2018 16:23:59 +0530 Subject: [PATCH 07/11] Fixes for #13071 (#13234) --- erpnext/config/crm.py | 5 +++++ erpnext/config/selling.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py index e51275c260..dd67005ecf 100644 --- a/erpnext/config/crm.py +++ b/erpnext/config/crm.py @@ -126,6 +126,11 @@ def get_data(): "link": "Tree/Sales Person", "description": _("Manage Sales Person Tree."), }, + { + "type": "doctype", + "name": "Lead Source", + "description": _("Track Leads by Lead Source.") + }, ] }, { diff --git a/erpnext/config/selling.py b/erpnext/config/selling.py index fef902e32d..b48cafc99a 100644 --- a/erpnext/config/selling.py +++ b/erpnext/config/selling.py @@ -173,6 +173,11 @@ def get_data(): "name": "Industry Type", "description": _("Track Leads by Industry Type.") }, + { + "type": "doctype", + "name": "Lead Source", + "description": _("Track Leads by Lead Source.") + }, ] }, { From aadd30d1947d768751d981335affa4393d4fc8bd Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Fri, 9 Mar 2018 12:19:35 +0530 Subject: [PATCH 08/11] fetch delivery date on add-row only if item_code exists (#13250) --- .../doctype/sales_order/sales_order.js | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index a9eb7dbac1..03e519aa4e 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -48,6 +48,15 @@ frappe.ui.form.on("Sales Order", { }); frappe.ui.form.on("Sales Order Item", { + item_code: function(frm,cdt,cdn) { + var row = locals[cdt][cdn]; + if (frm.doc.delivery_date) { + row.delivery_date = frm.doc.delivery_date; + refresh_field("delivery_date", cdn, "items"); + } else { + this.frm.script_manager.copy_from_first_row("items", row, ["delivery_date"]); + } + }, delivery_date: function(frm, cdt, cdn) { if(!frm.doc.delivery_date) { erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "delivery_date"); @@ -433,17 +442,6 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( if(cint(frappe.boot.notification_settings.sales_order)) { this.frm.email_doc(frappe.boot.notification_settings.sales_order_message); } - }, - - items_add: function(doc, cdt, cdn) { - var row = frappe.get_doc(cdt, cdn); - if(doc.delivery_date) { - row.delivery_date = doc.delivery_date; - refresh_field("delivery_date", cdn, "items"); - } else { - this.frm.script_manager.copy_from_first_row("items", row, ["delivery_date"]); - } } }); - $.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm})); \ No newline at end of file From 052333ea63fa43fd6e5c9323e1f072ab4602e1d4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 9 Mar 2018 14:30:32 +0530 Subject: [PATCH 09/11] subctracting stock entry should also be considered as consumed qty --- .../itemwise_recommended_reorder_level.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py index e1249ea3cd..cc47ad924e 100644 --- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py +++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py @@ -51,7 +51,7 @@ def get_consumed_items(condition): sum(se_item.transfer_qty) as 'consume_qty' from `tabStock Entry` se, `tabStock Entry Detail` se_item where se.name = se_item.parent and se.docstatus = 1 - and ifnull(se_item.t_warehouse, '') = '' %s + and (ifnull(se_item.t_warehouse, '') = '' or se.purpose = 'Subcontract') %s group by se_item.item_code""" % (condition), as_dict=1) cn_items_map = {} From c3889d85a10f2232029668672279eede37b2278c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 9 Mar 2018 16:28:25 +0530 Subject: [PATCH 10/11] Update shopping_cart.js --- erpnext/public/js/shopping_cart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/shopping_cart.js b/erpnext/public/js/shopping_cart.js index 0a3e0af29d..7755141da6 100644 --- a/erpnext/public/js/shopping_cart.js +++ b/erpnext/public/js/shopping_cart.js @@ -64,7 +64,7 @@ $.extend(shopping_cart, { }, set_cart_count: function() { - var cart_count = getCookie("cart_count"); + var cart_count = frappe.get_cookie("cart_count"); if(frappe.session.user==="Guest") { cart_count = 0; } From 096d1364609780dd96d1b164ca96f91330f8b738 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 9 Mar 2018 17:08:50 +0600 Subject: [PATCH 11/11] bumped to version 10.1.7 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 99981bd713..a4647e3b0a 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.6' +__version__ = '10.1.7' def get_default_company(user=None): '''Get default company for user'''