ci: add eslint and update linting confs
This commit is contained in:
parent
692bfccb6e
commit
924cdef6d9
65
.eslintrc
65
.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,
|
||||
|
9
.github/workflows/linters.yml
vendored
9
.github/workflows/linters.yml
vendored
@ -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
|
||||
|
@ -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: [
|
||||
|
@ -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": [
|
||||
|
@ -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'),
|
||||
|
@ -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"] = {
|
||||
|
@ -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": [
|
||||
|
@ -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 = [
|
||||
|
@ -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"] = {
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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 = [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* eslint-disable */
|
||||
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* eslint-disable */
|
||||
|
||||
frappe.listview_settings['Workstation'] = {
|
||||
// add_fields: ["status"],
|
||||
// filters:[["status","=", "Open"]]
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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: [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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() {
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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 = "<span style='color:green;'>" + formatted_value + "</span>"
|
||||
}
|
||||
|
@ -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"] = {
|
||||
}
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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"] = {
|
||||
|
@ -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"] = {
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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",
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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": [
|
||||
|
@ -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",
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user