123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- @extends ('layouts/template')
- @section('content')
- <div class="p-3 mcp-theme-1">
- <div class="card">
- <div class="card-header px-3 py-2 d-flex align-items-center">
- <strong class="mr-4">
- <i class="fas fa-user-injured"></i>
- Bills
- </strong>
- <select class="ml-auto max-width-300px form-control form-control-sm" onchange="fastLoad('/bills/' + this.value, true, false, false)">
- <option value="" {{ $filter === '' ? 'selected' : '' }}>All bills</option>
- <option value="not-yet-signed" {{ $filter === 'not-yet-signed' ? 'selected' : '' }}>Bills not yet signed</option>
- </select>
- </div>
- <div class="card-body p-0">
- <table class="table table-sm table-condensed p-0 m-0">
- <thead class="bg-light">
- <tr>
- <th class="px-3 border-0">Created</th>
- <th class="border-0">Patient</th>
- <th class="border-0">Reason</th>
- <th class="border-0">Role</th>
- <th class="border-0 w-50">Amount</th>
- </tr>
- </thead>
- <tbody>
- @foreach ($bills as $bill)
- <tr class="{{ $bill->is_cancelled ? 'cancelled-item always-clickable' : '' }}">
- <td class="px-3">
- {{ friendly_date_time($bill->created_at, true) }}
- </td>
- <td class="">
- <a href="/patients/view/{{ $bill->client->uid }}">{{ $bill->client->displayName() }}</a>
- </td>
- <td class="stag-no-wrap-td">
- @if($bill->careMonth)
- <b>{{ $bill->code }}</b>
- -
- <a href="/patients/view/{{ $bill->client->uid }}/care-months/view/{{ $bill->careMonth->uid }}">
- <b>{{ friendly_month($bill->careMonth->start_date) }}</b>
- </a>
- @elseif($bill->note)
- <b>{{ $bill->code }}</b>
- -
- <a href="/patients/view/{{ $bill->client->uid }}/notes/view/{{ $bill->note->uid }}">
- <b>Note</b>
- </a>
- @endif
- @if(!empty($bill->reason1))
- <div class="text-secondary text-sm stag-no-wrap" title="{{ $bill->reason1 }}">{{ $bill->reason1 }}</div>
- @endif
- </td>
- <td>
- <?php
- $roles = [];
- if($bill->hcp_pro_id === $pro->id) $roles[] = 'HCP';
- if($bill->cm_pro_id === $pro->id) $roles[] = 'CM';
- if($bill->rme_pro_id === $pro->id) $roles[] = 'RME';
- if($bill->rmm_pro_id === $pro->id) $roles[] = 'RMM';
- $roles = implode("<br>", $roles);
- ?>
- {!! $roles !!}
- </td>
- <td>
- @if($bill->hcp_pro_id === $pro->id)
- @if($bill->has_hcp_been_paid)
- <span class="text-dark">HCP Received:</span><span class="font-weight-bold text-success ml-2">${{ $bill->hcp_payment_amount }}</span>
- @else
- <span class="text-dark">HCP Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->hcp_expected_payment_amount ? '$' . $bill->hcp_expected_payment_amount : '-' }}</span>
- @endif
- @endif
- @if($bill->cm_pro_id === $pro->id)
- @if($bill->has_cm_been_paid)
- <span class="text-dark">HCP Received:</span><span class="font-weight-bold text-success ml-2">${{ $bill->cm_payment_amount }}</span>
- @else
- <span class="text-dark">HCP Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->cm_expected_payment_amount ? '$' . $bill->cm_expected_payment_amount : '-' }}</span>
- @endif
- @endif
- @if($bill->rmm_pro_id === $pro->id)
- @if($bill->has_rmm_been_paid)
- <span class="text-dark">HCP Received:</span><span class="font-weight-bold text-success ml-2">${{ $bill->rmm_payment_amount }}</span>
- @else
- <span class="text-dark">HCP Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->rmm_expected_payment_amount ? '$' . $bill->rmm_expected_payment_amount : '-' }}</span>
- @endif
- @endif
- @if($bill->rme_pro_id === $pro->id)
- @if($bill->has_rme_been_paid)
- <span class="text-dark">HCP Received:</span><span class="font-weight-bold text-success ml-2">${{ $bill->rme_payment_amount }}</span>
- @else
- <span class="text-dark">HCP Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->rme_expected_payment_amount ? '$' . $bill->rme_expected_payment_amount : '-' }}</span>
- @endif
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- </div>
- </div>
- @endsection
|