fix: returned empty list if non US based company
diff --git a/erpnext/regional/report/irs_1099/irs_1099.py b/erpnext/regional/report/irs_1099/irs_1099.py
index 67834d1..a06efc8 100644
--- a/erpnext/regional/report/irs_1099/irs_1099.py
+++ b/erpnext/regional/report/irs_1099/irs_1099.py
@@ -16,9 +16,14 @@
def execute(filters=None):
filters = filters if isinstance(filters, _dict) else _dict(filters)
+ company = frappe.db.get_default("company")
if not filters:
filters.setdefault('fiscal_year', get_fiscal_year(nowdate())[0])
- filters.setdefault('company', frappe.db.get_default("company"))
+ filters.setdefault('company', company)
+
+ region = frappe.db.get_value("Company", fieldname = ["country"], filters = { "name": company })
+ if region != 'United States':
+ return [],[]
data = []
columns = get_columns()
data = frappe.db.sql("""