|
@@ -467,6 +467,8 @@
|
|
|
@endif
|
|
|
@endif
|
|
|
</div>
|
|
|
+
|
|
|
+ @if($pro->pro_type === 'ADMIN')
|
|
|
<table class="table table-sm tabe-striped mb-0 table-bordered">
|
|
|
<thead class="bg-light">
|
|
|
<tr class="text-secondary">
|
|
@@ -724,6 +726,123 @@
|
|
|
@endforeach
|
|
|
</tbody>
|
|
|
</table>
|
|
|
+ @else
|
|
|
+ <table class="table table-sm tabe-striped mb-3 border-left border-right border-bottom">
|
|
|
+ <thead class="bg-light">
|
|
|
+ <tr>
|
|
|
+ <th class="border-bottom-0 pl-3">HCP</th>
|
|
|
+ <th class="border-bottom-0 w-25 pl-3">Service</th>
|
|
|
+ {{--<th class="border-bottom-0 w-25 pl-2">Reason</th>--}}
|
|
|
+ <th class="border-bottom-0 pl-3">Billable</th>
|
|
|
+ <th class="border-bottom-0 pl-2">Amount</th>
|
|
|
+ <th class="border-bottom-0"></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ @foreach ($note->bills as $bill)
|
|
|
+ <tr>
|
|
|
+ <td class="pl-3">{{ $bill->hcp->displayName() }}</td>
|
|
|
+ <td class="pl-3 {{ $bill->is_cancelled ? 'text-secondary' : '' }}">{{$bill->code}}</td>
|
|
|
+ {{--<td class="pl-2">
|
|
|
+ {{ $bill->reason1 }}
|
|
|
+ <div class="text-secondary small">{{ $bill->reason2 }}</div>
|
|
|
+ </td>--}}
|
|
|
+ <td class="pl-3">
|
|
|
+ @if(strpos(strtolower($bill->code), 'treatment services') !== FALSE)
|
|
|
+ <?php
|
|
|
+ $totalSeconds = $bill->number_of_units * 3600;
|
|
|
+ $remainder = $totalSeconds % 60;
|
|
|
+ if ($remainder !== 0) {
|
|
|
+ if ($remainder < 30) {
|
|
|
+ $totalSeconds = $totalSeconds - $remainder;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ $totalSeconds = $totalSeconds + (60 - $remainder);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ {{ time_in_hrminsec($totalSeconds) }}
|
|
|
+ @else
|
|
|
+ @if(!!$bill->number_of_units)
|
|
|
+ {{ $bill->number_of_units }} unit(s)
|
|
|
+ @else
|
|
|
+ -
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td class="pl-2">
|
|
|
+ @if($bill->has_hcp_been_paid)
|
|
|
+ <span class="text-dark">Processed:</span><span class="font-weight-bold text-success ml-2">${{ $bill->hcp_payment_amount }}</span>
|
|
|
+ @else
|
|
|
+ <span class="text-dark">Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->hcp_expected_payment_amount ? '$' . $bill->hcp_expected_payment_amount : '-' }}</span>
|
|
|
+ @endif
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <div class="d-flex align-items-center">
|
|
|
+ @if(!$bill->is_cancelled)
|
|
|
+ @if($bill->is_signed_by_hcp)
|
|
|
+ <span class="d-block text-secondary">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ HCP Signed
|
|
|
+ </span>
|
|
|
+ @else
|
|
|
+ <span moe
|
|
|
+ class="d-block {{ $bill->hcp_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
+ title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s HCP can sign' : '' }}">
|
|
|
+ <a class="" href="" show start>Sign</a>
|
|
|
+ <form url="/api/bill/signAsHcp">
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
+ <p>Sign this bill as HCP?</p>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-success btn-sm" submit>Sign</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
+ @if(!$bill->has_hcp_been_paid && $pro->pro_type === 'ADMIN')
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ <span class="d-block" moe>
|
|
|
+ <a class="text-danger" href="" show start>Submit Payment</a>
|
|
|
+ <form url="/api/bill/payHcpAmount">
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
+ <p>Submit payment:</p>
|
|
|
+ <div class="mb-0">
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="hcpPaymentAmount" value="{{$bill->hcp_expected_payment_amount}}" placeholder="amount"><br>
|
|
|
+ <button class="btn btn-success btn-sm" submit>Submit</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>Cancel</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ @endif
|
|
|
+ @if($bill->is_cancelled)
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ <span class="d-block text-secondary">
|
|
|
+ Cancelled
|
|
|
+ </span>
|
|
|
+ @else
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ <span class="d-block" moe>
|
|
|
+ <a class="text-danger" href="" show start>Cancel</a>
|
|
|
+ <form url="/api/bill/markCancelled" right>
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
+ <p>Cancel this bill?</p>
|
|
|
+ <div class="mb-0">
|
|
|
+ <button class="btn btn-danger btn-sm" submit>Yes</button>
|
|
|
+ <button class="btn btn-default border btn-sm" cancel>No</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </span>
|
|
|
+ @endif
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ @endforeach
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ @endif
|
|
|
+
|
|
|
</div>
|
|
|
@else
|
|
|
<div class="p-3 d-flex border-bottom">
|