Fix esportazioni bancarie

This commit is contained in:
MatteoPistorello 2022-06-07 10:09:04 +02:00
parent 4f632cc15f
commit 7704505f66
1 changed files with 7 additions and 1 deletions

View File

@ -321,7 +321,13 @@ class Gestore
{
$documento = $scadenza->documento;
return $documento->id_banca_azienda ? Banca::find($documento->id_banca_azienda) : self::getBancaPredefinitaAzienda();
$banca = $documento->id_banca_azienda ? Banca::find($documento->id_banca_azienda) : '';
if (empty($banca)) {
$banca = self::getBancaPredefinitaAzienda();
}
return $banca;
}
public static function getBancaPredefinitaAzienda(): Banca