diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index ed259089fd5..fa7a05caaf3 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -291,7 +291,6 @@ class SalesInvoice(SellingController):
required_fields = [
company_details.get("company_logo"),
- company_details.get("website"),
company_details.get("phone_no"),
company_details.get("email"),
self.company_address,
@@ -2861,6 +2860,7 @@ def save_company_master_details(name, company, details):
"address_title": details.get("address_title"),
"address_type": details.get("address_type"),
"address_line1": details.get("address_line1"),
+ "address_line2": details.get("address_line2"),
"city": details.get("city"),
"state": details.get("state"),
"pincode": details.get("pincode"),
@@ -2869,7 +2869,7 @@ def save_company_master_details(name, company, details):
"links": [{"link_doctype": "Company", "link_name": company}],
}
)
- address_doc.insert(ignore_permissions=True)
+ address_doc.insert()
company_address = address_doc.name
if company_address:
diff --git a/erpnext/accounts/letterhead/letterhead_plain.html b/erpnext/accounts/letterhead/letterhead_plain.html
index 2b0277343b0..46613a31308 100644
--- a/erpnext/accounts/letterhead/letterhead_plain.html
+++ b/erpnext/accounts/letterhead/letterhead_plain.html
@@ -16,12 +16,9 @@
width: 100px;
text-align: center;
position: relative;
-
}
.logo-container {
width: 90px;
- border: 1px solid #EDEDED;
- border-radius: 15px;
display: block;
}
.logo-container img {
@@ -73,9 +70,9 @@
{% if doc.company_address %}
{% set company_address_display = frappe.get_doc("Address", doc.company_address) %}
- {{ company_address_display.address_line1 or "" }}
- {% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}{% endif %}
- {{ company_address_display.city or "" }} {{ company_address_display.state or "" }} {{ company_address_display.pincode or "" }} {{ company_address_display.country or "" }}
+ {{ company_address_display.address_line1 or "" }}
+ {% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}
{% endif %}
+ {{ company_address_display.city or "" }}, {{ company_address_display.state or "" }} {{ company_address_display.pincode or "" }}, {{ company_address_display.country or "" }}
{% endif %}
diff --git a/erpnext/accounts/letterhead/letterhead_with_background_colour.html b/erpnext/accounts/letterhead/letterhead_with_background_colour.html
index cf918ee0f5c..9e2ca5033a4 100644
--- a/erpnext/accounts/letterhead/letterhead_with_background_colour.html
+++ b/erpnext/accounts/letterhead/letterhead_with_background_colour.html
@@ -30,7 +30,6 @@
.logo img {
border-radius: 15px;
- border: 1px solid #ededed;
}
.company-name {
@@ -84,10 +83,10 @@
{{ doc.company }}
{% if doc.company_address %} {% set company_address_display = frappe.get_doc("Address",
- doc.company_address) %} {{ company_address_display.address_line1 or "" }} {% if
+ doc.company_address) %} {{ company_address_display.address_line1 or "" }}
{% if
company_address_display.address_line2 %}{{ company_address_display.address_line2 }}
{%
- endif %} {{ company_address_display.city or "" }} {{ company_address_display.state or ""
- }} {{ company_address_display.pincode or "" }} {{ company_address_display.country or ""
+ endif %} {{ company_address_display.city or "" }}, {{ company_address_display.state or ""
+ }} {{ company_address_display.pincode or "" }}, {{ company_address_display.country or ""
}}
{% endif %}
diff --git a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html
index d74ba323301..f5143157a95 100644
--- a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html
+++ b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html
@@ -131,6 +131,19 @@ print_heading_template=None) -%}
}
.totals-table tr {
border-bottom: 1px solid #ededed;
+ position: relative;
+ }
+ .totals-table tr td {
+ position: relative;
+ }
+ .totals-table tr td div {
+ width: 12%;
+ height: 14px;
+ background-color: white;
+ position: absolute;
+ bottom: -6px;
+ left: 0%;
+ color: white;
}
.totals-table tr:last-child {
border-bottom: none;
@@ -205,8 +218,8 @@ print_heading_template=None) -%}
{% if doc.customer_address %}
{% set customer_address = frappe.get_doc("Address", doc.customer_address) %}
{{ doc.customer_name }}
- {{ customer_address.address_line1 or "" }}
- {% if customer_address.address_line2 %}{{ customer_address.address_line2 }}{% endif %}
+ {{ customer_address.address_line1 or "" }}
+ {% if customer_address.address_line2 %}{{ customer_address.address_line2 }}
{% endif %}
{{ customer_address.city or "" }} {{ customer_address.state or "" }} {{ customer_address.pincode or "" }} {{ customer_address.country or "" }}
{% endif %}
@@ -214,8 +227,8 @@ print_heading_template=None) -%}
{% if doc.company_address %}
{% set company_address_display = frappe.get_doc("Address", doc.company_address) %}
{{ doc.company }}
- {{ company_address_display.address_line1 or "" }}
- {% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}{% endif %}
+ {{ company_address_display.address_line1 or "" }}
+ {% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}
{% endif %}
{{ company_address_display.city or "" }} {{ company_address_display.state or "" }} {{ company_address_display.pincode or "" }} {{ company_address_display.country or "" }}
{% endif %}
@@ -257,20 +270,23 @@ print_heading_template=None) -%}
- |
+ |
{{ _("Total in words") }}
{{ doc.in_words }}
|
+
+ |
+
- | {{ _("Sub Total:") }} |
+ {{ _("Sub Total:") }} |
{{ doc.get_formatted("total", doc) }} |
{%- if doc.apply_discount_on == "Net Total" -%}
|
- {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
+ {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
{{ doc.get_formatted("discount_amount", doc) }} |
@@ -278,7 +294,7 @@ print_heading_template=None) -%}
{%- for tax in doc.taxes -%}
{%- if (tax.tax_amount or print_settings.print_taxes_with_zero_amount) and (not tax.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%}
- | {{ tax.get_formatted("description") }} ({{ tax.get_formatted("rate") }}%): |
+ {{ tax.get_formatted("description") }} ({{ tax.get_formatted("rate") }}%): |
{{ tax.get_formatted("tax_amount") }} |
{%- endif -%}
@@ -286,7 +302,7 @@ print_heading_template=None) -%}
{%- if doc.apply_discount_on == "Grand Total" -%}
|
- {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
+ {{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
{{ doc.get_formatted("discount_amount", doc) }} |
diff --git a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.json b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.json
index 34198f03e9c..39f299ea206 100644
--- a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.json
+++ b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.json
@@ -15,7 +15,7 @@
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
- "modified": "2025-09-01 17:47:14.710435",
+ "modified": "2025-10-08 22:18:52.241069",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Print Format",
diff --git a/erpnext/public/js/print.js b/erpnext/public/js/print.js
index a85e488b352..3949bcb2da9 100644
--- a/erpnext/public/js/print.js
+++ b/erpnext/public/js/print.js
@@ -20,7 +20,6 @@ frappe.realtime.on("sales_invoice_before_print", (data) => {
label: "Website",
fieldname: "website",
fieldtype: "Data",
- reqd: data.website ? 0 : 1,
hidden: data.website ? 1 : 0,
},
{
@@ -59,12 +58,18 @@ frappe.realtime.on("sales_invoice_before_print", (data) => {
hidden: data.address_line ? 1 : 0,
},
{
- label: "Address Line",
+ label: "Address Line 1",
fieldname: "address_line1",
fieldtype: "Data",
reqd: data.address_line ? 0 : 1,
hidden: data.address_line ? 1 : 0,
},
+ {
+ label: "Address Line 2",
+ fieldname: "address_line2",
+ fieldtype: "Data",
+ hidden: data.address_line ? 1 : 0,
+ },
{
label: "City",
fieldname: "city",
|