@php use App\Components\SearchQueryComponent; use Carbon\Carbon; use App\Enums\ProductStatus; use App\Enums\OrderProductStatus; $listStatus = OrderProductStatus::asSelectArray(); $categoryName = 'ギフト交換対応'; @endphp @extends('layouts.admin') @section('content')
注文番号 | ギフト名 | 交換数 | ステータス | お客様番号 | 交換日 | 交換期日 | 商品カテゴリ | |
---|---|---|---|---|---|---|---|---|
@if ($orderProduct->number_exchanges > 0)
@for ($i = 1; $i <= $orderProduct->number_exchanges; $i++)
#{{ $orderProduct->order->order_number }}-{{ $branch_number }}-{{ $i }} @endfor @endif @php $order_number_old = $orderProduct->order->order_number; @endphp |
{{ $orderProduct->name }} | {{ $orderProduct->number_exchanges }}品 | {{ $listStatus[$orderProduct->status] ?? '' }} | {{ $orderProduct->gift_code }} |
{!! nl2br(str_replace(' ', ' ', $date_exchanges)) !!} |
@php if (!empty($orderProduct->exchange_due_date)) { $addMonth = Carbon::create($orderProduct->exchange_due_date)->format('Y-m-d'); } else { $deadlineMonth = env('ORDER_DEADLINE_MONTH', 6); $replacementDate = env('REPLACEMENT_DATE', '交換期日1年'); if ( ! empty($orderProduct->order->tags) && strpos($orderProduct->order->tags, $replacementDate) !== false) { $deadlineMonth = 12; } $lastMonth = Carbon::create($orderProduct->order->order_created_at)->firstOfMonth()->format('Y-m-d'); $addMonth = Carbon::create($lastMonth)->addMonths($deadlineMonth)->lastOfMonth()->format('Y-m-d'); } @endphp {!! $addMonth !!} | {{ $categoryName }} |