ソースを参照

Client - generic bills

Vijayakrishnan 4 年 前
コミット
de378d6b33

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

@@ -260,6 +260,11 @@ class PatientController extends Controller
         return view('app.patient.notes', compact('patient','pros', 'filter'));
     }
 
+    public function genericBills(Request $request, Client $patient)
+    {
+        return view('app.patient.generic-bills', compact('patient'));
+    }
+
     public function sections(Request $request, Client $patient )
     {
         $pros = $this->pros;

+ 2 - 2
resources/views/app/generic-bills/create_generic-bill.blade.php

@@ -1,5 +1,5 @@
 <span class="mx-2 text-secondary">|</span>
-<div moe wide relative bottom class="">
+<div moe wide relative class="">
     <a class="" href="" show start>Create Generic Bill</a>
     <form url="/api/bill/createForGeneric">
         <div class="mb-2">
@@ -45,7 +45,7 @@
         </div>
         <div class="mb-2">
             <label for="" class="text-secondary text-sm">Effective Date</label>
-            <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{$note->effective_dateest ? $note->effective_dateest : date('Y-m-d')}}" required>
+            <input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
         </div>
         <div class="">
             <button class="btn btn-primary btn-sm" submit>Submit</button>

+ 3 - 3
resources/views/app/generic-bills/index.blade.php

@@ -24,12 +24,12 @@ $genericBills = $genericBills->orderBy('created_at', 'DESC')->get();
 ?>
 
 @if(!count($genericBills))
-    <div class="p-3 border-bottom border-top d-flex align-items-center">
+    <div class="p-3 d-flex align-items-center">
         <p class="font-weight-bold mb-0 text-secondary">No generic bills</p>
         @include('app.generic-bills.create_generic-bill')
     </div>
 @else
-    <div class="p-3 border-bottom border-top">
+    <div class="p-3">
         <div class="d-flex align-items-center mb-2">
             <p class="font-weight-bold text-secondary font-size-13 m-0">Generic Bills</p>
             @include('app.generic-bills.create_generic-bill')
@@ -213,7 +213,7 @@ $genericBills = $genericBills->orderBy('created_at', 'DESC')->get();
                                 </div>
                             @endif
 
-                            @if($bill->is_cancellation_acknowledged && !$note->is_billing_marked_done)
+                            @if($bill->is_cancellation_acknowledged && !@$note->is_billing_marked_done)
                                 <div class="mt-2 text-secondary">
                                     <i class="fa fa-check"></i>
                                     Acknowledged

+ 7 - 0
resources/views/app/patient/generic-bills.blade.php

@@ -0,0 +1,7 @@
+@extends ('layouts.patient')
+
+@section('inner-content')
+
+    @include('app.generic-bills.index', ['patient' => $patient])
+
+@endsection

+ 4 - 0
resources/views/layouts/patient.blade.php

@@ -50,6 +50,10 @@
                             <a class="nav-link {{ strpos($routeName, 'patients.view.notes') === 0 ? 'active' : '' }}"
                                href="{{ route('patients.view.notes', ['patient' => $patient]) }}">Notes</a>
                         </li>
+                        <li class="nav-item">
+                            <a class="nav-link {{ strpos($routeName, 'patients.view.generic-bills') === 0 ? 'active' : '' }}"
+                               href="{{ route('patients.view.generic-bills', ['patient' => $patient]) }}">Generic Bills</a>
+                        </li>
                         <li class="nav-item">
                             <a class="nav-link {{ strpos($routeName, 'patients.view.sections') === 0 ? 'active' : '' }}"
                                href="{{ route('patients.view.sections', ['patient' => $patient]) }}">Sections</a>

+ 1 - 0
routes/web.php

@@ -189,6 +189,7 @@ Route::middleware('pro.auth')->group(function () {
                 Route::get('', 'NoteController@dashboard')->name('dashboard');
                 Route::get('section-view/{section}/{view}/{page?}', 'NoteController@sectionView')->name('section-view');
             });
+            Route::get('generic-bills', 'PatientController@genericBills')->name('generic-bills');
             Route::get('sections', 'PatientController@sections')->name('sections');
             Route::get('handouts', 'PatientController@handouts')->name('handouts');
             Route::get('settings', 'PatientController@settings')->name('settings');