Bladeren bron

fixed filter

= 3 jaren geleden
bovenliggende
commit
9717884dde

+ 14 - 4
app/Http/Controllers/PracticeManagementController.php

@@ -160,11 +160,21 @@ SELECT effective_date, count(*), sum(number_of_units) as units FROM bill WHERE c
         }
         }
 
 
         if($verified){
         if($verified){
-            $rows = $rows->whereHas('note', function($noteQuery){
-                return $noteQuery->whereHas('bills', function($billQuery) {
-                    return $billQuery->where('is_verified', true)->where('is_cancelled', false);
+            if($verified == 'VERIFIED'){
+                $rows = $rows->whereHas('note', function($noteQuery){
+                    return $noteQuery->whereHas('bills', function($billQuery) {
+                        return $billQuery->where('is_verified', true)->where('is_cancelled', false);
+                    });
                 });
                 });
-            });
+            }
+
+            if($verified == 'UNVERIFIED'){
+                $rows = $rows->whereHas('note', function($noteQuery){
+                    return $noteQuery->whereHas('bills', function($billQuery) {
+                        return $billQuery->where('is_verified', false)->where('is_cancelled', false);
+                    });
+                });
+            }
         }
         }
        
        
 
 

+ 2 - 2
resources/views/app/practice-management/billing-report.blade.php

@@ -29,7 +29,7 @@
                     </div>
                     </div>
 
 
                     <div class="form-group mr-2">
                     <div class="form-group mr-2">
-                        <label class="control-label" for="">Claim Status</label>
+                        <label class="control-label  mr-1" for="">Claim Status</label>
                         <select name="claim_status" class="form-control" v-model="filters.claim_status">
                         <select name="claim_status" class="form-control" v-model="filters.claim_status">
                             <option value="">All</option>
                             <option value="">All</option>
                             @foreach($claimStatuses as $claimStatus)
                             @foreach($claimStatuses as $claimStatus)
@@ -39,7 +39,7 @@
                     </div>
                     </div>
                     
                     
                     <div class="form-group mr-2">
                     <div class="form-group mr-2">
-                        <label class="control-label" for="">Bill Verification Status</label>
+                        <label class="control-label mr-1" for="">Bill Verification Status</label>
                         <select name="verified" class="form-control" v-model="filters.verified">
                         <select name="verified" class="form-control" v-model="filters.verified">
                             <option value="">All</option>
                             <option value="">All</option>
                             <option value="VERIFIED">Verified</option>
                             <option value="VERIFIED">Verified</option>