reduce invoice printing size
This commit is contained in:
parent
8f6e105aac
commit
d28c59d57b
@ -38,7 +38,7 @@
|
||||
<div id="wrapper">
|
||||
<!-- Sidebar -->
|
||||
{% if user.is_authenticated %}
|
||||
<nav id="sidebar">
|
||||
<nav id="sidebar" class="d-print-none">
|
||||
<div class="sidebar-header d-flex align-items-center">
|
||||
<a class="navbar-brand fw-bold text-primary fs-4" href="{% url 'index' %}">
|
||||
{% if site_settings.logo %}
|
||||
@ -406,7 +406,7 @@
|
||||
<!-- Page Content -->
|
||||
<div id="content" {% if not user.is_authenticated %}style="margin-left: 0; width: 100%;"{% endif %}>
|
||||
{% if user.is_authenticated %}
|
||||
<div class="p-3 d-flex justify-content-between align-items-center">
|
||||
<div class="p-3 d-flex justify-content-between align-items-center d-print-none">
|
||||
<button type="button" id="sidebarCollapse" class="btn btn-light shadow-sm">
|
||||
<i class="bi bi-list fs-5"></i>
|
||||
</button>
|
||||
|
||||
@ -296,13 +296,13 @@ async function sendWhatsAppDirect() {
|
||||
@media print {
|
||||
@page {
|
||||
size: A4 portrait;
|
||||
margin: 10mm;
|
||||
margin: 5mm;
|
||||
}
|
||||
body {
|
||||
background-color: white !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.container {
|
||||
width: 100% !important;
|
||||
@ -327,27 +327,27 @@ async function sendWhatsAppDirect() {
|
||||
}
|
||||
|
||||
/* Spacing Reductions */
|
||||
.print-mb-2 { margin-bottom: 0.5rem !important; }
|
||||
.print-mb-1 { margin-bottom: 0.25rem !important; }
|
||||
.print-mt-2 { margin-top: 1rem !important; }
|
||||
.print-pt-2 { padding-top: 0.5rem !important; }
|
||||
.print-mb-2 { margin-bottom: 0.25rem !important; }
|
||||
.print-mb-1 { margin-bottom: 0.15rem !important; }
|
||||
.print-mt-2 { margin-top: 0.5rem !important; }
|
||||
.print-pt-2 { padding-top: 0.25rem !important; }
|
||||
.print-pb-0 { padding-bottom: 0 !important; }
|
||||
.print-px-0 { padding-left: 0 !important; padding-right: 0 !important; }
|
||||
.print-mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
|
||||
.print-p-0 { padding: 0 !important; }
|
||||
|
||||
/* Font Size Reductions */
|
||||
.print-h1 { font-size: 18px !important; margin-bottom: 0.5rem !important; }
|
||||
.print-h3 { font-size: 16px !important; }
|
||||
.print-h5 { font-size: 14px !important; }
|
||||
.print-small { font-size: 10px !important; }
|
||||
.print-h1 { font-size: 16px !important; margin-bottom: 0.25rem !important; }
|
||||
.print-h3 { font-size: 14px !important; }
|
||||
.print-h5 { font-size: 12px !important; }
|
||||
.print-small { font-size: 9px !important; }
|
||||
|
||||
/* Table Compactness */
|
||||
.table th, .table td {
|
||||
padding: 4px 8px !important;
|
||||
font-size: 11px !important;
|
||||
padding: 2px 4px !important;
|
||||
font-size: 10px !important;
|
||||
}
|
||||
.print-py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
|
||||
.print-py-1 { padding-top: 2px !important; padding-bottom: 2px !important; }
|
||||
|
||||
/* Hide Backgrounds */
|
||||
.print-bg-none { background-color: transparent !important; }
|
||||
@ -355,11 +355,16 @@ async function sendWhatsAppDirect() {
|
||||
border: 1px solid #000;
|
||||
color: #000 !important;
|
||||
background: transparent !important;
|
||||
padding: 2px 8px !important;
|
||||
padding: 1px 6px !important;
|
||||
font-size: 10px !important;
|
||||
}
|
||||
|
||||
/* Logo sizing */
|
||||
.print-logo { max-height: 50px !important; }
|
||||
.print-logo { max-height: 40px !important; }
|
||||
|
||||
/* Prevent orphans/widows */
|
||||
tr, p, div { page-break-inside: avoid; }
|
||||
.row { page-break-inside: auto; }
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
Loading…
x
Reference in New Issue
Block a user