Add percentages as part of sample data #125
This commit is contained in:
parent
d5aef6fb87
commit
b8b4fe7a8a
@ -239,11 +239,11 @@ subfleet_fare:
|
|||||||
capacity: 400
|
capacity: 400
|
||||||
- subfleet_id: 1
|
- subfleet_id: 1
|
||||||
fare_id: 2
|
fare_id: 2
|
||||||
capacity: 20
|
price: 120%
|
||||||
- subfleet_id: 1
|
- subfleet_id: 1
|
||||||
fare_id: 3
|
fare_id: 3
|
||||||
price: 1000
|
price: 1000
|
||||||
capacity: 10
|
capacity: 110%
|
||||||
|
|
||||||
# Fare classes on the 777
|
# Fare classes on the 777
|
||||||
- subfleet_id: 2
|
- subfleet_id: 2
|
||||||
|
@ -395,6 +395,16 @@ class FlightController extends BaseController
|
|||||||
return $this->return_fares_view($flight);
|
return $this->return_fares_view($flight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($request->isMethod('delete')) {
|
||||||
|
$fare = $this->fareRepo->findWithoutFail($request->fare_id);
|
||||||
|
$this->fareSvc->delFareFromFlight($flight, $fare);
|
||||||
|
return $this->return_fares_view($flight);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->validate($request, [
|
||||||
|
'value' => 'nullable', // regex:/([\d%]*)/
|
||||||
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update specific fare data
|
* update specific fare data
|
||||||
*/
|
*/
|
||||||
@ -408,10 +418,6 @@ class FlightController extends BaseController
|
|||||||
$override[$request->name] = $request->value;
|
$override[$request->name] = $request->value;
|
||||||
$this->fareSvc->setForFlight($flight, $fare, $override);
|
$this->fareSvc->setForFlight($flight, $fare, $override);
|
||||||
} // dissassociate fare from teh aircraft
|
} // dissassociate fare from teh aircraft
|
||||||
elseif ($request->isMethod('delete')) {
|
|
||||||
$fare = $this->fareRepo->findWithoutFail($request->fare_id);
|
|
||||||
$this->fareSvc->delFareFromFlight($flight, $fare);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->return_fares_view($flight);
|
return $this->return_fares_view($flight);
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
<a href="http://docs.phpvms.net/concepts/finances"
|
<a href="http://docs.phpvms.net/concepts/finances"
|
||||||
target="_blank">Read documentation about finances</a>.
|
target="_blank">Read documentation about finances</a>.
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
|
<p class="text-danger">{{ $errors->first('value') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table id="flight_fares"
|
<table id="flight_fares"
|
||||||
|
Loading…
Reference in New Issue
Block a user