修正
This commit is contained in:
@@ -83,6 +83,10 @@
|
||||
td.right {
|
||||
text-align: right;
|
||||
}
|
||||
td.center,
|
||||
th.center {
|
||||
text-align: center;
|
||||
}
|
||||
tr.total-row td {
|
||||
background-color: #d8d8d8 !important;
|
||||
font-weight: bold;
|
||||
@@ -91,10 +95,171 @@
|
||||
tr.indent-row td:nth-child(2) {
|
||||
padding-left: 40px !important;
|
||||
}
|
||||
tfoot td {
|
||||
font-weight: bold;
|
||||
background: #e0e0e0;
|
||||
border-top: 2px solid #333;
|
||||
.print-button {
|
||||
background: #ff9800;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 8px 16px;
|
||||
margin-left: 10px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.print-button:hover {
|
||||
background: #e68900;
|
||||
}
|
||||
/* 画面表示時:thead内の印刷用ヘッダー行を非表示 */
|
||||
tr.print-header-title,
|
||||
tr.print-header-period,
|
||||
tr.print-header-meta {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.print-header-cell {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
background-color: white !important;
|
||||
padding: 2px 5px !important;
|
||||
}
|
||||
|
||||
@media print {
|
||||
* {
|
||||
-webkit-print-color-adjust: exact !important;
|
||||
print-color-adjust: exact !important;
|
||||
color-adjust: exact !important;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
/* 画面用の要素を印刷時に隠す */
|
||||
#printDate,
|
||||
h2,
|
||||
.period-info,
|
||||
.back-button,
|
||||
.search-form,
|
||||
.print-button,
|
||||
#loadingStatus {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* thead内の印刷用ヘッダー行を表示 */
|
||||
tr.print-header-title,
|
||||
tr.print-header-period,
|
||||
tr.print-header-meta {
|
||||
display: table-row !important;
|
||||
}
|
||||
|
||||
.print-header-cell {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
background-color: white !important;
|
||||
padding: 3px 5px !important;
|
||||
}
|
||||
|
||||
/* 印刷時の単位・印刷日のスタイリング */
|
||||
tr.print-header-meta th {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
padding: 2px 5px !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
tr.print-header-meta th:last-child {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
tr.print-header-meta div {
|
||||
text-align: right !important;
|
||||
font-size: 10px !important;
|
||||
font-weight: normal !important;
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#theadPrintDate {
|
||||
text-align: right !important;
|
||||
align-items: center !important;
|
||||
flex-wrap: wrap !important;
|
||||
gap: 20px !important;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
page-break-after: avoid;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #e8e8e8 !important;
|
||||
font-weight: bold;
|
||||
padding: 5px 6px;
|
||||
border: 1px solid #666;
|
||||
page-break-inside: avoid;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid #666;
|
||||
padding: 4px 5px;
|
||||
font-size: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
tr.total-row td {
|
||||
background-color: #d8d8d8 !important;
|
||||
font-weight: bold;
|
||||
border-top: 2px solid #333;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
tr.indent-row td:nth-child(2) {
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
td.left {
|
||||
text-align: left;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
td.right {
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td.center,
|
||||
th.center {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4 portrait;
|
||||
margin-top: 10mm;
|
||||
margin-bottom: 20mm;
|
||||
margin-left: 10mm;
|
||||
margin-right: 10mm;
|
||||
|
||||
@bottom-center {
|
||||
content: "第 " counter(page) " 页";
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -115,6 +280,7 @@
|
||||
>
|
||||
← 首ページに戻る
|
||||
</button>
|
||||
|
||||
<h2>残高試算表(貸借・損益)</h2>
|
||||
|
||||
<div
|
||||
@@ -133,18 +299,68 @@
|
||||
|
||||
<button id="btnSearch">検索</button>
|
||||
<button id="btnFullYear" class="secondary">全年度表示</button>
|
||||
<button id="btnPrint" class="print-button">印刷</button>
|
||||
</div>
|
||||
|
||||
<div class="period-info">
|
||||
<span id="periodInfo">令和7年 1月 1日 ~ 令和7年 12月31日</span>
|
||||
<span style="margin-left: 20px">単位: 円</span>
|
||||
<span style="margin-left: 20px; float: right">単位: 円</span>
|
||||
</div>
|
||||
|
||||
<table id="trialBalanceTable">
|
||||
<thead>
|
||||
<tr class="print-header-title">
|
||||
<th
|
||||
colspan="7"
|
||||
class="print-header-cell"
|
||||
style="text-align: center; font-size: 14px; font-weight: bold"
|
||||
>
|
||||
残高試算表(貸借・損益)
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="print-header-period">
|
||||
<th
|
||||
colspan="7"
|
||||
class="print-header-cell"
|
||||
style="text-align: center; font-size: 11px; font-weight: normal"
|
||||
id="theadPeriodInfo"
|
||||
></th>
|
||||
</tr>
|
||||
<tr class="print-header-meta">
|
||||
<th colspan="5" class="print-header-cell"></th>
|
||||
<th
|
||||
colspan="2"
|
||||
class="print-header-cell"
|
||||
style="text-align: right !important; padding: 2px 5px"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
text-align: right !important;
|
||||
font-size: 10px;
|
||||
line-height: 1.2;
|
||||
display: block;
|
||||
width: 100%;
|
||||
"
|
||||
id="theadPrintDate"
|
||||
>
|
||||
印刷日:2026年2月25日
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
text-align: right !important;
|
||||
font-size: 10px;
|
||||
line-height: 1.2;
|
||||
display: block;
|
||||
width: 100%;
|
||||
"
|
||||
>
|
||||
単位:円
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="left">科目コード</th>
|
||||
<th class="left">科目名称</th>
|
||||
<th class="center">科目名称</th>
|
||||
<th>期首残高</th>
|
||||
<th>借方発生額</th>
|
||||
<th>貸方発生額</th>
|
||||
@@ -155,16 +371,6 @@
|
||||
<tbody>
|
||||
<!-- JS 动态插入 -->
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" class="left">合計</td>
|
||||
<td id="totalOpening">0</td>
|
||||
<td id="totalDebit">0</td>
|
||||
<td id="totalCredit">0</td>
|
||||
<td id="totalClosing">0</td>
|
||||
<td id="totalRatio">100.00</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<script src="js/trial-balance.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user