Compare commits
9 Commits
dependabot
...
dev
Author | SHA1 | Date | |
---|---|---|---|
|
ced2012578 | ||
|
00918f54aa | ||
|
41bd325f9a | ||
|
b4311b861f | ||
|
2f9e8583f2 | ||
|
2155979eb9 | ||
|
f30a3bc1ef | ||
|
3461672f10 | ||
|
b4d5114ea2 |
@ -169,7 +169,7 @@ class FareService extends Service
|
||||
}
|
||||
}
|
||||
|
||||
$fare->notes = '';
|
||||
// $fare->notes = '';
|
||||
$fare->active = true;
|
||||
|
||||
return $fare;
|
||||
|
@ -18,7 +18,7 @@ class AirportImporter extends ImportExport
|
||||
*/
|
||||
public static $columns = [
|
||||
'icao' => 'required',
|
||||
'iata' => 'required',
|
||||
'iata' => 'nullable',
|
||||
'name' => 'required',
|
||||
'location' => 'nullable',
|
||||
'country' => 'nullable',
|
||||
|
@ -33,7 +33,7 @@ class Money
|
||||
/**
|
||||
* Create from a dollar amount
|
||||
*
|
||||
* @param mixed $amount The amount in pennies
|
||||
* @param mixed $amount The amount in dollar
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws \InvalidArgumentException
|
||||
@ -52,12 +52,12 @@ class Money
|
||||
*
|
||||
* @param mixed $amount
|
||||
*
|
||||
* @return float|int
|
||||
* @return int
|
||||
*/
|
||||
public static function convertToSubunit($amount)
|
||||
{
|
||||
$currency = setting('units.currency', 'USD');
|
||||
return (int) $amount * config('money.'.$currency.'.subunit');
|
||||
return (int) ($amount * config('money.'.$currency.'.subunit'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8,6 +8,6 @@ return [
|
||||
'rejected' => 'Rechazado',
|
||||
'on_leave' => 'En excedencia',
|
||||
'suspended' => 'Suspendido',
|
||||
'deleted' => 'Borrar',
|
||||
'deleted' => 'Borrado',
|
||||
],
|
||||
];
|
||||
|
@ -270,7 +270,7 @@
|
||||
|
||||
<div class="row">
|
||||
<!-- Active Field -->
|
||||
<div class="col-sm-4">
|
||||
<div class="col-sm-3">
|
||||
<div class="checkbox">
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
@ -279,7 +279,17 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<!-- Visible Field -->
|
||||
<div class="col-sm-3">
|
||||
<div class="checkbox">
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::label('visible', 'Visible:') }}
|
||||
<input name="visible" type="hidden" value="0" />
|
||||
{{ Form::checkbox('visible') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-info']) }}
|
||||
</div>
|
||||
|
@ -9,6 +9,7 @@
|
||||
<th>Arr Time</th>
|
||||
<th>Notes</th>
|
||||
<th style="text-align: center;">Active</th>
|
||||
<th style="text-align: center;">Visible</th>
|
||||
<th colspan="3" style="text-align: right;">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -37,6 +38,13 @@
|
||||
<span class="label label-default">@lang('common.inactive')</span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
@if($flight->visible == 1)
|
||||
<span class="text-success"><i class="fas fa-check fa2x" title="Visible"></i></span>
|
||||
@else
|
||||
<span class="text-danger"><i class="fas fa-times fa2x" title="Hidden"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.flights.destroy', $flight->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.flights.edit', [$flight->id]) }}" class='btn btn-sm btn-success btn-icon'><i
|
||||
|
@ -12,6 +12,8 @@
|
||||
route_points: {!! json_encode($map_features['route_points']) !!},
|
||||
planned_route_line: {!! json_encode($map_features['planned_route_line']) !!},
|
||||
metar_wms: {!! json_encode(config('map.metar_wms')) !!},
|
||||
circle_color: '#056093',
|
||||
flightplan_route_color: '#8B008B',
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -213,43 +213,16 @@
|
||||
<h6><i class="fas fa-info-circle"></i> Prefile ATC Flight Plan</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-4" align="center">
|
||||
<form action="https://fpl.ivao.aero/api/fp/load" method="POST" target="_blank">
|
||||
<input type="hidden" name="CALLSIGN" value="{{ $simbrief->xml->atc->callsign }}"/>
|
||||
<input type="hidden" name="RULES" value="I"/>
|
||||
<input type="hidden" name="FLIGHTTYPE" value="N"/>
|
||||
<input type="hidden" name="NUMBER" value="1"/>
|
||||
<input type="hidden" name="ACTYPE" value="{{ $simbrief->xml->aircraft->icaocode }}"/>
|
||||
<input type="hidden" name="WAKECAT" value="{{ $wakecat }}"/>
|
||||
<input type="hidden" name="EQUIPMENT" value="{{ $equipment }}"/>
|
||||
<input type="hidden" name="TRANSPONDER" value="{{ $transponder }}"/>
|
||||
<input type="hidden" name="DEPICAO" value="{{ $simbrief->xml->origin->icao_code}}"/>
|
||||
<input type="hidden" name="DEPTIME" value="{{ date('Hi', $simbrief->xml->times->est_out->__toString()) }}"/>
|
||||
<input type="hidden" name="SPEEDTYPE" value="{{ $simbrief->xml->atc->initial_spd_unit }}"/>
|
||||
<input type="hidden" name="SPEED" value="{{ $simbrief->xml->atc->initial_spd }}"/>
|
||||
<input type="hidden" name="LEVELTYPE" value="{{ $simbrief->xml->atc->initial_alt_unit }}"/>
|
||||
<input type="hidden" name="LEVEL" value="{{ $simbrief->xml->atc->initial_alt }}"/>
|
||||
<input type="hidden" name="ROUTE" value="{{ $simbrief->xml->general->route_ifps }}"/>
|
||||
<input type="hidden" name="DESTICAO" value="{{ $simbrief->xml->destination->icao_code }}"/>
|
||||
<input type="hidden" name="EET" value="@secstohhmm($simbrief->xml->times->est_time_enroute)"/>
|
||||
<input type="hidden" name="ALTICAO" value="{{ $simbrief->xml->alternate->icao_code}}"/>
|
||||
<input type="hidden" name="ALTICAO2" value="{{ $simbrief->xml->alternate2->icao_code}}"/>
|
||||
<input type="hidden" name="OTHER" value="{{ $simbrief->xml->atc->section18 }}"/>
|
||||
<input type="hidden" name="ENDURANCE" value="@secstohhmm($simbrief->xml->times->endurance)"/>
|
||||
<input type="hidden" name="POB" value="{{ $simbrief->xml->weights->pax_count }}"/>
|
||||
<input id="ivao_prefile" type="submit" class="btn btn-primary" value="File ATC on IVAO"/>
|
||||
</form>
|
||||
<div class="col-3" align="center">
|
||||
<a href="{{ $simbrief->xml->prefile->ivao->link }}" target="_blank" class="btn btn-info">File > IVAO</a>
|
||||
</div>
|
||||
<div class="col-4" align="center">
|
||||
<form action="https://my.vatsim.net/pilots/flightplan" method="GET" target="_blank">
|
||||
<input type="hidden" name="raw" value="{{ $simbrief->xml->atc->flightplan_text }}">
|
||||
<input type="hidden" name="fuel_time" value="@secstohhmm($simbrief->xml->times->endurance)">
|
||||
<input type="hidden" name="speed" value="@if(substr($simbrief->xml->atc->initial_spd,0,1) === '0') {{ substr($simbrief->xml->atc->initial_spd,1) }} @else {{ $simbrief->xml->atc->initial_spd }} @endif">
|
||||
<input type="hidden" name="altitude" value="{{ $simbrief->xml->general->initial_altitude }}">
|
||||
<input id="vatsim_prefile" type="submit" class="btn btn-primary" value="File ATC on VATSIM"/>
|
||||
</form>
|
||||
<div class="col-3" align="center">
|
||||
<a href="{{ $simbrief->xml->prefile->vatsim->link }}" target="_blank" class="btn btn-info">File > VATSIM</a>
|
||||
</div>
|
||||
<div class="col-4" align="center">
|
||||
<div class="col-3" align="center">
|
||||
<a href="{{ $simbrief->xml->prefile->poscon->link }}" target="_blank" class="btn btn-info">File > POSCON</a>
|
||||
</div>
|
||||
<div class="col-3" align="center">
|
||||
<a
|
||||
href="http://skyvector.com/?chart=304&fpl={{ $simbrief->xml->origin->icao_code}} {{ $simbrief->xml->general->route }} {{ $simbrief->xml->destination->icao_code}}"
|
||||
target="_blank" class="btn btn-info">View Route At SkyVector</a>
|
||||
|
@ -72,16 +72,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="progress" style="margin: 20px 0;">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar"
|
||||
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
|
||||
style="width: {{$pirep->progress_percent}}%;">
|
||||
@if(!empty($pirep->distance))
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="progress" style="margin: 20px 0;">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar"
|
||||
aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
|
||||
style="width: {{$pirep->progress_percent}}%;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
@ -712,20 +712,20 @@ class FinanceTest extends TestCase
|
||||
|
||||
$journalRepo->post(
|
||||
$journal,
|
||||
Money::createFromAmount(100),
|
||||
Money::createFromAmount(100.5),
|
||||
null,
|
||||
$user
|
||||
);
|
||||
|
||||
$balance = $journalRepo->getBalance($journal);
|
||||
$this->assertEquals(100, $balance->getValue());
|
||||
$this->assertEquals(100, $journal->balance->getValue());
|
||||
$this->assertEquals(100.5, $balance->getValue());
|
||||
$this->assertEquals(100.5, $journal->balance->getValue());
|
||||
|
||||
// add another transaction
|
||||
|
||||
$journalRepo->post(
|
||||
$journal,
|
||||
Money::createFromAmount(25),
|
||||
Money::createFromAmount(24.5),
|
||||
null,
|
||||
$user
|
||||
);
|
||||
@ -912,7 +912,7 @@ class FinanceTest extends TestCase
|
||||
|
||||
// $this->assertCount(9, $transactions['transactions']);
|
||||
$this->assertEquals(3020, $transactions['credits']->getValue());
|
||||
$this->assertEquals(2050.0, $transactions['debits']->getValue());
|
||||
$this->assertEquals(2050.4, $transactions['debits']->getValue());
|
||||
|
||||
// Check that all the different transaction types are there
|
||||
// test by the different groups that exist
|
||||
@ -967,7 +967,7 @@ class FinanceTest extends TestCase
|
||||
|
||||
// $this->assertCount(9, $transactions['transactions']);
|
||||
$this->assertEquals(3020, $transactions['credits']->getValue());
|
||||
$this->assertEquals(2050.0, $transactions['debits']->getValue());
|
||||
$this->assertEquals(2050.4, $transactions['debits']->getValue());
|
||||
|
||||
// Check that all the different transaction types are there
|
||||
// test by the different groups that exist
|
||||
@ -1006,7 +1006,7 @@ class FinanceTest extends TestCase
|
||||
|
||||
$transactions = $journalRepo->getAllForObject($pirep2);
|
||||
$this->assertEquals(3020, $transactions['credits']->getValue());
|
||||
$this->assertEquals(2150.0, $transactions['debits']->getValue());
|
||||
$this->assertEquals(2150.4, $transactions['debits']->getValue());
|
||||
|
||||
// Check that all the different transaction types are there
|
||||
// test by the different groups that exist
|
||||
@ -1115,6 +1115,6 @@ class FinanceTest extends TestCase
|
||||
|
||||
// $this->assertCount(9, $transactions['transactions']);
|
||||
$this->assertEquals(3020, $transactions['credits']->getValue());
|
||||
$this->assertEquals(2050.0, $transactions['debits']->getValue());
|
||||
$this->assertEquals(2050.4, $transactions['debits']->getValue());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user