Compare commits
No commits in common. "1e30943b38448c98fd95eb2e5e32b9ea357ecd8a" and "3a8e6c81f4e68bc104ffaa23eb6e582d083ee272" have entirely different histories.
1e30943b38
...
3a8e6c81f4
@ -179,23 +179,24 @@ class ReceiptController extends Controller
|
||||
->where('management_id', $management_id)
|
||||
->first();
|
||||
|
||||
// 社員側の社判画像を参照するため、シンボリックリンクを作成 (company_image_path が存在する場合のみ)
|
||||
if (!empty($inv_setting->company_image_path)) {
|
||||
$krgmStoragePath = config('app.krgm_storage_path');
|
||||
$linkPath = public_path('other-storage');
|
||||
if (!file_exists($krgmStoragePath)) {
|
||||
\Log::error("[ERROR] " . now()->format('Y-m-d H:i:s') . " 社判画像保存フォルダ発見不可: " . $krgmStoragePath . ", user_id=" . $user_id . ", contract_id=" . $contract_id);
|
||||
throw new \Exception();
|
||||
}
|
||||
if (!file_exists($linkPath)) {
|
||||
$result = symlink($krgmStoragePath, $linkPath);
|
||||
\Log::info("[INFO] " . now()->format('Y-m-d H:i:s') . " 社判画像参照リンク作成。結果: " . ($result ? '成功' : '失敗') . ", user_id=" . $user_id . ", contract_id=" . $contract_id);
|
||||
if (!$result) {
|
||||
\Log::error("[ERROR] " . now()->format('Y-m-d H:i:s') . " 社判画像参照リンク作成失敗。user_id=" . $user_id . ", contract_id=" . $contract_id);
|
||||
throw new \Exception();
|
||||
}
|
||||
$krgmStoragePath = config('app.krgm_storage_path');
|
||||
$linkPath = public_path('other-storage');
|
||||
if (!file_exists($krgmStoragePath)) {
|
||||
\Log::error('KRGM path not found: ' . $krgmStoragePath);
|
||||
abort(404, '画像パスが見つかりません。');
|
||||
}
|
||||
if (!file_exists($linkPath)) {
|
||||
$result = symlink($krgmStoragePath, $linkPath);
|
||||
\Log::info('Symlink result: ' . ($result ? 'success' : 'failed'));
|
||||
if (!$result) {
|
||||
\Log::error('Symlink failed');
|
||||
abort(500, 'リンク作成失敗');
|
||||
}
|
||||
}
|
||||
if (!file_exists($linkPath)) {
|
||||
symlink($krgmStoragePath, $linkPath);
|
||||
}
|
||||
|
||||
|
||||
// ダウンロード回数をカウントアップ
|
||||
DB::table('inv_publish')
|
||||
@ -243,7 +244,7 @@ class ReceiptController extends Controller
|
||||
->header('Content-Disposition', 'attachment; filename="receipt_' . $contract_id . '.pdf"');
|
||||
} catch (\Exception $e) {
|
||||
// PDF生成エラーを記録
|
||||
\Log::error("[ERROR] " . now()->format('Y-m-d H:i:s') . " 領収書PDFダウンロードエラー: user_id=" . $user_id . ", contract_id=" . $contract_id . ", error=" . $e->getMessage());
|
||||
\Log::error("[ERROR] " . now()->format('Y-m-d H:i:s') . " PDFダウンロードエラー: user_id=" . $user_id . ", contract_id=" . $contract_id . ", error=" . $e->getMessage());
|
||||
abort(500, '領収書ダウンロードに失敗しました。');
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,16 +123,6 @@ return [
|
||||
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| KRGM Storage Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the path to the KRGM storage directory for accessing images
|
||||
| from the other project via symbolic link.
|
||||
|
|
||||
*/
|
||||
|
||||
'krgm_storage_path' => env('KRGM_STORAGE_PATH'),
|
||||
|
||||
];
|
||||
|
||||
@ -122,12 +122,9 @@
|
||||
<td>
|
||||
<div class="company">
|
||||
<span style="font-size:20px; font-weight:bold;">{{ $inv_setting->t_name ?? '' }}</span><br>
|
||||
〒{{ $inv_setting->zipcode }}<br>
|
||||
{{ $inv_setting->adrs }}
|
||||
@if(!empty($inv_setting->bldg))
|
||||
{{ $inv_setting->bldg }}
|
||||
@endif
|
||||
<br>適格事業者番号:{{ $inv_setting->t_number ?? '' }}<br>
|
||||
{{ $inv_setting->zipcode ?? '' }}<br>
|
||||
{{ $inv_setting->adrs ?? '' }}<br>
|
||||
適格事業者番号:{{ $inv_setting->t_number ?? '' }}<br>
|
||||
@if(!empty($inv_setting->tel_num))
|
||||
TEL:{{ $inv_setting->tel_num}}<br>
|
||||
@endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user