Эх сурвалжийг харах

Merge branch 'master' of rav.triplestart.com:jmudaka/stagfe2

root 4 жил өмнө
parent
commit
939e0aab99

+ 7 - 1
app/Http/Controllers/HomeController.php

@@ -235,8 +235,14 @@ class HomeController extends Controller
             ->orWhere(function ($query) use ($performerProID) {
                 $query->where('ally_pro_id', $performerProID)->where('is_signed_by_ally', false)->where('is_cancelled', false);;
             })->count();
+            $keyNumbers['pendingNotesToSign'] = $pendingNotesToSign;
 
-        $keyNumbers['pendingNotesToSign'] = $pendingNotesToSign;
+
+        $signedNotesWithoutBills = Note::where(function ($query) use ($performerProID) {
+            $query->where('hcp_pro_id', $performerProID)->where('is_signed_by_hcp', true)->where('is_cancelled', false);;
+        })->whereDoesntHave('bills')->count();
+
+        $keyNumbers['signedNotesWithoutBills'] = $signedNotesWithoutBills;
 
         // open tickets
         $keyNumbers['numOpenTickets'] = Ticket::where('is_open', true)

+ 5 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -116,6 +116,11 @@ class PracticeManagementController extends Controller
                 $query = $query->where('is_signed_by_hcp', false);
                 break;
 
+            case 'without-bills':
+                $query = $query->where('is_signed_by_hcp', true)->where('is_cancelled', false)->whereDoesntHave('bills');
+                
+                break;
+
             // more cases can be added as needed
             default:
                 break;

+ 9 - 4
resources/views/app/dashboard.blade.php

@@ -33,6 +33,7 @@
                                     <th class="px-2 text-center">{{$keyNumbers['pendingNotesToSign']}}</th>
                                     <th class="pl-2"><a href="/practice-management/notes/not-yet-signed">Pending notes to sign</a></th>
                                 </tr>
+                               
                                 <tr>
                                     <th class="px-2 text-center">{{$keyNumbers['numOpenTickets']}}</th>
                                     <th class="pl-2"><a href="/practice-management/my-tickets/open">Open tickets</a></th>
@@ -119,14 +120,18 @@
                         <table class="table mb-0">
                             <tbody>
                             <tr>
-                                <th class="border-top-0 px-2 text-center">{{$businessNumbers['notesWithBillsToResolve']}}</th>
-                                <th class="border-top-0 pl-2">
+                                    <th class="border-top-1 px-2 text-center">{{$keyNumbers['signedNotesWithoutBills']}}</th>
+                                    <th class="border-top-1 pl-2"><a href="/practice-management/notes/without-bills">Signed notes without bills</a></th>
+                                </tr>
+                            <tr>
+                                <th class="border-top-1 px-2 text-center">{{$businessNumbers['notesWithBillsToResolve']}}</th>
+                                <th class="border-top-1 pl-2">
                                     <a href="/practice-management/billing-manager">Notes with bills to resolve</a>
                                 </th>
                             </tr>
                             <tr>
-                                <th class="border-top-0 px-2 text-center">{{$businessNumbers['notesPendingBillingClosure']}}</th>
-                                <th class="border-top-0 pl-2">
+                                <th class="border-top-1 px-2 text-center">{{$businessNumbers['notesPendingBillingClosure']}}</th>
+                                <th class="border-top-1 pl-2">
                                     <a href="/practice-management/billing-manager">Notes pending billing closure</a>
                                 </th>
                             </tr>