Try ERPNext Buy Support Partners Foundation Foundation Members

Filters in report

I am writing a code for filters.I want to add filters for a report where do i add them? In which report type should i add the filter code? Help.I am new to ERP

Look at the documentation for script report. The filters are in a file ____.js

As an example, go to the directory

frappe-bench/apps/erpnext/selling/report/inactive_customers

You will see a few files

$ ls -lt

drwxr-xr-x 2 erpnext erpnext 4096 Oct 13 11:33 __pycache__
-rw-r--r-- 1 erpnext erpnext  477 Oct 12 08:23 inactive_customers.js
-rw-r--r-- 1 erpnext erpnext  655 Oct 12 08:23 inactive_customers.json
-rw-r--r-- 1 erpnext erpnext 2411 Oct 12 08:23 inactive_customers.py
-rw-r--r-- 1 erpnext erpnext 2411 Oct 12 08:23 inactive_customers.html
-rw-r--r-- 1 pradesh pradesh    0 Oct 12 08:23 __init__.py
  • The .js file contains details of the report filter
  • The .py file contains the logic required to load the report data.

@Ashutosh_Halape you can refer general ledger.

@crafter how do I create a ____.js file ??

https://frappe.io/docs/user/en/guides/reports-and-printing/how-to-make-script-reports.html