getFlashdata('success') || session()->getFlashdata('error')) : ?> getFlashdata('success')) : ?> getFlashdata('error')) : ?>
diff($toDateTime); // } else { // $interval = $currentDate->diff($toDateTime); // } $fromDateTime = new DateTime($row['from_subscription']); $toDateTime = new DateTime($row['to_subscription']); $currentDate = new DateTime(); $currentDate->setTime(0, 0, 0); $toDateTime->setTime(0, 0, 0); // Calculate days remaining $interval = $currentDate->diff($toDateTime); $daysRemaining = $interval->days; if ($currentDate > $toDateTime) { $daysRemaining = -$daysRemaining; } if ($daysRemaining < 0) { $class = 'text-danger'; $message = "Expired" . ($row['renewed'] != null ? " " . '(Renewed)' : ''); } elseif ($daysRemaining == 0) { $class = 'text-danger'; $message = "Expires Today" . ($row['renewed'] != null ? " " . '(Renewed)' : ''); } elseif ($daysRemaining == 1) { $class = 'text-warning'; $message = "Expires Tomorrow" . ($row['renewed'] != null ? " " . '(Renewed)' : ''); } elseif ($daysRemaining <= 7) { $class = 'text-warning'; $message = "Expires in $daysRemaining days". ($row['renewed'] != null ? " " . '(Renewed)' : ''); } else { $class = 'text-success'; $message = "Expires in $daysRemaining days". ($row['renewed'] != null ? " " . '(Renewed)' : ''); } ?>
Invoice Date Member Name Member's Mobile From Subscription To Subscription Expiring Status Short-Code Invoice Number Total (₹) Status Action
" class="edit-button" title="Edit the Invoice">  " class="download-pdf-button" title="Download the Invoice">  " class="print-address-button" title="Print Address"> " class="print-address-button" title="Print Address">