|
@@ -1013,12 +1013,14 @@
|
|
|
@endif
|
|
|
|
|
|
{{-- bills --}}
|
|
|
- @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id))
|
|
|
+ @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id) || ($note->allyPro && $pro->id === $note->allyPro->id))
|
|
|
@if($note->bills->count())
|
|
|
<div class="p-3 border-bottom">
|
|
|
<div class="d-flex align-items-center mb-2">
|
|
|
<p class="font-weight-bold text-secondary font-size-13 m-0">Bills</p>
|
|
|
- @include('app/patient/note/_create-bill')
|
|
|
+ @if($pro->pro_type === 'ADMIN' || ($note->hcpPro && $pro->id === $note->hcpPro->id))
|
|
|
+ @include('app/patient/note/_create-bill')
|
|
|
+ @endif
|
|
|
</div>
|
|
|
|
|
|
@if($pro->pro_type === 'ADMIN')
|
|
@@ -1307,35 +1309,65 @@
|
|
|
</td>
|
|
|
<td> <!-- submit payment -->
|
|
|
<div class="my-1">
|
|
|
- @if(!$bill->is_cancelled && !$bill->has_hcp_been_paid)
|
|
|
- <span class="d-block" moe relative="">
|
|
|
- <a class="font-weight-bold" href="" show start>Submit Payment For HCP</a>
|
|
|
- <form url="/api/bill/payHcpAmount" right>
|
|
|
- <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>
|
|
|
+ @if(!$bill->is_cancelled && !$bill->has_hcp_been_paid )
|
|
|
+ @if(+$bill->hcp_expected_payment_amount && $bill->is_signed_by_hcp)
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
+ <a class="font-weight-bold" href="" show start>Submit Payment For HCP</a>
|
|
|
+ <form url="/api/bill/payHcpAmount" right>
|
|
|
+ <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>
|
|
|
+ @else
|
|
|
+ @if(!+$bill->hcp_expected_payment_amount)
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
+ HCP expected amount is invalid
|
|
|
</div>
|
|
|
- </form>
|
|
|
- </span>
|
|
|
+ @endif
|
|
|
+ @if(!$bill->is_signed_by_hcp)
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
+ HCP has not signed the bill
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
@endif
|
|
|
</div>
|
|
|
<div class="my-1">
|
|
|
@if(!$bill->is_cancelled && !$bill->has_na_been_paid && $bill->ally)
|
|
|
- <span class="d-block" moe relative="">
|
|
|
- <a class="font-weight-bold" href="" show start>Submit Payment For NA</a>
|
|
|
- <form url="/api/bill/payNaAmount" right>
|
|
|
- <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
- <p>Submit Payment For NA</p>
|
|
|
- <div class="mb-0">
|
|
|
- <input type="text" class="text form-control form-control-sm" name="naPaymentAmount" value="{{$bill->na_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>
|
|
|
+ @if(+$bill->na_expected_payment_amount && $bill->is_signed_by_na)
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
+ <a class="font-weight-bold" href="" show start>Submit Payment For NA</a>
|
|
|
+ <form url="/api/bill/payNaAmount" right>
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
+ <p>Submit Payment For NA</p>
|
|
|
+ <div class="mb-0">
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="naPaymentAmount" value="{{$bill->na_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>
|
|
|
+ @else
|
|
|
+ @if(!+$bill->na_expected_payment_amount)
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
+ NA expected amount is invalid
|
|
|
</div>
|
|
|
- </form>
|
|
|
- </span>
|
|
|
+ @endif
|
|
|
+ @if(!$bill->is_signed_by_na)
|
|
|
+ <div class="mb-1 text-danger">
|
|
|
+ <i class="fa fa-exclamation-triangle"></i>
|
|
|
+ NA has not signed the bill
|
|
|
+ </div>
|
|
|
+ @endif
|
|
|
+ @endif
|
|
|
@endif
|
|
|
</div>
|
|
|
</td>
|
|
@@ -1348,6 +1380,9 @@
|
|
|
<thead class="bg-light">
|
|
|
<tr>
|
|
|
<th class="border-bottom-0 pl-3">HCP</th>
|
|
|
+ @if($note->ally_pro_id === $pro->id)
|
|
|
+ <th class="border-bottom-0 pl-3">NA</th>
|
|
|
+ @endif
|
|
|
<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>
|
|
@@ -1359,6 +1394,9 @@
|
|
|
@foreach ($note->bills as $bill)
|
|
|
<tr>
|
|
|
<td class="pl-3">{{ $bill->hcp->displayName() }}</td>
|
|
|
+ @if($note->ally_pro_id === $pro->id)
|
|
|
+ <td class="pl-3">{{ $note->allyPro->displayName() }}</td>
|
|
|
+ @endif
|
|
|
<td class="pl-3 {{ $bill->is_cancelled ? 'text-secondary' : '' }}">{{$bill->code}}</td>
|
|
|
{{--<td class="pl-2">
|
|
|
{{ $bill->reason1 }}
|
|
@@ -1388,10 +1426,18 @@
|
|
|
@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>
|
|
|
+ @if($bill->hcp_pro_id === $pro->id)
|
|
|
+ @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
|
|
|
+ @elseif($bill->na_pro_id === $pro->id)
|
|
|
+ @if($bill->has_na_been_paid)
|
|
|
+ <span class="text-dark">Processed:</span><span class="font-weight-bold text-success ml-2">${{ $bill->na_payment_amount }}</span>
|
|
|
+ @else
|
|
|
+ <span class="text-dark">Expected:</span><span class="font-weight-bold text-dark ml-2">{{ $bill->na_expected_payment_amount ? '$' . $bill->na_expected_payment_amount : '-' }}</span>
|
|
|
+ @endif
|
|
|
@endif
|
|
|
</td>
|
|
|
<td>
|
|
@@ -1406,7 +1452,7 @@
|
|
|
<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>
|
|
|
+ <a class="" href="" show start>Sign as HCP</a>
|
|
|
<form url="/api/bill/signAsHcp">
|
|
|
<input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
<p>Sign this bill as HCP?</p>
|
|
@@ -1417,6 +1463,29 @@
|
|
|
</form>
|
|
|
</span>
|
|
|
@endif
|
|
|
+ @if($bill->na_pro_id === $pro->id)
|
|
|
+ <span class="mx-2 text-secondary">|</span>
|
|
|
+ @if($bill->is_signed_by_na)
|
|
|
+ <span class="d-block text-secondary">
|
|
|
+ <i class="fa fa-check"></i>
|
|
|
+ NA Signed
|
|
|
+ </span>
|
|
|
+ @else
|
|
|
+ <span moe
|
|
|
+ class="d-block {{ $bill->na_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
|
|
|
+ title="{{ $bill->hcp_pro_id !== $pro->id ? 'Only the bill\'s NA can sign' : '' }}">
|
|
|
+ <a class="" href="" show start>Sign as NA</a>
|
|
|
+ <form url="/api/bill/signAsNa">
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
+ <p>Sign this bill as NA?</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
|
|
|
@endif
|
|
|
@if(!$bill->has_hcp_been_paid && $pro->pro_type === 'ADMIN')
|
|
|
<span class="mx-2 text-secondary">|</span>
|
|
@@ -1433,6 +1502,20 @@
|
|
|
</form>
|
|
|
</span>
|
|
|
@endif
|
|
|
+ @if(!$bill->has_na_been_paid && $bill->ally && $pro->pro_type === 'ADMIN')
|
|
|
+ <span class="d-block" moe relative="">
|
|
|
+ <a class="font-weight-bold" href="" show start>Submit Payment For NA</a>
|
|
|
+ <form url="/api/bill/payNaAmount" right>
|
|
|
+ <input type="hidden" name="uid" value="{{$bill->uid}}">
|
|
|
+ <p>Submit Payment For NA</p>
|
|
|
+ <div class="mb-0">
|
|
|
+ <input type="text" class="text form-control form-control-sm" name="naPaymentAmount" value="{{$bill->na_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">
|