Account for fuel in the finance calculations #313

This commit is contained in:
Nabeel Shahzad
2019-07-23 08:41:20 -04:00
parent ee1c8ee3fa
commit 62a10224a0
31 changed files with 246 additions and 89 deletions

View File

@@ -72,7 +72,13 @@
</div>
<div class="form-group col-md-6">
{{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }}
{{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p>
@component('admin.components.info')
This is the cost per {{ config('phpvms.internal_units.fuel') }}
@endcomponent
</div>
</div>

View File

@@ -6,9 +6,9 @@
<th>Location</th>
<th>Hub</th>
<th style="text-align: center;">GH Cost</th>
<th style="text-align: center;">100LL</th>
{{--<th style="text-align: center;">100LL</th>--}}
<th style="text-align: center;">JetA</th>
<th style="text-align: center;">MOGAS</th>
{{--<th style="text-align: center;">MOGAS</th>--}}
<th></th>
</thead>
<tbody>
@@ -25,15 +25,15 @@
<td style="text-align: center;">
{{ $airport->ground_handling_cost }}
</td>
<td style="text-align: center;">
{{--<td style="text-align: center;">
<a class="inline" href="#" data-pk="{{ $airport->id }}" data-name="fuel_100ll_cost">{{ $airport->fuel_100ll_cost }}</a>
</td>
</td>--}}
<td style="text-align: center;">
<a class="inline" href="#" data-pk="{{ $airport->id }}" data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a>
</td>
<td style="text-align: center;">
{{--<td style="text-align: center;">
<a class="inline" href="#" data-pk="{{ $airport->id }}" data-name="fuel_mogas_cost">{{ $airport->fuel_mogas_cost }}</a>
</td>
</td>--}}
<td style="text-align: right;">
{{ Form::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }}
<a href="{{ route('admin.airports.edit', [$airport->id]) }}" class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>

View File

@@ -28,6 +28,7 @@
@endif
</td>
<td>&nbsp;</td>
@if ($on_edit_page === false)
<td>
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
<button type="submit"
@@ -35,5 +36,6 @@
<i class="fas fa-pencil-alt"></i>&nbsp;&nbsp;Edit</button>
</form>
</td>
@endif
</tr>
</table>

View File

@@ -135,7 +135,7 @@
<div class="row">
<!-- Flight Time Field -->
<div class="form-group col-sm-6">
<div class="form-group col-sm-3">
{{ Form::label('flight_time', 'Flight Time (hours & minutes):') }}
@if($pirep->read_only)
<p>
@@ -163,8 +163,30 @@
@endif
</div>
<!-- Block Fuel Field -->
<div class="form-group col-sm-2">
{{ Form::label('block_fuel', 'Block Fuel:') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('block_fuel', null, ['class' => 'form-control', 'min' => 0]) }}
<p class="text-danger">{{ $errors->first('block_fuel') }}</p>
</div>
</div>
</div>
<!-- Fuel Used Field -->
<div class="form-group col-sm-2">
{{ Form::label('fuel_used', 'Fuel Used:') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('fuel_used', null, ['class' => 'form-control', 'min' => 0]) }}
<p class="text-danger">{{ $errors->first('fuel_used') }}</p>
</div>
</div>
</div>
<!-- Level Field -->
<div class="form-group col-sm-6">
<div class="form-group col-sm-5">
{{ Form::label('level', 'Flight Level:') }}
<div class="row">
<div class="col-sm-12">