Fix pilot leave calculation #1022 (#1035)

* Fix pilot leave calculation #1022

* Remove unused imports

* Add logging where fares are being saved
This commit is contained in:
Nabeel S
2021-02-17 18:54:18 -05:00
committed by GitHub
parent 8907527872
commit cbb7d6e274
7 changed files with 114 additions and 24 deletions

View File

@@ -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();
}