mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-18 00:48:42 +00:00
Merge pull request #57589 from frappe/mergify/bp/version-15-hotfix/pr-57314
fix(italy): skip e-invoicing for opening invoices (backport #57314)
This commit is contained in:
@@ -238,7 +238,7 @@ def get_invoice_summary(items, taxes):
|
||||
# Preflight for successful e-invoice export.
|
||||
def sales_invoice_validate(doc):
|
||||
# Validate company
|
||||
if doc.doctype != "Sales Invoice":
|
||||
if doc.doctype != "Sales Invoice" or doc.is_opening == "Yes":
|
||||
return
|
||||
|
||||
if not doc.company_address:
|
||||
@@ -322,7 +322,7 @@ def sales_invoice_validate(doc):
|
||||
# Ensure payment details are valid for e-invoice.
|
||||
def sales_invoice_on_submit(doc, method):
|
||||
# Validate payment details
|
||||
if get_company_country(doc.company) not in [
|
||||
if doc.is_opening == "Yes" or get_company_country(doc.company) not in [
|
||||
"Italy",
|
||||
"Italia",
|
||||
"Italian Republic",
|
||||
@@ -388,7 +388,7 @@ def generate_single_invoice(docname):
|
||||
|
||||
# Delete e-invoice attachment on cancel.
|
||||
def sales_invoice_on_cancel(doc, method):
|
||||
if get_company_country(doc.company) not in [
|
||||
if doc.is_opening == "Yes" or get_company_country(doc.company) not in [
|
||||
"Italy",
|
||||
"Italia",
|
||||
"Italian Republic",
|
||||
|
||||
Reference in New Issue
Block a user