mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 15:45:01 +00:00
style: slight spacing and alignment fix
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 @@
|
||||
</div>
|
||||
{% 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 %}<br>
|
||||
{{ company_address_display.city or "" }} {{ company_address_display.state or "" }} {{ company_address_display.pincode or "" }} {{ company_address_display.country or "" }}<br>
|
||||
{{ company_address_display.address_line1 or "" }}<br>
|
||||
{% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}<br>{% endif %}
|
||||
{{ company_address_display.city or "" }}, {{ company_address_display.state or "" }} {{ company_address_display.pincode or "" }}, {{ company_address_display.country or "" }}<br>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
.logo img {
|
||||
border-radius: 15px;
|
||||
border: 1px solid #ededed;
|
||||
}
|
||||
|
||||
.company-name {
|
||||
@@ -84,10 +83,10 @@
|
||||
<div class="company-name">{{ doc.company }}</div>
|
||||
<div class="company-address">
|
||||
{% 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 "" }}<br /> {% if
|
||||
company_address_display.address_line2 %}{{ company_address_display.address_line2 }}<br />{%
|
||||
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 ""
|
||||
}}<br />
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -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 }}<br>
|
||||
{{ customer_address.address_line1 or "" }}
|
||||
{% if customer_address.address_line2 %}{{ customer_address.address_line2 }}{% endif %}<br>
|
||||
{{ customer_address.address_line1 or "" }}<br>
|
||||
{% if customer_address.address_line2 %}{{ customer_address.address_line2 }}<br>{% endif %}
|
||||
{{ customer_address.city or "" }} {{ customer_address.state or "" }} {{ customer_address.pincode or "" }} {{ customer_address.country or "" }}<br>
|
||||
{% endif %}
|
||||
</td>
|
||||
@@ -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 }}<br>
|
||||
{{ company_address_display.address_line1 or "" }}
|
||||
{% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}{% endif %}<br>
|
||||
{{ company_address_display.address_line1 or "" }}<br>
|
||||
{% if company_address_display.address_line2 %}{{ company_address_display.address_line2 }}<br>{% endif %}
|
||||
{{ company_address_display.city or "" }} {{ company_address_display.state or "" }} {{ company_address_display.pincode or "" }} {{ company_address_display.country or "" }}<br>
|
||||
{% endif %}
|
||||
</td>
|
||||
@@ -257,20 +270,23 @@ print_heading_template=None) -%}
|
||||
|
||||
<!-- Totals Section -->
|
||||
<table style="width:100%; margin-top: 15px">
|
||||
<td style="vertical-align: bottom !important;">
|
||||
<td style="vertical-align: bottom !important; width: 60%;">
|
||||
<p class="title">{{ _("Total in words") }}</p>
|
||||
<div class="words-box text-uppercase">{{ doc.in_words }}</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td style="width: 38%;">
|
||||
<table class="totals-table">
|
||||
<tr>
|
||||
<td class="text-right text-muted">{{ _("Sub Total:") }}</td>
|
||||
<td class="text-right text-muted"><div></div>{{ _("Sub Total:") }}</td>
|
||||
<td class="text-right amount-width">{{ doc.get_formatted("total", doc) }}</td>
|
||||
</tr>
|
||||
{%- if doc.apply_discount_on == "Net Total" -%}
|
||||
<tr>
|
||||
<td class="text-right text-muted">
|
||||
{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
||||
<div></div>{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
||||
</td>
|
||||
<td class="text-right amount-width">{{ doc.get_formatted("discount_amount", doc) }}</td>
|
||||
</tr>
|
||||
@@ -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) -%}
|
||||
<tr>
|
||||
<td class="text-right text-muted">{{ tax.get_formatted("description") }} ({{ tax.get_formatted("rate") }}%):</td>
|
||||
<td class="text-right text-muted"><div></div>{{ tax.get_formatted("description") }} ({{ tax.get_formatted("rate") }}%):</td>
|
||||
<td class="text-right amount-width">{{ tax.get_formatted("tax_amount") }}</td>
|
||||
</tr>
|
||||
{%- endif -%}
|
||||
@@ -286,7 +302,7 @@ print_heading_template=None) -%}
|
||||
{%- if doc.apply_discount_on == "Grand Total" -%}
|
||||
<tr>
|
||||
<td class="text-right text-muted">
|
||||
{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
||||
<div></div>{{ _("Discount") }} ({{ doc.additional_discount_percentage }}%):
|
||||
</td>
|
||||
<td class="text-right amount-width">{{ doc.get_formatted("discount_amount", doc) }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user