fix:날짜 형식 통일 (Y년 n월 j일) + 날짜 폰트 크기 일관성 확보

- overlayDate: Y-m-d → Y년 n월 j일, 미지정 시 12pt 고정
- buildVariableMap: current_date/expires_at도 동일 형식 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-13 19:52:14 +09:00
parent f0a57015c0
commit c635abc3dd
2 changed files with 7 additions and 5 deletions

View File

@@ -1359,8 +1359,8 @@ private function buildVariableMap(EsignContract $contract, EsignFieldTemplate $t
// 시스템 변수: 계약 정보
$map['contract_title'] = $contract->title ?? '';
$map['current_date'] = now()->format('Y.m.d');
$map['expires_at'] = $contract->expires_at ? $contract->expires_at->format('Y.m.d') : '';
$map['current_date'] = now()->format('Y년 n월 j일');
$map['expires_at'] = $contract->expires_at ? $contract->expires_at->format('Y년 n월 j일') : '';
// 커스텀 변수: contract.metadata에서 조회
$metadata = $contract->metadata ?? [];

View File

@@ -161,14 +161,16 @@ private function overlayDate(Fpdi $pdf, EsignSignField $field, float $x, float $
$dateText = $field->field_value;
if (! $dateText && $signer && $signer->signed_at) {
$dateText = $signer->signed_at->format('Y-m-d');
$dateText = $signer->signed_at->format('Y년 n월 j일');
}
if (! $dateText) {
$dateText = now()->format('Y-m-d');
$dateText = now()->format('Y년 n월 j일');
}
$this->renderText($pdf, $dateText, $x, $y, $w, $h, $field->font_size, $field->text_align ?? 'L');
// 날짜 필드는 폰트 크기를 일관되게 유지 (미지정 시 12pt 고정)
$fontSize = $field->font_size ?: 12;
$this->renderText($pdf, $dateText, $x, $y, $w, $h, $fontSize, $field->text_align ?? 'L');
}
/**