fix: wrap long bid items within printable page width

This commit is contained in:
2026-09-06 15:12:10 +03:00
parent fb2c2b120e
commit 4d6d7009ca
4 changed files with 28 additions and 3 deletions
+7 -3
View File
@@ -62,7 +62,7 @@ const kacir = (s) =>
const STIL = `
@page { size: A4; margin: 20mm 18mm; }
* { box-sizing: border-box; }
body { font-family: "Times New Roman", Georgia, serif; font-size: 11.5pt; line-height: 1.55; color: #000; }
body { margin: 0; font-family: "Times New Roman", Georgia, serif; font-size: 11.5pt; line-height: 1.55; color: #000; overflow-wrap: anywhere; }
h1 { font-size: 13pt; text-align: center; margin: 0 0 4mm; letter-spacing: .3px; }
h2 { font-size: 11pt; margin: 6mm 0 2mm; }
.ust { font-size: 10pt; margin-bottom: 6mm; }
@@ -70,16 +70,20 @@ const STIL = `
table { width: 100%; border-collapse: collapse; margin: 3mm 0; font-size: 9.5pt; }
th, td { border: 1px solid #444; padding: 1.6mm 2mm; text-align: left; vertical-align: top; }
thead { display: table-header-group; }
tfoot { display: table-row-group; }
tr { break-inside: avoid; }
th { background: #eee; font-weight: bold; }
td.s, th.s { text-align: right; white-space: nowrap; }
.cetvel { table-layout: fixed; }
.cetvel td, .cetvel th { white-space: normal; overflow-wrap: anywhere; }
.toplam td { font-weight: bold; background: #f4f4f4; }
.imza { margin-top: 12mm; width: 70mm; margin-left: auto; text-align: center; font-size: 10pt; }
.imza { break-inside: avoid; margin-top: 12mm; width: 70mm; margin-left: auto; text-align: center; font-size: 10pt; }
.imza .kutu { border: 1px solid #666; height: 26mm; margin-bottom: 2mm; }
.not { font-size: 8.5pt; color: #555; margin-top: 8mm; }
ul { margin: 2mm 0; padding-left: 6mm; }
li { margin: 1.2mm 0; }
.kutucuk { display: inline-block; width: 3.6mm; height: 3.6mm; border: 1px solid #333; margin-right: 2mm; vertical-align: -0.4mm; }
@media screen { body { width: calc(100% - 32px); max-width: 174mm; margin: 20mm auto; } }
@media print { .yazdirma { display: none; } }
`;
@@ -184,7 +188,7 @@ export function teklifCetveliHtml(f, satirlar, toplam) {
return `<h1>BİRİM FİYAT TEKLİF CETVELİ</h1>
${ustBilgi(f)}
<table>
<table class="cetvel">
<thead><tr>
<th class="s" style="width:8%">Sıra</th><th>Mal / hizmet adı</th>
<th class="s" style="width:12%">Miktar</th><th style="width:12%">Birim</th>