diff --git a/app/Models/SubscriptionModel.php b/app/Models/SubscriptionModel.php index b852c951..c6543c22 100755 --- a/app/Models/SubscriptionModel.php +++ b/app/Models/SubscriptionModel.php @@ -259,7 +259,18 @@ public function getQueryforSubscriptionDetailsBySchemeName($flag,$condition, $va $currentDate = date('Y-m-d'); if ($downloadType === 'active') { - $result = $this->getQueryforSubscriptionDetailsBySchemeName(1,'s.to_subscription >=', $currentDate,$selectedScheme); + $result1 = $this->getQueryforSubscriptionDetailsBySchemeName(1,'s.to_subscription >', $currentDate,$selectedScheme); + $result2 = $this->getQueryforSubscriptionDetailsBySchemeName(1,'s.isactive', 1,$selectedScheme); + // Flatten the arrays for comparison + $flattened1 = array_map('serialize', $result1); + $flattened2 = array_map('serialize', $result2); + + // Find common elements + $commonElements = array_intersect($flattened1, $flattened2); + + // Unserialize to get back the original array format + $result = array_map('unserialize', $commonElements); + } if ($downloadType === 'expired') { $expiredResult = $this->getQueryforSubscriptionDetailsBySchemeName(1,'s.to_subscription <', $currentDate, $selectedScheme); diff --git a/app/Views/invoice_list.php b/app/Views/invoice_list.php index 1a1c9749..936f48a9 100755 --- a/app/Views/invoice_list.php +++ b/app/Views/invoice_list.php @@ -99,7 +99,7 @@ - + " class="download-pdf-button" title="Download the Invoice">  " class="print-address-button" title="Print Address"> diff --git a/app/Views/offline_invoice_list.php b/app/Views/offline_invoice_list.php index 953c3f17..a183317e 100755 --- a/app/Views/offline_invoice_list.php +++ b/app/Views/offline_invoice_list.php @@ -128,7 +128,7 @@ - + " class="download-pdf-button" title="Download the Invoice">  " class="print-address-button" title="Print Address">