I am new to ERPNext reports. I want to generate a custom report in ERPNext using Query Report. I was able to write a script for the columns in report. However I would like to add filter to columns. How can I do the same?
SELECT so.name AS "Sales Order", so.transaction_date AS "Transaction Date", so.customer AS "Customer", soi.item_code AS "Item Code", soi.item_name AS "Item Name", soi.qty AS "Quantity", soi.delivered_qty AS "Delivered Quantity", soi.qty - soi.delivered_qty AS "Pending Quantity" FROM `tabSales Order` AS so INNER JOIN `tabSales Order Item` AS soi ON so.name = soi.parent WHERE so.docstatus = 1 AND soi.qty > soi.delivered_qty