How to apply filter in child table

for the taxes child table,in field batch_no i want to filter only the company’s item and item which has batch_no only should display in sales invoice Doctype

Please, try following this script (JS), “on sales invoice Doctype”

frm.set_query('batch_no', 'taxes ', function() {
    return {
        filters: {
            item_group: 'Products'
        }
    }
})

Generally, use this formula to Apply filters on a Link field in a Child Table

frm.set_query('filedname', 'childtable', () => {
    return {
        filters: {
            filedname: 'value'
        }
    }
})

Can the ‘value’ be different for different row.
For example: in Quotation Items table, i want to filter a link field with that row’s item_code. Is that possible?

Yes, it is possible… Try it and let me know.