|
@@ -0,0 +1,117 @@
|
|
|
+@extends ('layouts/template')
|
|
|
+
|
|
|
+@section('content')
|
|
|
+ <?php
|
|
|
+ function selectIf($_cond) {
|
|
|
+ return $_cond ? 'selected' : '';
|
|
|
+ }
|
|
|
+ if(request()->input('_ql')) \Illuminate\Support\Facades\DB::enableQueryLog();
|
|
|
+ ?>
|
|
|
+ <style>
|
|
|
+ .posneg {
|
|
|
+ width: 10px;
|
|
|
+ display: inline-block;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px !important;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <div class="p-3 mcp-theme-1" id="accounting-items-container">
|
|
|
+ <div class="card">
|
|
|
+
|
|
|
+ <div class="card-header px-2 py-2 d-flex align-items-center">
|
|
|
+ <strong class="mr-4 font-size-14">
|
|
|
+ <i class="fas fa-user"></i>
|
|
|
+ Accounting Item Templates
|
|
|
+ </strong>
|
|
|
+ @include('app.patient.partials.create-edit-accounting-item-template')
|
|
|
+ </div>
|
|
|
+ <div class="card-body p-0">
|
|
|
+ <table class="table table-sm table-striped border-0 mb-0">
|
|
|
+ <thead class="bg-light">
|
|
|
+ <tr>
|
|
|
+ <th class="border-bottom-0 width-200px">Created</th>
|
|
|
+ <th class="border-bottom-0">Context</th>
|
|
|
+ <th class="border-bottom-0 width-60px text-right">Expected</th>
|
|
|
+ <th class="border-bottom-0 width-60px text-right">Actual</th>
|
|
|
+ <th class="border-bottom-0 text-center">Open</th>
|
|
|
+ <th class="border-bottom-0">Memo</th>
|
|
|
+ <th class="border-bottom-0">Active</th>
|
|
|
+ <th class="border-bottom-0"> </th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach($records as $record)
|
|
|
+ <tr>
|
|
|
+ <td class="">
|
|
|
+ {{friendly_date_time($record->created_at)}}
|
|
|
+ </td>
|
|
|
+ <td class="">
|
|
|
+ {{$record->entity_type}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0 width-60px text-right">
|
|
|
+ @if($record->expected_value)
|
|
|
+ <span class="posneg">{{$record->positive_or_negative == 0 ? '+' : '-'}}</span>
|
|
|
+ {{'$' . $record->expected_value}}
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0 width-60px text-right">
|
|
|
+ @if($record->received_value)
|
|
|
+ <span class="posneg">{{$record->positive_or_negative == 0 ? '+' : '-'}}</span>
|
|
|
+ {{'$' . $record->received_value}}
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0 text-center">
|
|
|
+ {{$record->is_open ? 'Yes' : 'No'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->memo ? $record->memo : ''}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ {{$record->is_active ? 'Yes' : 'No'}}
|
|
|
+ </td>
|
|
|
+ <td class="border-bottom-0">
|
|
|
+ <div class="d-flex">
|
|
|
+ @include('app.patient.partials.create-edit-accounting-item-template', ['record' => $record])
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ @if($record->is_active)
|
|
|
+ <div moe relative="">
|
|
|
+ <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="">
|
|
|
+ <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
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <?php
|
|
|
+ if(request()->input('_ql')) printQueryLog(DB::getQueryLog());
|
|
|
+ ?>
|
|
|
+@endsection
|
|
|
+
|