fix: invoice cancellation (#18151)
This commit is contained in:
committed by
Nabin Hait
parent
cc80be449d
commit
4dd48f46f3
@@ -316,6 +316,9 @@ def get_company_country(company):
|
|||||||
return frappe.get_cached_value('Company', company, 'country')
|
return frappe.get_cached_value('Company', company, 'country')
|
||||||
|
|
||||||
def get_e_invoice_attachments(invoice):
|
def get_e_invoice_attachments(invoice):
|
||||||
|
if not invoice.company_tax_id:
|
||||||
|
return []
|
||||||
|
|
||||||
out = []
|
out = []
|
||||||
attachments = get_attachments(invoice.doctype, invoice.name)
|
attachments = get_attachments(invoice.doctype, invoice.name)
|
||||||
company_tax_id = invoice.company_tax_id if invoice.company_tax_id.startswith("IT") else "IT" + invoice.company_tax_id
|
company_tax_id = invoice.company_tax_id if invoice.company_tax_id.startswith("IT") else "IT" + invoice.company_tax_id
|
||||||
|
|||||||
Reference in New Issue
Block a user