* Fix pilot leave calculation #1022 * Remove unused imports * Add logging where fares are being saved
This commit is contained in:
@@ -286,9 +286,7 @@ class FareService extends Service
|
||||
*/
|
||||
public function getForPirep(Pirep $pirep)
|
||||
{
|
||||
$found_fares = PirepFare::where('pirep_id', $pirep->id)->get();
|
||||
|
||||
return $found_fares;
|
||||
return PirepFare::where('pirep_id', $pirep->id)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -313,6 +311,8 @@ class FareService extends Service
|
||||
$fare['pirep_id'] = $pirep->id;
|
||||
// other fields: ['fare_id', 'count']
|
||||
|
||||
Log::info('Saving fare pirep='.$pirep->id.', fare='.$fare['count']);
|
||||
|
||||
$field = new PirepFare($fare);
|
||||
$field->save();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user