feat: standard print format for Sales Order and Purchase Invoice

(cherry picked from commit 371efce88a)
This commit is contained in:
khushi8112
2026-02-23 01:39:17 +05:30
committed by Mergify
parent 6975fa185c
commit 222f51b4d0
11 changed files with 149 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -4296,7 +4296,7 @@ def get_missing_company_details(doctype, docname):
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")
@@ -4392,6 +4392,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"),

View File

@@ -1,11 +1,22 @@
const doctype_list = ["Sales Invoice", "Delivery Note", "Purchase Order", "POS Invoice"];
const doctype_list = [
"Sales Order",
"Sales Invoice",
"Delivery Note",
"Purchase Order",
"Purchase Invoice",
"POS Invoice",
];
const allowed_print_formats = [
"Sales Order Standard",
"Sales Order with Item Image",
"Sales Invoice Standard",
"Sales Invoice with Item Image",
"Delivery Note Standard",
"Delivery Note with Item Image",
"Purchase Order Standard",
"Purchase Order with Item Image",
"Purchase Invoice Standard",
"Purchase Invoice with Item Image",
"POS Invoice Standard",
"POS Invoice with Item Image",
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long