|
@@ -1,5 +1,32 @@
|
|
<?php $genericPro = @$note && $note->allyPro ? $note->allyPro : $pro; ?>
|
|
<?php $genericPro = @$note && $note->allyPro ? $note->allyPro : $pro; ?>
|
|
<?php $genericRates = $genericPro->genericRates(); ?>
|
|
<?php $genericRates = $genericPro->genericRates(); ?>
|
|
|
|
+<?php $genericCompanyPro = $genericPro->defaultCompanyPro; ?>
|
|
|
|
+
|
|
|
|
+{{-- if no defaultCompanyPro on this pro, STOP --}}
|
|
|
|
+@if(!$genericPro->defaultCompanyPro)
|
|
|
|
+ <form url="/api/bill/createForGeneric">
|
|
|
|
+ <div class="border rounded bg-aliceblue p-2 text-nowrap">
|
|
|
|
+ <div class="mb-2 font-weight-bold">
|
|
|
|
+ <i class="fa fa-exclamation-triangle text-warning-mellow mr-2"></i>
|
|
|
|
+ Cannot create bill!
|
|
|
|
+ </div>
|
|
|
|
+ Default company pro is not set.
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+@else
|
|
|
|
+ {{-- if no generic rates for this pro, STOP --}}
|
|
|
|
+ @if(!$genericRates || !count($genericRates))
|
|
|
|
+ <form url="/api/bill/createForGeneric">
|
|
|
|
+ <div class="border rounded bg-aliceblue p-2 text-nowrap">
|
|
|
|
+ <div class="mb-2 font-weight-bold">
|
|
|
|
+ <i class="fa fa-exclamation-triangle text-warning-mellow mr-2"></i>
|
|
|
|
+ Cannot create bill!
|
|
|
|
+ </div>
|
|
|
|
+ No generic rates found for pro.
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ @else
|
|
|
|
+
|
|
<form url="/api/bill/createForGeneric">
|
|
<form url="/api/bill/createForGeneric">
|
|
@if(hasActiveGenericBill($genericPro, @$patient, @$entityType, @$entityUid))
|
|
@if(hasActiveGenericBill($genericPro, @$patient, @$entityType, @$entityUid))
|
|
<div class="border rounded bg-aliceblue p-2 width-200px">
|
|
<div class="border rounded bg-aliceblue p-2 width-200px">
|
|
@@ -34,3 +61,6 @@
|
|
@endif
|
|
@endif
|
|
</form>
|
|
</form>
|
|
@include('app.generic-bills.add-bill-form._default-script')
|
|
@include('app.generic-bills.add-bill-form._default-script')
|
|
|
|
+
|
|
|
|
+ @endif
|
|
|
|
+@endif
|