Spaces:
Sleeping
Sleeping
Commit
·
659f9d7
1
Parent(s):
65eba5f
feat: Improve invoice printing for A4 page size
Browse files
script.js
CHANGED
|
@@ -133,7 +133,7 @@ if (typeof document !== 'undefined') {
|
|
| 133 |
`;
|
| 134 |
});
|
| 135 |
// Add empty rows to fill the page
|
| 136 |
-
for (let i = items.length; i <
|
| 137 |
html += '<tr><td> </td><td></td><td></td><td></td><td></td><td></td><td></td></tr>';
|
| 138 |
}
|
| 139 |
|
|
|
|
| 133 |
`;
|
| 134 |
});
|
| 135 |
// Add empty rows to fill the page
|
| 136 |
+
for (let i = items.length; i < 7; i++) {
|
| 137 |
html += '<tr><td> </td><td></td><td></td><td></td><td></td><td></td><td></td></tr>';
|
| 138 |
}
|
| 139 |
|
style.css
CHANGED
|
@@ -125,3 +125,48 @@
|
|
| 125 |
margin-top: 20px;
|
| 126 |
font-weight: bold;
|
| 127 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
margin-top: 20px;
|
| 126 |
font-weight: bold;
|
| 127 |
}
|
| 128 |
+
|
| 129 |
+
@media print {
|
| 130 |
+
|
| 131 |
+
html,
|
| 132 |
+
body {
|
| 133 |
+
height: 100%;
|
| 134 |
+
margin: 0;
|
| 135 |
+
padding: 0;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
@page {
|
| 139 |
+
size: a4;
|
| 140 |
+
margin: 10mm;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
body {
|
| 144 |
+
font-size: 12pt;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.quotation-print {
|
| 148 |
+
max-width: 100%;
|
| 149 |
+
padding: 20px;
|
| 150 |
+
margin: auto;
|
| 151 |
+
border: 1px solid #000;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.items-table-print,
|
| 155 |
+
.items-table-print tr,
|
| 156 |
+
.items-table-print td {
|
| 157 |
+
page-break-inside: avoid !important;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.header,
|
| 161 |
+
.customer-info,
|
| 162 |
+
.footer,
|
| 163 |
+
.notes-and-total,
|
| 164 |
+
.disclaimer,
|
| 165 |
+
.thank-you {
|
| 166 |
+
page-break-inside: avoid !important;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
button {
|
| 170 |
+
display: none;
|
| 171 |
+
}
|
| 172 |
+
}
|