Merge branch 'develop' into trunk

This commit is contained in:
Jérémy Munsch 2022-10-27 18:13:55 +02:00
commit ba4aa3e001
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 5 additions and 7 deletions

View file

@ -88,7 +88,7 @@ class EggController extends Controller
collect($inuavs)->map(function ($inuav) use ($mep) {
$mep->where('inuav_codes', 'LIKE', "%{$inuav}%");
});
$mep->where('transfert_date', '<', $datePonte)
$mep = $mep->where('transfert_date', '<', $datePonte)
->orderBy('transfert_date', 'DESC')->first();
if ($mep) {

View file

@ -76,14 +76,12 @@ abstract class CafelJobs implements ShouldQueue
$failed = $validator->invalid();
$this->invalidRows[] = collect($row)->put('validation_message', collect($e->errors())
->mapWithKeys(function (array $messages, string $attribute) use ($failed) {
if (!array_key_exists($attribute, $failed)) {
throw new \RuntimeException(
"ValidationException is missing faling data for '{$attribute}'"
);
$verifiedValue = '';
if (array_key_exists($attribute, $failed)) {
$verifiedValue = ' Valeur vérifiée : ' . \json_encode($failed[$attribute]);
}
return [
$attribute => collect($messages)->implode(', ') .
' Valeur vérifiée : ' . \json_encode($failed[$attribute])
$attribute => collect($messages)->implode(', ') . $verifiedValue
];
})->implode(' '))->all();
}