|
@@ -21,17 +21,18 @@
|
|
<input type="hidden" name="code"
|
|
<input type="hidden" name="code"
|
|
data-entity-type="{{$entityType}}"
|
|
data-entity-type="{{$entityType}}"
|
|
data-amount="{{ $genericRates[0]->amount }}"
|
|
data-amount="{{ $genericRates[0]->amount }}"
|
|
|
|
+ data-rate-type="{{ $genericRates[0]->is_hourly ? 'hourly' : 'flat' }}"
|
|
value="{{$genericRates[0]->code}}">
|
|
value="{{$genericRates[0]->code}}">
|
|
- <p class="mb-2">Service: <br><b>{{ $genericRates[0]->code }} (${{ $genericRates[0]->amount }}/hr)</b></p>
|
|
|
|
|
|
+ <p class="mb-2">Service: <br><b>{{ $genericRates[0]->code }} (${{ $genericRates[0]->amount }}{{$genericRates[0]->is_hourly ? '/hr' : ''}})</b></p>
|
|
@else
|
|
@else
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
- <label for="" class="text-secondary text-sm">Service</label>
|
|
|
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Service</label>
|
|
<select autofocus class="form-control" name="code"
|
|
<select autofocus class="form-control" name="code"
|
|
data-entity-type="{{$entityType}}"
|
|
data-entity-type="{{$entityType}}"
|
|
onchange="switchGenericRate(this)">
|
|
onchange="switchGenericRate(this)">
|
|
<option value="">-- Select Code --</option>
|
|
<option value="">-- Select Code --</option>
|
|
@foreach($genericPro->genericRates() as $genericRate)
|
|
@foreach($genericPro->genericRates() as $genericRate)
|
|
- <option data-amount="{{ $genericRate->amount }}" value="{{ $genericRate->code }}">
|
|
|
|
|
|
+ <option data-amount="{{ $genericRate->amount }}" data-rate-type="{{ $genericRate->is_hourly ? 'hourly' : 'flat' }}" value="{{ $genericRate->code }}">
|
|
{{ $genericRate->code }} (${{ $genericRate->amount }})
|
|
{{ $genericRate->code }} (${{ $genericRate->amount }})
|
|
</option>
|
|
</option>
|
|
@endforeach
|
|
@endforeach
|
|
@@ -40,29 +41,32 @@
|
|
@endif
|
|
@endif
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
<?php
|
|
<?php
|
|
- if(!@$maxMinutes) {
|
|
|
|
|
|
+ if (!@$maxMinutes) {
|
|
$maxMinutes = 30;
|
|
$maxMinutes = 30;
|
|
}
|
|
}
|
|
?>
|
|
?>
|
|
- <label for="" class="text-secondary text-sm">Minutes</label>
|
|
|
|
- <div class="mb-2">
|
|
|
|
- <select name="numberOfUnits" class="form-control form-control-sm"
|
|
|
|
- onchange="calculateGenericBillAmount(this)">
|
|
|
|
- <option value=""> -- select -- </option>
|
|
|
|
- <?php for ($i = 5; $i <= $maxMinutes; $i+=5) { ?>
|
|
|
|
- <option value="{{ $i/60 }}">{{ $i }} minutes</option>
|
|
|
|
- <?php } ?>
|
|
|
|
- </select>
|
|
|
|
|
|
+ <div class="minutesSelectContainer d-none">
|
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Minutes</label>
|
|
|
|
+ <div class="mb-2">
|
|
|
|
+ <select name="numMinutes" class="form-control form-control-sm"
|
|
|
|
+ onchange="minutesToUnits(this)">
|
|
|
|
+ <option value=""> -- select --</option>
|
|
|
|
+ <?php for ($i = 5; $i <= $maxMinutes; $i += 5) { ?>
|
|
|
|
+ <option value="{{ $i/60 }}">{{ $i }} minutes</option>
|
|
|
|
+ <?php } ?>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <input type="hidden" name="numberOfUnits" value="1">
|
|
<div class="mb-2" calculated-generic-amount></div>
|
|
<div class="mb-2" calculated-generic-amount></div>
|
|
</div>
|
|
</div>
|
|
@if($entityType !== 'Note')
|
|
@if($entityType !== 'Note')
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
- <label for="" class="text-secondary text-sm">Description</label>
|
|
|
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Description</label>
|
|
<input type="text" name="genericDescription" class="form-control form-control-sm" value="">
|
|
<input type="text" name="genericDescription" class="form-control form-control-sm" value="">
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@endif
|
|
<div class="mb-2">
|
|
<div class="mb-2">
|
|
- <label for="" class="text-secondary text-sm">Effective Date</label>
|
|
|
|
|
|
+ <label for="" class="text-secondary text-sm mb-1">Effective Date</label>
|
|
<input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
|
|
<input type="date" name="effectiveDate" class="form-control form-control-sm" value="{{date('Y-m-d')}}" required>
|
|
</div>
|
|
</div>
|