 <tbody  class="table-border-bottom-0">
                                        <!-- Table rows -->
                                        @foreach($order_details as $details)
                                        @if($details->prescription_order->o_status === 2)
                                        <tr>
                                            <td>{{ $details->prescription_order->id }}</td>
                                            <td>{{ $details->prescription_order->user->fname . ' ' . $details->prescription_order->user->lname ?? 'N/A' }}</td>
                                            <td>{{ $details->prescription_order->user->mobile ?? 'N/A' }}</td>

                                            <td>

                                                <?php
                                               
                                                $createdAt = strtotime($details->prescription_order->updated_at);
                                                $currentDate = time();
                                                $timeDifference = $currentDate-$createdAt;
                                               // $remainingDays = ceil($timeDifference / (60 * 60 * 24)); // Convert seconds to days and round up
                                                $totaldays = 2; // Convert seconds to days and round up
                                                $extension = ($totaldays === 1) ? "day" : "days";
                                                if($totaldays<=$details->m_days){
                                                $remaining=$details->m_days-$totaldays;
                                                }else{
                                                    $remaining=0; 
                                                }
                                                ?>
                                            
                                                <!-- Display the calculated result -->
                                                <?php echo $remaining . " " . $extension." remaining "; ?>

                                            </td>
                                            <td>

                                                {{-- <a href="" onclick="return confirmDelete()" class="btn btn-primary">{{__('Remind User')}}</a> --}}

                                                <button data-bs-toggle="modal"
                                                data-bs-target="#addModal"
                                                type="button"class="btn btn-primary">{{__('Remind User')}}</button>
                                                @if ($details->prescription_order->user->line_id!="-")
                                                <a href="https://connect.littlehelp.co.jp/24321469/line/inbox/1/{{$details->prescription_order->user->line_id }}" class="btn"  target="_blank" data-toggle="tooltip" data-placement="bottom" style="background-color: #3498db;" title="Send Messages">
                                                    <img src="{{ asset('assets/img/icons/chat.png') }}" alt="New Icon" style="filter: invert(100%); width: 20px; height: 20px;">
                                                </a>
                                                @else
                                                <span class="btn disabled" data-toggle="tooltip" data-placement="bottom" style="background-color: #3498db; opacity: 0.6; cursor: not-allowed;" title="Send Messages">
                                                    <img src="{{ asset('assets/img/icons/chat.png') }}" alt="New Icon" style="filter: invert(100%); width: 20px; height: 20px;">
                                                </span>
                                            @endif
                                            </td>

                                        </tr>
                                        @endif
                                        @endforeach
                                    </tbody>
