|
@@ -0,0 +1,111 @@
|
|
|
+@if($pro->pro_type === 'ADMIN')
|
|
|
+
|
|
|
+ <?php
|
|
|
+ $uidParamName = [
|
|
|
+ 'Note' => 'noteUid',
|
|
|
+ 'CareMonth' => 'careMonthUid',
|
|
|
+ 'Bill' => 'billUid',
|
|
|
+ 'SupplyOrder' => 'supplyOrderUid',
|
|
|
+ ];
|
|
|
+ $records = \App\Models\AccountingItem
|
|
|
+ ::where('entity_type', $entityType)
|
|
|
+ ->where('entity_uid', $entityUid)
|
|
|
+ ->orderBy('last_updated_at', 'DESC')
|
|
|
+ ->get();
|
|
|
+ ?>
|
|
|
+
|
|
|
+ <div class="">
|
|
|
+ <div class="d-flex align-items-center mb-2">
|
|
|
+ <p class="font-weight-bold m-0">Accounting Items</p>
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ @include('app.patient.partials.create-edit-accounting-item', ['entityType' => $entityType, 'entityUid' => $entityUid])
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
|
|
|
+ <thead class="bg-light">
|
|
|
+ <tr>
|
|
|
+ @if(@$showPro)
|
|
|
+ <th class="border-bottom-0">Pro</th>
|
|
|
+ @endif
|
|
|
+ @if(@$showClient)
|
|
|
+ <th class="border-bottom-0">Client</th>
|
|
|
+ @endif
|
|
|
+ <th class="border-bottom-0 pl-2">Type</th>
|
|
|
+ <th class="border-bottom-0">Expected</th>
|
|
|
+ <th class="border-bottom-0">Actual</th>
|
|
|
+ <th class="border-bottom-0">Open</th>
|
|
|
+ <th class="border-bottom-0">Memo</th>
|
|
|
+ <th class="border-bottom-0">Updated</th>
|
|
|
+ <th class="border-bottom-0">Active</th>
|
|
|
+ <th class="border-bottom-0"> </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($records as $record)
|
|
|
+ <tr>
|
|
|
+ @if(@$showPro)
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->pro ? $record->pro->displayName() : '-'}}
|
|
|
+ </td>
|
|
|
+ @endif
|
|
|
+ @if(@$showClient)
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->client ? $record->client->displayName() : '-'}}
|
|
|
+ </td>
|
|
|
+ @endif
|
|
|
+ <td class="border-bottom-0 pl-2">
|
|
|
+ {{$record->positive_or_negative == 0 ? 'Revenue' : 'Cost'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->expected_value ? '$' . $record->expected_value : '-'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->received_value ? '$' . $record->received_value : '-'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->is_open ? 'Yes' : 'No'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->memo ? $record->memo : ''}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{friendly_date_time($record->last_updated_at)}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->is_active ? 'Yes' : 'No'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ @include('app.patient.partials.create-edit-accounting-item', ['entityType' => $entityType, 'entityUid' => $entityUid, 'record' => $record])
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ @if($record->is_active)
|
|
|
+ <div moe relative="" class="ml-2">
|
|
|
+ <a start show class="py-0 mb-3">Deactivate</a>
|
|
|
+ <form url="/api/accountingItem/deactivate" class="mcp-theme-1" right="">
|
|
|
+ <input type="hidden" name="uid" value="{{$record->uid}}">
|
|
|
+ <p>Deactivate this record?</p>
|
|
|
+ <div>
|
|
|
+ <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
+ <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ @else
|
|
|
+ <div moe relative="" class="ml-2">
|
|
|
+ <a start show class="py-0 mb-3">Reactivate</a>
|
|
|
+ <form url="/api/accountingItem/reactivate" class="mcp-theme-1" right="">
|
|
|
+ <input type="hidden" name="uid" value="{{$record->uid}}">
|
|
|
+ <p>Reactivate this record?</p>
|
|
|
+ <div>
|
|
|
+ <button submit class="btn btn-sm btn-primary mr-1">Submit</button>
|
|
|
+ <button cancel class="btn btn-sm btn-default border">Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+@endif
|