text: // Copyright (c) 2021, TZCODE SRL and contributors
  // For license information, please see license.txt
  
  frappe.ui.form.on('Tax Segment', {
  	refresh(frm) {
  		frm.trigger("set_queries");
  	},
  	set_queries(frm, cdt, cdn) {
  		frm.fields_dict["tax_accounts"].grid.get_field("tax").get_query = function (doc, cdt, cdn) {
  			const row = locals[cdt][cdn];
  			return {
  				filters: { company: row.company, account_type: "Tax" }
  			}
  		}
  		
  	}
  });
  