From 7d9dd3c6281b7c35f7be04b0f61a9ccfc8266e42 Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 28 Oct 2020 17:07:10 +0530 Subject: [PATCH 01/10] fix: item wise tax calculation (#23744) --- erpnext/public/js/controllers/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 23705a8779..02b1dc0beb 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -651,7 +651,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ let child = frappe.model.add_child(me.frm.doc, "taxes"); child.charge_type = "On Net Total"; child.account_head = tax; - child.rate = rate; + child.rate = 0; } }); } From a51d9e3259c4994025d15a718682a14335097244 Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 28 Oct 2020 17:08:47 +0530 Subject: [PATCH 02/10] fix: pos register shows cancelled documents (#23747) --- erpnext/accounts/report/pos_register/pos_register.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/report/pos_register/pos_register.py b/erpnext/accounts/report/pos_register/pos_register.py index 0bcde64f7f..52f7fe238e 100644 --- a/erpnext/accounts/report/pos_register/pos_register.py +++ b/erpnext/accounts/report/pos_register/pos_register.py @@ -63,6 +63,7 @@ def get_pos_entries(filters, group_by_field): FROM `tabPOS Invoice` p {from_sales_invoice_payment} WHERE + p.docstatus = 1 and {group_by_mop_condition} {conditions} ORDER BY From 94a630c2551e1b699c2dc5be7b8f966e3ba75bcd Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 28 Oct 2020 17:15:14 +0530 Subject: [PATCH 03/10] fix: Do not allow Company as accounting dimension --- .../doctype/accounting_dimension/accounting_dimension.js | 2 +- .../doctype/accounting_dimension/accounting_dimension.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js index 3c12f85f93..9a6c389339 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.js @@ -7,7 +7,7 @@ frappe.ui.form.on('Accounting Dimension', { frm.set_query('document_type', () => { let invalid_doctypes = frappe.model.core_doctypes_list; invalid_doctypes.push('Accounting Dimension', 'Project', - 'Cost Center', 'Accounting Dimension Detail'); + 'Cost Center', 'Accounting Dimension Detail', 'Company'); return { filters: { diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index 8834385135..f888d9e038 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -19,7 +19,7 @@ class AccountingDimension(Document): def validate(self): if self.document_type in core_doctypes_list + ('Accounting Dimension', 'Project', - 'Cost Center', 'Accounting Dimension Detail') : + 'Cost Center', 'Accounting Dimension Detail', 'Company') : msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type) frappe.throw(msg) From c17cdd7c2e16454b7bcd9bbac8a4366ddf32522f Mon Sep 17 00:00:00 2001 From: Syed Mujeer Hashmi Date: Thu, 29 Oct 2020 11:10:06 +0530 Subject: [PATCH 04/10] fix: Fix for LMS Sign Up link (#23743) Signed-off-by: Syed Mujeer Hashmi Co-authored-by: Shivam Mishra Co-authored-by: Rucha Mahabal --- erpnext/www/lms/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/www/lms/index.html b/erpnext/www/lms/index.html index 7ce3521273..7b239acd56 100644 --- a/erpnext/www/lms/index.html +++ b/erpnext/www/lms/index.html @@ -45,7 +45,7 @@

{{ education_settings.description }}

{% if frappe.session.user == 'Guest' %} - {{_('Sign Up')}} + {{_('Sign Up')}} {% endif %}

@@ -62,4 +62,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} From 10f246807699b67315e7b05cce2dc5c9245a27e0 Mon Sep 17 00:00:00 2001 From: Kenneth Sequeira <33246109+kennethsequeira@users.noreply.github.com> Date: Thu, 29 Oct 2020 12:02:48 +0530 Subject: [PATCH 05/10] fix: make asset dashboard charts public (#23751) --- .../asset_value_analytics/asset_value_analytics.json | 4 ++-- .../category_wise_asset_value/category_wise_asset_value.json | 4 ++-- .../location_wise_asset_value/location_wise_asset_value.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/assets/dashboard_chart/asset_value_analytics/asset_value_analytics.json b/erpnext/assets/dashboard_chart/asset_value_analytics/asset_value_analytics.json index bc2edc9d7d..94debf1243 100644 --- a/erpnext/assets/dashboard_chart/asset_value_analytics/asset_value_analytics.json +++ b/erpnext/assets/dashboard_chart/asset_value_analytics/asset_value_analytics.json @@ -9,9 +9,9 @@ "filters_json": "{\"status\":\"In Location\",\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"date_based_on\":\"Purchase Date\",\"group_by\":\"--Select a group--\"}", "group_by_type": "Count", "idx": 0, - "is_public": 0, + "is_public": 1, "is_standard": 1, - "modified": "2020-07-23 13:53:33.211371", + "modified": "2020-10-28 23:15:58.432189", "modified_by": "Administrator", "module": "Assets", "name": "Asset Value Analytics", diff --git a/erpnext/assets/dashboard_chart/category_wise_asset_value/category_wise_asset_value.json b/erpnext/assets/dashboard_chart/category_wise_asset_value/category_wise_asset_value.json index e79d2d7372..78611da003 100644 --- a/erpnext/assets/dashboard_chart/category_wise_asset_value/category_wise_asset_value.json +++ b/erpnext/assets/dashboard_chart/category_wise_asset_value/category_wise_asset_value.json @@ -8,9 +8,9 @@ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}", "filters_json": "{\"status\":\"In Location\",\"group_by\":\"Asset Category\",\"is_existing_asset\":0}", "idx": 0, - "is_public": 0, + "is_public": 1, "is_standard": 1, - "modified": "2020-07-23 13:39:32.429240", + "modified": "2020-10-28 23:16:16.939070", "modified_by": "Administrator", "module": "Assets", "name": "Category-wise Asset Value", diff --git a/erpnext/assets/dashboard_chart/location_wise_asset_value/location_wise_asset_value.json b/erpnext/assets/dashboard_chart/location_wise_asset_value/location_wise_asset_value.json index 481586e7ca..848184cc14 100644 --- a/erpnext/assets/dashboard_chart/location_wise_asset_value/location_wise_asset_value.json +++ b/erpnext/assets/dashboard_chart/location_wise_asset_value/location_wise_asset_value.json @@ -8,9 +8,9 @@ "dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}", "filters_json": "{\"status\":\"In Location\",\"group_by\":\"Location\",\"is_existing_asset\":0}", "idx": 0, - "is_public": 0, + "is_public": 1, "is_standard": 1, - "modified": "2020-07-23 13:42:44.912551", + "modified": "2020-10-28 23:16:07.883312", "modified_by": "Administrator", "module": "Assets", "name": "Location-wise Asset Value", From b193731158a21c0d6a76dd28e3a966258225df70 Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 29 Oct 2020 13:23:50 +0530 Subject: [PATCH 06/10] fix: pos profile has no attr 'show_only_available_items' (#23758) --- erpnext/accounts/doctype/pos_profile/pos_profile.json | 9 ++++++++- erpnext/selling/page/point_of_sale/point_of_sale.py | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.json b/erpnext/accounts/doctype/pos_profile/pos_profile.json index 4e22218c6e..570111acac 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.json +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.json @@ -14,6 +14,7 @@ "column_break_9", "update_stock", "ignore_pricing_rule", + "hide_unavailable_items", "warehouse", "campaign", "company_address", @@ -307,13 +308,19 @@ "fieldtype": "Check", "label": "Update Stock", "read_only": 1 + }, + { + "default": "0", + "fieldname": "hide_unavailable_items", + "fieldtype": "Check", + "label": "Hide Unavailable Items" } ], "icon": "icon-cog", "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2020-10-20 13:16:50.665081", + "modified": "2020-10-29 13:18:38.795925", "modified_by": "Administrator", "module": "Accounts", "name": "POS Profile", diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index e5b50d7789..6b9939e8ef 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -14,11 +14,11 @@ from six import string_types def get_items(start, page_length, price_list, item_group, pos_profile, search_value=""): data = dict() result = [] - warehouse, show_only_available_items = "", False + warehouse, hide_unavailable_items = "", False allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock') if not allow_negative_stock: - warehouse, show_only_available_items = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'show_only_available_items']) + warehouse, hide_unavailable_items = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'hide_unavailable_items']) if not frappe.db.exists('Item Group', item_group): item_group = get_root_of('Item Group') @@ -48,7 +48,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_va lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt']) bin_join_selection, bin_join_condition = "", "" - if show_only_available_items: + if hide_unavailable_items: bin_join_selection = ", `tabBin` bin" bin_join_condition = "AND bin.warehouse = %(warehouse)s AND bin.item_code = item.name AND bin.actual_qty > 0" From d0c2700c8541ee35186c1dea339d824ea3f6a50a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 29 Oct 2020 18:52:16 +0530 Subject: [PATCH 07/10] fix: subscription test case (#23763) Co-authored-by: Marica --- erpnext/accounts/doctype/subscription/test_subscription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py index 811fc356cf..c17fccdce0 100644 --- a/erpnext/accounts/doctype/subscription/test_subscription.py +++ b/erpnext/accounts/doctype/subscription/test_subscription.py @@ -237,7 +237,7 @@ class TestSubscription(unittest.TestCase): subscription.party_type = 'Customer' subscription.party = '_Test Customer' subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1}) - subscription.start_date = '2018-01-01' + subscription.start_date = add_days(nowdate(), -1000) subscription.insert() subscription.process() # generate first invoice From bf54ea9976fbf4cf8013e2a78251bb433a74066f Mon Sep 17 00:00:00 2001 From: Marica Date: Thu, 29 Oct 2020 18:54:36 +0530 Subject: [PATCH 08/10] chore: (Production Plan) Simplify and fix translation in message popup (#23753) --- .../doctype/production_plan/production_plan.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index b6552d5d6b..feac9c8fa2 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -735,10 +735,12 @@ def get_items_for_material_requests(doc, warehouses=None): mr_items = new_mr_items if not mr_items: - frappe.msgprint(_("""As raw materials projected quantity is more than required quantity, - there is no need to create material request for the warehouse {0}. - Still if you want to make material request, - kindly enable Ignore Existing Projected Quantity checkbox""").format(doc.get('for_warehouse'))) + to_enable = frappe.bold(_("Ignore Existing Projected Quantity")) + warehouse = frappe.bold(doc.get('for_warehouse')) + message = _("As there are sufficient raw materials, Material Request is not required for Warehouse {0}.").format(warehouse) + "

" + message += _(" If you still want to proceed, please enable {0}.").format(to_enable) + + frappe.msgprint(message, title=_("Note")) return mr_items From 8f6bd851d37a7a456dd1f02a5377e91f9b5b20d5 Mon Sep 17 00:00:00 2001 From: Marica Date: Thu, 29 Oct 2020 18:55:52 +0530 Subject: [PATCH 09/10] chore: Show Toast alert feedback on Scanning Barcode (#23760) --- erpnext/public/js/controllers/transaction.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 02b1dc0beb..1358a4bd08 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -352,9 +352,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ let show_description = function(idx, exist = null) { if (exist) { - scan_barcode_field.set_new_description(__('Row #{0}: Qty increased by 1', [idx])); + frappe.show_alert({ + message: __('Row #{0}: Qty increased by 1', [idx]), + indicator: 'green' + }); } else { - scan_barcode_field.set_new_description(__('Row #{0}: Item added', [idx])); + frappe.show_alert({ + message: __('Row #{0}: Item added', [idx]), + indicator: 'green' + }); } } @@ -365,7 +371,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ }).then(r => { const data = r && r.message; if (!data || Object.keys(data).length === 0) { - scan_barcode_field.set_new_description(__('Cannot find Item with this barcode')); + frappe.show_alert({ + message: __('Cannot find Item with this Barcode'), + indicator: 'red' + }); return; } From 9c67629e281696bf673fc4582ebf59a50b4b05ea Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Thu, 29 Oct 2020 19:51:57 +0530 Subject: [PATCH 10/10] fix: Ignore cancelled entries instock balance report (#23757) Co-authored-by: Nabin Hait --- erpnext/stock/report/stock_balance/stock_balance.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 042087a4a7..1339d9b682 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -168,6 +168,7 @@ def get_stock_ledger_entries(filters, items): from `tabStock Ledger Entry` sle force index (posting_sort_index) where sle.docstatus < 2 %s %s + and is_cancelled = 0 order by sle.posting_date, sle.posting_time, sle.creation, sle.actual_qty""" % #nosec (item_conditions_sql, conditions), as_dict=1)