feat: standard print format for Sales Order and Purchase Invoice

This commit is contained in:
khushi8112
2026-02-23 01:39:17 +05:30
parent f133b96cb4
commit 371efce88a
11 changed files with 149 additions and 4 deletions

View File

@@ -4310,7 +4310,7 @@ def get_missing_company_details(doctype: str, docname: str):
from frappe.contacts.doctype.address.address import get_address_display_list
company = frappe.db.get_value(doctype, docname, "company")
if doctype == "Purchase Order":
if doctype in ["Purchase Order", "Purchase Invoice"]:
company_address = frappe.db.get_value(doctype, docname, "billing_address")
else:
company_address = frappe.db.get_value(doctype, docname, "company_address")
@@ -4406,6 +4406,8 @@ def update_doc_company_address(current_doctype, docname, company_address, detail
address_field_map = {
"Purchase Order": ("billing_address", "billing_address_display"),
"Purchase Invoice": ("billing_address", "billing_address_display"),
"Sales Order": ("company_address", "company_address_display"),
"Sales Invoice": ("company_address", "company_address_display"),
"Delivery Note": ("company_address", "company_address_display"),
"POS Invoice": ("company_address", "company_address_display"),