resources/views/receipt/pdf.blade.php を更新
All checks were successful
Deploy so-manager (auto) / deploy (push) Successful in 23s

This commit is contained in:
y.higashide 2026-01-21 17:53:37 +09:00
parent 3d79e24ff5
commit d37de8c61c

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>