mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-06 03:52:15 +00:00
feat: standard print format for Sales Order and Purchase Invoice
(cherry picked from commit 371efce88a)
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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"),
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user