Merge pull request #27373 from deepeshgarg007/gstin_filter_issue
fix: GSTR-1 Reports not showing any data
This commit is contained in:
commit
8f6d22b7ea
@ -96,6 +96,7 @@ class Gstr1Report(object):
|
||||
def get_b2c_data(self):
|
||||
b2cs_output = {}
|
||||
|
||||
if self.invoices:
|
||||
for inv, items_based_on_rate in self.items_based_on_tax_rate.items():
|
||||
invoice_details = self.invoices.get(inv)
|
||||
for rate, items in items_based_on_rate.items():
|
||||
@ -173,6 +174,7 @@ class Gstr1Report(object):
|
||||
|
||||
company_gstins = get_company_gstin_number(self.filters.get('company'), all_gstins=True)
|
||||
|
||||
if company_gstins:
|
||||
self.filters.update({
|
||||
'company_gstins': company_gstins
|
||||
})
|
||||
@ -1050,6 +1052,7 @@ def get_company_gstin_number(company, address=None, all_gstins=False):
|
||||
["Dynamic Link", "link_doctype", "=", "Company"],
|
||||
["Dynamic Link", "link_name", "=", company],
|
||||
["Dynamic Link", "parenttype", "=", "Address"],
|
||||
["gstin", "!=", '']
|
||||
]
|
||||
gstin = frappe.get_all("Address", filters=filters, pluck="gstin", order_by="is_primary_address desc")
|
||||
if gstin and not all_gstins:
|
||||
|
Loading…
x
Reference in New Issue
Block a user