From 924cdef6d9631e2d84a775b94e211c71d7e5b57a Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 14 Jul 2023 18:53:02 +0530 Subject: [PATCH] ci: add eslint and update linting confs --- .eslintrc | 65 +++++-------------- .github/workflows/linters.yml | 9 +-- .pre-commit-config.yaml | 18 ++++- .../report/account_balance/account_balance.js | 2 +- .../billed_items_to_be_received.js | 4 +- .../consolidated_financial_statement.js | 2 +- .../customer_ledger_summary.js | 2 +- .../deferred_revenue_and_expense.js | 2 +- .../dimension_wise_accounts_balance_report.js | 2 +- .../gross_and_net_profit_report.js | 2 +- .../inactive_sales_items.js | 2 +- .../report/payment_ledger/payment_ledger.js | 2 +- .../report/pos_register/pos_register.js | 2 +- .../report/share_balance/share_balance.js | 2 +- .../report/share_ledger/share_ledger.js | 2 +- .../supplier_ledger_summary.js | 2 +- .../tds_computation_summary.js | 2 +- .../tds_payable_monthly.js | 2 +- .../voucher_wise_balance.js | 2 +- .../fixed_asset_register.js | 2 +- .../procurement_tracker.js | 2 +- .../purchase_analytics/purchase_analytics.js | 9 +-- .../purchase_order_analysis.js | 2 +- .../requested_items_to_order_and_receive.js | 2 +- .../subcontract_order_summary.js | 2 +- .../subcontracted_item_to_be_received.js | 2 +- ...tracted_raw_materials_to_be_transferred.js | 2 +- .../first_response_time_for_opportunity.js | 2 +- .../lead_conversion_time.js | 2 +- .../crm/report/lead_details/lead_details.js | 2 +- .../lost_opportunity/lost_opportunity.js | 2 +- .../opportunity_summary_by_sales_stage.js | 2 +- .../sales_pipeline_analytics.js | 2 +- .../doctype/workstation/_test_workstation.js | 2 +- .../doctype/workstation/workstation_list.js | 2 +- .../report/bom_explorer/bom_explorer.js | 2 +- .../bom_operations_time.js | 2 +- .../bom_stock_calculated.js | 2 +- .../bom_variance_report.js | 2 +- .../cost_of_poor_quality_report.js | 2 +- .../downtime_analysis/downtime_analysis.js | 2 +- .../exponential_smoothing_forecasting.js | 2 +- .../job_card_summary/job_card_summary.js | 2 +- .../process_loss_report.js | 2 +- .../production_analytics.js | 2 +- .../production_plan_summary.js | 2 +- .../production_planning_report.js | 2 +- .../quality_inspection_summary.js | 2 +- .../work_order_consumed_materials.js | 2 +- .../work_order_stock_report.js | 2 +- .../work_order_summary/work_order_summary.js | 2 +- .../delayed_tasks_summary.js | 2 +- .../employee_billing_summary.js | 2 +- .../project_billing_summary.js | 2 +- .../report/project_summary/project_summary.js | 2 +- erpnext/public/js/controllers/buying.js | 2 +- .../electronic_invoice_register.js | 2 +- .../report/uae_vat_201/uae_vat_201.js | 2 +- .../vat_audit_report/vat_audit_report.js | 2 +- .../address_and_contacts.js | 2 +- .../customer_wise_item_price.js | 2 +- .../item_wise_sales_history.js | 2 +- .../payment_terms_status_for_sales_order.js | 6 +- .../pending_so_items_for_purchase_request.js | 2 +- .../report/sales_analytics/sales_analytics.js | 2 +- .../sales_order_analysis.js | 2 +- .../sales_partner_commission_summary.js | 2 +- ...ner_target_variance_based_on_item_group.js | 2 +- .../sales_partner_transaction_summary.js | 2 +- .../sales_person_commission_summary.js | 2 +- ...son_target_variance_based_on_item_group.js | 2 +- ...ory_target_variance_based_on_item_group.js | 2 +- .../territory_wise_sales.js | 2 +- .../cogs_by_item_group/cogs_by_item_group.js | 2 +- .../delayed_item_report.js | 2 +- .../delayed_order_report.js | 2 +- ...eue_vs_qty_after_transaction_comparison.js | 2 +- ...incorrect_balance_qty_after_transaction.js | 2 +- .../incorrect_serial_no_valuation.js | 2 +- .../incorrect_stock_value_report.js | 2 +- .../item_price_stock/item_price_stock.js | 2 +- .../item_shortage_report.js | 2 +- .../item_variant_details.js | 2 +- .../serial_no_ledger/serial_no_ledger.js | 2 +- .../report/stock_analytics/stock_analytics.js | 8 +-- .../stock_and_account_value_comparison.js | 2 +- .../stock_ledger_invariant_check.js | 2 +- .../stock_qty_vs_serial_no_count.js | 2 +- .../total_stock_summary.js | 2 +- ...rehouse_wise_item_balance_age_and_value.js | 2 +- .../warehouse_wise_stock_balance.js | 2 +- .../first_response_time_for_issues.js | 2 +- .../report/issue_analytics/issue_analytics.js | 8 +-- .../report/issue_summary/issue_summary.js | 2 +- .../support_hour_distribution.js | 2 +- .../youtube_interactions.js | 2 +- 96 files changed, 145 insertions(+), 158 deletions(-) diff --git a/.eslintrc b/.eslintrc index 12fefa0968..f3d4fd5091 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,65 +2,32 @@ "env": { "browser": true, "node": true, - "es6": true + "es2022": true }, "parserOptions": { - "ecmaVersion": 11, "sourceType": "module" }, "extends": "eslint:recommended", "rules": { - "indent": [ - "error", - "tab", - { "SwitchCase": 1 } - ], - "brace-style": [ - "error", - "1tbs" - ], - "space-unary-ops": [ - "error", - { "words": true } - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "off" - ], - "semi": [ - "warn", - "always" - ], - "camelcase": [ - "off" - ], - "no-unused-vars": [ - "warn" - ], - "no-redeclare": [ - "warn" - ], - "no-console": [ - "warn" - ], - "no-extra-boolean-cast": [ - "off" - ], - "no-control-regex": [ - "off" - ], - "space-before-blocks": "warn", - "keyword-spacing": "warn", - "comma-spacing": "warn", - "key-spacing": "warn" + "indent": "off", + "brace-style": "off", + "no-mixed-spaces-and-tabs": "off", + "no-useless-escape": "off", + "space-unary-ops": ["error", { "words": true }], + "linebreak-style": "off", + "quotes": ["off"], + "semi": "off", + "camelcase": "off", + "no-unused-vars": "off", + "no-console": ["warn"], + "no-extra-boolean-cast": ["off"], + "no-control-regex": ["off"] }, "root": true, "globals": { "frappe": true, "Vue": true, + "SetVueGlobals": true, "erpnext": true, "hub": true, "$": true, @@ -97,8 +64,10 @@ "is_null": true, "in_list": true, "has_common": true, + "posthog": true, "has_words": true, "validate_email": true, + "open_web_template_values_editor": true, "get_number_format": true, "format_number": true, "format_currency": true, diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index af6d8f26a7..94b76b12ce 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -9,21 +9,22 @@ jobs: name: linters runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.10' + cache: pip - name: Install and Run Pre-commit - uses: pre-commit/action@v2.0.3 + uses: pre-commit/action@v3.0.0 - name: Download Semgrep rules run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules - name: Download semgrep - run: pip install semgrep==0.97.0 + run: pip install semgrep - name: Run Semgrep rules run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d70977c07e..93d07485e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,8 +16,24 @@ repos: - id: check-merge-conflict - id: check-ast + - repo: https://github.com/pre-commit/mirrors-eslint + rev: v8.44.0 + hooks: + - id: eslint + types_or: [javascript] + args: ['--quiet'] + # Ignore any files that might contain jinja / bundles + exclude: | + (?x)^( + erpnext/public/dist/.*| + cypress/.*| + .*node_modules.*| + .*boilerplate.*| + erpnext/public/js/controllers/.* + )$ + - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 additional_dependencies: [ diff --git a/erpnext/accounts/report/account_balance/account_balance.js b/erpnext/accounts/report/account_balance/account_balance.js index bb66951cdc..5681be9211 100644 --- a/erpnext/accounts/report/account_balance/account_balance.js +++ b/erpnext/accounts/report/account_balance/account_balance.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Account Balance"] = { "filters": [ diff --git a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.js b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.js index e1fccb6e72..7617ed1e22 100644 --- a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.js +++ b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports['Billed Items To Be Received'] = { 'filters': [ @@ -17,7 +17,7 @@ frappe.query_reports['Billed Items To Be Received'] = { 'fieldname': 'posting_date', 'fieldtype': 'Date', 'reqd': 1, - 'default': get_today() + 'default': frappe.datetime.get_today() }, { 'label': __('Purchase Invoice'), diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js index dd965a9813..c6600b9aa7 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.require("assets/erpnext/js/financial_statements.js", function() { frappe.query_reports["Consolidated Financial Statement"] = { diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js index a123631663..74d52de2d2 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Customer Ledger Summary"] = { "filters": [ diff --git a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.js b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.js index 0056b9e8f5..eb2df6284b 100644 --- a/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.js +++ b/erpnext/accounts/report/deferred_revenue_and_expense/deferred_revenue_and_expense.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + function get_filters() { let filters = [ diff --git a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js index ea05a35b25..bd4b274f4d 100644 --- a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js +++ b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.require("assets/erpnext/js/financial_statements.js", function() { frappe.query_reports["Dimension-wise Accounts Balance Report"] = { diff --git a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.js b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.js index 92cf36ebc5..f6b0b8c3f7 100644 --- a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.js +++ b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Gross and Net Profit Report"] = { "filters": [ diff --git a/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.js b/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.js index 7908c07a0a..bd9b54398b 100644 --- a/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.js +++ b/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Inactive Sales Items"] = { "filters": [ diff --git a/erpnext/accounts/report/payment_ledger/payment_ledger.js b/erpnext/accounts/report/payment_ledger/payment_ledger.js index a5a4108f1d..65380ccdda 100644 --- a/erpnext/accounts/report/payment_ledger/payment_ledger.js +++ b/erpnext/accounts/report/payment_ledger/payment_ledger.js @@ -1,6 +1,6 @@ // Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + function get_filters() { let filters = [ diff --git a/erpnext/accounts/report/pos_register/pos_register.js b/erpnext/accounts/report/pos_register/pos_register.js index b8d48d92de..6e5491a0f8 100644 --- a/erpnext/accounts/report/pos_register/pos_register.js +++ b/erpnext/accounts/report/pos_register/pos_register.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["POS Register"] = { "filters": [ diff --git a/erpnext/accounts/report/share_balance/share_balance.js b/erpnext/accounts/report/share_balance/share_balance.js index 6db5bdd299..ac64a0bfb9 100644 --- a/erpnext/accounts/report/share_balance/share_balance.js +++ b/erpnext/accounts/report/share_balance/share_balance.js @@ -1,7 +1,7 @@ // -*- coding: utf-8 -*- // Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Share Balance"] = { "filters": [ diff --git a/erpnext/accounts/report/share_ledger/share_ledger.js b/erpnext/accounts/report/share_ledger/share_ledger.js index 6d1c44a6d0..4f2d2cc78f 100644 --- a/erpnext/accounts/report/share_ledger/share_ledger.js +++ b/erpnext/accounts/report/share_ledger/share_ledger.js @@ -1,7 +1,7 @@ // -*- coding: utf-8 -*- // Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Share Ledger"] = { "filters": [ diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js index 5dc4c3d1c1..8e3c8ac630 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Supplier Ledger Summary"] = { "filters": [ diff --git a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.js b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.js index d3d45b353a..d3348460a8 100644 --- a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.js +++ b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["TDS Computation Summary"] = { "filters": [ diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.js b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.js index ff2aa30601..202fd1d15a 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.js +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["TDS Payable Monthly"] = { "filters": [ diff --git a/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.js b/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.js index 0c148f85fb..f7ab029f19 100644 --- a/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.js +++ b/erpnext/accounts/report/voucher_wise_balance/voucher_wise_balance.js @@ -1,6 +1,6 @@ // Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Voucher-wise Balance"] = { "filters": [ diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js index b788a32d6a..2752e09909 100644 --- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js +++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Fixed Asset Register"] = { "filters": [ diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.js b/erpnext/buying/report/procurement_tracker/procurement_tracker.js index 283d56c946..416655d6bc 100644 --- a/erpnext/buying/report/procurement_tracker/procurement_tracker.js +++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Procurement Tracker"] = { "filters": [ diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.js b/erpnext/buying/report/purchase_analytics/purchase_analytics.js index a884f06d2c..a0faa6869a 100644 --- a/erpnext/buying/report/purchase_analytics/purchase_analytics.js +++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Purchase Analytics"] = { "filters": [ @@ -81,8 +81,9 @@ frappe.query_reports["Purchase Analytics"] = { const tree_type = frappe.query_report.filters[0].value; if (data_doctype != tree_type) return; - row_name = data[2].content; - length = data.length; + let row_name = data[2].content; + let length = data.length; + let row_values = ''; if (tree_type == "Supplier") { row_values = data @@ -104,7 +105,7 @@ frappe.query_reports["Purchase Analytics"] = { }); } - entry = { + let entry = { name: row_name, values: row_values, }; diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js index 721e54e46f..91506c0ab3 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Purchase Order Analysis"] = { "filters": [ diff --git a/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.js b/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.js index d727584d0a..cb05109d5b 100644 --- a/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.js +++ b/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Requested Items to Order and Receive"] = { "filters": [ diff --git a/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.js b/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.js index 075671f4ec..800b8ab7db 100644 --- a/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.js +++ b/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Subcontract Order Summary"] = { "filters": [ diff --git a/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.js b/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.js index 9db769d59b..35be2a9cf8 100644 --- a/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.js +++ b/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Subcontracted Item To Be Received"] = { "filters": [ diff --git a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.js b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.js index 7e5338f353..33b26dcb5f 100644 --- a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.js +++ b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Subcontracted Raw Materials To Be Transferred"] = { "filters": [ diff --git a/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.js b/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.js index fe5707af29..4bf82479a1 100644 --- a/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.js +++ b/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["First Response Time for Opportunity"] = { "filters": [ diff --git a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js index eeb8984513..d7ff9ad538 100644 --- a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js +++ b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.js @@ -1,6 +1,6 @@ // Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Lead Conversion Time"] = { "filters": [ diff --git a/erpnext/crm/report/lead_details/lead_details.js b/erpnext/crm/report/lead_details/lead_details.js index 2f6d24224f..66611f6c6c 100644 --- a/erpnext/crm/report/lead_details/lead_details.js +++ b/erpnext/crm/report/lead_details/lead_details.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Lead Details"] = { "filters": [ diff --git a/erpnext/crm/report/lost_opportunity/lost_opportunity.js b/erpnext/crm/report/lost_opportunity/lost_opportunity.js index 927c54df07..8d5923950a 100644 --- a/erpnext/crm/report/lost_opportunity/lost_opportunity.js +++ b/erpnext/crm/report/lost_opportunity/lost_opportunity.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Lost Opportunity"] = { "filters": [ diff --git a/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js b/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js index 7cd1710a7f..0aa21436bc 100644 --- a/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js +++ b/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Opportunity Summary by Sales Stage"] = { "filters": [ diff --git a/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.js b/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.js index 1426f4b6fd..3111121522 100644 --- a/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.js +++ b/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Pipeline Analytics"] = { "filters": [ diff --git a/erpnext/manufacturing/doctype/workstation/_test_workstation.js b/erpnext/manufacturing/doctype/workstation/_test_workstation.js index 0f09bd1c61..f2dced81e2 100644 --- a/erpnext/manufacturing/doctype/workstation/_test_workstation.js +++ b/erpnext/manufacturing/doctype/workstation/_test_workstation.js @@ -1,4 +1,4 @@ -/* eslint-disable */ + // rename this file from _test_[name] to test_[name] to activate // and remove above this line diff --git a/erpnext/manufacturing/doctype/workstation/workstation_list.js b/erpnext/manufacturing/doctype/workstation/workstation_list.js index 6a89d21e1e..61f2062ec0 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation_list.js +++ b/erpnext/manufacturing/doctype/workstation/workstation_list.js @@ -1,4 +1,4 @@ -/* eslint-disable */ + frappe.listview_settings['Workstation'] = { // add_fields: ["status"], // filters:[["status","=", "Open"]] diff --git a/erpnext/manufacturing/report/bom_explorer/bom_explorer.js b/erpnext/manufacturing/report/bom_explorer/bom_explorer.js index b94d3f3770..50191bf8ab 100644 --- a/erpnext/manufacturing/report/bom_explorer/bom_explorer.js +++ b/erpnext/manufacturing/report/bom_explorer/bom_explorer.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["BOM Explorer"] = { "filters": [ diff --git a/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.js b/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.js index 0eb22a22f7..34edb9d538 100644 --- a/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.js +++ b/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["BOM Operations Time"] = { "filters": [ diff --git a/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.js b/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.js index a0fd91e866..8e66f704c8 100644 --- a/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.js +++ b/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Epoch Consulting and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["BOM Stock Calculated"] = { "filters": [ diff --git a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js index c6ecaef2fa..db6f4d7688 100644 --- a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js +++ b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["BOM Variance Report"] = { "filters": [ diff --git a/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.js b/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.js index 72eed5e0d7..d0249ba84b 100644 --- a/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.js +++ b/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Cost of Poor Quality Report"] = { "filters": [ diff --git a/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.js b/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.js index f6486743aa..0589260958 100644 --- a/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.js +++ b/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Downtime Analysis"] = { "filters": [ diff --git a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.js b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.js index a3f0d00877..3795bd3df8 100644 --- a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.js +++ b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Exponential Smoothing Forecasting"] = { "filters": [ diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js index 782ce8110a..aa4251cd50 100644 --- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js +++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Job Card Summary"] = { "filters": [ diff --git a/erpnext/manufacturing/report/process_loss_report/process_loss_report.js b/erpnext/manufacturing/report/process_loss_report/process_loss_report.js index b0c2b94a25..c08413dc4a 100644 --- a/erpnext/manufacturing/report/process_loss_report/process_loss_report.js +++ b/erpnext/manufacturing/report/process_loss_report/process_loss_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Process Loss Report"] = { filters: [ diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.js b/erpnext/manufacturing/report/production_analytics/production_analytics.js index 99f9b1260a..72f06edf85 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.js +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Production Analytics"] = { "filters": [ diff --git a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.js b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.js index 59396fef16..521543ab1b 100644 --- a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.js +++ b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Production Plan Summary"] = { "filters": [ diff --git a/erpnext/manufacturing/report/production_planning_report/production_planning_report.js b/erpnext/manufacturing/report/production_planning_report/production_planning_report.js index 675b8a1100..422583274b 100644 --- a/erpnext/manufacturing/report/production_planning_report/production_planning_report.js +++ b/erpnext/manufacturing/report/production_planning_report/production_planning_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Production Planning Report"] = { "filters": [ diff --git a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.js b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.js index d4587aa661..905d185076 100644 --- a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.js +++ b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Quality Inspection Summary"] = { "filters": [ diff --git a/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.js b/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.js index 2fb4ec6791..70d7f92da0 100644 --- a/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.js +++ b/erpnext/manufacturing/report/work_order_consumed_materials/work_order_consumed_materials.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Work Order Consumed Materials"] = { "filters": [ diff --git a/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.js b/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.js index dbb7c23410..cf651cb394 100644 --- a/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.js +++ b/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Work Order Stock Report"] = { "filters": [ diff --git a/erpnext/manufacturing/report/work_order_summary/work_order_summary.js b/erpnext/manufacturing/report/work_order_summary/work_order_summary.js index 67bd24dd80..d0242f4d3b 100644 --- a/erpnext/manufacturing/report/work_order_summary/work_order_summary.js +++ b/erpnext/manufacturing/report/work_order_summary/work_order_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Work Order Summary"] = { "filters": [ diff --git a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.js b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.js index 5aa44c0a8c..fa70b9394a 100644 --- a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.js +++ b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Delayed Tasks Summary"] = { "filters": [ diff --git a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.js b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.js index 13f49ed6be..8566b1fc78 100644 --- a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.js +++ b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Employee Billing Summary"] = { "filters": [ diff --git a/erpnext/projects/report/project_billing_summary/project_billing_summary.js b/erpnext/projects/report/project_billing_summary/project_billing_summary.js index caac1d86b4..0242036dc7 100644 --- a/erpnext/projects/report/project_billing_summary/project_billing_summary.js +++ b/erpnext/projects/report/project_billing_summary/project_billing_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Project Billing Summary"] = { "filters": [ diff --git a/erpnext/projects/report/project_summary/project_summary.js b/erpnext/projects/report/project_summary/project_summary.js index 414b7b206a..21dbfda73f 100644 --- a/erpnext/projects/report/project_summary/project_summary.js +++ b/erpnext/projects/report/project_summary/project_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Project Summary"] = { "filters": [ diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index c001b4eb56..75d9891b81 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -34,7 +34,7 @@ erpnext.buying.BuyingController = class BuyingController extends erpnext.Transac this.frm.set_value("disable_rounded_total", disable); } - /* eslint-disable */ + // no idea where me is coming from if(this.frm.get_field('shipping_address')) { this.frm.set_query("shipping_address", function() { diff --git a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js index d7e3ac9a5d..4fc1be1ff5 100644 --- a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js +++ b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Electronic Invoice Register"] = { "filters": [ diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.js b/erpnext/regional/report/uae_vat_201/uae_vat_201.js index 5957424770..eaefc0420a 100644 --- a/erpnext/regional/report/uae_vat_201/uae_vat_201.js +++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["UAE VAT 201"] = { "filters": [ diff --git a/erpnext/regional/report/vat_audit_report/vat_audit_report.js b/erpnext/regional/report/vat_audit_report/vat_audit_report.js index 39ef9b563a..41318f3160 100644 --- a/erpnext/regional/report/vat_audit_report/vat_audit_report.js +++ b/erpnext/regional/report/vat_audit_report/vat_audit_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["VAT Audit Report"] = { "filters": [ diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.js b/erpnext/selling/report/address_and_contacts/address_and_contacts.js index ef87586f66..c16d9752f5 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.js +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Address And Contacts"] = { "filters": [ diff --git a/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.js b/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.js index d333c8be65..2aac3436c0 100644 --- a/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.js +++ b/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Customer-wise Item Price"] = { "filters": [ diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.js b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.js index 073be78979..f63d02ec84 100644 --- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.js +++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.js @@ -1,6 +1,6 @@ // Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Item-wise Sales History"] = { "filters": [ diff --git a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js index 990d736baa..0203a054f9 100644 --- a/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js +++ b/erpnext/selling/report/payment_terms_status_for_sales_order/payment_terms_status_for_sales_order.js @@ -1,6 +1,6 @@ // Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + function get_filters() { let filters = [ @@ -116,7 +116,7 @@ frappe.query_reports["Payment Terms Status for Sales Order"] = { "filters": get_filters(), "formatter": function(value, row, column, data, default_formatter){ if(column.fieldname == 'invoices' && value) { - invoices = value.split(','); + let invoices = value.split(','); const invoice_formatter = (prev_value, curr_value) => { if(prev_value != "") { return prev_value + ", " + default_formatter(curr_value, row, column, data); @@ -128,7 +128,7 @@ frappe.query_reports["Payment Terms Status for Sales Order"] = { return invoices.reduce(invoice_formatter, "") } else if (column.fieldname == 'paid_amount' && value){ - formatted_value = default_formatter(value, row, column, data); + let formatted_value = default_formatter(value, row, column, data); if(value > 0) { formatted_value = "" + formatted_value + "" } diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.js b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.js index 37634efb6c..204205949e 100644 --- a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.js +++ b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Pending SO Items For Purchase Request"] = { } diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.js b/erpnext/selling/report/sales_analytics/sales_analytics.js index 87dd02f991..ace16f4f41 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.js +++ b/erpnext/selling/report/sales_analytics/sales_analytics.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Analytics"] = { "filters": [ diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js index f3f931edfd..ac3d3dbf71 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Order Analysis"] = { "filters": [ diff --git a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.js b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.js index 63d930c145..f08780ae72 100644 --- a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.js +++ b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Partner Commission Summary"] = { "filters": [ diff --git a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.js b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.js index adae47b87d..83934fb359 100644 --- a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.js +++ b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Partner Target Variance based on Item Group"] = { "filters": [ diff --git a/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.js b/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.js index e404233953..e443ab39f6 100644 --- a/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.js +++ b/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Partner Transaction Summary"] = { "filters": [ diff --git a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js index ba6ee784b9..306ef6fffd 100644 --- a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js +++ b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Person Commission Summary"] = { "filters": [ diff --git a/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.js b/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.js index 2b8443627d..9414ad6a8f 100644 --- a/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.js +++ b/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Sales Person Target Variance Based On Item Group"] = { "filters": [ diff --git a/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.js b/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.js index 9f3d255e66..12bb49fd18 100644 --- a/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.js +++ b/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Territory Target Variance Based On Item Group"] = { "filters": [ diff --git a/erpnext/selling/report/territory_wise_sales/territory_wise_sales.js b/erpnext/selling/report/territory_wise_sales/territory_wise_sales.js index bef800f104..c755a75d82 100644 --- a/erpnext/selling/report/territory_wise_sales/territory_wise_sales.js +++ b/erpnext/selling/report/territory_wise_sales/territory_wise_sales.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Territory-wise Sales"] = { diff --git a/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.js b/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.js index d7c50a6697..a032285124 100644 --- a/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.js +++ b/erpnext/stock/report/cogs_by_item_group/cogs_by_item_group.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["COGS By Item Group"] = { diff --git a/erpnext/stock/report/delayed_item_report/delayed_item_report.js b/erpnext/stock/report/delayed_item_report/delayed_item_report.js index 40e6abefeb..cf6e12ff47 100644 --- a/erpnext/stock/report/delayed_item_report/delayed_item_report.js +++ b/erpnext/stock/report/delayed_item_report/delayed_item_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Delayed Item Report"] = { "filters": [ diff --git a/erpnext/stock/report/delayed_order_report/delayed_order_report.js b/erpnext/stock/report/delayed_order_report/delayed_order_report.js index aab0f3d0d1..cf489c932e 100644 --- a/erpnext/stock/report/delayed_order_report/delayed_order_report.js +++ b/erpnext/stock/report/delayed_order_report/delayed_order_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Delayed Order Report"] = { "filters": [ diff --git a/erpnext/stock/report/fifo_queue_vs_qty_after_transaction_comparison/fifo_queue_vs_qty_after_transaction_comparison.js b/erpnext/stock/report/fifo_queue_vs_qty_after_transaction_comparison/fifo_queue_vs_qty_after_transaction_comparison.js index 0b8f49653d..bc86979132 100644 --- a/erpnext/stock/report/fifo_queue_vs_qty_after_transaction_comparison/fifo_queue_vs_qty_after_transaction_comparison.js +++ b/erpnext/stock/report/fifo_queue_vs_qty_after_transaction_comparison/fifo_queue_vs_qty_after_transaction_comparison.js @@ -1,6 +1,6 @@ // Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + const DIFFERNCE_FIELD_NAMES = [ "fifo_qty_diff", diff --git a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.js b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.js index bf11277d9c..0f9120ba2f 100644 --- a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.js +++ b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Incorrect Balance Qty After Transaction"] = { "filters": [ diff --git a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js index c62d48081c..6325cc85c4 100644 --- a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js +++ b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Incorrect Serial No Valuation"] = { "filters": [ diff --git a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.js b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.js index ff424807e3..174d03317d 100644 --- a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.js +++ b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Incorrect Stock Value Report"] = { "filters": [ diff --git a/erpnext/stock/report/item_price_stock/item_price_stock.js b/erpnext/stock/report/item_price_stock/item_price_stock.js index 7af1dab6a0..c4684daa9f 100644 --- a/erpnext/stock/report/item_price_stock/item_price_stock.js +++ b/erpnext/stock/report/item_price_stock/item_price_stock.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Item Price Stock"] = { "filters": [ diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.js b/erpnext/stock/report/item_shortage_report/item_shortage_report.js index ca42a331e9..5642038f3f 100644 --- a/erpnext/stock/report/item_shortage_report/item_shortage_report.js +++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Item Shortage Report"] = { "filters": [ diff --git a/erpnext/stock/report/item_variant_details/item_variant_details.js b/erpnext/stock/report/item_variant_details/item_variant_details.js index 78eab4050c..b9022948f4 100644 --- a/erpnext/stock/report/item_variant_details/item_variant_details.js +++ b/erpnext/stock/report/item_variant_details/item_variant_details.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Item Variant Details"] = { "filters": [ diff --git a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js index 976e5156ad..fe977c6d5c 100644 --- a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js +++ b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Serial No Ledger"] = { "filters": [ diff --git a/erpnext/stock/report/stock_analytics/stock_analytics.js b/erpnext/stock/report/stock_analytics/stock_analytics.js index 78afe6d264..ea7bf5688e 100644 --- a/erpnext/stock/report/stock_analytics/stock_analytics.js +++ b/erpnext/stock/report/stock_analytics/stock_analytics.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Stock Analytics"] = { "filters": [ @@ -93,11 +93,11 @@ frappe.query_reports["Stock Analytics"] = { checkboxColumn: true, events: { onCheckRow: function(data) { - row_name = data[2].content; - row_values = data.slice(7).map(function (column) { + let row_name = data[2].content; + let row_values = data.slice(7).map(function (column) { return column.content; }) - entry = { + let entry = { 'name':row_name, 'values':row_values } diff --git a/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.js b/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.js index 254f5273be..ffef11a20e 100644 --- a/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.js +++ b/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Stock and Account Value Comparison"] = { "filters": [ diff --git a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js index 31f389f236..3447e0a6fa 100644 --- a/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js +++ b/erpnext/stock/report/stock_ledger_invariant_check/stock_ledger_invariant_check.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + const DIFFERNCE_FIELD_NAMES = [ "difference_in_qty", diff --git a/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.js b/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.js index 2a0fd4025c..7a48798495 100644 --- a/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.js +++ b/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Stock Qty vs Serial No Count"] = { "filters": [ diff --git a/erpnext/stock/report/total_stock_summary/total_stock_summary.js b/erpnext/stock/report/total_stock_summary/total_stock_summary.js index 88054aaea7..3d247f6740 100644 --- a/erpnext/stock/report/total_stock_summary/total_stock_summary.js +++ b/erpnext/stock/report/total_stock_summary/total_stock_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Total Stock Summary"] = { "filters": [ diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js index 39cfd7274f..8d6b283a15 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Warehouse wise Item Balance Age and Value"] = { "filters": [ diff --git a/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js b/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js index 752e464e27..4a77052a90 100644 --- a/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js +++ b/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js @@ -1,6 +1,6 @@ // Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Warehouse Wise Stock Balance"] = { "filters": [ diff --git a/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.js b/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.js index 18691fe264..a133770f6d 100644 --- a/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.js +++ b/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["First Response Time for Issues"] = { "filters": [ diff --git a/erpnext/support/report/issue_analytics/issue_analytics.js b/erpnext/support/report/issue_analytics/issue_analytics.js index 746eee025a..be45b9b44a 100644 --- a/erpnext/support/report/issue_analytics/issue_analytics.js +++ b/erpnext/support/report/issue_analytics/issue_analytics.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Issue Analytics"] = { "filters": [ @@ -93,11 +93,11 @@ frappe.query_reports["Issue Analytics"] = { events: { onCheckRow: function(data) { if (data && data.length) { - row_name = data[2].content; - row_values = data.slice(3).map(function(column) { + let row_name = data[2].content; + let row_values = data.slice(3).map(function(column) { return column.content; }) - entry = { + let entry = { 'name': row_name, 'values': row_values } diff --git a/erpnext/support/report/issue_summary/issue_summary.js b/erpnext/support/report/issue_summary/issue_summary.js index a5122d03ad..aee6f53f17 100644 --- a/erpnext/support/report/issue_summary/issue_summary.js +++ b/erpnext/support/report/issue_summary/issue_summary.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Issue Summary"] = { "filters": [ diff --git a/erpnext/support/report/support_hour_distribution/support_hour_distribution.js b/erpnext/support/report/support_hour_distribution/support_hour_distribution.js index ae30b6a550..82ccc73bf9 100644 --- a/erpnext/support/report/support_hour_distribution/support_hour_distribution.js +++ b/erpnext/support/report/support_hour_distribution/support_hour_distribution.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["Support Hour Distribution"] = { "filters": [ diff --git a/erpnext/utilities/report/youtube_interactions/youtube_interactions.js b/erpnext/utilities/report/youtube_interactions/youtube_interactions.js index 6e3e4e6980..adf2cf62f7 100644 --- a/erpnext/utilities/report/youtube_interactions/youtube_interactions.js +++ b/erpnext/utilities/report/youtube_interactions/youtube_interactions.js @@ -1,6 +1,6 @@ // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -/* eslint-disable */ + frappe.query_reports["YouTube Interactions"] = { "filters": [