BO 일계부 수입/수출 영수증 다운로드 버튼 추가

This commit is contained in:
주수현
2025-07-04 11:40:36 +09:00
parent 38a9ca2997
commit 69b7bda52a
5 changed files with 62 additions and 5 deletions

View File

@@ -43,7 +43,11 @@
di.price, /* 현금 */
di.estimated_value, /* 현물평가액 */
di.updated_by, /* 최종수정자 */
TO_CHAR(di.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
TO_CHAR(di.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at, /* 최종수정날짜 */
uf.id AS file_id,
uf.name AS file_name,
uf.origin_name AS file_origin_name,
uf.path AS file_path
<if test="searchMonth == true">
, EXTRACT(DAY FROM CAST(dr.start_date as date)) as start_day
, EXTRACT(DAY FROM CAST(dr.end_date as date)) as end_day
@@ -55,6 +59,11 @@
LEFT JOIN uicode ui_unit
ON ui_unit.parent_id = 'code.record.unit'
AND ui_unit.id = di.unit_code
LEFT JOIN receipt_has_record rhr
ON rhr.receipt_type_id = di.id
AND rhr.type = 'INCOME' AND rhr.is_deleted = false
LEFT JOIN upload_file uf
ON uf.id = rhr.file_id and uf.type = 'INCOME'
<if test="searchMonth == true">
INNER JOIN daily_record dr
ON dr.id = di.daily_record_seq
@@ -150,7 +159,11 @@
de.price, /* 현금 */
de.estimated_value, /* 현물평가액 */
de.updated_by, /* 최종수정자 */
TO_CHAR(de.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
TO_CHAR(de.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at, /* 최종수정날짜 */
uf.id AS file_id,
uf.name AS file_name,
uf.origin_name AS file_origin_name,
uf.path AS file_path
<if test="searchMonth == true">
, EXTRACT(DAY FROM CAST(dr.start_date as date)) as start_day
, EXTRACT(DAY FROM CAST(dr.end_date as date)) as end_day
@@ -159,6 +172,11 @@
LEFT JOIN uicode ui_unit
ON ui_unit.parent_id = 'code.record.unit'
AND ui_unit.id = de.unit_code
LEFT JOIN receipt_has_record rhr
ON rhr.receipt_type_id = de.id
AND rhr.type = 'EXPENSE' AND rhr.is_deleted = false
LEFT JOIN upload_file uf
ON uf.id = rhr.file_id and uf.type = 'EXPENSE'
<if test="searchMonth == true">
INNER JOIN daily_record dr
ON dr.id = de.daily_record_seq

View File

@@ -78,9 +78,6 @@
<h3>수입 <strong>(<span id="incomeCount">0</span>건)</strong></h3>
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
<div class="btns-row align-right">
<button type="button" class="btn small">
<span class="btn-txt">영수증 다운로드 <i class="ico-download" aria-hidden="true"></i></span>
</button>
<button type="button" class="btn small">
<span class="btn-txt">
<label class="radio-inner">
@@ -112,6 +109,7 @@
<th>단위</th>
<th>현금(원)</th>
<th>현물평가액</th>
<th>영수증</th>
<th>최종 수정자</th>
</tr>
</thead>
@@ -219,6 +217,7 @@
<th>단위</th>
<th>현금(원)</th>
<th>현물평가액</th>
<th>영수증</th>
<th>최종 수정자</th>
</tr>
</thead>
@@ -514,6 +513,9 @@
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
<td class="align-center">
${item.fileId ? `<a href="${item.attachmentURL}" download>다운로드</a>` : '-'}
</td>
<td>
${item.updatedBy}<br>
(${item.updatedAt})
@@ -605,6 +607,9 @@
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
<td class="align-center">
${item.fileId ? `<a href="${item.attachmentURL}" download>다운로드</a>` : '-'}
</td>
<td>
${item.updatedBy}<br>
(${item.updatedAt})