Compare commits

..

6 Commits

Author SHA1 Message Date
d37de8c61c resources/views/receipt/pdf.blade.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 23s
2026-01-21 17:53:37 +09:00
3d79e24ff5 app/Http/Controllers/ReceiptController.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 24s
2026-01-21 17:48:38 +09:00
29ce166b4d app/Http/Controllers/ReceiptController.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 24s
2026-01-21 17:25:33 +09:00
e5e8ef5a75 Merge pull request 'シンボリックリンク追加' (#55) from main_higashide into main
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 24s
Reviewed-on: #55
2026-01-21 17:23:04 +09:00
9534d68b24 database/migrations/2026_01_16_144753_create_management_table.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 26s
2026-01-20 18:18:18 +09:00
00fe485cbe Merge pull request '定期契約履歴確認、領収書宛名入力画面対応' (#54) from main_higashide into main
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 25s
Reviewed-on: #54
2026-01-20 18:01:14 +09:00
3 changed files with 15 additions and 12 deletions

View File

@ -181,7 +181,18 @@ class ReceiptController extends Controller
$krgmStoragePath = config('app.krgm_storage_path'); $krgmStoragePath = config('app.krgm_storage_path');
$linkPath = public_path('other-storage'); $linkPath = public_path('other-storage');
dd($linkPath); 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)) { if (!file_exists($linkPath)) {
symlink($krgmStoragePath, $linkPath); symlink($krgmStoragePath, $linkPath);
} }

View File

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('management', function (Blueprint $table) { Schema::create('management', function (Blueprint $table) {
$table->id('management_id'); // 主キー、AUTO_INCREMENT, NOT NULL $table->increments('management_id'); // 主キー、AUTO_INCREMENT, NOT NULL
$table->string('management_name', 255); // varchar(255), NOT NULL $table->string('management_name', 255); // varchar(255), NOT NULL
$table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE $table->string('management_code', 10)->unique(); // varchar(10), NOT NULL, UNIQUE
$table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL $table->boolean('municipality_flag')->nullable(); // tinyint(1), NULL

View File

@ -134,22 +134,14 @@
</div> </div>
</td> </td>
@php @php
// $stamp_file = null;
// $extensions = ['png', 'jpeg', 'jpg'];
// foreach ($extensions as $ext) {
// $file_path = public_path('images/' . $inv_setting->t_name . '_stamp.' . $ext);
// if (file_exists($file_path)) {
// $stamp_file = $inv_setting->t_name . '_stamp.' . $ext;
// break;
// }
// }
$stamp_file = null; $stamp_file = null;
if (!empty($inv_setting->company_image_path)) { if (!empty($inv_setting->company_image_path)) {
// company_image_path: storage/app/public/xxx.png → other-storage/xxx.png // company_image_path: storage/app/public/xxx.png → other-storage/xxx.png
$stamp_file = str_replace('storage/app/public/', 'other-storage/', $inv_setting->company_image_path); $stamp_file = str_replace('storage/app/public/', 'other-storage/', $inv_setting->company_image_path);
}
@endphp @endphp
@if($stamp_file) @if($stamp_file)
<td><img src="{{ str_replace('\\', '/', public_path('images/' . $stamp_file)) }}" class="stamp"></td> <td><img src="{{ asset($stamp_file) }}" class="stamp"></td>
@endif @endif
</tr> </tr>
</table> </table>